#stage {
  position: absolute; inset: 0 0 88px 0; /* leave room for navbar */
  display: flex; flex-direction: column; align-items: center;
  padding: 32px; text-align: center;
  overflow-y: auto;
}
.scene {
  width: 100%; max-width: 1100px;
  /* margin: auto centres short content; collapses to 0 when content overflows so
     iOS Safari can always scroll from the very top of tall scenes. */
  margin-top: auto; margin-bottom: auto;
  animation: sceneIn .45s ease both;
}
@keyframes sceneIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

#navbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 88px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: rgba(255, 255, 255, .6); backdrop-filter: blur(6px);
}
.nav-btn {
  font-family: var(--font); font-weight: 800; font-size: 18px;
  border: none; border-radius: 12px; padding: 12px 22px; cursor: pointer;
  background: #fff; color: var(--ink); box-shadow: 0 4px 0 #e2dccf;
}
.nav-btn.primary { background: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-shadow); }
.nav-btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.progress { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #e7ddcd; transition: .2s; }
.dot.active { background: var(--brand); transform: scale(1.25); }

/* Phones: keep every nav control on-screen and tappable */
@media (max-width: 640px) {
  #stage { inset: 0 0 68px 0; padding: 22px 16px; }
  #navbar { height: 68px; padding: 0 12px; gap: 8px; }
  .nav-btn, #btn-home { font-size: 15px; padding: 11px 14px; }
  #btn-home { margin-right: 8px; }
  .progress { gap: 7px; }
  .dot { width: 9px; height: 9px; }
}

/* Very small phones: drop the decorative progress dots so buttons stay usable */
@media (max-width: 460px) {
  .progress { display: none; }
}
