html {
  -ms-touch-action: none;
  /* 关键逻辑：禁止浏览器接管拖动手势，保证 Cocos 首页与所有 ScrollView 能持续收到 touchmove。 */
  touch-action: none;
  overscroll-behavior: 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);
}

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

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

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

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

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

#WarehouseLoading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: #050403;
  opacity: 1;
  transition: opacity 520ms ease, visibility 520ms ease;
  will-change: opacity;
}

.warehouse-loading__background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.warehouse-loading--done {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}

.warehouse-loading__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0.08) 100%);
}

.warehouse-loading__brand {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 81.2%;
  width: 100%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.warehouse-loading__progress {
  position: relative;
  width: min(72vw, 460px);
  height: 14px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(235, 177, 70, 0.55);
  border-radius: 999px;
  background: rgba(29, 31, 34, 0.86);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 14px rgba(210, 143, 31, 0.12);
}

.warehouse-loading__progress-value {
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(151, 87, 12, 0.2), #e5ab3b 52%, #ffdc78 100%);
  box-shadow: 0 0 12px rgba(255, 194, 74, 0.55);
  animation: warehouse-loading-progress 1.35s ease-in-out infinite;
  will-change: transform;
}

.warehouse-loading__hint {
  margin-top: 15px;
  color: rgba(237, 210, 155, 0.78);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

@keyframes warehouse-loading-progress {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(92%); }
  100% { transform: translateX(245%); }
}

@media (prefers-reduced-motion: reduce) {
  .warehouse-loading__progress-value {
    animation-duration: 2.8s;
  }
}

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

#GameDiv {
  position: relative;
  /* 运行画布始终使用当前视口；720×1280 仅作为 Cocos 美术坐标基准，由 Fit Width 负责内容适配。 */
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background-color: #000;
}

#Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
  touch-action: none;
  overscroll-behavior: none;
}

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}
