@font-face{font-family:"Silkscreen";src:url("fonts/silkscreen-regular.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Silkscreen";src:url("fonts/silkscreen-bold.woff2") format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:"Jacquard 24";src:url("fonts/jacquard24-regular.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"VT323";src:url("fonts/vt323-regular.woff2") format("woff2");font-weight:400;font-display:swap}

/* Layout: one arcade cabinet screen, a slim masthead above and the control legend below. Single dark look by design. */
:root{
  --bg:#0b0609; --panel:#170b11; --line:#3b1822;
  --ink:#f1e4e8; --dim:#9c7d88; --blood:#e0244f; --cyan:#5ff2e6; --gold:#f2c14e;
  --display:"Silkscreen", ui-monospace, "Courier New", monospace;
  --logo:"Jacquard 24", "Silkscreen", serif;
  --mono:"VT323", ui-monospace, "Courier New", monospace;
  color-scheme:dark;
}
html,body{height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--mono);font-size:19px;line-height:1.35}
.wrap{max-width:1952px;margin:0 auto;padding-inline:16px;padding-block:14px;display:flex;flex-direction:column;gap:10px}
header{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:4px 16px}
h1{font-family:var(--logo);font-weight:400;font-size:34px;margin:0;color:var(--blood);letter-spacing:.02em;line-height:1}
header p{margin:0;color:var(--dim)}
.stage{position:relative;width:min(100%, max(480px, calc((100svh - 230px) * 5 / 3)));min-width:0;margin-inline:auto;max-width:100%;background:#000;border:1px solid var(--line);box-shadow:0 0 0 4px var(--panel), 0 0 40px rgba(224,36,79,.18)}
canvas{width:100%;height:auto;aspect-ratio:5/3;display:block;cursor:crosshair;touch-action:none}
.keys{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 20px;color:var(--dim)}
.keys span{white-space:nowrap}
kbd{font-family:var(--mono);font-size:18px;color:var(--ink);border:1px solid var(--line);border-bottom-width:2px;padding:0 5px;border-radius:3px;background:var(--panel)}
.touch{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:space-between;align-items:flex-end;padding:8px;pointer-events:none;gap:8px}
.pad{display:grid;grid-template-columns:repeat(2,auto);gap:6px}
.touch button{pointer-events:auto;font-family:var(--display);font-size:13px;color:var(--ink);background:rgba(23,11,17,.72);border:1px solid var(--line);border-radius:10px;width:58px;height:46px;touch-action:none;user-select:none;-webkit-user-select:none}
.touch[hidden]{display:none}
.touch button:active{background:rgba(224,36,79,.45)}
button:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
@media (max-width:640px){ .keys{font-size:16px} h1{font-size:22px} }
/* Phones: the touch pad sits under the canvas instead of covering it. */
@media (max-width:760px){ .touch{position:static;padding:10px 0 0;background:var(--bg)} .touch button{width:64px;height:52px} }
body.touching .keys{display:none}

*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;min-height:100svh;display:flex;flex-direction:column}
.masthead{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--panel)}
.brand{display:inline-flex;align-items:center;gap:8px;color:var(--dim);text-decoration:none;font-family:var(--mono);font-size:18px}
.brand img{display:block;height:22px;width:auto}
.brand:hover span,.brand:focus-visible span{color:var(--ink)}
.create-yours{font-family:var(--display);font-size:13px;letter-spacing:.06em;color:var(--bg);background:var(--gold);padding:8px 14px;border-radius:4px;text-decoration:none}
.create-yours:hover,.create-yours:focus-visible{background:var(--ink)}
.brand:focus-visible,.create-yours:focus-visible,.making a:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
.wrap{flex:1;width:100%}
.making{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 18px;margin:0;color:var(--dim)}
.making a{color:var(--gold)}
.site-foot{margin-top:auto}
:root{--exploration-footer-bg:#170b11;--exploration-footer-ink:#c9b3bb;--exploration-footer-border:#3b1822}
@media (max-width:640px){.stage{width:100%}}
/* Short landscape phones: keep the whole canvas above the fold. */
@media (max-height:520px){.intro{display:none}.masthead{padding:6px 16px}.wrap{padding-block:8px}.stage{width:min(100%, max(420px, calc((100svh - 70px) * 5 / 3)))}}
