@font-face { font-family: "Press Start 2P"; src: url("/wilds/press-start-2p.woff2") format("woff2"); font-display: swap; }
:root { --bg: #141312; --shell: #262421; --shell-hi: #34312c; --ink: #f4efe2; --muted: #a39d90; --btn: #f4efe2; --btn-ink: #141312; color-scheme: dark; --ar: 160 / 144; --arw: 160; --arh: 144; }
html[data-system=gba] { --ar: 240 / 160; --arw: 240; --arh: 160; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex; flex-direction: column; align-items: center; overscroll-behavior: none; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
a { color: var(--ink); }
.top { width: 100%; max-width: 560px; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 13px; letter-spacing: .04em; }
.top span { font-family: "Press Start 2P", monospace; font-size: 11px; }
.top a { color: var(--muted); text-decoration: none; } .top a:hover { color: var(--ink); }
.console {
  --scrw: min(calc(100vw - 72px), calc((100dvh - 300px) * var(--arw) / var(--arh)), 520px);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 12px 14px 18px; border-radius: 14px 14px 36px 14px;
  background: linear-gradient(160deg, var(--shell-hi), var(--shell)); box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.bar { width: calc(var(--scrw) + 20px); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cart { font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools { display: flex; gap: 6px; flex: none; }
button { font: inherit; border: 0; cursor: pointer; }
.chip { background: #0d0d0c; color: var(--ink); font-size: 12px; padding: 6px 11px; border-radius: 999px; }
.chip:hover { background: #000; }
.menu { position: absolute; z-index: 20; top: 44px; right: 14px; display: flex; flex-direction: column; background: #0d0d0c; border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); min-width: 220px; }
.menu[hidden] { display: none; }
.menu button { text-align: left; background: none; color: var(--ink); padding: 9px 12px; border-radius: 6px; font-size: 13px; }
.menu button:hover { background: #222; }
.bezel { position: relative; background: #0b0b0a; padding: 10px; border-radius: 8px 8px 22px 8px; }
#game { width: var(--scrw); aspect-ratio: var(--ar); background: #0b0b0a; position: relative; overflow: hidden; }
.toast { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: var(--ink); padding: 6px 12px; border-radius: 6px; font-size: 12px; pointer-events: none; }
.toast[hidden] { display: none; }
/* Strip EmulatorJS chrome: this page supplies its own controls. */
#game .ejs_menu_bar, #game .ejs_virtualGamepad_parent, #game .ejs_context_menu, #game .ejs_start_button { display: none !important; }
#game canvas { image-rendering: pixelated; }
.shoulders { width: calc(var(--scrw) + 20px); display: flex; justify-content: space-between; margin-bottom: -4px; }
.shoulders[hidden] { display: none; }
.sh { background: #0d0d0c; color: var(--muted); font-family: "Press Start 2P", monospace; font-size: 10px; width: 84px; padding: 9px 0; border-radius: 10px; touch-action: none; }
.controls { width: calc(var(--scrw) + 20px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.dpad { position: relative; width: 116px; height: 116px; justify-self: start; touch-action: none; cursor: pointer; }
.dpad .arm, .dpad .hub { position: absolute; background: #0d0d0c; border-radius: 6px; }
.dpad .arm.h { left: 0; right: 0; top: 38px; height: 40px; } .dpad .arm.v { top: 0; bottom: 0; left: 38px; width: 40px; }
.dpad .hub { left: 46px; top: 46px; width: 24px; height: 24px; border-radius: 50%; background: #1d1c1a; }
.dpad[data-dir~=up] .arm.v { box-shadow: inset 0 40px 0 -2px #2c2a26; } .dpad[data-dir~=down] .arm.v { box-shadow: inset 0 -40px 0 -2px #2c2a26; }
.dpad[data-dir~=left] .arm.h { box-shadow: inset 40px 0 0 -2px #2c2a26; } .dpad[data-dir~=right] .arm.h { box-shadow: inset -40px 0 0 -2px #2c2a26; }
.mid { display: flex; flex-direction: column; gap: 10px; align-items: center; align-self: end; padding-bottom: 6px; }
.pill { font-family: "Press Start 2P", monospace; font-size: 8px; letter-spacing: .06em; color: var(--muted); background: #0d0d0c; padding: 7px 12px; border-radius: 999px; touch-action: none; }
.ab { justify-self: end; display: flex; gap: 14px; transform: rotate(-22deg); padding-right: 4px; }
.round { width: 54px; height: 54px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); font-family: "Press Start 2P", monospace; font-size: 13px; box-shadow: 0 4px 0 #8f897c; touch-action: none; }
.round.a { margin-top: -22px; }
.round.on, .pill.on, .sh.on { transform: translateY(3px); box-shadow: 0 1px 0 #8f897c; }
.help { max-width: 560px; padding: 14px 16px 24px; color: var(--muted); font-size: 12px; text-align: center; user-select: text; -webkit-user-select: text; }
.help p { margin: 6px 0; } .help b { color: var(--ink); font-weight: 600; }
html.embed .top, html.embed .help { display: none; }
html.embed body { justify-content: center; }
html.embed .console { --scrw: min(calc(100vw - 48px), calc((100vh - 230px) * var(--arw) / var(--arh))); border-radius: 0; box-shadow: none; background: var(--shell); width: 100vw; height: 100vh; justify-content: center; padding: 8px; gap: 8px; }
html.embed[data-system=gba] .console { --scrw: min(calc(100vw - 48px), calc((100vh - 270px) * var(--arw) / var(--arh))); }
html.embed .dpad { width: 104px; height: 104px; }
html.embed .dpad .arm.h { top: 34px; height: 36px; } html.embed .dpad .arm.v { left: 34px; width: 36px; }
html.embed .dpad .hub { left: 41px; top: 41px; width: 22px; height: 22px; }
html.embed .menu { top: 40px; right: 8px; }
.status { position: absolute; inset: 10px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: #a39d90; font-size: 13px; line-height: 1.5; pointer-events: none; white-space: pre-line; }
.status.err { color: #f4efe2; pointer-events: auto; background: #0b0b0a; }
.status[hidden] { display: none; }
