* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #edf1f5;
  background: #080a0d;
  font: 13px system-ui, sans-serif;
}
#screen { position: relative; flex: 1; min-height: 0; }
canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
#boot {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px;
  background: #080a0d;
}
#boot strong { color: #ff9875; font-size: clamp(18px, 5vw, 30px); }
#boot p { margin: 0; }
button {
  border: 1px solid #6c7886;
  border-radius: 3px;
  padding: 6px 9px;
  background: #202934;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: wait; }
#controls {
  display: none;
  grid-template-columns: repeat(6, auto);
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
}
#controls button { touch-action: none; padding-inline: 5px; min-height: 32px; }
#controls button:active { background: #543528; }
#keyboard { padding: 3px 8px; color: #c3cdd6; text-align: center; }
#credits { color: #c3cdd6; text-align: right; padding: 2px 6px; font-size: 11px; }
@media (any-pointer: coarse) {
  #controls { display: grid; }
  #keyboard { display: none; }
}
