:root {
  color-scheme: light;
  --ink: #111111;
  --paper: #f7f7f2;
  --snow: #ffffff;
  --accent: #d71920;
  --accent-dark: #8e1014;
  --blue: #0b63ce;
  --green: #138a36;
  --shadow: rgba(17, 17, 17, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, #dbeeff 0%, #f6fbff 48%, #ffffff 100%);
  background-size: 42px 42px, 100% 100%;
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
}

button {
  min-width: 132px;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  font: 700 16px/1 "Courier New", Courier, monospace;
  text-transform: uppercase;
}

button:hover {
  background: var(--accent-dark);
}

button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.game-shell {
  position: relative;
  width: min(100vw, 960px);
  height: min(100vh, 720px);
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--snow);
  box-shadow: 0 20px 60px var(--shadow);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(247, 247, 242, 0.76);
}

.overlay[hidden] {
  display: none;
}

.panel {
  width: min(440px, 100%);
  border: 3px solid var(--ink);
  border-radius: 6px;
  padding: 24px;
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--ink);
  text-align: center;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0 0 12px;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(32px, 7vw, 56px);
}

h2 {
  font-size: clamp(24px, 5vw, 36px);
}

.panel p {
  margin: 0 0 18px;
}

.hint {
  margin-top: 18px;
  font-size: 13px;
}

@media (max-width: 720px) {
  body {
    display: block;
  }

  .game-shell {
    width: 100vw;
    height: 100vh;
    border: 0;
    box-shadow: none;
  }

  .panel {
    padding: 20px;
  }
}
