body, html {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	height: 100dvh;
	overflow: hidden;
	position: fixed;
	top: 0;
	left: 0;
	touch-action: none;
	-webkit-overflow-scrolling: touch;
}

#Stage,
#Stage *{
	position: absolute;
	user-select: none;
	-moz-user-select: none;
	-webkit-user-select: none;
	-o-user-select: none;
	-ms-user-select: none;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	-webkit-text-size-adjust: none;
}

#Stage {
	width: 100% !important;
	height: 100% !important;
}

#Stage canvas {
	display: block;
	max-width: 100%;
	max-height: 100%;
}

.Spinner svg {
	animation: rotation 1.4s linear infinite;
	stroke: #fff;
}

@keyframes rotation {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(270deg);
	}
}

.Spinner svg circle {
	stroke-dasharray: 187;
	stroke-dashoffset: 0;
	transform-origin: 0, 0;
	animation: turn 1.4s ease-in-out infinite;
}

@-webkit-keyframes turn {
	0% {
		stroke-dashoffset: 187;
	}

	50% {
		stroke-dashoffset: 46.75;
		transform: rotate(135deg);
	}

	100% {
		stroke-dashoffset: 187;
		transform: rotate(450deg);
	}
}

@keyframes turn {
	0% {
		stroke-dashoffset: 187;
	}

	50% {
		stroke-dashoffset: 46.75;
		transform: rotate(135deg);
	}

	100% {
		stroke-dashoffset: 187;
		transform: rotate(450deg);
	}
}

.HowTo {
	position: fixed;
	z-index: 10;
	top: 42%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(360px, calc(100vw - 32px));
	box-sizing: border-box;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #555;
	text-align: left;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	animation: howto-in 0.5s ease-out;
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.HowTo.hidden {
	opacity: 0;
	transform: translate(-50%, -46%);
}

.HowTo h2 {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 600;
	color: #333;
	text-align: center;
}

.HowTo ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.HowTo li {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.35;
}

.HowTo li svg {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
}

.HowTo b {
	color: #333;
}

.HowTo p {
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 1.6;
	color: #555;
	text-align: center;
}

.LoadError {
	position: fixed;
	z-index: 30;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 16px;
	background: #fff;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	text-align: center;
	color: #555;
}

.LoadError p {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
}

.LoadError button {
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: #4998b4;
	border: 0;
	border-radius: 999px;
	padding: 12px 28px;
	cursor: pointer;
}

@keyframes howto-in {
	from { opacity: 0; transform: translate(-50%, -46%); }
	to { opacity: 1; transform: translate(-50%, -50%); }
}

@media (max-height: 520px) {
	.HowTo { top: 38%; }
	.HowTo h2 { font-size: 17px; margin-bottom: 8px; }
	.HowTo li { font-size: 13px; margin-bottom: 4px; }
	.HowTo li svg { width: 24px; height: 24px; flex-basis: 24px; }
	.HowTo p { margin-top: 8px; font-size: 13px; line-height: 1.4; }
}

@media (max-width: 480px) {
	.LoaderGif {
		max-width: 55vw !important;
		max-height: 35vh !important;
	}

	.Spinner {
		max-width: 30vw !important;
		max-height: 20vh !important;
	}
}

@media (max-height: 500px) and (orientation: landscape) {
	.LoaderGif {
		max-width: 25vh !important;
		max-height: 25vh !important;
	}

	.Spinner {
		max-width: 18vh !important;
		max-height: 18vh !important;
	}
}

@media (max-width: 360px) {
	body, html {
		font-size: 14px;
	}
}
