body {
	background-color: #121212;
}
main {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: fit-content;
	height: fit-content;
}
span {
	position: relative;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: var(--card-size);
	height: var(--card-size);
	flex: 1 1 0;
	margin: 2px;
	font-weight: bold;
	font-size: 1.75rem;
	user-select: none;
	perspective: 1000px;
}
span:not(.found) {
	cursor: pointer;
}
span.active figure, span.found figure {
	transform: rotateY(180deg);
}
span figure {
	position: relative;
	width: 100%;
	height: 100%;
	margin: 0;
	transform-style: preserve-3d;
	border: 2px solid rgba(255,255,255,0.5);
	border-radius: 8px;
	transition: all 250ms ease-in-out;
}
span figure img, span figure figcaption {
	display: inline-block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	border-radius: 6px;
}
span figure img {
	object-fit: cover;
	transform: rotateY(180deg);
}
span figure figcaption {
	background-color: gray;
}

@media screen and (min-width: 415px) {
	html {
		--card-size: 100px;
	}
}
@media screen and (max-width: 414px) {
	html {
		--card-size: 90px;
	}
}
@media screen and (max-width: 360px) {
	html {
		--card-size: 80px;
	}
}