/* Runtime glue for the rebuilt world (replaces what the Peachworlds runtime did). */

/* The page scrolls the document; the scroll sections define its length. */
#pwb-body-wrap {
  max-height: none;
  overflow: visible;
  transition: opacity 0.6s ease;
}
html.world-ready #pwb-body-wrap {
  opacity: 1;
}

/* Loader sits above everything until the world is ready. */
div#pwb-loading-wrap {
  position: fixed;
  z-index: 1000;
}
html.world-ready div#pwb-loading-wrap {
  opacity: 0;
  pointer-events: none;
}

#ifui canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Back-to-home button. Inside the site's iframe the site shows its own
   back arrow, so the world's button only appears when opened directly. */
#igouksg {
  display: flex !important;
  position: fixed;
  top: 32px;
  left: 32px;
  width: 44px;
  height: 44px;
  z-index: 2000;
  border: 1px solid rgba(144, 144, 144, 0.6);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}
#igouksg:hover { background: rgba(255, 255, 255, 0.3); }
#igouksg #ipyfkmj { width: 18px !important; height: 18px !important; object-fit: contain; }
html.world-embedded #igouksg { display: none !important; }
@media (max-width: 480px) {
  #igouksg { top: 20px; left: 20px; }
}

/* Keep the interactive controls above the full-width text overlays. */
#iwjdh-3-2, #iwjdh-2-2-2-5-2-2-3, #iwjdh-2-2-2-5-2-2-3-2 { z-index: 2000 !important; }

/* ACTIVATE SOUND disappears once the music has started. */
#iwjdh-2-2-2-5,
#iwjdh-2-2-2-5-2-2-3 {
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
html.sound-on #iwjdh-2-2-2-5,
html.sound-on #iwjdh-2-2-2-5-2-2-3 {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
