/* Bloomist on Pikabu Games: the page is one fixed stage inside the portal frame (the whole frame up to 2:1, a portrait
   column on a phone), nothing scrolls, nothing is selectable. */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  /* the game's launch colour (LoadingScreen.LaunchColor) with a soft vignette: the band around the column on a computer */
  background: radial-gradient(ellipse at center, #d9cde8 0%, #c3b2da 70%, #b4a0cf 100%) #d0c2e1;
  font-family: "Nunito", "Trebuchet MS", "Segoe UI", sans-serif;
}

#stage {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  background: #d0c2e1;
  box-shadow: 0 0 48px rgba(60, 40, 90, 0.25);
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  background: #d0c2e1;
}

#loader {
  position: absolute;
  inset: 0;
  background: #d0c2e1;
  transition: opacity 0.5s ease;
}

#loader.done {
  opacity: 0;
  pointer-events: none;
}

#loader-head {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
}

#loader-logo {
  display: block;
  /* the game's loading screen: 880 of the 1080×1920 frame, which a landscape window scales by its height */
  width: min(81%, 45.8vh);
  margin: 0 auto;
  pointer-events: none;
}

#loader-title {
  margin-top: 2.2vh;
  color: #5d3f7a;
  font-weight: 800;
  font-size: clamp(16px, 2.6vh, 30px);
  letter-spacing: 0.02em;
}

#loader-bar {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: min(57%, 32vh);
  height: 1.6vh;
  min-height: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.67);
  overflow: hidden;
}

#loader-fill {
  width: 4%;
  height: 100%;
  border-radius: 999px;
  background: #7cbe4e;
  transition: width 0.25s ease;
}

#loader-error {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8%;
  text-align: center;
  color: #4a3260;
  font-size: clamp(14px, 2.2vh, 24px);
  font-weight: 700;
}

#loader-error[hidden], #loader-bar[hidden] {
  display: none;
}

#loader-reload {
  margin-top: 1.6vh;
  padding: 0.9vh 3.5vh;
  border: none;
  border-radius: 999px;
  background: #7cbe4e;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

/* A phone held sideways (index.html layout()): the portrait game asks to be turned upright. */
#rotate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4vh;
  background: radial-gradient(ellipse at center, #d9cde8 0%, #c3b2da 70%, #b4a0cf 100%) #d0c2e1;
  color: #5d3f7a;
  font-weight: 800;
  font-size: clamp(16px, 5vh, 28px);
  text-align: center;
  padding: 0 8vw;
}

#rotate[hidden] {
  display: none;
}

#rotate-phone {
  width: 13vh;
  height: 22vh;
  border: 1.2vh solid #5d3f7a;
  border-radius: 2.6vh;
  box-sizing: border-box;
  animation: bloomist-turn 2.4s ease-in-out infinite;
}

@keyframes bloomist-turn {
  0%, 20% { transform: rotate(-90deg); }
  55%, 100% { transform: rotate(0deg); }
}
