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

#H5LoadStatus[hidden] { display: none !important; }

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  color: #fff;
  background: #08122f;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

canvas {
  background-color: transparent;
  touch-action: none;
}

#GameDiv {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  overflow: hidden;
}

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

#PortraitOnlyOverlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(24px, var(--safe-top)) max(24px, var(--safe-right))
    max(24px, var(--safe-bottom)) max(24px, var(--safe-left));
  background: #08122f;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: auto;
  touch-action: none;
}

@media (orientation: landscape) {
  #GameDiv {
    visibility: hidden;
    pointer-events: none;
  }

  #PortraitOnlyOverlay {
    display: flex;
  }
}

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