/* T-FIT-DESKTOP: game canvas keeps the 750:1334 design aspect ratio, centered
   with letterbox on any window size (same behavior as the editor preview).
   cc_exact_fit_screen is disabled in index.html, so the engine renders at the
   canvas size below without stretching. */

html {
  -ms-touch-action: none;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
}

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

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  cursor: default;
  color: #888;
  background-color: #000;

  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;

  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Game area: fixed 750:1334 aspect, fit inside the window, centered.
   !important is required: the engine writes fullscreen inline styles on these
   nodes at runtime, and inline styles would otherwise override this file. */
#GameDiv {
  width: min(100vw, calc(100vh * 750 / 1334)) !important;
  height: min(100vh, calc(100vw * 1334 / 750)) !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

#Cocos3dGameContainer {
  width: 100% !important;
  height: 100% !important;
}

#GameCanvas {
  width: 100% !important;
  height: 100% !important;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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