html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #050505;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#GameDiv {
  position: relative;
  width: min(100vw, calc((100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 750 / 1334));
  height: min(calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)), calc(100vw * 1334 / 750));
  background: #000 url("./runtime/assets/resources/native/1f/1f9e8525-e332-4bd2-bb98-9565c5e1ef24.png") center / cover no-repeat;
  overflow: hidden;
}

#GameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  visibility: hidden;
  outline: none;
}

input.cocosEditBox,
textarea.cocosEditBox,
body input,
body textarea,
body [contenteditable="true"],
#GameDiv input,
#GameDiv textarea {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0, 0, 0, 0) !important;
  background-color: rgba(0, 0, 0, 0) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0) inset !important;
  color: #f8e2a3 !important;
  -webkit-text-fill-color: #f8e2a3 !important;
  caret-color: #f8e2a3 !important;
  outline: none !important;
  text-shadow: none !important;
  filter: none !important;
}

input.cocosEditBox:-webkit-autofill,
textarea.cocosEditBox:-webkit-autofill,
body input:-webkit-autofill,
body textarea:-webkit-autofill,
#GameDiv input:-webkit-autofill,
#GameDiv textarea:-webkit-autofill {
  -webkit-text-fill-color: #f8e2a3 !important;
  caret-color: #f8e2a3 !important;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0) inset !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0) inset !important;
  transition: background-color 999999s ease-in-out 0s !important;
}

#splash {
  position: absolute;
  inset: 0;
  display: block;
  color: #f7d77a;
  font: 14px/1.4 Arial, "Microsoft YaHei", sans-serif;
  background: #000 url("./splash-apk-devpkg.jpg?v=20260529-splash-restore") center / cover no-repeat;
  z-index: 10;
  transition: opacity .18s ease;
}

#splash.splash-hide {
  opacity: 0;
  pointer-events: none;
}

.xhtd-install-guide {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: end center;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #fff6ea;
}

.xhtd-install-guide .guide-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(4px);
}

.xhtd-install-guide .guide-panel {
  position: relative;
  width: min(100%, 420px);
  padding: 22px 20px 20px;
  border: 1px solid rgba(255, 218, 156, .24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(44, 15, 18, .96), rgba(16, 7, 8, .96));
  box-shadow: 0 18px 54px rgba(0, 0, 0, .5);
}

.xhtd-install-guide .guide-close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgba(255, 238, 215, .82);
  font-size: 26px;
  line-height: 36px;
}

.xhtd-install-guide .guide-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

.xhtd-install-guide .guide-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.xhtd-install-guide .guide-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #f7d39a;
}

.xhtd-install-guide .guide-text {
  margin: 10px auto 0;
  max-width: 330px;
  text-align: center;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 233, 207, .78);
}

.xhtd-install-guide .guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.xhtd-install-guide .guide-steps span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 218, 156, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
  color: rgba(255, 245, 227, .9);
}

.xhtd-install-guide .guide-download {
  display: grid;
  place-items: center;
  height: 48px;
  width: 100%;
  margin-top: 18px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffd27d, #d99027);
  color: #361706;
  font-weight: 700;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.splash-stage {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
}

.splash-bottom {
  position: absolute;
  left: 50%;
  bottom: 8.8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 83.2%;
  transform: translateX(-50%);
}

.progress-bar {
  width: 100%;
  height: 16px;
  padding: 2px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(12, 3, 1, .86);
  border: 1px solid rgba(255, 229, 131, .82);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, .9), 0 0 8px rgba(255, 212, 91, .25);
  box-sizing: border-box;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #ff7a27 0%, #ffe983 55%, #fff8c9 100%);
  box-shadow: 0 0 10px rgba(255, 226, 119, .72);
}

.status {
  min-height: 22px;
  color: #f8df93;
  font-size: 14px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .86);
}
