#game:open {
	display: grid;
	grid-template-areas:
		"game-toolbar"
		"game-screen";
	grid-template-rows: auto 1fr;
	margin: auto;
	padding: 0;
	width: 1200px;
	max-width: 90vw;
	height: 90vh;
	background: var(--background);
	border: none;
	border-radius: 16px;
	outline: none;
	box-shadow: var(--elevation);
	overflow: hidden;
}

@media (width <= 720px) {
	#game:open {
		margin: 0;
		width: 100vw;
		min-width: 320px;
		max-width: 100vw;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
	}
}

#game:open::backdrop {
	background: var(--backdrop);
	backdrop-filter: blur(8px);
}

/* === TOOLBAR === */

.game-toolbar {
	grid-area: game-toolbar;
	z-index: 100;
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-between;
	align-items: center;
	margin: 0;
	padding: 8px;
	width: 100%;
	height: 56px;
	color: var(--white);
	line-height: 100%;
	background: var(--green);
	border-radius: 16px 16px 0 0;
	box-shadow: var(--elevation);
}

@media (width <= 720px) {
	.game-toolbar {
		flex-flow: row-reverse nowrap;
		margin: 0;
		width: 100%;
		border-radius: 0;
	}
}

.game-counter {
	margin: 4px;
	padding: 4px 8px;
	font-family: dinpro-medium;
	border: 2px solid var(--white);
	border-radius: 4px;
}

.game-timer {
	margin: 8px;
	padding: 0;
	font-family: dinpro-medium;
	font-size: 1.5rem;
}

.game-timer-warning {
	color: var(--orange);
}

.game-close {
	appearance: none;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0;
	padding: 8px;
	width: 40px;
	height: 40px;
	color: inherit;
	background: transparent;
	border: none;
	outline: none;
	cursor: pointer;
}

/* === CONTENT === */

.game-screen {
	grid-area: game-screen;
	display: grid;
	grid-template-areas:
		"game-head"
		"game-body"
		"game-foot";
	margin: 0;
	padding: 0;
	min-height: 0;
}

.game-load-screen {
	grid-template-rows: 0 1fr 0;
}

.game-start-screen {
	grid-template-rows: auto auto min-content;
}

.game-play-screen {
	grid-template-rows: 1fr min-content 0;
	transition: grid-template-rows calc(var(--timing) * 2);
}

.game-play-screen:has(.game-button-visible) {
	grid-template-rows: 1fr min-content 112px;
}

.game-end-screen {
	grid-template-rows: auto auto min-content;
}

.game-title {
	grid-area: game-head;
	justify-self: center;
	align-self: end;
	margin: 16px;
	padding: 8px;
	font-family: dinpro-medium;
	font-weight: normal;
	font-size: 2rem;
	color: var(--green);
	line-height: 120%;
	text-align: center;
}

.game-question {
	grid-area: game-head;
	justify-self: center;
	align-self: center;
	margin: 16px;
	padding: 8px;
	font-family: dinpro-medium;
	font-weight: normal;
	font-size: clamp(1.2rem, 1rem + 2vw, 2rem);
	color: var(--green);
	line-height: 150%;
	text-align: center;
}

.game-image {
	grid-area: game-head;
	justify-self: center;
	align-self: center;
	margin: 16px 16px 0 16px;
	padding: 0;
	width: calc(100% - 32px);
	height: calc(100% - 32px);
	min-height: 0;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: var(--elevation);
}

.game-score {
	grid-area: game-head;
	justify-self: center;
	align-self: center;
	margin: 16px;
	padding: 8px;
	font-family: dinpro-medium;
	font-weight: normal;
	font-size: 4rem;
	color: var(--green);
	line-height: 150%;
	text-align: center;
}

.game-description {
	grid-area: game-body;
	justify-self: center;
	align-self: start;
	margin: 16px;
	padding: 8px;
	font-family: dinpro-regular;
	font-size: 1.5rem;
	color: var(--green);
	line-height: 150%;
	text-align: center;
}

.game-spinner {
	grid-area: game-body;
	justify-self: center;
	align-self: center;
	color: var(--green);
}

.game-highlight {
	padding: 4px 12px;
	border-radius: 4px;
	background: var(--highlight);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/* === OPTIONS === */

.game-options {
	grid-area: game-body;
	justify-self: center;
	align-self: end;
	display: flex;
	flex-flow: row wrap;
	justify-content: center;
	align-items: center;
	margin: 0;
	padding: 8px;
	width: 100%;
}

.game-option {
	position: relative;
	display: flex;
	flex-flow: row nowrap;
	justify-content: start;
	align-items: center;
	margin: 8px;
	padding: 0;
	width: calc(50% - 16px);
	font-family: dinpro-medium;
	color: var(--green);
	line-height: 120%;
	border-radius: 8px;
	box-shadow: var(--elevation);
	cursor: pointer;
}

@media (width <= 720px) {
	.game-option {
		width: calc(100% - 16px);
	}
}

.game-option:has(input:disabled) {
	cursor: not-allowed;
}

.game-option input {
	appearance: none;
	display: none;
}

.game-option i {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0;
	padding: 0;
	width: 72px;
	min-width: 72px;
	height: 72px;
	color: var(--white);
	background: var(--green);
	border-radius: 8px 0 0 8px;
	transition: color var(--timing);
}

.game-option:has(input:checked) i {
	color: var(--orange);
}

.game-option-correct::after {
	content: "\f058";
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	line-height: 100%;
	font-family: "Font Awesome 7 Free";
	font-size: 2rem;
	font-weight: bold;
	color: var(--green);
	background: var(--white);
	border: 4px solid var(--white);
	border-radius: 50%;
	transform: scale(0);
	transition: transform var(--timing);
}

.game-option-correct:has(input:disabled)::after {
	transform: scale(1);
}

.game-option-correct:has(input:disabled:checked)::after {
	background: var(--orange);
	transform: scale(1);
}

.game-option span {
	flex: auto;
	display: flex;
	justify-content: start;
	align-items: center;
	margin: 8px;
	padding: 0 8px;
	line-height: 120%;
	hyphens: auto;
}

/* === BUTTONS === */

.game-button {
	appearance: none;
	grid-area: game-foot;
	justify-self: center;
	align-self: end;
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
	align-items: center;
	margin: 16px 32px 32px 32px;
	padding: 16px;
	width: 64px;
	height: 64px;
	color: var(--green);
	background: var(--orange);
	border: none;
	border-radius: 50%;
	box-shadow: var(--elevation);
	cursor: pointer;
	transform: scale(0);
	transition: transform calc(var(--timing) * 2) var(--timing);
}

.game-button-visible {
	transform: scale(1);
}