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;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  background: #000;
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: default;
  color: #888;
  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 {
  position: fixed;
  inset: 0;
  width: 100svw;
  height: 100svh;
  box-sizing: border-box;
}

#GameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  pointer-events: auto;
}

#brand-loading {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  z-index: 999;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity 0.5s ease;
  overflow: hidden;
}

#brand-loading .brand-logo {
  position: relative;
  width: min(72vw, 420px);
  aspect-ratio: 1023 / 266;
  overflow: visible;
}

#brand-loading .brand-fallback,
#brand-loading .brand-animation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#brand-loading .brand-animation {
  visibility: hidden;
  overflow: visible;
}

#brand-loading .brand-fallback {
  visibility: hidden;
}

#brand-loading .brand-animation svg {
  display: block;
}

@media (orientation: portrait) {
  #GameDiv {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

#brand-loading mp-loader { width: 100%; }

#brand-loading .brand-progress-group {
  position: absolute;
  left: 50%;
  bottom: 10.5%;
  transform: translateX(-50%);
  width: min(64vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

#brand-loading .brand-progress {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  background: #D9D6EA;
}

#brand-loading .brand-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #3D15EA;
  transition: width 0.16s linear;
}

#brand-loading.is-ready .brand-progress-fill {
  animation: none;
  width: 100%;
  transform: none;
}

#brand-loading .brand-loading-label {
  color: #625F70;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  #brand-loading .brand-progress-fill {
    transition: none;
  }
  #brand-loading.is-ready .brand-progress-fill { transform: none; }
}

: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);
}
