html {
	-ms-touch-action: none;
}

body,
canvas,
div {
	display: block;
	outline: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);

	user-select: none;
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	-khtml-user-select: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	/* display: none; <- Crashes Chrome on hover */
	-webkit-appearance: none;
	/* <-- Apparently some margin are still there even though it's hidden */
	margin: 0;
}

body {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	margin: 0;
	cursor: default;
	color: #888;
	background-color: #333;
	text-align: center;
	font-family: Helvetica, Verdana, Arial, sans-serif;
	display: flex;
	flex-direction: column;
}

canvas {
	background-color: rgba(0, 0, 0, 0);
}

#GameDiv,
#Cocos3dGameContainer,
#GameCanvas {
	width: 100%;
	height: 100%;
}

:root {
	--safe-top: env(safe-area-inset-top);
	--safe-right: env(safe-area-inset-right);
	--safe-bottom: env(safe-area-inset-bottom);
	--safe-left: env(safe-area-inset-left);
}

#splash {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 10;
}

#splash-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	z-index: 0;
	pointer-events: none;
}

#logo {
	position: absolute;
	left: 50%;
	top: 32%;
	transform: translate(-50%, -50%);
	max-width: 50vw;
	height: auto;
	display: block;
}

#splash-container {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 15%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	z-index: 10;
}

#progress-bg-container {
	/* 由背景图原始尺寸撑开，无需写死宽高 */
	position: relative;
	display: inline-block;
	line-height: 0;
	/* --progress: 0~1 揭示比例；nudge 用于后期微调填充图位置 */
	--progress: 0;
	--progress-fill-nudge-x: 0px;
	--progress-fill-nudge-y: 0px;
}

#progress-bg {
	display: block;
}

#progress-fill {
	position: absolute;
	left: calc(50% + var(--progress-fill-nudge-x));
	top: calc(50% + var(--progress-fill-nudge-y));
	transform: translate(-50%, -50%);
	display: block;
	/* 从左到右按 --progress 揭示填充图 */
	clip-path: inset(0 calc((1 - var(--progress)) * 100%) 0 0);
}

#loading-text {
	font-family: Arial, sans-serif;
	font-weight: bold;
	color: #fff;
	font-size: 12px;
	text-align: center;
	margin-top: 10px;
	line-height: 1.2;
}

#age-rating {
	position: absolute;
	left: 16px;
	top: 16px;
	width: 43px;
	height: auto;
	display: block;
	z-index: 11;
	pointer-events: none;
}