html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #050708;
}

body {
  cursor: default;
  padding: 0;
  border: 0;
  margin: 0;

  display: grid;
  place-items: center;
  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;
}

body, canvas, div {
  outline: 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 */
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

#GameDiv {
  position: relative;
  width: min(100vw, 56.25vh) !important;
  height: min(100vh, 177.777778vw) !important;
  aspect-ratio: 9 / 16;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  touch-action: none;
}

#Cocos3dGameContainer, #GameCanvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

#GameCanvas {
  display: block;
  pointer-events: auto;
  touch-action: none;
}

@supports (height: 100dvh) {
  #GameDiv {
    width: min(100vw, 56.25dvh) !important;
    height: min(100dvh, 177.777778vw) !important;
  }
}

: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);
}
