@font-face {
	font-family: 'irony machine';
	src: url(ironymachine.ttf);
}

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

body {
	height: 100vh;
	width: 100vw;
	background-color: #d8b2ff;
	font-family: 'irony machine';
	overflow: hidden;
}

.scroll-container {
	height: 100%;
	width: 100%;
	overflow-y: auto;
}

.scroll-container::-webkit-scrollbar {
  width: 8px;
  background-color: #d8b2ff;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: black;
}

main {
	max-width: 1000px;
	margin: 48px auto 0;
	display: flex;
	flex-direction: column;
}

h1 {
	font-size: 34px;
	margin: 24px auto;
	text-align: center;
}

h1 span {
	font-size: 22px;
}

h1 label {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	margin: 24px auto 0;
}

[type=checkbox] {
	display: none;
}

label:has([type=checkbox])::before {
	content: '';
	width: 14px;
	height: 14px;
	border: 1px solid;
	font-size: 16px;
	line-height: 14px;
}

label:has([type=checkbox]:checked)::before {
	content: 'x';
}

#grid {
	width: 100%;
	margin: 48px auto;
	display: grid;
	grid-template-rows: repeat(5, 200px);
	grid-template-columns: repeat(5, 200px);
	border: 1px solid black;
}

.box {
	border: 1px solid black;
}

.box.enabled {
	cursor: pointer;
}

.box:not(.enabled) {
	cursor: not-allowed;
}

.box:not(.enabled) .front {
	opacity: .2;
}

.box .front,
.box .back {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	font-size: 24px;
	text-align: center;
	padding: 8px;
}

.box .back>* {
	max-height: 100%;
	max-width: 100%;
}

.box .back {
	display: none;
}

.box.open .back {
	display: grid;
}

.box.open .front {
	display: none;
}

.link-home-container {
	border: 1px solid;
	width: fit-content;
	padding: 4px 6px;
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 8px;
	align-items: center;
	margin-left: auto;
	margin-bottom: 24px;
}

.link-home-container a {
	color: black;
}

.popup {
	position: absolute;
	inset: 0;
	background: #d8b2ff;
	display: grid;
	place-items: center;
}

.popup iframe,
.popup .content {
	width: 100%;
	height: 100%;
}

.popup .content {
	/* display: grid;
	place-items: center; */
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 1;
	position: relative;
}

.popup .content * {
	width: 100%;
	height: 100%;
}

.popup .note {
	height: fit-content;
	padding: 4px;
	text-align: right;
}

.popup-window {
	position: relative;
	border: 1px solid;
	width: 500px;
	height: 400px;
}

.popup-window>button {
	position: absolute;
	top: -42px;
	right: -42px;
	border: none;
	background: none;
	font-family: 'irony machine';
	cursor: pointer;
	font-size: 24px;
}

.popup-window .loading {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	z-index: 0;
}

@media screen and (max-width: 1080px) {
	main {
		padding: 0 24px;
	}

	#grid {
		width: 100%;
		max-width: unset;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		background: none;
		border: none;
	}

	.box {
		width: 200px;
		height: 200px;
		flex-shrink: 0;
		background: rgba(255, 255, 255, .3);
	}

	.popup-window {
		max-width: 80vw;
	}
}