:root {
  color-scheme: dark;
  color: #deded6;
  background: #141611;
  font: 14px/1.5 system-ui, sans-serif;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-content: center;
}

main { width: min(800px, 100vw); }

#stage {
  position: relative;
  display: grid;
  place-items: center;
  background: #000;
  min-height: min(480px, calc(100vw * 3 / 4));
}

#game {
  display: block;
  width: var(--game-width, 100%);
  max-width: 100%;
  height: auto;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  outline: none;
}

#game:focus-visible {
  outline: 1px solid #899471;
  outline-offset: -1px;
}

#loading {
  display: grid;
  position: absolute;
  inset: 0;
  z-index: 1;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  background: #0d100b;
}

#loading p { margin: 0; }
#progress { width: min(180px, 62vw); accent-color: #a8bc6f; }
[hidden] { display: none !important; }

.game-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.game-controls p {
  display: flex;
  gap: 8px 15px;
  flex-wrap: wrap;
  margin: 2px 0;
  color: #b8b9ab;
}

.game-controls span { white-space: nowrap; }

kbd {
  display: inline-block;
  min-width: 1.15em;
  text-align: center;
  font: inherit;
  font-size: 0.9em;
  color: #f0f0e3;
  background: #282b22;
  border: 1px solid #484b40;
  padding: 0 2px;
}

button {
  color: inherit;
  background: #262824;
  border: 1px solid #53554b;
  border-radius: 4px;
  font: inherit;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}

button:hover { background: #363931; }
button:disabled { opacity: 0.55; cursor: default; }
