html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  /* 页面底色改成游戏自己的深色（Batch 1.5）：
     以前是浅绿 #c3d092 —— 那本来是落地页的主题色，留在游戏页上会露出来。
     <canvas> 在第一帧画出来之前是**全透明**的，
     这段时间里玩家看到的就是这个页面底色 ⇒ 浅绿整屏（看着像卡死）。
     现在底色 = 加载页同款深色，最坏情况也只是「黑屏而不是绿屏」。 */
  background: #0a0d08;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#game {
  display: block;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 静态加载兜底（Batch 1.5）
   纯 HTML + CSS，零 JS 依赖：JS 还在下载时先给玩家一个「正在加载」界面，
   画布第一帧画完后由 js/platform.js 移除（无缝交接给游戏自己的加载自检页）。
   压在画布之上（z-index 2），所以 JS 一旦挂掉，它就是玩家唯一能看到的东西 ——
   这正好把「静默一片浅绿」变成「看得见的加载界面 / 看得见的报错」。 */
#bootFallback {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0d08;
  color: #f2ead7;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
}
#bootFallback .bf-box {
  text-align: center;
}
#bootFallback .bf-title {
  font-size: 26px;
  font-weight: 700;
  color: #f6efdd;
  letter-spacing: 2px;
}
#bootFallback .bf-sub {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(242, 234, 215, .5);
}
#bootFallback .bf-spin {
  width: 26px;
  height: 26px;
  margin: 18px auto 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 196, 92, .18);
  border-top-color: rgba(255, 196, 92, .85);
  animation: bfSpin .9s linear infinite;
}
@keyframes bfSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
#bootFallback .bf-err {
  display: none;
  margin: 14px auto 0;
  max-width: 520px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(184, 86, 47, .16);
  border: 1px solid rgba(255, 150, 120, .35);
  color: rgba(255, 190, 165, .95);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
  white-space: pre-wrap;
}
#bootFallback .bf-btn {
  display: none;
  margin: 16px auto 0;
  padding: 9px 22px;
  border: 0;
  border-radius: 19px;
  background: #b8562f;
  color: #fff6e8;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
#bootFallback.bf-fail .bf-spin { display: none; }
#bootFallback.bf-fail .bf-sub { color: rgba(255, 150, 120, .9); }
#bootFallback.bf-fail .bf-err { display: block; }
#bootFallback.bf-fail .bf-btn { display: block; }
/* 没开 JavaScript 时的兜底说明（Batch 1-11） */
.noscript {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: block;
  padding: 40px 24px;
  box-sizing: border-box;
  overflow: auto;
  background: #14180d;
  color: #f2ead7;
  font: 16px/1.7 "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  text-align: center;
}
.noscript h1 {
  margin: 0 0 14px;
  font-size: 26px;
  color: #ffd28a;
}
.noscript p {
  margin: 8px 0;
  color: rgba(242, 234, 215, .82);
}
.noscript-hint {
  font-size: 14px;
  color: rgba(242, 234, 215, .55);
}
.noscript a {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 20px;
  border-radius: 20px;
  background: #b8562f;
  color: #fff6e8;
  font-size: 15px;
  text-decoration: none;
}
