@font-face { font-family: "IBM VGA"; src: url("/fonts/ansiapps/WebPlus_IBM_VGA_8x16.woff") format("woff"); font-display: block; }
:root { --ink: #2b2233; --panel: #3b2f46; --panel2: #4d3f5a; --line: #f1d9a8; --text: #fbf7ee; --gold: #f2c14e; --kal: #6fe3d4; --bad: #ff8a7a; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font-family: "IBM VGA", monospace; font-size: 16px; overscroll-behavior: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
#stage { position: fixed; inset: 0; display: grid; place-items: stretch; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#screen { width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; background: var(--ink); }
[hidden] { display: none !important; }
#splash { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; background: var(--ink); z-index: 10; padding: 24px; }
#splash h1 { margin: 0; font-weight: normal; font-size: 32px; color: var(--gold); letter-spacing: 4px; }
#splash p { margin: 0; max-width: 32ch; }
#load { width: min(280px, 70vw); height: 12px; justify-self: center; appearance: none; border: 2px solid var(--line); background: var(--panel); }
#load::-webkit-progress-bar { background: var(--panel); }
#load::-webkit-progress-value { background: var(--kal); }
#load::-moz-progress-bar { background: var(--kal); }
.box { background: var(--panel); border: 3px solid var(--line); box-shadow: 0 0 0 3px var(--ink), 4px 4px 0 3px var(--ink); padding: 12px 14px; }
button, input { font: inherit; color: var(--text); }
button { background: var(--panel2); border: 2px solid var(--line); padding: 6px 12px; cursor: pointer; min-height: 36px; }
button:hover { background: #5d4d6c; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
input { background: var(--ink); border: 2px solid var(--line); padding: 8px 10px; width: 100%; }
#panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 92vw); z-index: 5; display: grid; gap: 10px; max-height: 92vh; overflow: auto; }
#panel h2 { margin: 0; font-weight: normal; color: var(--gold); }
#panel p { margin: 0; color: #e6dcc8; }
#toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: 92vw; z-index: 4; pointer-events: none; text-align: center; }
#toast.bad { border-color: var(--bad); }
#hint { position: absolute; left: 8px; right: 8px; top: 44px; z-index: 3; pointer-events: none; text-align: center; color: var(--line); text-shadow: 2px 2px 0 var(--ink); }
#bar { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 4; }
#build { position: absolute; right: 8px; top: 8px; z-index: 4; display: grid; gap: 6px; max-height: 70vh; overflow: auto; width: min(220px, 46vw); }
#build button { text-align: left; display: flex; justify-content: space-between; gap: 8px; }
#pad { position: absolute; right: 8px; bottom: 8px; z-index: 4; display: none; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 56px); gap: 4px; }
#pad button { min-height: 0; padding: 0; font-size: 22px; }
#pad .u { grid-column: 2; grid-row: 1; } #pad .l { grid-column: 1; grid-row: 2; } #pad .d { grid-column: 2; grid-row: 3; } #pad .r { grid-column: 3; grid-row: 2; } #pad .a { grid-column: 3; grid-row: 3; background: var(--gold); color: var(--ink); }
@media (pointer: coarse) { #pad { display: grid; } #bar { bottom: 188px; } #toast { bottom: 250px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
#nudge { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); width: min(420px, 92vw); z-index: 6; display: grid; gap: 8px; }
#nudge p { margin: 0; }
#panel .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#panel .prov { display: grid; gap: 6px; }
