:root{color-scheme:dark;--bg:#0a1020;--panel:#151e34;--edge:#33466a;--text:#f4f7ff;--muted:#b9c8e6;--cyan:#88eaff;--sun:#ffb96a;font:16px/1.55 system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;color:var(--text);background:radial-gradient(ellipse at top right,#25325a,transparent 40rem),var(--bg)}
a{color:var(--cyan);text-underline-offset:.19em}button,input,select{font:inherit}
:focus-visible{outline:3px solid var(--sun);outline-offset:3px}
.top,.wrap,footer{max-width:72rem;margin:auto;padding:1rem clamp(1rem,4vw,3rem)}
.top{display:flex;flex-wrap:wrap;gap:.7rem 1.2rem;align-items:center;border-bottom:1px solid var(--edge)}
.brand{color:var(--text);font-weight:800;text-decoration:none}.kicker{font-weight:800;color:var(--sun);letter-spacing:.11em;text-transform:uppercase;font-size:.78rem}
h1{font-size:clamp(2rem,7vw,4.5rem);line-height:1.04;margin:.4rem 0 1rem}h2,h3{line-height:1.2}p{max-width:75ch}
.lede,.muted,small,footer{color:var(--muted)}.lede{font-size:1.15rem}.hero{display:grid;grid-template-columns:1.18fr .82fr;gap:2rem;align-items:center;padding-block:2.5rem}
.hero img{width:100%;height:auto;display:block;border:1px solid var(--edge);border-radius:.7rem;image-rendering:pixelated;background:#090f1d}
.links,.tools{display:flex;flex-wrap:wrap;gap:.55rem .8rem;align-items:center}
button,.button,input[type=search],select{border:1px solid var(--edge);border-radius:.45rem;padding:.48rem .75rem;color:var(--text);background:var(--panel)}
button,.button{cursor:pointer;font-weight:650;text-decoration:none}button[disabled]{opacity:.55;cursor:default}.primary{background:var(--cyan);color:#081223;border-color:transparent}
button[aria-pressed=true]{border-color:var(--cyan);background:#263d62}input[type=search]{max-width:100%}
.panel,.card{border:1px solid var(--edge);border-radius:.65rem;background:var(--panel);padding:1rem}.panel{margin:1rem 0}.card h2,.card h3{margin-top:0}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(16rem,100%),1fr));gap:1rem;margin:1rem 0}
.hero + .grid{grid-template-columns:repeat(auto-fit,minmax(min(13rem,100%),1fr))}.hero + .grid a{text-decoration:none}.hero + .grid h2{text-decoration:underline}.grid img{max-width:100%;height:auto;image-rendering:pixelated}
#emulator{position:relative;width:100%;aspect-ratio:4/3;max-height:min(69vh,43rem);background:#02040a;border:1px solid var(--edge);touch-action:none}
.play-area{max-width:57rem;margin:auto}.status{min-height:1.5rem;color:var(--sun);margin:.6rem 0}
.play-controls{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:.75rem 0}.key{color:var(--cyan);font-family:monospace}
audio{display:block;width:100%;margin:.8rem 0}ol.results{padding:0;list-style:none}
.results li{display:flex;align-items:center;gap:.8rem;justify-content:space-between;flex-wrap:wrap;padding:.5rem 0;border-bottom:1px solid var(--edge)}
.results li > button{text-align:left}.results li[aria-current=true]{color:var(--sun)}
dialog{color:var(--text);background:var(--panel);border:1px solid var(--edge);border-radius:.65rem;max-width:95vw;width:62rem;max-height:92vh}
dialog::backdrop{background:#000b}.image-window{overflow:auto;max-height:67vh;background:#0a1020;margin:.6rem 0}.image-window img{display:block;image-rendering:pixelated;max-width:none}
[hidden]{display:none!important}
@media(max-width:640px){.hero{grid-template-columns:1fr;gap:1rem;padding-block:1.5rem}.hero img{max-width:32rem}.tools label{max-width:100%}#emulator{max-height:none}}


.image-window canvas{image-rendering:pixelated;vertical-align:top;max-width:100%}
#frame-status{font-variant-numeric:tabular-nums}
