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: #a2e6e0;

  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%;
  min-width: 100%;
  min-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);
  --neon-ad-reserved-bottom: 0px;
  --neon-forest: #244c44;
  --neon-cream: #fff9e9;
  --neon-yellow: #f5cd50;
  --neon-muted: #6f806b;
}

/* Keep the fixed portrait board inside the host viewport, including fractional CSS sizes. */
html, body { overflow: hidden; width: 100%; height: 100%; min-width: 100vw; min-height: 100dvh; overscroll-behavior: none; touch-action: none; background: #a2e6e0; }
#GameDiv { flex-shrink: 0; overflow: hidden; width: 100vw; height: 100dvh; min-width: 100vw; min-height: 100dvh; background: #a2e6e0; }
#Cocos3dGameContainer { width: 100%; height: 100%; min-width: 100%; min-height: 100%; background: #a2e6e0; }

#neon-ad-layer {
  position: fixed;
  z-index: 20;
  display: none;
  box-sizing: border-box;
  border: 1px solid var(--neon-forest);
  border-radius: 6px;
  background: var(--neon-cream);
  color: var(--neon-forest);
  font: 600 12px/1.2 Helvetica, Verdana, Arial, sans-serif;
  letter-spacing: 0;
  pointer-events: auto;
}
#neon-ad-layer[data-state="loading"], #neon-ad-layer[data-state="filled"], #neon-ad-layer[data-state="preview"] { display: block; }
#neon-ad-layer[data-placement="bottom-banner"] {
  left: 50%;
  bottom: calc(var(--safe-bottom) + 12px);
  width: 320px;
  height: 50px;
  transform: translateX(-50%);
}
#neon-ad-layer[data-placement="desktop-side"] {
  right: max(12px, var(--safe-right));
  top: 50%;
  width: 300px;
  height: 250px;
  transform: translateY(-50%);
}
.neon-ad-label { position: absolute; left: 8px; top: -15px; color: var(--neon-muted); font-size: 10px; }
#neon-ad-content { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
body[data-neon-ad-placement="bottom-banner"] #GameDiv { height: calc(100dvh - var(--neon-ad-reserved-bottom)) !important; min-height: calc(100dvh - var(--neon-ad-reserved-bottom)) !important; }
body[data-neon-ad-placement="hidden"] #GameDiv, body[data-neon-ad-placement="desktop-side"] #GameDiv { height: 100dvh !important; min-height: 100dvh !important; }
