/**
 * 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{color:#78f78c;background:#030503;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}html,body,#root{min-width:320px;min-height:100%;margin:0}body{min-height:100vh;overflow:hidden;background:linear-gradient(rgba(40,255,79,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(40,255,79,.025) 1px,transparent 1px),#030503;background-size:28px 28px}body:after{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10;pointer-events:none;content:"";background:repeating-linear-gradient(0deg,rgba(0,0,0,.08),rgba(0,0,0,.08) 1px,transparent 1px,transparent 3px)}.app-shell{display:flex;flex-direction:column;width:100vw;height:100vh;padding:18px}.masthead{display:flex;flex:0 0 72px;align-items:center;justify-content:space-between;border-bottom:1px solid #21642f}.eyebrow{color:#6b8e6e;font-size:10px;letter-spacing:.2em}h1{margin:2px 0 0;color:#9affaa;font-size:28px;line-height:1;letter-spacing:.12em;text-shadow:0 0 18px rgba(68,255,99,.35)}.status{display:flex;align-items:center;gap:9px;color:#62ad6c;font-size:11px;letter-spacing:.12em}.status span{width:8px;height:8px;border-radius:50%;background:#5cff72;box-shadow:0 0 10px #5cff72}.status.working{color:#ffb547}.status.working span{background:#ffb547;box-shadow:0 0 10px #ffb547;animation:pulse .8s infinite alternate}.workspace{display:grid;flex:1;min-height:0;grid-template-columns:minmax(230px,27%) 1fr;gap:12px;padding-top:12px}button,textarea{font:inherit}button{border:1px solid #428b4e;color:#9affaa;background:#071309;cursor:pointer}button:hover{border-color:#ffb547;color:#ffce7b}button:disabled{cursor:wait;opacity:.45}.onboarding{display:grid;width:100vw;min-height:100vh;place-items:center;padding:clamp(24px,6vw,96px)}.intro-screen{grid-template-columns:minmax(360px,1fr) minmax(420px,.9fr);gap:7vw}.intro-visual{position:relative;width:100%;border:1px solid #174c24;background:#030a05e6;box-shadow:0 0 80px #2fe64e14}.intro-visual img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover;opacity:.08;filter:grayscale(1) contrast(1.8);mix-blend-mode:screen}.intro-visual .wren-intro-portrait{position:relative;z-index:1;display:block;aspect-ratio:1 / 1;height:auto;opacity:1;object-fit:contain;filter:contrast(1.06) saturate(.9);mix-blend-mode:normal}.portrait-scanlines{position:absolute;z-index:2;top:0;right:0;bottom:0;left:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(0,0,0,.2) 3px 4px)}.intro-visual .ascii-reveal{position:relative;z-index:1}.intro-visual pre{min-height:440px}.intro-copy h1,.idea-card h1{max-width:760px;margin:12px 0 30px;font-size:clamp(34px,5vw,72px);line-height:.98}.intro-sequence{min-height:220px;margin:26px 0}.intro-sequence p{margin:12px 0;color:#36583b;opacity:0;transform:translate(-12px);transition:.5s ease}.intro-sequence p.visible{color:#79c986;opacity:1;transform:none}.intro-sequence span{display:inline-block;width:40px;color:#ffb547}.intro-copy>button,.idea-actions button{padding:14px 20px;letter-spacing:.1em}.idea-screen{background:radial-gradient(circle at 50% 45%,rgba(32,120,48,.12),transparent 48%)}.prewarm-screen{grid-template-columns:minmax(420px,1fr) minmax(360px,.72fr);gap:clamp(32px,7vw,110px);background:radial-gradient(circle at 35% 45%,rgba(35,150,54,.1),transparent 48%)}.prewarm-visual{position:relative;width:100%;aspect-ratio:3 / 2;overflow:hidden;border:1px solid #246832;background:#000;box-shadow:0 0 90px #37ff5517}.prewarm-visual img{width:100%;height:100%;object-fit:contain;animation:prewarm-image-in .45s steps(5)}.prewarm-visual .wren-thinking-portrait{position:absolute;z-index:2;right:-2%;bottom:-10%;width:48%;height:auto;opacity:.94;filter:drop-shadow(-18px 0 22px #000)}.prewarm-visual i{z-index:3;position:absolute;top:0;right:0;bottom:0;left:0;background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(0,0,0,.24) 3px 4px)}.professor-status{display:flex;align-items:center;gap:10px}.professor-status>img{width:44px;height:44px;border:1px solid #386d40;object-fit:cover;object-position:center 20%;filter:contrast(1.1)}.export-storyboard,.start-again{margin-left:10px;padding:9px 12px;font-size:9px;letter-spacing:.12em}.export-storyboard{border-color:#9a681f;color:#ffce7b}.prewarm-copy h1{min-height:2.2em;margin:18px 0;font-size:clamp(34px,4.3vw,66px);line-height:1.05}.prewarm-copy p{max-width:560px;color:#6e9774;line-height:1.7}.cursor-block{color:#75ff8b;animation:visual-flicker .7s steps(1) infinite}.prewarm-meter{height:3px;margin:32px 0 12px;overflow:hidden;background:#14361b}.prewarm-meter span{display:block;width:100%;height:100%;transform-origin:left;background:#65e978;animation:prewarm-meter 1.4s linear}.prewarm-copy small{color:#486c4e}@keyframes prewarm-image-in{0%{opacity:0;filter:brightness(2);transform:translateY(8px)}to{opacity:1;filter:none;transform:none}}@keyframes prewarm-meter{0%{transform:scaleX(0)}to{transform:scaleX(1)}}.idea-card{width:min(880px,100%)}.idea-card>p{max-width:680px;color:#6e9774;line-height:1.7}.idea-card textarea{width:100%;min-height:210px;margin-top:30px;padding:24px;resize:vertical;border:1px solid #286338;outline:none;color:#b0fabb;background:#040d06eb;box-shadow:inset 0 0 40px #25a8390d;line-height:1.6}.idea-card textarea:focus{border-color:#65cf76;box-shadow:0 0 35px #34ce4d17}.idea-actions{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.idea-actions small,.narrative-panel small{color:#55745a}.form-error{color:#ff7373!important}.scene-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding-top:12px}.scene-strip button{min-width:0;padding:10px 12px;text-align:left}.scene-strip button span{display:block;margin-bottom:4px;color:#59785e;font-size:9px;letter-spacing:.1em}.scene-strip button strong{display:block;overflow:hidden;font-size:11px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.scene-strip button.active{border-color:#ffb547;box-shadow:inset 3px 0 #ffb547}.storyboard-workspace{padding-top:8px}.lower-grid{display:grid;min-height:0;grid-template-columns:.75fr 1.25fr;gap:12px}.narrative-panel{overflow:auto}.narrative-panel>p{margin:0;padding:18px;color:#94dda0;font-size:12px;line-height:1.65}.narrative-panel>small{display:block;padding:0 18px 18px;font-size:9px;line-height:1.5}.ascii-reveal{display:flex;flex:1;align-items:center;justify-content:center;min-height:0;margin:0;padding:10px;overflow:hidden;color:#74df86;font-family:Menlo,SFMono-Regular,DejaVu Sans Mono,Noto Sans Mono,Consolas,monospace;font-variant-ligatures:none;font-feature-settings:"liga" 0,"calt" 0;font-size:clamp(3px,.37vw,6px);line-height:1;text-align:center;text-shadow:0 0 7px rgba(75,255,106,.25);white-space:pre}.effect-scan{background:linear-gradient(transparent 48%,rgba(74,255,100,.08) 50%,transparent 52%)}.effect-blink{animation:visual-flicker .12s steps(2) 7}.effect-roll{animation:roll-in .45s ease-out}.generated-terminal-art{position:relative;display:flex;flex:1;min-height:0;align-items:center;justify-content:center;overflow:hidden;background:#000}.generated-terminal-art img{width:100%;height:100%;object-fit:contain;filter:contrast(1.08) saturate(.9)}.generated-terminal-art i{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;background:linear-gradient(transparent 50%,#00000029 50%),linear-gradient(90deg,#ff000004,#00ff0003,#0000ff04);background-size:100% 4px,6px 100%}.generated-terminal-art.effect-scan:after{position:absolute;right:0;left:0;height:18%;content:"";background:linear-gradient(transparent,rgba(105,255,125,.13),transparent);animation:terminal-image-scan 1.2s ease-out}@keyframes terminal-image-scan{0%{top:-20%}to{top:100%}}.right-column{display:grid;min-width:0;min-height:0;grid-template-rows:48% 1fr;gap:12px}.panel{min-width:0;min-height:0;border:1px solid #174c24;background:#030a05e0;box-shadow:inset 0 0 30px #1769270d}.panel-title{display:flex;height:34px;align-items:center;gap:10px;padding:0 10px;border-bottom:1px solid #174c24}.panel-title span{color:#ffb547;font-size:10px}.panel-title h2{margin:0;color:#5acf6d;font-size:11px;font-weight:500;letter-spacing:.14em}.panel-title i{flex:1;height:1px;background:linear-gradient(90deg,#174c24,transparent)}.state-panel{display:flex;flex-direction:column}.state-panel dl{flex:1;margin:0;padding:22px 18px}.state-panel dt{margin:0 0 7px;color:#486f4d;font-size:10px;letter-spacing:.14em}.state-panel dd{margin:0 0 28px;color:#98f7a7;font-size:13px;line-height:1.55}.state-panel ul{margin:0;padding:0;list-style:none}.state-panel li:before{margin-right:8px;color:#ffb547;content:"+"}.state-footer{display:flex;align-items:baseline;justify-content:space-between;padding:14px 18px;border-top:1px solid #174c24;color:#486f4d;font-size:10px;letter-spacing:.14em}.state-footer strong{color:#ffb547;font-size:22px}.visual-panel{display:flex;flex-direction:column}.visual-panel pre{display:flex;flex:1;align-items:center;justify-content:center;min-height:0;margin:0;padding:10px;overflow:hidden;color:#74df86;font-family:Menlo,SFMono-Regular,DejaVu Sans Mono,Noto Sans Mono,Consolas,monospace;font-size:clamp(5px,.69vw,10px);line-height:1;text-align:center;text-shadow:0 0 7px rgba(75,255,106,.25);white-space:pre}.command-panel{display:flex;flex-direction:column}.terminal-host{flex:1;min-height:0;padding:8px 10px}.terminal-host .xterm{height:100%}.terminal-host .xterm-viewport{scrollbar-color:#245b2e #050805}.dim{color:#486f4d}@keyframes pulse{to{opacity:.35}}@keyframes visual-flicker{50%{opacity:.66}}@keyframes roll-in{0%{transform:translateY(-16px);filter:blur(2px)}}@media (max-width: 760px){body{overflow:auto}.app-shell{height:auto;min-height:100vh;padding:10px}.workspace,.intro-screen{grid-template-columns:1fr}.intro-visual{display:none}.scene-strip{grid-template-columns:1fr 1fr}.lower-grid{grid-template-columns:1fr;grid-template-rows:260px 430px}.state-panel{min-height:260px}.right-column{grid-template-rows:330px 430px}.visual-panel pre{font-size:clamp(2px,.68vw,4px)}}
