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);
}

/* Pelmennaya responsive mobile shell */
:root {
  --app-width: 100vw;
  --app-height: 100dvh;
  --game-safe-top: max(env(safe-area-inset-top, 0px), 6px);
  --game-safe-right: env(safe-area-inset-right, 0px);
  --game-safe-bottom: max(env(safe-area-inset-bottom, 0px), 14px);
  --game-safe-left: env(safe-area-inset-left, 0px);
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #241105;
}

body {
  position: fixed;
  inset: 0 auto auto 0;
  width: var(--app-width);
  height: var(--app-height);
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding: var(--game-safe-top) var(--game-safe-right) var(--game-safe-bottom) var(--game-safe-left);
  overscroll-behavior: none;
  touch-action: none;
}

#GameDiv {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

#Cocos3dGameContainer,
#GameCanvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}

#GameCanvas {
  object-fit: fill;
  touch-action: none;
}

html.vk-banner-visible #GameDiv {
  height: auto;
  margin-bottom: 60px;
}

@supports not (height: 100dvh) {
  :root {
    --app-height: 100vh;
  }
}

@media (orientation: landscape) {
  :root {
    --game-safe-top: max(env(safe-area-inset-top, 0px), 2px);
    --game-safe-bottom: max(env(safe-area-inset-bottom, 0px), 4px);
  }
}

