:root{color-scheme:dark;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#080a0c;color:#e7ecef}
*{box-sizing:border-box}body{margin:0}main{max-width:1040px;margin:0 auto;padding:24px 20px 30px}a{color:#9ccfe9}a:focus-visible,button:focus-visible,select:focus-visible,canvas:focus-visible,summary:focus-visible{outline:2px solid #bce7ff;outline-offset:3px}.back{font-size:14px;text-decoration:none}.heading{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:18px 0 6px}h1{font-size:clamp(24px,4vw,34px);margin:0;letter-spacing:-.02em}.badge{border:1px solid #34404a;border-radius:4px;padding:5px 8px;color:#bdd7e5;font:12px ui-monospace,monospace}header p{color:#a5b0b7;margin:8px 0 22px;font-size:14px}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:12px 0}button,select{font:inherit;font-size:14px;border:1px solid #46505a;border-radius:4px;background:#161c22;color:#e9edf0;padding:8px 12px;cursor:pointer}button:hover:not(:disabled),select:hover{background:#252f37;border-color:#6c8596}button.primary{background:#c8e4f4;border-color:#c8e4f4;color:#111b21;font-weight:650}button:disabled{opacity:.48;cursor:default}.toolbar #status{font-size:13px;color:#b7c2ca;flex:1;min-width:180px}.secondary{margin:14px 0 10px}.secondary label{font-size:13px;color:#b7c2ca;display:flex;align-items:center;gap:7px}.secondary select{padding:7px 9px}#bell{font-size:12px;color:#bce7ff}.screen-shell{background:#003f68;border:1px solid #263c4a;border-radius:5px;padding:12px;margin-top:14px;overflow:hidden;display:flex;justify-content:center;align-items:center;min-height:216px}#screen-fit{position:relative;width:640px;height:384px;flex:none;overflow:hidden}#ftelnet{width:320px;height:192px;transform-origin:top left;transform:scale(2);margin:0}.fTelnetClientContainer{width:320px!important;height:192px!important;margin:0!important;border:0!important;opacity:1!important;overflow:hidden!important}.fTelnetCrtCanvas{display:block;image-rendering:pixelated;width:320px!important;height:192px!important}.fTelnetStatusBar,.fTelnetFocusWarning,.fTelnetScrollback,.fTelnetMenuButtons{display:none!important}.fTelnetKeyboardWrapper{max-width:100%;margin:14px auto}#keyboard-panel .fTelnetKeyboard{background:#080a0c!important}#keyboard-panel .fTelnetKeyboardKey{background:#17222a;border-color:#46505a;color:#edf3f6}.keys{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 20px}.keys button{min-width:40px;font:12px ui-monospace,monospace;padding:8px 11px}details{border-top:1px solid #26313a;padding:16px 0;color:#aebac2;font-size:14px;line-height:1.6}summary{cursor:pointer;color:#dce6ec}footer{font-size:12px;color:#8396a2;padding-top:12px}.screen-shell:fullscreen{width:100vw;height:100vh;max-width:none;border:0;border-radius:0;background:#003f68}body:has(.screen-shell:fullscreen){overflow:hidden}@media(max-width:520px){main{padding:18px 12px 24px}.screen-shell{padding:6px;min-height:204px}.toolbar #status{flex-basis:100%}.heading{gap:9px}.secondary{gap:7px}.secondary button{padding:8px 10px}}@media(pointer:coarse){button,select{min-height:44px}.keys button{min-height:44px;min-width:44px}}

/* Keep the terminal dark until Connect and after session shutdown. */
.screen-shell:not(.running){background:#000}
#screen-fit[hidden]{display:block!important;visibility:hidden}

/* Reserve the scrollbar gutter so Connect cannot change fitted width. */
:root{scrollbar-gutter:stable}

/* Fit the centred frame to the scaled Atari image, including while off. */
.screen-shell{width:fit-content;max-width:100%;min-height:0;margin-inline:auto}
.screen-shell:fullscreen{width:100vw;max-width:none}
