/* Prevent the overall page from scrolling (the story area will handle its own scroll). */
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

/* Center the device image (story text is positioned independently below it). */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* Device frame container. */
.outerContainer {
  position: relative;
  margin-top: 10px;
  width: 348px;  /* match device frame width */
  height: 532px; /* match device frame height */
}

/* Phaser inserts the game canvas into this element.  We need to offsets it so it sits properly in the device shell */
/* image so it looks like a functional PocketPC device. */
.container {
  width: 240px;
  height: 320px;
  position: absolute;
  left: 51px;
  top: 57px;
}

  /* Loading overlay sits on top of the virtual screen until preloading finishes. */
.loadingOverlay {
  position: absolute;
  left: 51px;
  top: 57px;
  width: 240px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  color: #e6e6e6;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 18px;
  z-index: 3;
  pointer-events: none;
}

/* Story text area. */
.storyText {
  position: fixed;
  top: calc(10px + 532px + 12px); /* device top + height + gap */
  left: 50%;
  transform: translateX(-50%);
  width: 90vw; /* stretch across most of the page */
  max-width: 960px;
  height: calc(100vh - (10px + 532px + 12px) - 12px); /* fill remaining height above page edge */
  min-height: 120px;
  text-align: left;
  z-index: 2;
  overflow-y: auto; /* scroll inside the story area */
  box-sizing: border-box;
}
