#hook-a-duck {
	--kallidus-blue: #003366;
	--carnival-red: #e63946;
	--fairground-gold: #ffb703;
	--water-blue: #f0f8ff;
	--page-bg: #f4f4f9;
	max-width: 940px;
	margin: auto;
	padding-bottom: 40px;
}

#hook-a-duck .header {
	width: min(100%, 860px);
	text-align: center;
	flex: 0 0 auto;
}

#hook-a-duck .header h1 {
	color: var(--kallidus-blue);
	text-transform: uppercase;
	letter-spacing: clamp(1px, 0.4vw, 2px);
	margin: 0;
	font-size: clamp(1.45rem, 6vw, 2.6rem);
	line-height: 1;
}

#hook-a-duck .header p {
	color: #555;
	font-style: italic;
	margin: 0.45rem auto 0;
	max-width: 56rem;
	font-size: clamp(0.9rem, 3.2vw, 1rem);
	line-height: 1.3;
}

#hook-a-duck p {
	padding:0;
	margin:0;
}

#hook-a-duck #game-container {
	position: relative;
	width: min(100%, 860px);
	max-height: calc(100svh - 108px);
	box-shadow: 0 10px 30px rgba(0,0,0,0.2);
	border-radius: clamp(10px, 2vw, 16px);
	overflow: hidden;
	touch-action: none;
	background: white;
}

#hook-a-duck #game-container::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 3;
	outline: clamp(3px, 0.8vw, 5px) dashed rgba(255,255,255,0.85);
	outline-offset: calc(clamp(3px, 0.8vw, 5px) * -2.2);
}

#hook-a-duck canvas {
	width: 100%;
	height: min(62.5vw, 500px);
	min-height: 360px;
	max-height: calc(100svh - 136px);
	background: radial-gradient(circle, var(--water-blue) 0%, #cce7ff 100%);
	cursor: pointer;
	display: block;
	touch-action: none;
	user-select: none;
}

#hook-a-duck .score-board,
#hook-a-duck .mobile-hint {
	position: absolute;
	z-index: 4;
	background: rgba(255, 255, 255, 0.94);
	color: var(--kallidus-blue);
	border: 2px solid var(--kallidus-blue);
	box-shadow: 0 3px 12px rgba(0,0,0,0.12);
	pointer-events: none;
}

#hook-a-duck .score-board {
	top: clamp(8px, 2vw, 14px);
	right: clamp(8px, 2vw, 14px);
	padding: clamp(5px, 1.5vw, 7px) clamp(10px, 2vw, 15px);
	border-radius: 999px;
	font-weight: 800;
	font-size: clamp(0.78rem, 2.4vw, 1rem);
	white-space: nowrap;
}

#hook-a-duck .mobile-hint {
	left: 50%;
	bottom: clamp(8px, 2vw, 14px);
	transform: translateX(-50%);
	border-color: rgba(0, 51, 102, 0.45);
	padding: 6px 10px;
	border-radius: 999px;
	font-size: clamp(0.76rem, 2.8vw, 0.9rem);
	font-weight: 700;
	white-space: nowrap;
}

#hook-a-duck #modal-overlay {
	display: none;
	position: absolute;
	inset: 0;
	background: rgba(0, 51, 102, 0.82);
	justify-content: center;
	align-items: center;
	z-index: 10;
	padding: clamp(14px, 4vw, 28px);
}

#hook-a-duck #modal {
	background: white;
	width: min(100%, 440px);
	max-height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: clamp(18px, 5vw, 30px);
	border-radius: 16px;
	text-align: center;
	border-top: 8px solid var(--fairground-gold);
	animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
	from { transform: scale(0.88); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

#hook-a-duck #modal h2 {
	color: var(--carnival-red);
	margin: 0 0 0.75rem;
	font-size: clamp(1.15rem, 5vw, 1.55rem);
	line-height: 1.15;
}

#hook-a-duck #modal p {
	color: #333;
	line-height: 1.5;
	margin: 0;
	font-size: clamp(0.95rem, 3.6vw, 1rem);
}

#hook-a-duck #modal .trap-level {
	font-weight: 800;
	color: var(--kallidus-blue);
	margin-top: 15px;
	display: block;
}

#hook-a-duck #modal button {
	margin-top: 20px;
	min-height: 44px;
	width: min(100%, 260px);
	padding: 12px 20px;
	background: var(--kallidus-blue);
	color: white;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 800;
	font-size: 1rem;
}

#hook-a-duck #modal button:hover,
#hook-a-duck #modal button:focus-visible {
	background: #004a99;
}

@media (max-width: 640px) {
	#hook-a-duck body {
		justify-content: flex-start;
	}

	#hook-a-duck #game-container {
		width: 100%;
		max-height: none;
	}

	#hook-a-duck canvas {
		height: calc(100svh - 132px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
		min-height: 410px;
		max-height: none;
	}

	#hook-a-duck .header p {
		max-width: 22rem;
	}
}

@media (max-width: 420px) {
	#hook-a-duck body {
		padding-left: 8px;
		padding-right: 8px;
	}

	#hook-a-duck .header p {
		display: none;
	}

	#hook-a-duck canvas {
		height: calc(100svh - 86px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
		min-height: 440px;
	}
}