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

.webgl-fallback {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  overflow: hidden;
  padding: max(16px, var(--safe-top)) max(16px, var(--safe-right))
    max(16px, var(--safe-bottom)) max(16px, var(--safe-left));
  box-sizing: border-box;
  color: #fff4df;
  background: #170f1b;
  text-align: center;
  font-family: "Noto Sans Myanmar", "Myanmar Text", sans-serif;
  line-height: 1.6;
}

.webgl-fallback__art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.webgl-fallback__panel {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  padding: 20px 22px;
  box-sizing: border-box;
  border: 1px solid rgba(239, 190, 87, 0.72);
  border-radius: 10px;
  color: #fff4df;
  background: rgba(25, 13, 28, 0.78);
  box-shadow: 0 14px 42px rgba(7, 4, 10, 0.28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.webgl-fallback__panel h2 {
  margin: 0 0 9px;
  color: #f0c45e;
  font-size: clamp(17px, 2.5vw, 21px);
  line-height: 1.45;
}

.webgl-fallback__panel p {
  margin: 0 0 15px;
  font-size: 14px;
}

.webgl-fallback__panel button {
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid #f0c45e;
  border-radius: 6px;
  color: #241624;
  background: #f0c45e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.webgl-fallback__panel button:hover {
  background: #f8d982;
}

.webgl-fallback__panel button:focus-visible {
  outline: 3px solid #fff4df;
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .webgl-fallback {
    flex-direction: column;
    gap: 20px;
  }

  .webgl-fallback__art {
    position: relative;
    inset: auto;
    height: auto;
    max-height: 40dvh;
    flex: 0 0 auto;
  }

  .webgl-fallback__panel {
    padding: 16px;
  }

  .webgl-fallback__panel p {
    font-size: 13px;
  }
}
