.island-game-open {
	overflow: hidden;
}

[data-island-game-trigger] {
	display: block;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: default;
	outline: none;
}

[data-island-game-trigger]:focus-visible {
	border-radius: 50%;
	box-shadow: 0 0 0 4px #fff, 0 0 0 7px #ef7d32;
}

.island-game-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: grid;
	place-items: center;
	padding: clamp(12px, 3vw, 36px);
	background: rgba(0, 42, 63, 0.88);
	backdrop-filter: blur(8px);
}

.island-game-overlay[hidden] {
	display: none;
}

.island-game-panel {
	position: relative;
	width: min(1080px, 100%);
	padding: clamp(18px, 3vw, 34px);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 24px;
	background: #fffaf0;
	box-shadow: 0 30px 90px rgba(0, 25, 38, 0.45);
	color: #002a3f;
}

.island-game-panel::before {
	position: absolute;
	inset: 0 0 auto;
	height: 7px;
	background: linear-gradient(90deg, #ef7d32 0 34%, #18a7a0 34% 67%, #f3c860 67%);
	content: "";
}

.island-game-header {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 18px;
}

.island-game-kicker {
	margin: 0 0 5px;
	color: #ef7d32;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.25em;
	text-transform: uppercase;
}

.island-game-title {
	margin: 0;
	color: #002a3f;
	font-size: clamp(27px, 4vw, 52px);
	font-weight: 400;
	letter-spacing: -0.035em;
	line-height: 0.95;
}

.island-game-score {
	flex: 0 0 auto;
	min-width: 122px;
	padding: 10px 16px;
	border: 1px solid rgba(0, 42, 63, 0.25);
	border-radius: 999px;
	background: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-align: center;
	text-transform: uppercase;
}

.island-game-close {
	position: absolute;
	z-index: 2;
	top: 17px;
	right: 17px;
	display: grid;
	width: 38px;
	height: 38px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #002a3f;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 23px;
	line-height: 1;
}

.island-game-close:hover,
.island-game-close:focus-visible {
	background: #ef7d32;
	outline: none;
}

.island-game-stage {
	position: relative;
	overflow: hidden;
	border: 2px solid #002a3f;
	border-radius: 16px;
	background: #9ee5e2;
	box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.55);
	cursor: pointer;
	touch-action: manipulation;
}

.island-game-canvas {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 8 / 3;
}

.island-game-message {
	position: absolute;
	top: 50%;
	left: 50%;
	width: min(430px, calc(100% - 32px));
	padding: 15px 18px;
	transform: translate(-50%, -50%);
	border: 1px solid rgba(0, 42, 63, 0.22);
	border-radius: 12px;
	background: rgba(255, 250, 240, 0.94);
	box-shadow: 0 10px 30px rgba(0, 42, 63, 0.18);
	color: #002a3f;
	font-size: clamp(14px, 2vw, 18px);
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
}

.island-game-message[hidden] {
	display: none;
}

.island-game-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-top: 14px;
	color: rgba(0, 42, 63, 0.72);
	font-size: 13px;
}

.island-game-footer p {
	margin: 0;
}

.island-game-key {
	display: inline-block;
	margin: 0 3px;
	padding: 3px 8px;
	border: 1px solid rgba(0, 42, 63, 0.28);
	border-bottom-width: 3px;
	border-radius: 5px;
	background: #fff;
	color: #002a3f;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

@media (max-width: 640px) {
	.island-game-overlay {
		padding: 8px;
	}

	.island-game-panel {
		padding: 22px 12px 14px;
		border-radius: 16px;
	}

	.island-game-header {
		display: block;
		padding-right: 42px;
	}

	.island-game-score {
		display: inline-block;
		margin-top: 12px;
	}

	.island-game-close {
		top: 12px;
		right: 12px;
	}

	.island-game-footer {
		display: block;
		text-align: center;
	}

	.island-game-footer p + p {
		margin-top: 7px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.island-game-overlay {
		backdrop-filter: none;
	}
}
