html {
  -ms-touch-action: none;
  height: 100%;
}

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);
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  width: 100dvw;
  height: 100%;
  height: 100dvh;
  padding: 0;
  border: 0;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;

  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 {
  width: 100%;
  height: 100%;
}

/* 平板竖屏修复：强制限制 GameDiv 不超出视口 */
#GameDiv {
  max-width: 100dvw !important;
  max-height: 100dvh !important;
}

/* 摇杆面板适配：关闭 exactFitScreen 后，用 FIXED_HEIGHT 保持比例 */
#Cocos3dGameContainer {
  display: flex;
  align-items: center;
  justify-content: center;
}

#GameCanvas {
  max-width: 100% !important;
  max-height: 100% !important;
}
