/* ========== SCROLL JOURNEY — CONTEMPLATIVE ADVENTURE ========== */

/* State selector — show game view when active */
[data-state="game"] #game-view {
  opacity: 1;
  pointer-events: all;
}

#game-view {
  z-index: 5;
}

/* Canvas — fixed fullscreen, pixel-art rendering */
#game-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  background: #1B0A3C;
  z-index: 1;
  pointer-events: none;
}

/* Scroll wrapper — captures scroll for journey progress */
.game-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  z-index: 5;
  scrollbar-width: none;
}

.game-wrapper::-webkit-scrollbar {
  display: none;
}

/* Virtual scroll height — ~10 min contemplative journey */
.game-wrapper::before {
  content: '';
  display: block;
  height: 5500vh;
  pointer-events: none;
}

/* Continue button at scroll bottom (fallback) */
.journey-continue {
  display: flex;
  justify-content: center;
  padding: 2rem 0 4rem;
  pointer-events: all;
}

/* ── Responsive ──────────────────────────────────── */

@media (pointer: coarse) {
  .game-wrapper::before {
    height: 12000vh;
  }
}

@media (max-width: 480px) {
  #game-canvas {
    height: 100dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  #game-canvas {
    transition: none;
  }
}
