*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	display: flex;
	flex-direction: column;
	padding: 1em;
	margin: auto;
	min-height: 100vh;
}

main {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1em;
}

.board {
	position: relative;
}

.board-tiles {
	position: absolute;
	width: 100%;
	height: 100%;
}

.board-tile {
	position: absolute;
	width: calc(100%/3);
	aspect-ratio: 1/1;
	background-color: lightgrey;
}

.board-tile:nth-child(2) {
	right: 0;
}

.board-tile:nth-child(3) {
	bottom: 0;
}

.board-tile:nth-child(4) {
	bottom: 0;
	right: 0;
}

.board-tile:nth-child(5) {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.inputs {
	position: relative;
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	grid-template-rows: repeat(9, 1fr);
	aspect-ratio: 1/1;
	border: solid 1px grey;
}

.inputs input {
	width: 100%;
	height: 100%;
	font-size: 8vw;
	outline: none;
	border: solid 1px grey;
	text-align: center;
	background-color: transparent;
	font-family: 'Courier New', Courier, monospace;
	color: inherit;
}

.inputs input:hover {
	background-color: rgba(122, 122, 122, 0.103);
}

.inputs input:focus {
	background-color: rgba(0, 0, 255, 0.212);
}

.solution {
	position: absolute;
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	grid-template-rows: repeat(9, 1fr);
	width: 100%;
	height: 100%;
}

.solution div {
	display: grid;
	place-content: center;
	width: 100%;
	aspect-ratio: 1/1;
	font-size: 8vw;
	font-family: 'Courier New', Courier, monospace;
	color: #3ca53c;
}

button {
	padding: 0.2em 1em;
	font-size: 1.25em;
	border-radius: 5px;
	background-color: lightgrey;
	border: outset 2px;
}

button:active {
	background-color: #c2c2c2;
	border-style: inset;
}

footer {
	padding: 0.5em;
	margin-top: 1em;
	margin-left: -1em;
	margin-right: -1em;
	margin-bottom: -1em;
	background-color: grey;
	text-align: center;
}

footer a {
	color: white;
	text-decoration: none;
}

footer a:hover {
	text-decoration: underline;
}

@media screen and (prefers-color-scheme: dark) {
	body {
		background-color: #111;
		color: white;
	}

	.board-tile {
		background-color: #333;
	}

	.solution div {
		color: greenyellow;
	}
}

@media screen and (min-width: 600px) {
	main {
		width: 550px;
		margin: auto;
	}

	.inputs input,
	.solution div {
		font-size: 48px;
	}
}