@font-face { font-family: Gelasio; src: url(fonts/gelasio-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root { color-scheme: light; background: #f7f5ec; color: #233e30; font-family: Arial, Helvetica, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px 16px; }
/* Never taller than the screen, so the touch buttons stay in view. */
main { width: min(900px, 100%); width: min(900px, 100%, (100vh - 150px) * 1.5); width: min(900px, 100%, (100dvh - 150px) * 1.5); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.frame { width: 100%; border: 1px solid #65705d; border-radius: 10px; overflow: hidden; box-shadow: 6px 8px 0 #233e3012; background: #f3ead2; }
canvas { display: block; width: 100%; aspect-ratio: 3 / 2; touch-action: manipulation; cursor: pointer; }
canvas:focus-visible { outline: 3px solid #b5442d; outline-offset: -3px; }
.pads { display: none; width: 100%; gap: 10px; }
.pads button { flex: 1; min-height: 58px; border: 0; border-radius: 12px; background: #233e30; color: #fffdf6; font: 700 18px Arial, sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; }
.pads button[data-key="jump"] { flex: 1.6; background: #b5442d; }
.help-touch { display: none; }
@media (pointer: coarse) { .pads { display: flex; } .help { display: none; } .help-touch { display: block; } }
@media (pointer: coarse) and (orientation: landscape) {
  body { justify-content: flex-start; padding: 8px 12px; gap: 10px; }
  main { width: min(900px, 100%, (100dvh - 90px) * 1.5); gap: 8px; }
  .pads button { min-height: 48px; }
  .help-touch { display: none; }
}
.help, .help-touch { margin: 0; max-width: 620px; text-align: center; font-size: 15px; line-height: 1.7; color: #5f685c; }
kbd { padding: 1px 6px; border: 1px solid #b9a98a; border-bottom-width: 2px; border-radius: 4px; background: #fffdf6; font: 13px Menlo, Consolas, monospace; color: #233e30; }
footer { max-width: 620px; text-align: center; font-size: 13px; line-height: 1.6; color: #5f685c; }
footer a { color: #b5442d; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
