.cookie-game {
	position: fixed;
	inset: 0;
	z-index: 9996;
	pointer-events: none;
	overflow: hidden;
}

.cookie-game__hud {
	position: fixed;
	right: 14px;
	bottom: 52px;
	left: auto;
	top: auto;
	width: min(280px, calc(100vw - 28px));
	z-index: 9997;
	pointer-events: auto;
	overflow: hidden;
}

.cookie-game__hud[hidden] {
	display: none !important;
}

.cookie-game__hud .topbar {
	font-size: 0.95rem;
	padding: 4px 6px;
	align-items: center;
}

.cookie-game__hud .topbarButton {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	line-height: 1;
}

.cookie-game__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	align-items: center;
	padding: 8px 10px;
	font-size: 0.85rem;
}

.cookie-game__cookie,
.cookie-game__cookie.clickable {
	position: absolute;
	top: -70px;
	left: 0;
	width: var(--cookie-size);
	height: var(--cookie-size);
	padding: 0;
	border: 0;
	background: transparent;
	pointer-events: auto;
	cursor: pointer;
	animation: cookie-game-fall var(--cookie-duration) linear forwards;
}

.cookie-game__cookie img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
}

.cookie-game__feedback {
	position: absolute;
	color: #000;
	font-weight: 700;
	animation: cookie-game-feedback 500ms ease-out forwards;
	pointer-events: none;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@keyframes cookie-game-fall {
	to { transform: translateY(calc(100vh + 100px)) rotate(360deg); }
}

@keyframes cookie-game-feedback {
	to { opacity: 0; transform: translateY(-24px); }
}

@media (prefers-reduced-motion: reduce) {
	.cookie-game__cookie { animation-duration: 8s; }
	.cookie-game__feedback { animation-duration: 700ms; }
}

@media screen and (max-width: 768px) {
	.cookie-game__hud {
		right: 8px;
		bottom: 8px;
		width: min(260px, calc(100vw - 16px));
	}

	.cookie-game__stats {
		font-size: 0.75rem;
		gap: 8px;
		padding: 7px 9px;
	}

	.cookie-game__cookie {
		min-width: 44px;
		min-height: 44px;
	}
}
