html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #ccc;
  font-family: "Courier New", Courier, monospace;
  height: 100%;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

#border {
  background: #000;
  padding: 16px;
  display: inline-block;
  line-height: 0;
  transition: background 0.05s;
}

#screen {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000;
  outline: none;
}

#help {
  margin: 6px 0 0;
  font-size: 12px;
  color: #888;
  text-align: center;
}
#help b { color: #ddd; }
#help a { color: #6cf; }

#touch-controls {
  display: none;
  width: 100%;
  max-width: 640px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 14px;
  box-sizing: border-box;
  gap: 8px;
}
#touch-controls .group { display: flex; gap: 10px; }
#touch-controls button {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #d7d7d7;
  background: #111;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  font-family: inherit;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
#touch-controls button[data-key="jump"] { width: 96px; height: 96px; font-size: 18px; border-color: #ffff00; color: #ffff00; }
#touch-controls .small button { width: 44px; height: 44px; font-size: 16px; border-width: 2px; }
#touch-controls button.down { background: #d7d7d7; color: #000; }

@media (pointer: coarse) {
  #touch-controls { display: flex; }
  #help { display: none; }
}
