body {
  background-color: black;
  color: white;
  font-family: "Ubuntu mono", "Courier New", Courier, monospace;
  font-size: 18px;
}

.x {
  text-align: center;
  align-self: end;
  padding-bottom: 4px;
  width: 32px;
  user-select: none;
}

.y {
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: end;
  padding-right: 8px;
  width: 124px;
  height: 32px;
}

.game {
  width: calc(128px + 512px);
  display: grid;
  grid-template-columns: 4fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: 4fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 2fr;
  gap: 0px 0px;
  grid-template-areas:
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". . . . . . . . . . . . . . . . ."
    ". reset reset reset reset reset reset reset reset next next next next next next next next";
}

.grid {
  grid-area: grid;
  width: 512px;
  height: 512px;
  max-width: 100vw;
  max-height: 100vw;
}

.game input[type="checkbox"] {
  width: 32px;
  height: 32px;
  border: 0;
  margin: 0;
  box-shadow: none;
  appearance: none;
  display: block;
  float: left;
  background-color: black;
  border-color: black;
  cursor: pointer;
  outline: 1px solid rgba(255, 255, 255, 0.1);
}

.game input[type="checkbox"]:nth-child(17n + 5),
.game input[type="checkbox"]:nth-child(17n + 9),
.game input[type="checkbox"]:nth-child(17n + 13) {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.game input[type="checkbox"]:nth-child(n + 70):nth-child(-n + 86),
.game input[type="checkbox"]:nth-child(n + 138):nth-child(-n + 154),
.game input[type="checkbox"]:nth-child(n + 206):nth-child(-n + 222) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.game input[type="checkbox"]:checked {
  background: #fff;
  outline: 1px solid rgba(0, 0, 0, 0.1);
}

.game input[type="checkbox"]:checked:nth-child(17n + 5),
.game input[type="checkbox"]:checked:nth-child(17n + 9),
.game input[type="checkbox"]:checked:nth-child(17n + 13) {
  border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.game input[type="checkbox"]:checked:nth-child(n + 70):nth-child(-n + 86),
.game input[type="checkbox"]:checked:nth-child(n + 138):nth-child(-n + 154),
.game input[type="checkbox"]:checked:nth-child(n + 206):nth-child(-n + 222) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

button.next {
  display: none;
  grid-area: next;
  margin-left: 12px;
}

.reset {
  margin-right: 12px;
  grid-area: reset;
}

button,
.button {
  background: black;
  color: white;
  border: 2px solid #fff;
  font-family: inherit;
  font-size: 32px;
  padding: 8px 16px;
  cursor: pointer;
}
