:root {
  color-scheme: dark;
  background: #080815;
  font-family: "Courier New", monospace;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  color: #dbf3ff;
  background:
    radial-gradient(circle at 50% 35%, #212044 0, #0b0b1b 46%, #03030a 100%);
}

main { width: min(96vw, 960px); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .7rem;
  border: 2px solid #56659a;
  border-bottom: 0;
  background: #11142b;
  color: #b4c7ff;
  font-size: clamp(.58rem, 1.1vw, .8rem);
  letter-spacing: .08em;
}

button {
  border: 1px solid #7180b6;
  padding: .3rem .5rem;
  color: #d8e1ff;
  background: #20264d;
  font: inherit;
  font-size: clamp(.5rem, 1vw, .72rem);
  cursor: pointer;
}

button:hover, button:focus-visible { background: #38458a; }

#frame {
  overflow: hidden;
  width: 100%;
  border: 2px solid #56659a;
  background: #000;
  box-shadow: 0 1rem 4rem #000a;
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}

#frame:fullscreen {
  display: grid;
  place-items: center;
  background: #000;
}

#frame:fullscreen canvas {
  width: min(100vw, calc(100vh * 4 / 3));
  height: min(100vh, calc(100vw * 3 / 4));
}

.help {
  margin: .65rem 0 0;
  text-align: center;
  color: #7f8fbe;
  font-size: clamp(.58rem, 1vw, .76rem);
}

kbd {
  border: 1px solid #465079;
  padding: 0 .18rem;
  background: #171b38;
  color: #c7d2ff;
}
