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;
  margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

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 {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background-color: #49311f;
  background-image: url("loading-background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#splash-box {
  width: min(100vw, calc(100vh * 375 / 526));
  width: min(100vw, calc(100dvh * 375 / 526));
  height: 100%;
  position: relative;
}

#splash-logo {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(64%, 240px);
  height: auto;
  pointer-events: none;
}

#splash-p {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  width: min(78%, 291px);
  aspect-ratio: 582 / 62;
}

#splash-track {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#splash-loading {
  position: absolute;
  left: calc(100% * 6 / 582);
  top: calc(100% * 6 / 62);
  width: calc(100% * 570 / 582);
  height: calc(100% * 42 / 62);
  background-image: url("loading-progress-inner.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.1s linear;
  pointer-events: none;
}

#splash-progress-text {
  position: absolute;
  top: calc(100% * 27 / 62);
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 1;
  color: #fff;
  text-stroke: 1px rgba(149,0,11,0.8);
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

#age-rating {
	position: absolute;
	left: 16px;
	top: 16px;
	width: 43px;
	height: auto;
	display: block;
	z-index: 11;
	pointer-events: none;
}
