/* 批68部署-2：游戏区恒定 16:9 居中 + 深色留边（覆盖 Cocos 出厂模板的 1280x960 白底黑框外壳） */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  cursor: default;
  padding: 0;
  border: 0;
  margin: 0;
  text-align: center;
  background-color: #0a1410;
  font-family: Helvetica, Verdana, Arial, sans-serif;
}

body, canvas, div {
  outline: 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);
}

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

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

/* 🔴宽铺满、高按 16:9 收（批98修正）：
   旧写法＝游戏区"恒定 16:9 居中"⇒ 浏览器窗口比 16:9 更宽时（有标签栏＋书签栏＋任务栏，可视区实测≈1.9）
   左右各留一条深色边＝用户在线上看到的"两边黑框"。窗口比 16:9 更方时留上下边是对的（本地预览同理），
   所以只放开宽度：width 恒铺满，height 只在"更方"那一侧被 16:9 夹住。
   ⚠️顺带纠一句旧注释的事实错误：这里写的是"fitScale 恒为 1"，v241 实测＝0.947
   （游戏自己申报的需求框是 1320×760、不是 1280×720），留边并不能让 fitScale 变成 1，别再拿这句话当依据。 */
#GameDiv {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: min(100vh, calc(100vw * 9 / 16));
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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