:root{color-scheme:dark;--background:#070707;--foreground:#eeeeec;--muted:#aaa;--green:#8ae234;--blue:#8eb9e8;--orange:#e9a16b;--mono:'SFMono-Regular',Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace}
*{box-sizing:border-box}
html,body{width:100%;height:100%;min-width:300px;margin:0;background:var(--background)}
body{font-family:var(--mono);font-size:13px;line-height:1.5;font-variant-ligatures:none;color:var(--foreground);-webkit-font-smoothing:antialiased}
button,input{font:inherit}
button{border:0;border-radius:0;cursor:pointer;color:inherit;background:none;touch-action:manipulation}
button:disabled{cursor:default}
a{color:var(--blue);text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
a:hover{color:#c7e1ff}
button:focus-visible,a:focus-visible{outline:1px dashed var(--foreground);outline-offset:4px}
::selection{background:#ccc;color:#070707}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.terminal{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.window-bar{height:40px;min-height:40px;background:#242424;border-bottom:1px solid #111;display:grid;grid-template-columns:36px 1fr 36px;align-items:center;padding:0 12px;gap:12px;box-shadow:0 1px 0 #3a3a3a;position:relative;z-index:1;user-select:none}
.terminal-icon{font-size:13px;border:1px solid #bdb7bb;width:22px;height:18px;display:grid;place-items:center;line-height:1;color:#ded8dc}
.window-title{font-size:13px;font-weight:700;text-align:center;color:#e0dadd;letter-spacing:.1px}
.window-help{width:29px;height:27px;font-size:16px;line-height:1;justify-self:end;color:#bbb;border:1px solid #4a4a4a;background:#333}
.window-help:hover{background:#444;color:white}
.viewport{flex:1;min-height:0;overflow:auto;padding:4px 6px 12px;scrollbar-color:#444 transparent;scrollbar-width:thin}
.viewport::-webkit-scrollbar{width:9px}.viewport::-webkit-scrollbar-thumb{background:#444;border:2px solid var(--background);border-radius:9px}
.scrollback{max-width:90ch}
.entry{margin:0 0 1em}
.command-line,.input-line{display:flex;align-items:baseline;gap:.65ch;min-height:1.45em}
.command-line{white-space:pre-wrap;overflow-wrap:anywhere}
.prompt{white-space:nowrap;flex:none;user-select:none}
.user{color:var(--green);font-weight:700}.path{color:var(--blue);font-weight:700}.punctuation,.dollar{color:var(--foreground)}
.dollar{margin-left:.08ch}
.command-text{white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}
.output{margin:.45em 0 0;max-width:78ch;white-space:pre-wrap;overflow-wrap:anywhere}
.output p{margin:0 0 .65em}.output p:last-child{margin-bottom:0}
.output h2,.output h3{font:inherit;font-weight:700;margin:0 0 .65em}
.intro-output{width:min(53ch,100%);margin-top:.45em;white-space:normal}
.terminal-logo{font:inherit;font-size:clamp(8px,2.7vw,13px);line-height:1.08;letter-spacing:0;color:#aaa;white-space:pre;overflow-wrap:normal;margin:0 0 .5em}
h1{font:inherit;font-weight:700;margin:0 0 .7em}
.shortcuts{display:flex;gap:.2ch 1.4ch;flex-wrap:wrap;margin-top:1.1em;color:var(--muted);white-space:normal;align-items:center}
.intro-output .shortcuts{justify-content:space-between;gap:.25ch .35ch;margin-top:12px}
.intro-output .shortcuts>button{font-size:clamp(11px,2.9vw,12px)}
.shortcuts>button{padding:3px 0;line-height:1.5;font-size:inherit;min-height:32px}
.shortcuts>button:hover{color:var(--foreground)}
kbd{font:inherit;font-weight:700;color:var(--orange);padding:0 0 0 0}
kbd::before{content:'['}kbd::after{content:']'}
.input-line{max-width:100%;margin:0;position:relative}
.input-slot{position:relative;flex:1;min-width:30px;display:block;line-height:1.45}
#command-input{width:100%;min-width:0;margin:0;padding:0;border:0;border-radius:0;outline:none;background:transparent;color:var(--foreground);line-height:1.45;caret-color:var(--foreground);appearance:none}
.input-slot.is-empty #command-input{caret-color:transparent}
.block-cursor{position:absolute;left:0;top:.16em;width:.5em;height:1.08em;background:var(--foreground);pointer-events:none;animation:cursor-blink 1.05s steps(1,end) infinite;opacity:.9}
.input-slot:not(.is-empty) .block-cursor{display:none}
@keyframes cursor-blink{0%,49%{opacity:.9}50%,100%{opacity:0}}
.muted{color:var(--muted)}.accent{color:var(--orange)}.success{color:var(--green)}.error{color:#f19b90}
.file-list{display:flex;flex-wrap:wrap;gap:.2em 1.7ch;white-space:normal}
.file-link{padding:0;color:var(--blue);text-align:left;line-height:1.6;min-height:1.6em}
.file-link:hover{text-decoration:underline;text-underline-offset:4px;color:#c8e0ff}
.hidden-file{color:var(--muted)}
.help-grid{display:grid;grid-template-columns:minmax(10ch,17ch) 1fr;column-gap:2ch;row-gap:.1em;white-space:normal}
.help-command{color:var(--orange)}
.reconnect{margin-top:.5em;padding:0;color:var(--orange);text-align:left;text-decoration:underline;text-underline-offset:4px}
.terminal-game{margin:.55em 0 .3em;max-width:660px;outline:none}
.game-title{font-weight:700;margin:0 0 .2em}
.game-meter{color:var(--muted);font-size:inherit;white-space:pre-wrap;margin-bottom:.75em}
.game-cards{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;white-space:normal}
.game-card{flex:0 0 auto;font-size:16px;font-weight:400;padding:0;display:flex;flex-direction:column;align-items:center;text-align:center;white-space:normal;line-height:1.25;color:var(--foreground);letter-spacing:0;min-width:0}
.game-card-face{display:grid;place-items:center;width:6ch;height:4.25em;border:1px solid currentColor}
.game-card-value{display:flex;align-items:center;justify-content:center;gap:.25ch;white-space:nowrap;line-height:1}
.game-card-suit{display:block;min-width:1ch;text-align:center}
.game-card-key{font-size:12px;line-height:1.5;margin-top:4px;min-height:1.5em}
.game-card:disabled{opacity:1;color:var(--muted)}
.game-card.is-red{color:#e7a2a2}
.game-card.is-held{color:var(--green)}
.game-card.is-held .game-card-key{font-weight:700}
button.game-card:not(:disabled):hover{color:var(--orange)}
.blackjack-cards{row-gap:8px}
.blackjack-hand-label{font-size:inherit;color:var(--muted);margin:.8em 0 .35em!important}
.game-rule{font-size:12px;color:var(--muted);margin:0 0 .7em!important}
.game-status{margin:.65em 0;font-size:inherit;white-space:pre-wrap;min-height:0}
.game-actions{display:flex;flex-wrap:wrap;gap:.2em 1.5ch;font-size:inherit;margin-top:.7em;color:var(--orange)}
.game-actions>button{padding:3px 0;min-height:30px;text-align:left}
.game-actions>button:hover{color:#ffe1b9}
.game-actions>button:disabled{opacity:.5}
.game-result{color:var(--green)}
@media(max-width:600px){.window-bar{height:36px;min-height:36px;padding-left:10px;padding-right:10px;gap:4px}.window-title{font-size:12px}.shortcuts{gap:0 1.2ch;margin-top:.9em}.shortcuts>button{min-height:40px}.entry{margin-bottom:1em}.help-grid{grid-template-columns:10ch 1fr;column-gap:1ch}.game-cards{gap:6px}.game-actions{column-gap:1ch}.game-actions>button{min-height:40px}.file-list{gap:.2em 1.4ch}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;scroll-behavior:auto!important}}
