:root { color-scheme: dark; --lime: #a6ff00; --cyan: #00e5ee; --magenta: #f000eb; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #000; color: #f7ffff; }
body { font-family: 'Courier New', monospace; font-weight: 700; }
main { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; max-width: 1600px; margin: auto; padding: 16px 22px; }
.cabinet { width: 100%; position: relative; aspect-ratio: 16 / 9; max-height: calc(100svh - 100px); margin: 0 auto; }
canvas { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; outline: none; touch-action: none; }
.screen-controls { position: absolute; top: 53%; left: 0; width: 100%; text-align: center; pointer-events: none; }
button { font: inherit; color: var(--cyan); border: 0; background: none; cursor: pointer; }
button:hover { color: #fff; }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
.play { pointer-events: auto; border: 2px solid var(--magenta); color: var(--magenta); padding: 13px 22px; font-size: clamp(13px, 1.7vw, 25px); letter-spacing: .06em; background: #000; box-shadow: 4px 4px 0 #420040; }
.play:hover { color: #000; background: var(--magenta); box-shadow: 4px 4px 0 #680068; }
footer { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 12px 0 0; font-size: clamp(10px, 1vw, 15px); }
.keys { display: flex; gap: clamp(15px, 3vw, 42px); }
.keys span { white-space: nowrap; }.keys b { color: var(--cyan); margin-left: 6px; }
nav { display: flex; gap: 22px; align-items: center; } nav button { padding: 8px 0; font-size: inherit; white-space: nowrap; } #about { text-decoration: underline; text-underline-offset: 4px; }
#sound { color: #899194; font-size: 10px; }
.soundtrack { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--lime); font-size: 11px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #202b29; }
.soundtrack button { color: var(--lime); padding: 6px 0; min-width: 110px; text-align: left; }
.music-credit { color: #899194; font-weight: normal; }.music-credit a { color: inherit; text-underline-offset: 3px; }
.soundtrack label { display: flex; align-items: center; gap: 8px; color: #899194; margin-left: auto; }
.soundtrack input { width: 84px; accent-color: var(--lime); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
dialog { background: #050505; border: 0; border-top: 4px solid var(--lime); color: #f7ffff; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(28px, 5vw, 88px); font-size: 18px; line-height: 1.55; overflow-y: auto; }
dialog::backdrop { background: #000; }
body:has(dialog[open]) { overflow: hidden; }
.about-content { max-width: 1200px; min-height: 100%; margin: auto; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.dialog-title { color: var(--lime); letter-spacing: .13em; font-size: clamp(16px, 1.5vw, 24px); margin: 0 55px 38px 0; }
.dialog-title span { display: inline-block; color: #85948d; font-size: .55em; letter-spacing: .08em; margin-left: 22px; }
.close { position: fixed; right: 22px; top: 18px; font-size: 36px; width: 48px; height: 48px; background: #050505; z-index: 1; }
#about-title { color: var(--lime); font-size: clamp(56px, 8.5vw, 120px); line-height: .98; letter-spacing: -.065em; margin: 0 0 24px; }
.about-lead { font-size: clamp(25px, 3vw, 42px); color: var(--cyan); margin: 0 0 22px; }
.about-description { max-width: 850px; font-size: clamp(20px, 2.1vw, 29px); margin: 0 0 18px; }
.about-examples { max-width: 790px; color: #a6b4af; font-size: clamp(16px, 1.5vw, 20px); margin: 0; font-weight: normal; }
.about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 36px; margin: 38px 0; }
.try-button { display: inline-block; background: var(--lime); color: #050505; padding: 20px 26px; font-size: clamp(17px, 1.7vw, 24px); text-decoration: none; line-height: 1.3; cursor: pointer; box-shadow: 5px 5px 0 #284000; }
.try-button span { margin-left: 18px; }.try-button:hover { background: #fff; }.try-button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 6px; }
.try-action { max-width: 100%; }#try-detail { color: #85948d; font-size: 11px; letter-spacing: .08em; margin: 12px 0 0; }
.about-actions .back { font-size: 14px; padding: 12px 0; }.about-actions .back span { margin-left: 12px; }
.about-origin { max-width: 850px; color: #85948d; font-size: 14px; font-weight: normal; margin: 0; padding-top: 20px; border-top: 1px solid #26352d; }
@media (max-width: 600px) { dialog { padding: 28px 22px; }.about-content { justify-content: flex-start; }.dialog-title { margin-bottom: 32px; }.dialog-title span { display: block; margin: 8px 0 0; }#about-title { font-size: clamp(44px, 14vw, 72px); }.about-actions { width: 100%; margin: 30px 0; }.try-button { width: 100%; padding: 18px; }.try-button span { margin-left: 4px; } }
@media (min-width: 1000px) {
  dialog { padding: clamp(36px, 5vh, 80px) 6vw; }
  .about-content { max-width: 1800px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 7vw; align-content: center; align-items: start; }
  .dialog-title { grid-column: 1 / -1; margin-bottom: clamp(36px, 6vh, 80px); }
  #about-title { grid-column: 1; grid-row: 2 / 5; font-size: clamp(64px, 7.3vw, 150px); margin: 0; }
  .about-lead, .about-description, .about-examples { grid-column: 2; }
  .about-lead { font-size: clamp(26px, 2.5vw, 48px); }
  .about-description { font-size: clamp(20px, 1.65vw, 32px); }
  .about-examples { font-size: clamp(16px, 1.1vw, 21px); }
  .about-actions { grid-column: 1 / -1; margin: clamp(34px, 6vh, 72px) 0 30px; }
  .try-button { font-size: clamp(20px, 1.6vw, 30px); padding: 22px 30px; }
  .about-origin { grid-column: 1 / -1; max-width: none; width: 100%; font-size: clamp(14px, 1vw, 18px); }
}
.touch-controls { display: none; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; user-select: none; }
.touch-controls button { min-width: 52px; min-height: 48px; border: 1px solid #28525b; touch-action: none; }
.touch-controls button:active { background: #153e45; }.touch-controls .fire { color: var(--magenta); border-color: var(--magenta); min-width: 80px; min-height: 62px; }
.dpad { display: grid; grid-template-columns: repeat(3, clamp(32px, 12vw, 48px)); grid-template-rows: repeat(2, 44px); gap: 4px; }.dpad button { min-width: 0; min-height: 0; }.dpad button:first-child { grid-column: 2; }.dpad button:nth-child(2) { grid-column: 1; }
@media (pointer: coarse) { .touch-controls { display: flex; } .keys { display: none; } .cabinet { max-height: none; } }
@media (max-width: 760px) { main { padding: 10px; } footer { flex-wrap: wrap; gap: 10px; }.keys { gap: 14px; flex-wrap: wrap; font-size: 10px; } nav { justify-content: space-between; width: 100%; }.play { padding: 8px 11px; font-size: clamp(10px, 2.6vw, 16px); } .cabinet { max-height: none; } }
@media (max-width: 500px) { main { justify-content: flex-start; padding-top: 30px; }.touch-controls { display: flex; }.keys { display: none; } footer { margin-top: 18px; } }
@media (orientation: landscape) and (max-height: 500px) { main { padding: 4px 12px; }.cabinet { max-height: calc(100svh - 45px); width: calc((100svh - 45px) * 16 / 9); } footer { padding-top: 2px; }.touch-controls { position: fixed; bottom: 8px; left: 10px; right: 10px; pointer-events: none; opacity: .65; }.touch-controls button { pointer-events: auto; } }
