html {
  -ms-touch-action: none;
  background: #fff0d5;
}

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

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  cursor: default;
  color: #7d402f;
  background: #fff0d5;
  text-align: center;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
}

canvas {
  background-color: transparent;
}

#GameDiv, #Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}

#GameCanvas {
  visibility: hidden;
}

#PindouSplash {
  position: fixed;
  z-index: 9999;
  inset: 0;
  overflow: hidden;
  background-color: #fff0d5;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.5s ease, transform 0.55s ease;
  pointer-events: none;
}

.splash-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

#PindouSplash.is-hidden {
  opacity: 0;
  transform: scale(1.015);
}

.splash-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 247, 229, 0.03) 0%, rgba(255, 245, 220, 0) 38%, rgba(255, 239, 207, 0.18) 100%),
    radial-gradient(circle at 50% 49%, rgba(255, 250, 237, 0.84) 0%, rgba(255, 248, 231, 0.46) 23%, rgba(255, 245, 222, 0) 53%);
}

.splash-brand {
  position: absolute;
  top: 43.5%;
  left: 50%;
  width: min(86vw, 520px);
  transform: translate(-50%, -50%);
  color: #8f432f;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.85), 0 7px 22px rgba(143, 67, 47, 0.12);
}

.splash-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 15px;
  margin-bottom: 9px;
  border: 1px solid rgba(232, 108, 92, 0.3);
  border-radius: 999px;
  color: #d65f51;
  background: rgba(255, 251, 239, 0.84);
  box-shadow: 0 5px 15px rgba(191, 95, 69, 0.09);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}

.splash-brand h1 {
  margin: 0;
  font-size: clamp(40px, 11vw, 66px);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: 0.04em;
}

.splash-brand p {
  margin: 11px 0 0;
  color: #b4674e;
  font-size: clamp(14px, 3.8vw, 20px);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.splash-loading {
  position: absolute;
  left: 50%;
  bottom: max(9.5%, calc(env(safe-area-inset-bottom) + 32px));
  min-width: 132px;
  padding: 10px 17px 9px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  transform: translateX(-50%);
  color: #a45b45;
  background: rgba(255, 249, 232, 0.74);
  box-shadow: 0 9px 30px rgba(151, 78, 48, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.splash-loading-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
}

.splash-loading-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  height: 7px;
  margin-top: 6px;
}

.splash-loading-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f27468;
  box-shadow: inset 0 -1px 1px rgba(151, 45, 38, 0.22), 0 2px 4px rgba(217, 83, 71, 0.2);
  animation: pindou-bounce 1.05s ease-in-out infinite;
}

.splash-loading-dots i:nth-child(2) {
  background: #f3b84a;
  animation-delay: 0.14s;
}

.splash-loading-dots i:nth-child(3) {
  background: #71b76c;
  animation-delay: 0.28s;
}

#PindouSplash.has-error .splash-loading-dots {
  display: none;
}

@keyframes pindou-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

@media (max-height: 650px) {
  .splash-brand { top: 45%; }
  .splash-loading { bottom: max(5%, calc(env(safe-area-inset-bottom) + 18px)); }
}

@media (prefers-reduced-motion: reduce) {
  #PindouSplash { transition-duration: 0.12s; }
  .splash-loading-dots i { animation: none; }
}

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