:root { --orange: #FF5E00; --black: #050505; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--orange); color: #000; font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 12px 10px 20px; touch-action: manipulation; }
.top { width: min(960px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.top a.back { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: 15px; color: #000; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.top a.back:hover { color: #fff; }
.sticker { display: inline-block; padding: 5px 10px; background: #000; color: var(--orange); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; border-radius: 6px; transform: rotate(-3deg); box-shadow: 0 0 0 3px #fff; }
.langs { display: inline-flex; gap: 2px; background: #0c0c0c; border: 2px solid #2a2a2a; border-radius: 999px; padding: 3px; }
.langs button { padding: 4px 10px; border-radius: 999px; border: 0; background: none; color: #9a938d; font: inherit; font-weight: 700; letter-spacing: .1em; font-size: 12px; cursor: pointer; }
.langs button.on { background: var(--orange); color: #000; }
/* the screen never gets taller than the window: width follows the height on wide, low screens */
.device { position: relative; width: min(960px, 100%, calc((100vh - 120px) * 1.7778)); width: min(960px, 100%, calc((100dvh - 120px) * 1.7778)); min-width: min(100%, 300px); border-radius: 26px; background: linear-gradient(180deg, #262626 0%, #141414 38%, #070707 100%); border: 3px solid #0b0b0b; box-shadow: 0 0 0 3px rgba(255, 150, 80, .55), 0 22px 46px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -5px 0 rgba(0, 0, 0, .75); padding: 14px; }
body.portrait .device { width: min(560px, 100%); }
.screen { position: relative; width: 100%; background: #000; border-radius: 14px; overflow: hidden; border: 3px solid #000; box-shadow: inset 0 0 0 2px #1a1a1a, inset 0 0 40px rgba(0, 0, 0, .8); }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 384 / 216; image-rendering: pixelated; image-rendering: crisp-edges; background: #0b0d1a; touch-action: none; }
.ov { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; color: #fff; background: rgba(0, 0, 0, .72); overflow-y: auto; }
.ov.on { display: flex; }
.ov h1, .ov h2 { font-family: "Press Start 2P", monospace; text-transform: uppercase; color: #fff; margin: 0 0 8px; line-height: 1.5; text-shadow: 3px 3px 0 #000; }
.ov h1 { font-size: clamp(14px, 3.4vw, 30px); } .ov h1 .o, .ov h2 { color: var(--orange); }
.ov h2 { font-size: clamp(12px, 2.4vw, 20px); }
.ov p { margin: 3px 0; font-size: clamp(13px, 1.8vw, 17px); color: #d8d2cc; font-weight: 600; letter-spacing: .04em; max-width: 640px; }
.ov .big { font-family: "Press Start 2P", monospace; font-size: clamp(16px, 3vw, 30px); color: #fff; margin: 8px 0; }
.ov .big.count { font-size: clamp(30px, 7vw, 64px); color: var(--orange); text-shadow: 4px 4px 0 #000; }
.ov .muted { color: #8C8580; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.ov .ctl { color: #b3aba5; line-height: 1.5; margin-top: 8px; }
.ov .tips { text-transform: none; letter-spacing: .02em; font-size: 12px; max-width: 560px; }
.btn { display: inline-flex; align-items: center; justify-content: center; margin: 10px 4px 0; padding: 9px 26px 11px; border-radius: 999px; border: 0; cursor: pointer; background: linear-gradient(180deg, #FF9A55 0%, var(--orange) 50%, #D64D00 100%); color: #1B0A00; font-family: "Press Start 2P", monospace; font-size: clamp(9px, 1.5vw, 13px); text-transform: uppercase; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -5px 0 rgba(0, 0, 0, .3), 0 10px 20px rgba(0, 0, 0, .35), 0 0 0 3px #0b0b0b; transition: transform .12s; }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; cursor: default; transform: none; }
.btn.ghost { background: linear-gradient(180deg, #303030 0%, #121212 45%, #030303 100%); color: var(--orange); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), inset 0 -5px 0 rgba(0, 0, 0, .85), 0 10px 20px rgba(0, 0, 0, .38), 0 0 0 3px rgba(255, 150, 80, .55); }
.row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; width: 100%; }
.tile { flex: 0 1 170px; display: flex; align-items: center; gap: 8px; text-align: left; background: linear-gradient(180deg, #2a2a2a, #111); border: 3px solid #0b0b0b; border-radius: 12px; padding: 6px 10px 6px 6px; cursor: pointer; box-shadow: 0 0 0 2px rgba(255, 150, 80, .35), 0 8px 18px rgba(0, 0, 0, .5); color: #fff; font: inherit; transition: transform .12s; }
.tile:hover { transform: translateY(-2px); }
.tile.on { box-shadow: 0 0 0 3px var(--orange), 0 10px 22px rgba(0, 0, 0, .6); background: linear-gradient(180deg, #3a2210, #140a04); }
.tile .ic { flex: none; width: 44px; height: 54px; image-rendering: pixelated; object-fit: contain; }
.tile b { display: block; font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--orange); line-height: 1.5; }
.tile span { display: block; font-size: 13px; color: #d8d2cc; font-weight: 600; margin-top: 3px; line-height: 1.2; }
.opts { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.opts button { border: 2px solid #333; background: #0c0c0c; color: #b3aba5; border-radius: 999px; padding: 5px 12px; font: inherit; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.opts button.on { background: var(--orange); color: #000; border-color: var(--orange); }
.tbtns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.banner { position: absolute; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; font-family: "Press Start 2P", monospace; color: var(--orange); font-size: clamp(11px, 2.6vw, 22px); text-shadow: 3px 3px 0 #000, 0 0 16px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .25s; text-transform: uppercase; padding: 0 8px; }
.banner.on { opacity: 1; }
.banner small { display: block; font-size: 55%; color: #fff; margin-top: 8px; }
.hint { width: min(960px, 100%); margin-top: 10px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: #2a1200; }
.hint button { border: 0; background: none; font: inherit; font-weight: 800; cursor: pointer; color: #000; text-transform: uppercase; letter-spacing: .1em; padding: 0; }
.hint button:hover { color: #fff; }
.hint .legal a { color: #2a1200; text-decoration: none; } .hint .legal a:hover { color: #fff; }

/* ---------- touch pad ---------- */
.pad { display: none; position: relative; width: 100%; margin-top: 12px; justify-content: space-between; align-items: center; gap: 10px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
body.touch .pad { display: flex; }
.dpad { position: relative; flex: none; width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle, #1d1d1d 0%, #0c0c0c 70%); box-shadow: 0 0 0 3px #0b0b0b, 0 0 0 5px rgba(255, 150, 80, .45), inset 0 2px 0 rgba(255, 255, 255, .1); touch-action: none; }
.dpad::before, .dpad::after { content: ""; position: absolute; background: #2c2c2c; border-radius: 6px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), inset 0 -3px 0 rgba(0, 0, 0, .6); }
.dpad::before { left: 14px; right: 14px; top: 46px; height: 36px; } .dpad::after { top: 14px; bottom: 14px; left: 46px; width: 36px; }
.dpad i { position: absolute; z-index: 1; width: 0; height: 0; border: 8px solid transparent; pointer-events: none; }
.dpad .au { left: 56px; top: 18px; border-bottom-color: #8C8580; } .dpad .ad { left: 56px; bottom: 18px; border-top-color: #8C8580; }
.dpad .al { top: 56px; left: 18px; border-right-color: #8C8580; } .dpad .ar { top: 56px; right: 18px; border-left-color: #8C8580; }
.dpad.u .au { border-bottom-color: var(--orange); } .dpad.d .ad { border-top-color: var(--orange); } .dpad.l .al { border-right-color: var(--orange); } .dpad.r .ar { border-left-color: var(--orange); }
.pbtns { position: relative; flex: none; width: 190px; height: 128px; }
.pb { position: absolute; border: 0; border-radius: 50%; cursor: pointer; touch-action: none; font-family: "Press Start 2P", monospace; font-size: 8px; text-transform: uppercase; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
.pb span { pointer-events: none; }
.pa { right: 0; bottom: 6px; width: 74px; height: 74px; background: linear-gradient(180deg, #FF9A55 0%, var(--orange) 50%, #D64D00 100%); color: #1B0A00; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -5px 0 rgba(0, 0, 0, .3), 0 0 0 3px #0b0b0b; }
.pbb { right: 84px; bottom: 0; width: 60px; height: 60px; background: linear-gradient(180deg, #303030 0%, #121212 45%, #030303 100%); color: var(--orange); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), inset 0 -5px 0 rgba(0, 0, 0, .85), 0 0 0 3px rgba(255, 150, 80, .55); }
.pc { right: 66px; top: 0; width: 50px; height: 50px; background: linear-gradient(180deg, #4a1a12 0%, #2a0c08 60%, #120403 100%); color: #ffb37a; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15), inset 0 -4px 0 rgba(0, 0, 0, .7), 0 0 0 3px rgba(255, 150, 80, .55); font-size: 7px; }
.pb.on { transform: translateY(2px) scale(.96); filter: brightness(1.25); }
.pp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 42px; height: 30px; border-radius: 999px; border: 2px solid #333; background: #0c0c0c; color: #b3aba5; font-family: "Press Start 2P", monospace; font-size: 9px; cursor: pointer; }
@media (max-width: 600px) {
  body { padding: 8px 6px 14px; } .device { padding: 8px; border-radius: 18px; } .screen { border-radius: 10px; } .top a.back span.t { display: none; }
  .ov { padding: 8px; justify-content: flex-start; padding-top: 12px; }
  .ov .tag { font-size: 13px; } .ov .tips { display: none; }
  .tile { flex-basis: 140px; padding: 4px 8px 4px 4px; } .tile .ic { width: 32px; height: 40px; } .tile span { display: none; }
  .btn { margin-top: 8px; }
}
/* phone held sideways: the screen fills the height, pad and buttons sit in the free space left and right */
@media (orientation: landscape) and (max-height: 520px) {
  body { padding: 4px 6px 6px; } .top { margin-bottom: 4px; }
  /* the legal links stay reachable (scroll down a little), only the key hint and the sound switch go */
  .hint { margin-top: 6px; justify-content: center; font-size: 10px; } .hint > span:not(.legal) { display: none; }
  body.touch .device { width: min(100%, calc((100vh - 64px) * 1.7778)); width: min(100%, calc((100dvh - 64px) * 1.7778)); padding: 6px; }
  body.touch .pad { position: fixed; left: 8px; right: 8px; bottom: 10px; margin: 0; pointer-events: none; z-index: 5; align-items: flex-end; }
  body.touch .pad > * { pointer-events: auto; opacity: .85; }
  body.touch .dpad { width: 112px; height: 112px; } body.touch .dpad::before { top: 40px; height: 32px; left: 12px; right: 12px; } body.touch .dpad::after { left: 40px; width: 32px; top: 12px; bottom: 12px; }
  body.touch .dpad .au { left: 48px; top: 16px; } body.touch .dpad .ad { left: 48px; bottom: 16px; } body.touch .dpad .al { top: 48px; left: 16px; } body.touch .dpad .ar { top: 48px; right: 16px; }
  body.touch .pbtns { width: 118px; height: 178px; }
  body.touch .pa { right: 0; bottom: 0; width: 66px; height: 66px; }
  body.touch .pbb { right: 54px; bottom: 56px; width: 54px; height: 54px; }
  body.touch .pc { right: 2px; bottom: 116px; top: auto; width: 48px; height: 48px; }
  body.touch .pp { left: 32px; top: auto; bottom: 130px; transform: none; }
  .ov h1 { font-size: 14px; } .ov .tips { display: none; }
}

/* fullscreen toggle next to the sound switch */
.hint #btn-fs { margin-right: 14px; }
.hint #btn-fs.on { color: #fff; }

/* controls card at the start of the stage (gone after the first hits) */
.help { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); min-width: min(330px, 86%); max-width: 92%; padding: 10px 16px 10px; background: rgba(5, 5, 5, .82); border: 2px solid var(--orange); border-radius: 12px; color: #fff; pointer-events: none; opacity: 0; transition: opacity .35s; box-shadow: 0 10px 26px rgba(0, 0, 0, .55); display: none; }
.help.on { display: block; opacity: 1; }
.help b { display: block; font-family: "Press Start 2P", monospace; font-size: clamp(9px, 1.5vw, 13px); color: var(--orange); text-transform: uppercase; text-align: center; margin-bottom: 8px; }
.help .hr { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0; font-size: clamp(14px, 2vw, 19px); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.help .hr i { font-style: normal; text-align: right; color: #d8d2cc; font-weight: 700; text-transform: none; }
.help kbd { display: inline-block; min-width: 1.7em; margin-left: 4px; padding: 1px 6px 2px; border-radius: 5px; background: linear-gradient(180deg, #3a3a3a, #161616); border: 1px solid #555; border-bottom-width: 3px; color: #fff; font: 700 clamp(12px, 1.7vw, 16px) "Barlow Condensed", "Arial Narrow", sans-serif; text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.help small { display: block; margin-top: 7px; font-size: clamp(11px, 1.5vw, 14px); color: #b3aba5; font-weight: 600; text-align: center; letter-spacing: .02em; }
@media (max-width: 600px) { .help { padding: 6px 10px; top: 15%; } .help .hr { margin: 2px 0; } .help small + small { display: none; } }
/* desktop (Mike 11.10.): use more of the screen in the window, but always keep the whole 16:9 game visible */
@media (pointer: fine) and (min-width: 1000px) {
  .top, .hint, .device { width: min(1280px, 100%, calc((100dvh - 150px) * 16 / 9 + 34px)); }
}
