:root {
	--ch-ink: #1f2a24;
	--ch-muted: #5a6b62;
	--ch-paper: #eef5f0;
	--ch-sage: #7f9e8a;
	--ch-sage-deep: #3d5c4a;
	--ch-coral: #e07a5f;
	--ch-coral-deep: #c45c42;
	--ch-cream: #f7fbf8;
	--ch-shadow: rgba(31, 42, 36, 0.14);
}

.cat-hunt {
	position: relative;
	min-height: calc(100vh - 4.5rem);
	overflow: hidden;
	font-family: "Nunito", system-ui, sans-serif;
	color: var(--ch-ink);
}

.cat-hunt__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 70% 50% at 12% 8%, #d5ebe0 0%, transparent 55%),
		radial-gradient(ellipse 60% 45% at 92% 12%, #f8e0d6 0%, transparent 50%),
		linear-gradient(165deg, #e4f0e9 0%, #f4efe8 48%, #e8f1ec 100%);
}

.cat-hunt__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.3;
	background-image:
		radial-gradient(circle at 18% 28%, rgba(127, 158, 138, 0.18) 0 2px, transparent 3px),
		radial-gradient(circle at 72% 58%, rgba(224, 122, 95, 0.14) 0 1.5px, transparent 2.5px);
	background-size: 48px 48px, 36px 36px;
}

.cat-hunt__wrap {
	position: relative;
	z-index: 1;
	width: min(920px, 100% - 2rem);
	margin: 0 auto;
	padding: 2rem 0 3rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	min-height: inherit;
}

.cat-hunt__header {
	text-align: center;
	animation: ch-rise 0.65s ease-out both;
}

.cat-hunt__brand {
	margin: 0;
	font-family: "Fredoka", sans-serif;
	font-weight: 600;
	font-size: clamp(1.35rem, 4vw, 1.75rem);
	letter-spacing: -0.02em;
	color: var(--ch-sage-deep);
}

.cat-hunt__title {
	margin: 0.35rem 0 0;
	font-family: "Fredoka", sans-serif;
	font-weight: 700;
	font-size: clamp(2.1rem, 7vw, 3.4rem);
	letter-spacing: -0.03em;
	line-height: 1.05;
	color: var(--ch-ink);
}

.cat-hunt__lead {
	margin: 0.65rem auto 0;
	max-width: 28rem;
	font-size: 1.05rem;
	color: var(--ch-muted);
	line-height: 1.45;
}

.cat-hunt__progress {
	display: flex;
	justify-content: center;
	gap: 0.45rem;
	margin-top: 1.1rem;
}

.cat-hunt__progress-seg {
	width: 2.4rem;
	height: 0.35rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ch-sage) 28%, transparent);
	transition: background 0.25s ease, transform 0.25s ease;
}

.cat-hunt__progress-seg.is-done,
.cat-hunt__progress-seg.is-active {
	background: var(--ch-coral);
}

.cat-hunt__progress-seg.is-active {
	transform: scaleY(1.35);
}

.cat-hunt__stage {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: ch-rise 0.65s ease-out 0.08s both;
}

.cat-hunt__arena {
	width: 100%;
	min-height: 280px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-end;
	gap: 0.85rem 1rem;
	padding: 1rem 0.25rem 0.5rem;
}

.cat-hunt__footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	animation: ch-rise 0.65s ease-out 0.14s both;
}

.cat-hunt__btn {
	font-family: "Fredoka", sans-serif;
	font-weight: 600;
	font-size: 1.05rem;
	border: none;
	cursor: pointer;
	border-radius: 999px;
	padding: 0.85rem 1.5rem;
	transition: transform 0.15s ease, background 0.2s, filter 0.2s, opacity 0.2s;
}

.cat-hunt__btn:active {
	transform: scale(0.97);
}

.cat-hunt__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.cat-hunt__btn--primary {
	background: var(--ch-coral);
	color: #fffaf7;
	min-width: 10rem;
	box-shadow: 0 10px 24px color-mix(in srgb, var(--ch-coral) 35%, transparent);
}

.cat-hunt__btn--primary:hover:not(:disabled) {
	background: var(--ch-coral-deep);
}

.cat-hunt__btn--ghost {
	background: transparent;
	color: var(--ch-sage-deep);
	border: 1.5px solid color-mix(in srgb, var(--ch-sage) 45%, transparent);
}

.cat-hunt__btn--ghost:hover:not(:disabled) {
	background: color-mix(in srgb, var(--ch-sage) 12%, transparent);
}

.cat-hunt__btn[hidden] {
	display: none !important;
}

/* Choices */
.ch-choice {
	appearance: none;
	border: none;
	background: transparent;
	padding: 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	min-width: 6.5rem;
	max-width: 8.5rem;
	transition: transform 0.2s ease, opacity 0.35s ease;
	animation: ch-pop 0.45s ease both;
}

.ch-choice:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--ch-coral) 55%, transparent);
	outline-offset: 4px;
	border-radius: 0.75rem;
}

.ch-choice:hover {
	transform: translateY(-4px);
}

.ch-choice.is-selected {
	transform: translateY(-8px) scale(1.06);
	z-index: 2;
}

.ch-choice.is-dimmed {
	opacity: 0.28;
	transform: scale(0.92);
	pointer-events: none;
}

.ch-choice__label {
	font-family: "Fredoka", sans-serif;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--ch-sage-deep);
	background: color-mix(in srgb, var(--ch-cream) 90%, white);
	border: 1.5px solid color-mix(in srgb, var(--ch-sage) 30%, transparent);
	border-radius: 999px;
	padding: 0.28rem 0.7rem;
	box-shadow: 0 6px 16px var(--ch-shadow);
	text-align: center;
	line-height: 1.2;
}

/* Cat */
.ch-cat {
	--tilt: 0deg;
	width: 108px;
	position: relative;
	transform: rotate(var(--tilt));
	animation: ch-idle 2.8s ease-in-out infinite;
}

.ch-cat--sm {
	width: 88px;
}

.ch-cat__svg {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 8px 12px rgba(31, 42, 36, 0.16));
}

.ch-cat.is-jump {
	animation: ch-jump 0.55s ease both;
}

.ch-cat.is-run {
	animation: ch-run 0.85s ease-in forwards;
}

/* Boxes */
.ch-box {
	width: 92px;
	height: 78px;
	position: relative;
	filter: drop-shadow(0 8px 12px rgba(31, 42, 36, 0.14));
}

.ch-box__body {
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 0;
	height: 58%;
	border-radius: 0.35rem 0.35rem 0.55rem 0.55rem;
	background: linear-gradient(180deg, #f0c9a0 0%, #e0a978 100%);
	border: 2px solid #c4844e;
}

.ch-box__lid {
	position: absolute;
	left: 4%;
	right: 4%;
	top: 18%;
	height: 28%;
	border-radius: 0.35rem;
	background: linear-gradient(180deg, #f6d7b5 0%, #e8b888 100%);
	border: 2px solid #c4844e;
	transform-origin: bottom center;
	transition: transform 0.35s ease;
}

.ch-box__ribbon {
	position: absolute;
	left: 50%;
	top: 18%;
	bottom: 0;
	width: 12px;
	transform: translateX(-50%);
	background: var(--ch-coral);
	border-radius: 2px;
	z-index: 1;
}

.ch-box__bow {
	position: absolute;
	left: 50%;
	top: 8%;
	width: 28px;
	height: 16px;
	transform: translateX(-50%);
	background: var(--ch-coral-deep);
	border-radius: 50% 50% 40% 40%;
	z-index: 2;
}

.ch-choice.is-selected .ch-box__lid {
	transform: rotate(-18deg) translateY(-10px);
}

.ch-box--alt .ch-box__body,
.ch-box--alt .ch-box__lid {
	background: linear-gradient(180deg, #c5dccf 0%, #9fbfad 100%);
	border-color: #6f917e;
}

.ch-box--alt .ch-box__ribbon,
.ch-box--alt .ch-box__bow {
	background: var(--ch-sage-deep);
}

/* Backpacks */
.ch-pack {
	width: 86px;
	height: 96px;
	position: relative;
	filter: drop-shadow(0 8px 12px rgba(31, 42, 36, 0.14));
}

.ch-pack__body {
	position: absolute;
	inset: 18% 12% 8%;
	border-radius: 1.1rem 1.1rem 0.85rem 0.85rem;
	background: linear-gradient(180deg, #6f8f7c 0%, #4d6b5a 100%);
	border: 2px solid #3d5c4a;
}

.ch-pack__flap {
	position: absolute;
	left: 16%;
	right: 16%;
	top: 8%;
	height: 28%;
	border-radius: 0.85rem 0.85rem 0.35rem 0.35rem;
	background: linear-gradient(180deg, #8aab98 0%, #6f8f7c 100%);
	border: 2px solid #3d5c4a;
}

.ch-pack__strap {
	position: absolute;
	top: 22%;
	width: 10px;
	height: 42%;
	background: #c9a27a;
	border: 1.5px solid #a67c52;
	border-radius: 4px;
}

.ch-pack__strap--l { left: 6%; transform: rotate(-8deg); }
.ch-pack__strap--r { right: 6%; transform: rotate(8deg); }

.ch-pack--sm .ch-pack__body { inset: 28% 18% 12%; }
.ch-pack--sm .ch-pack__flap { top: 18%; height: 22%; }
.ch-pack--lg { width: 102px; height: 112px; }
.ch-pack--any .ch-pack__body {
	background: linear-gradient(180deg, #e8a090 0%, #c45c42 100%);
	border-color: #a04834;
}
.ch-pack--any .ch-pack__flap {
	background: linear-gradient(180deg, #f0b5a6 0%, #e07a5f 100%);
	border-color: #a04834;
}

.ch-choice.is-selected .ch-pack {
	animation: ch-jump 0.55s ease both;
}

/* Searching state */
.cat-hunt.is-searching .cat-hunt__arena {
	justify-content: center;
	align-items: center;
}

.ch-search {
	text-align: center;
	animation: ch-rise 0.4s ease both;
}

.ch-search__dots {
	display: flex;
	justify-content: center;
	gap: 0.45rem;
	margin-top: 1rem;
}

.ch-search__dot {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--ch-coral);
	animation: ch-bounce 0.9s ease-in-out infinite;
}

.ch-search__dot:nth-child(2) { animation-delay: 0.12s; }
.ch-search__dot:nth-child(3) { animation-delay: 0.24s; }

@keyframes ch-rise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes ch-pop {
	from { opacity: 0; transform: translateY(18px) scale(0.92); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ch-idle {
	0%, 100% { transform: rotate(var(--tilt)) translateY(0); }
	50% { transform: rotate(var(--tilt)) translateY(-5px); }
}

@keyframes ch-jump {
	0% { transform: translateY(0) scale(1); }
	35% { transform: translateY(-28px) scale(1.05); }
	100% { transform: translateY(0) scale(1.06); }
}

@keyframes ch-run {
	0% { transform: translateX(0) rotate(var(--tilt)); opacity: 1; }
	100% { transform: translateX(120vw) rotate(12deg); opacity: 0; }
}

@keyframes ch-bounce {
	0%, 100% { transform: translateY(0); opacity: 0.45; }
	50% { transform: translateY(-8px); opacity: 1; }
}

@media (max-width: 640px) {
	.cat-hunt__wrap {
		padding: 1.35rem 0 2rem;
	}

	.ch-choice {
		min-width: 5.6rem;
		max-width: 7.2rem;
	}

	.ch-cat {
		width: 92px;
	}

	.ch-cat--sm {
		width: 76px;
	}

	.cat-hunt__arena {
		gap: 0.7rem 0.65rem;
		min-height: 240px;
	}
}
