:root {
  color-scheme: light;
  font-family: "Courier New", Courier, monospace;
  color: #111;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
}

.game {
  width: min(960px, calc(100% - 40px));
  padding: 40px 0;
}

.game-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.eyebrow,
.score-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1 {
  margin: 5px 0 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.09em;
}

.score {
  display: grid;
  justify-items: end;
  gap: 5px;
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 18px;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px #fff, 0 0 6px #fff;
}

.score-label {
  font-size: 0.65rem;
}

.play-area {
  position: relative;
  overflow: hidden;
  border: 3px solid #111;
  background: #fff;
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.game-error {
  margin: 18px 0 0;
  padding: 12px;
  border: 2px solid #111;
  font-weight: 700;
  text-align: center;
}

.controls {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 18px;
  margin: 0;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-shadow: 0 0 6px #fff, 0 0 6px #fff;
}

.controls span {
  margin-left: 8px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

@media (max-width: 520px) {
  .game {
    width: calc(100% - 24px);
    padding: 24px 0;
  }

  .eyebrow {
    font-size: 0.58rem;
  }

  .score {
    font-size: 1.15rem;
    top: 10px;
    right: 10px;
  }

  .score-label {
    font-size: 0.55rem;
  }

  .controls {
    top: 10px;
    left: 10px;
    font-size: 0.62rem;
  }
}