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: #a8c97b;

  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;

  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

/*
 * Keep the playable scene undistorted. On wide VK embeds the spare space is
 * filled by a soft-focus version of the game's own home background.
 */
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: -56px;
  pointer-events: none;
  background:
    linear-gradient(rgba(169, 202, 123, 0.18), rgba(130, 166, 105, 0.18)),
    url("58015016-c7a2-40ca-8989-75da10ac5397.jpg") center / cover no-repeat;
  filter: blur(32px) saturate(0.9) brightness(0.92);
  transform: scale(1.06);
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

#GameDiv {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: min(100vw, 75vh);
  height: 100vh;
  min-height: 0;
  box-shadow: 0 0 38px rgba(73, 102, 62, 0.34);
}

#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);
}


.vk-startup-error {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #344f3b;
  background: #c9dba2;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

.vk-startup-error[hidden] {
  display: none;
}

.vk-startup-error__panel {
  display: grid;
  width: min(100%, 430px);
  gap: 14px;
  padding: 28px 24px;
  border: 2px solid #afc489;
  border-radius: 24px;
  background: #fffaf0;
  box-shadow: 0 12px 28px #344f3b33;
}

.vk-startup-error__panel strong {
  font-size: 24px;
}

.vk-startup-error__panel span {
  font-size: 16px;
  line-height: 1.45;
}

.vk-startup-error__panel button {
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: #6f995e;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
