html {
  -ms-touch-action: 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;
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  cursor: default;
  color: #5b4636;
  background-color: #f4e8d4;
  text-align: center;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  display: flex;
  flex-direction: column;
}

#Cocos2dGameContainer {
  position: absolute;
  margin: 0;
  left: 0;
  top: 0;
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

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

#splash {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f4e8d4;
}

#splash.splash-background-ready {
  background-image: url(./splash-bg.f5aef.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

#splash.splash-lightweight {
  background: #f4e8d4;
}

#splash::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 252, 242, 0.05) 0%,
    rgba(255, 247, 225, 0.08) 55%,
    rgba(77, 61, 47, 0.08) 100%
  );
}

.splash-brand {
  position: absolute;
  z-index: 1;
  top: 29%;
  left: 50%;
  min-width: 40%;
  padding: 18px 54px 16px;
  border: 3px solid rgba(116, 78, 43, 0.42);
  border-radius: 18px;
  box-sizing: border-box;
  transform: translateX(-50%);
  background: rgba(255, 247, 220, 0.78);
  box-shadow:
    0 5px 0 rgba(101, 69, 42, 0.18),
    0 12px 30px rgba(90, 65, 45, 0.12);
}

.splash-title {
  color: #754526;
  font-size: clamp(42px, 6.4vw, 82px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  text-shadow: 0 2px 0 #fff8df;
  white-space: nowrap;
}

.splash-subtitle {
  margin-top: 9px;
  color: #8b6c51;
  font-size: clamp(16px, 2vw, 25px);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  white-space: nowrap;
}

.loading-panel {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 9%;
  width: min(48%, 620px);
  transform: translateX(-50%);
}

.loading-label {
  margin-bottom: 10px;
  color: #755941;
  font-size: clamp(15px, 1.7vw, 22px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.progress-bar {
  height: 12px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid rgba(102, 72, 46, 0.6);
  border-radius: 12px;
  background: rgba(255, 249, 230, 0.72);
  box-shadow:
    0 2px 7px rgba(78, 58, 41, 0.18) inset,
    0 1px 0 rgba(255, 255, 255, 0.65);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 8px;
  background-color: #e4a85e;
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.28) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.28) 75%,
    transparent 75%,
    transparent
  );
  background-size: 28px 28px;
}

.splash-version {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 22px;
  color: rgba(91, 70, 54, 0.72);
  font-size: clamp(14px, 1.5vw, 22px);
  font-weight: 700;
  letter-spacing: 0.06em;
}

@media (max-aspect-ratio: 4/3) {
  .splash-brand {
    top: 30%;
    min-width: 72%;
    padding-right: 28px;
    padding-left: 28px;
  }

  .loading-panel {
    width: 72%;
  }
}
