* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	width: 100%;
	min-height: 100%;
}

body {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #10141d;
	font-family: Arial, sans-serif;
	flex-direction: column;
	min-height: 100dvh;
	height: auto;
	overflow-y: auto;
}

.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;
}

.game-layout {
	width: min(95vw, calc(92vh * (1100 / 620)), 1250px);
	aspect-ratio: 1100 / 620;
	height: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.mobile-game-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 100%;
}

#gameCanvas {
	width: 100%;
	height: 100%;
	max-width: 1250px;
	max-height: 760px;
	border: 3px solid #2d3748;
	border-radius: 12px;
	background: #182132;
	display: block;
	cursor: none;
	touch-action: none;
}

#fullscreenButton {
	position: absolute;
	right: 0;
	bottom: -52px;
	padding: 8px 14px;
	border-radius: 8px;
	border: 2px solid #9fc2ff;
	background: #1b2b47;
	color: #f6fbff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

#fullscreenButton:hover {
	background: #27436f;
}

#gameContainer:fullscreen {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	padding: 0;
	background: #10141d;
	display: block;
}

#gameContainer:fullscreen #gameCanvas {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	border-radius: 0;
	border: 0;
}

#gameContainer:fullscreen #fullscreenButton {
	display: none;
}

.site-footer {
	margin-top: 18px;
	font-size: 14px;
	color: #c8d5ef;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	padding: 0 12px 14px;
}

.seo-content {
	max-width: min(95vw, 1250px);
	color: #dbe8ff;
	padding: 10px 12px 0;
	text-align: center;
}

.seo-content h2 {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: #f6fbff;
}

.seo-content p {
	margin: 0;
	line-height: 1.45;
	font-size: 15px;
}

.noscript-note {
	color: #f6fbff;
	font-size: 14px;
	margin: 6px 0 14px;
	text-align: center;
}

.site-footer a {
	color: #9fc2ff;
	text-decoration: none;
	font-weight: 700;
}

.site-footer a:hover {
	text-decoration: underline;
}

.mobile-stick,
.mobile-stick-knob,
.mobile-stop-button {
	-webkit-user-select: none;
	user-select: none;
}

.mobile-stick,
.mobile-stop-button {
	display: none;
}

@media (pointer: coarse), (max-width: 900px) {
	body {
		justify-content: flex-start;
		padding-top: calc(env(safe-area-inset-top) + 8px);
		padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
	}

	.game-layout {
		width: min(96vw, calc(70dvh * (1100 / 620)));
		margin-top: 4px;
	}

	#fullscreenButton {
		display: none;
	}

	#gameCanvas {
		cursor: default;
	}

	.mobile-game-row {
		display: flex;
		width: 100%;
		align-items: center;
		justify-content: center;
		gap: 10px;
		padding: 6px 4px 2px;
	}

	.mobile-game-row {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		grid-template-areas:
			"game game game"
			"stop . stick";
		align-items: center;
	}

	.mobile-stick {
		display: block;
		width: 94px;
		height: 94px;
		border-radius: 999px;
		border: 3px solid #2d3748;
		background: rgba(27, 43, 71, 0.8);
		position: relative;
		touch-action: none;
		flex: 0 0 auto;
		margin-bottom: 6px;
		grid-area: stick;
		justify-self: end;
	}

	.mobile-stick-knob {
		width: 40px;
		height: 40px;
		border-radius: 999px;
		background: #9fc2ff;
		border: 2px solid #f6fbff;
		position: absolute;
		left: calc(50% - 20px);
		top: calc(50% - 20px);
		box-shadow: 0 0 0 2px rgba(16, 20, 29, 0.45) inset;
	}

	.mobile-stop-button {
		display: grid;
		width: 88px;
		height: 88px;
		padding: 0;
		border-radius: 0;
		border: 0;
		background: #f6fbff;
		color: #f6fbff;
		touch-action: manipulation;
		place-items: center;
		position: relative;
		overflow: hidden;
		clip-path: polygon(29.3% 0%, 70.7% 0%, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0% 70.7%, 0% 29.3%);
		margin-bottom: 6px;
		grid-area: stop;
		justify-self: start;
	}

	.game-layout {
		grid-area: game;
		justify-self: center;
	}

	.mobile-stop-button::before {
		content: "";
		position: absolute;
		inset: 6px;
		background: #e54242;
		clip-path: polygon(29.3% 0%, 70.7% 0%, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0% 70.7%, 0% 29.3%);
	}

	.mobile-stop-button span {
		position: relative;
		z-index: 1;
		font-size: 18px;
		font-weight: 800;
		letter-spacing: 0.2px;
		text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
		color: #f6fbff;
	}

	.mobile-stop-button:active {
		background: #f6fbff;
	}

	.mobile-stop-button:active::before {
		background: #b93232;
	}

	.seo-content {
		padding-top: 6px;
	}

	.site-footer {
		margin-top: 10px;
		padding-bottom: 8px;
	}
}

@media (pointer: coarse) and (orientation: landscape), (max-width: 900px) and (orientation: landscape) {
	.mobile-game-row {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas: "stop game stick";
		padding: 6px 4px 2px;
	}

	.game-layout {
		width: min(max(250px, calc(96vw - 198px)), calc(72dvh * (1100 / 620)));
	}

	.mobile-stop-button,
	.mobile-stick {
		margin-bottom: 0;
	}
}

.policy-body {
	display: block;
	background: #10141d;
	color: #f6fbff;
	min-height: 100vh;
	height: auto;
	padding: 32px 16px;
}

.policy-layout {
	max-width: 860px;
	margin: 0 auto;
	background: #182132;
	border: 3px solid #2d3748;
	border-radius: 12px;
	padding: 24px;
	line-height: 1.5;
}

.policy-layout h1,
.policy-layout h2 {
	margin-top: 0;
	color: #f6fbff;
}

.policy-layout section {
	margin: 18px 0;
}

.policy-layout a {
	color: #9fc2ff;
}

.policy-layout ul {
	padding-left: 20px;
}

.policy-note {
	color: #c8d5ef;
	font-size: 14px;
}
