@import url('https://fonts.googleapis.com/css2?family=MonteCarlo&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;700;800&display=swap');

@media (hover: none), (pointer: coarse) {
	body.explanation::before {
		background-image: url('../resources/pictures/flower-bg-slim.png');
	}
}

body.explanation {
	background-color: rgb(225, 109, 128);
	min-height: 100svh;
	margin: 0;
	padding: clamp(10px, 2.4vh, 20px);
	overflow: hidden;
	display: grid;
	place-items: center;
}

body.explanation::before {
	content: '';
	position: fixed;
	inset: 0;
	background-image: url('../resources/pictures/flower-bg.png');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	pointer-events: none;
}

.main {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(6px, 1.2vh, 12px);
	text-align: center;
	width: min(94vw, 820px);
	max-height: calc(100svh - clamp(20px, 4vh, 40px));
	padding: clamp(14px, 3vh, 34px) clamp(16px, 4.2vw, 38px);
	border-radius: clamp(14px, 3vw, 24px);
	background: rgba(137, 40, 72, 0.48);
	backdrop-filter: blur(4px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.explanation h1 {
	margin: 0;
	font-family: "MonteCarlo", cursive;
	font-weight: 900;
	font-size: clamp(32px, 12vw, 72px);
	line-height: 1;
	color: #fff9fc;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.explanation h2,
.explanation h3,
.explanation p,
.explanation li {
	margin: 0;
	font-family: "Nunito", sans-serif;
	color: #fff9fc;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.win-banner * {
	color: #000 !important;
	text-shadow: none !important;
}

.explanation h2 {
	font-size: clamp(16px, 3.1vw, 27px);
	line-height: 1.35;
	font-weight: 800;
}

.explanation h3 {
	margin-top: 6px;
	font-size: clamp(15px, 2.4vw, 20px);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
}

.explanation ul {
	margin: 4px 0 12px;
	padding-left: clamp(22px, 4vw, 34px);
	text-align: left;
	align-self: stretch;
}

.explanation li {
	font-size: clamp(14px, 2.1vw, 19px);
	line-height: 1.5;
	font-weight: 600;
	margin: 6px 0;
}

.explanation p {
	font-size: clamp(14px, 2.1vw, 19px);
	line-height: 1.4;
	font-weight: 700;
}

.explanation .tiny-note {
	font-size: clamp(12px, 1.8vw, 16px);
	line-height: 1.25;
	font-weight: 700;
	margin-bottom: 10px;
}

.explanation h3.no-underline {
	text-decoration: none;
}

.explanation li strong {
	font-weight: 800;
}

.explanation .game-link {
	color: #fff7b2;
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 2px;
}

.explanation .game-link:hover {
	color: #fff3db;
}

.explanation li.completed {
	opacity: 0.92;
}

.explanation li.completed::after {
	content: " ✅";
}

.explanation .game-label {
	font-weight: 800;
	color: #fff4c7;
}

.explanation .age-status {
	font-size: clamp(24px, 7.5vw, 52px);
	line-height: 1.15;
}

.explanation .age-value {
	display: inline-block;
	padding: 2px 12px;
	margin: 0 3px;
	border-radius: 999px;
	background: linear-gradient(135deg, rgba(255, 207, 121, 0.95), rgba(255, 239, 181, 0.95));
	color: #8f2148;
	font-weight: 900;
	text-shadow: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.explanation .final-image {
	width: clamp(116px, 18vh, 205px);
	height: auto;
	margin-top: clamp(6px, 1.5vh, 10px);
	padding: 6px;
	border: 3px solid rgba(255, 235, 245, 0.92);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.16);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transform: translateY(10px) scale(0.98);
	transition: opacity 420ms ease, transform 420ms ease;
}

.explanation .final-image.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.hidden {
	display: none;
}

.win-banner {
	position: fixed;
	inset: 0;
	background: rgba(39, 10, 26, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 8;
	backdrop-filter: blur(4px);
}

.win-banner.hidden {
	display: none;
}

.win-banner__panel {
	text-align: center;
	padding: clamp(20px, 5vw, 42px) clamp(24px, 6vw, 56px);
	border-radius: 20px;
	background: rgba(255, 252, 244, 0.96);
	border: 2px solid rgba(162, 64, 102, 0.35);
	box-shadow: 0 16px 40px rgba(20, 10, 12, 0.35);
	transform: scale(0.96);
	opacity: 0;
	transition: opacity 420ms ease, transform 420ms ease;
}

.win-banner.is-visible .win-banner__panel {
	opacity: 1;
	transform: scale(1);
}

.win-banner__title {
	margin: 0;
	font-family: "MonteCarlo", cursive;
	font-size: clamp(48px, 10vw, 96px);
	color: #000;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.win-banner__hint {
	margin: 12px 0 0;
	font-family: "Nunito", sans-serif;
	font-size: clamp(14px, 2.6vw, 20px);
	font-weight: 800;
	color: #000;
	opacity: 0.9;
}

.win-banner.is-ready .win-banner__hint {
	opacity: 1;
}


@media (max-width: 520px), (max-height: 720px) {
	.main {
		width: min(95vw, 620px);
		padding: 13px 13px 17px;
		gap: 6px;
	}

	.explanation h1 {
		font-size: clamp(28px, 10vw, 52px);
	}

	.explanation h2 {
		font-size: clamp(14px, 4.5vw, 21px);
	}

	.explanation .age-status {
		font-size: clamp(22px, 8vw, 44px);
	}

	.explanation h3 {
		font-size: clamp(13px, 4vw, 18px);
	}

	.explanation li,
	.explanation p {
		font-size: clamp(12px, 3.8vw, 17px);
		line-height: 1.34;
	}

	.explanation .tiny-note {
		font-size: clamp(11px, 3.3vw, 15px);
		margin-bottom: 8px;
	}

	.explanation ul {
		padding-left: 22px;
	}

	.explanation .final-image {
		width: clamp(94px, 15vh, 150px);
	}
}
