/* EQUILIBRIUM — PASS 23
   Keep the world in the viewport while scroll reveals camera states and copy.
   No black interstitial shaft, no detached manifesto after the 3D scene. */

/* ---------------- QUANTUM UNFOLDS ---------------- */
.quantum-world-page[data-pass23-quantum="true"] .quantum-journey{
  position:relative!important;
  height:500svh!important;
  min-height:230rem!important;
  overflow:clip!important;
  background:#02040a!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-world-sticky{
  position:sticky!important;
  top:0!important;
  height:100svh!important;
  min-height:100svh!important;
  background:#02040a!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-beats{
  position:absolute!important;
  inset:0!important;
  z-index:-1!important;
  margin:0!important;
  pointer-events:none!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-beat{
  position:absolute!important;
  left:0!important;
  width:1px!important;
  height:1px!important;
  min-height:1px!important;
  overflow:hidden!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-beat:nth-child(1){top:8%}
.quantum-world-page[data-pass23-quantum="true"] .quantum-beat:nth-child(2){top:34%}
.quantum-world-page[data-pass23-quantum="true"] .quantum-beat:nth-child(3){top:58%}
.quantum-world-page[data-pass23-quantum="true"] .quantum-beat:nth-child(4){top:78%}
.quantum-world-page[data-pass23-quantum="true"] .quantum-state-panel{
  top:auto!important;
  right:clamp(1rem,5vw,5rem)!important;
  bottom:clamp(5.4rem,10vh,8rem)!important;
  width:min(27rem,36vw)!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  transform:translateY(1rem)!important;
  opacity:0!important;
  text-shadow:0 .18rem 1.5rem rgba(0,0,0,.92),0 0 1.8rem rgba(0,0,0,.55)!important;
  transition:opacity .55s ease,transform .65s cubic-bezier(.16,1,.3,1)!important;
}
.quantum-world-page[data-pass23-quantum="true"][data-pass23-copy="true"] .quantum-state-panel{
  opacity:1!important;
  transform:none!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-state-panel::after{display:none!important}
.quantum-world-page[data-pass23-quantum="true"] .annotation-anchor{
  right:calc(100% + .8rem)!important;
  width:clamp(2.4rem,6vw,5.5rem)!important;
  opacity:.55!important;
}
.quantum-world-page[data-pass23-quantum="true"] .state-readout{
  align-items:center!important;
  gap:.55rem!important;
}
.quantum-world-page[data-pass23-quantum="true"] .state-readout b{
  font-size:clamp(1.35rem,2.5vw,2.3rem)!important;
  opacity:.78!important;
}
.quantum-world-page[data-pass23-quantum="true"] .state-readout span{
  font-size:clamp(.58rem,.85vw,.72rem)!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-state-panel>p{
  max-width:25rem!important;
  margin:.52rem 0 0!important;
  color:rgba(244,249,255,.88)!important;
  font-size:clamp(.76rem,1vw,.9rem)!important;
  line-height:1.64!important;
}
.quantum-world-page[data-pass23-quantum="true"] .state-lore{
  margin-bottom:.4rem!important;
  font-size:.52rem!important;
  opacity:.86!important;
}
.quantum-world-page[data-pass23-quantum="true"][data-pass23-phase="crossing"] .quantum-hero-copy,
.quantum-world-page[data-pass23-quantum="true"][data-pass23-phase="final"] .quantum-hero-copy{
  opacity:0!important;
  transform:translateY(-1rem) scale(.975)!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-manifesto-pass23{
  position:absolute!important;
  z-index:9!important;
  left:clamp(1rem,5vw,5rem)!important;
  right:auto!important;
  top:50%!important;
  width:min(43rem,52vw)!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  transform:translateY(-42%) translateX(-1rem)!important;
  opacity:0!important;
  pointer-events:none!important;
  text-shadow:0 .18rem 1.6rem rgba(0,0,0,.92),0 0 2rem rgba(0,0,0,.5)!important;
  transition:opacity .65s ease,transform .8s cubic-bezier(.16,1,.3,1)!important;
}
.quantum-world-page[data-pass23-quantum="true"][data-pass23-final="true"] .quantum-manifesto-pass23{
  opacity:1!important;
  transform:translateY(-50%) translateX(0)!important;
  pointer-events:auto!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-manifesto-pass23 h2{
  max-width:14ch!important;
  margin:.5rem 0 .85rem!important;
  font-size:clamp(2.35rem,5vw,5.4rem)!important;
  line-height:.9!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-manifesto-pass23 p{
  max-width:37rem!important;
  color:rgba(243,248,255,.86)!important;
  font-size:clamp(.78rem,1.05vw,.93rem)!important;
  line-height:1.65!important;
}
.quantum-world-page[data-pass23-quantum="true"] .quantum-manifesto-pass23 nav{margin-top:1rem!important}
.quantum-world-page[data-pass23-quantum="true"][data-pass23-final="true"] .quantum-state-panel{opacity:0!important;pointer-events:none!important}
.quantum-world-page[data-pass23-quantum="true"] .quantum-world canvas{
  filter:brightness(1.13) saturate(1.09) contrast(1.045)!important;
}

/* ---------------- TRIPPY MOUNTAINS ---------------- */
.trippy-page[data-pass23-trippy="true"] .trippy-journey{
  height:520svh!important;
  min-height:235rem!important;
  overflow:clip!important;
  background:#070510!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-sticky{
  position:sticky!important;
  top:0!important;
  height:100svh!important;
  min-height:100svh!important;
  background:#070510!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-beats{
  position:absolute!important;
  inset:0!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-chapters article{
  padding:.35rem 0 .4rem 1rem!important;
  border:0!important;
  border-left:1px solid rgba(128,234,239,.55)!important;
  background:transparent!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  text-shadow:0 .2rem 1.5rem rgba(0,0,0,.95)!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-chapters strong{
  font-size:clamp(2.1rem,4.4vw,4.6rem)!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-chapters p{
  max-width:27rem!important;
  margin-left:auto!important;
  color:rgba(246,248,251,.88)!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23{
  position:absolute!important;
  z-index:11!important;
  inset:0!important;
  width:auto!important;
  margin:0!important;
  padding:clamp(5.6rem,10vh,8rem) clamp(1rem,5vw,5rem) clamp(2rem,5vh,4rem)!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.1fr) minmax(16rem,.75fr)!important;
  align-content:center!important;
  gap:1.2rem 3rem!important;
  background:linear-gradient(90deg,rgba(4,3,10,.62),rgba(4,3,10,.08) 55%,transparent)!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transition:opacity .65s ease,visibility .65s ease!important;
}
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final="true"] .trippy-manifest-pass23{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23>header{
  display:block!important;
  margin:0!important;
  max-width:42rem!important;
  opacity:0;
  transform:translateY(1rem);
  transition:opacity .6s ease,transform .7s cubic-bezier(.16,1,.3,1);
  text-shadow:0 .2rem 1.6rem rgba(0,0,0,.95)!important;
}
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final-step="1"] .trippy-manifest-pass23>header,
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final-step="2"] .trippy-manifest-pass23>header,
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final-step="3"] .trippy-manifest-pass23>header{opacity:1;transform:none}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23 h2{
  max-width:10ch!important;
  font-size:clamp(2.7rem,6vw,6.3rem)!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23 header p{
  max-width:34rem!important;
  color:rgba(246,248,251,.86)!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:.45rem!important;
  margin:0!important;
}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-grid article{
  min-height:0!important;
  padding:.7rem 0 .7rem .85rem!important;
  border:0!important;
  border-left:1px solid rgba(128,234,239,.35)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  opacity:0;
  transform:translateX(1rem);
  text-shadow:0 .15rem 1.2rem #000!important;
  transition:opacity .55s ease,transform .7s cubic-bezier(.16,1,.3,1);
}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-grid h3{margin:.28rem 0 .25rem!important;font-size:clamp(1.15rem,2vw,1.7rem)!important}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-grid p{font-size:.72rem!important;line-height:1.52!important;color:rgba(244,247,251,.74)!important}
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final-step="2"] .trippy-manifest-grid article:nth-child(1),
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final-step="3"] .trippy-manifest-grid article{opacity:1;transform:none}
.trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23>nav{
  grid-column:1/-1!important;
  margin-top:.3rem!important;
  opacity:0;
  transform:translateY(.7rem);
  transition:opacity .5s ease,transform .6s ease;
}
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final-step="3"] .trippy-manifest-pass23>nav{opacity:1;transform:none}
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final="true"] .trippy-chapters,
.trippy-page[data-pass23-trippy="true"][data-pass23-trippy-final="true"] .trippy-cue{opacity:0!important;pointer-events:none!important}

/* ---------------- RESONANCE ---------------- */
.resonance-v2[data-pass23-resonance="true"]{
  position:relative!important;
  min-height:390svh!important;
  background:#06131b!important;
  overflow:clip!important;
}
/* V5 reparents the WebGL host to the root. The stage must therefore be transparent;
   the former opaque stage background was literally painting over the cathedral. */
.resonance-v2[data-pass23-resonance="true"]>[data-resonance-world]{
  position:sticky!important;
  top:0!important;
  z-index:0!important;
  width:100%!important;
  height:100svh!important;
  margin-bottom:-100svh!important;
  opacity:1!important;
  filter:brightness(1.48) saturate(1.16) contrast(1.035)!important;
}
.resonance-v2[data-pass23-resonance="true"] .resonance-stage{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  height:100svh!important;
  min-height:100svh!important;
  background:transparent!important;
  overflow:hidden!important;
}
.resonance-v2[data-pass23-resonance="true"] .resonance-grade{
  opacity:.18!important;
  background:radial-gradient(circle at 50% 50%,transparent 0 66%,rgba(0,4,7,.12) 100%)!important;
}
.resonance-v2[data-pass23-resonance="true"] .resonance-hero,
.resonance-v2[data-pass23-resonance="true"] .signal-readout,
.resonance-v2[data-pass23-resonance="true"] .frequency-rail-wrap{
  transition:opacity .55s ease,transform .65s cubic-bezier(.16,1,.3,1)!important;
}
.resonance-v2[data-pass23-resonance="true"][data-pass23-resonance-phase="story"] .resonance-hero,
.resonance-v2[data-pass23-resonance="true"][data-pass23-resonance-phase="story"] .signal-readout,
.resonance-v2[data-pass23-resonance="true"][data-pass23-resonance-phase="story"] .frequency-rail-wrap{
  opacity:0!important;
  pointer-events:none!important;
  transform:translateY(-.8rem)!important;
}
.resonance-v2[data-pass23-resonance="true"] .resonance-explain{
  position:relative!important;
  z-index:10!important;
  min-height:390svh!important;
  margin-top:-100svh!important;
  padding:118svh clamp(1rem,5vw,5rem) 14svh!important;
  background:transparent!important;
  pointer-events:none!important;
}
.resonance-v2[data-pass23-resonance="true"] .resonance-explain>header,
.resonance-v2[data-pass23-resonance="true"] .explain-grid article{
  border:0!important;
  border-left:1px solid color-mix(in srgb,var(--band) 44%,rgba(255,255,255,.16))!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  text-shadow:0 .2rem 1.6rem rgba(0,0,0,.96)!important;
}
.resonance-v2[data-pass23-resonance="true"] .resonance-explain>header{
  width:min(39rem,82vw)!important;
  min-height:70svh!important;
  margin:0 0 8svh auto!important;
  padding:.6rem 0 .6rem 1rem!important;
}
.resonance-v2[data-pass23-resonance="true"] .explain-grid{
  gap:11svh!important;
}
.resonance-v2[data-pass23-resonance="true"] .explain-grid article{
  width:min(31rem,78vw)!important;
  min-height:54svh!important;
  padding:.7rem 0 .7rem 1rem!important;
}
.resonance-v2[data-pass23-resonance="true"] .safety{
  background:rgba(3,10,14,.34)!important;
  backdrop-filter:blur(8px)!important;
}

/* ---------------- RÊVERIE / KAGUYA ---------------- */
.reverie-place-story .pass21-place-actions{display:none!important}
.pass23-place-actions{
  position:relative;
  z-index:80;
  display:flex;
  flex-wrap:wrap;
  gap:.42rem;
  margin-top:.65rem;
  pointer-events:auto!important;
}
.pass23-place-actions :is(button,a){
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:2.45rem;
  padding:.52rem .74rem;
  border:1px solid rgba(126,235,255,.48);
  border-radius:999px;
  background:rgba(4,18,27,.76);
  color:#e5fbff;
  box-shadow:inset 0 1px rgba(255,255,255,.1),0 .6rem 1.8rem rgba(0,0,0,.28);
  backdrop-filter:blur(12px) saturate(1.18);
  text-decoration:none;
  font:800 .54rem/1 system-ui,sans-serif;
  letter-spacing:.085em;
  text-transform:uppercase;
  cursor:pointer;
  pointer-events:auto!important;
  touch-action:manipulation;
}
.pass23-place-actions a{
  border-color:rgba(244,207,112,.72);
  color:#fff0ba;
  background:linear-gradient(135deg,rgba(116,72,19,.74),rgba(26,18,8,.8));
  box-shadow:inset 0 1px rgba(255,255,255,.11),0 0 1.5rem rgba(240,195,89,.13),0 .6rem 1.8rem rgba(0,0,0,.28);
}
.reverie-kaguya-enter-pass23{
  position:absolute;
  z-index:90;
  right:clamp(.8rem,4vw,3rem);
  bottom:clamp(5.2rem,10vh,7.5rem);
  display:inline-flex;
  align-items:center;
  min-height:3rem;
  padding:.7rem 1rem;
  border:1px solid rgba(250,211,112,.78);
  border-radius:999px;
  background:linear-gradient(135deg,rgba(112,70,17,.9),rgba(24,16,7,.9));
  color:#fff1b9;
  box-shadow:0 0 2.3rem rgba(244,196,75,.18),0 .8rem 2.2rem rgba(0,0,0,.4),inset 0 1px rgba(255,255,255,.13);
  backdrop-filter:blur(14px) saturate(1.2);
  text-decoration:none;
  font:850 .62rem/1 system-ui,sans-serif;
  letter-spacing:.1em;
  text-transform:uppercase;
  opacity:0;
  visibility:hidden;
  transform:translateY(.7rem);
  pointer-events:none;
  transition:opacity .35s ease,transform .45s cubic-bezier(.16,1,.3,1),visibility .35s;
}
.reverie-kaguya-enter-pass23[data-visible="true"]{
  opacity:1;
  visibility:visible;
  transform:none;
  pointer-events:auto;
}

@media(max-width:820px){
  .quantum-world-page[data-pass23-quantum="true"] .quantum-journey{height:540svh!important;min-height:240rem!important}
  .quantum-world-page[data-pass23-quantum="true"] .quantum-state-panel{
    left:.8rem!important;
    right:1.1rem!important;
    bottom:5.7rem!important;
    width:auto!important;
  }
  .quantum-world-page[data-pass23-quantum="true"] .annotation-anchor{display:none!important}
  .quantum-world-page[data-pass23-quantum="true"] .quantum-state-panel>p{max-width:21rem!important;font-size:.73rem!important}
  .quantum-world-page[data-pass23-quantum="true"] .quantum-manifesto-pass23{
    left:.8rem!important;
    right:.8rem!important;
    top:auto!important;
    bottom:5.4rem!important;
    width:auto!important;
    transform:translateY(1rem)!important;
  }
  .quantum-world-page[data-pass23-quantum="true"][data-pass23-final="true"] .quantum-manifesto-pass23{transform:none!important}
  .quantum-world-page[data-pass23-quantum="true"] .quantum-manifesto-pass23 h2{font-size:clamp(2.25rem,10vw,4rem)!important}
  .quantum-world-page[data-pass23-quantum="true"] .quantum-manifesto-pass23 p{font-size:.72rem!important;line-height:1.55!important}

  .trippy-page[data-pass23-trippy="true"] .trippy-journey{height:560svh!important;min-height:245rem!important}
  .trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23{
    grid-template-columns:1fr!important;
    align-content:end!important;
    padding:5.2rem .8rem 4.8rem!important;
    gap:.6rem!important;
    background:linear-gradient(180deg,transparent 20%,rgba(4,3,10,.26) 52%,rgba(4,3,10,.72) 100%)!important;
  }
  .trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23>header{max-width:25rem!important}
  .trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23 h2{font-size:clamp(2.6rem,13vw,4.7rem)!important}
  .trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23 header p{font-size:.72rem!important;line-height:1.5!important}
  .trippy-page[data-pass23-trippy="true"] .trippy-manifest-grid{display:none!important}
  .trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23>nav{grid-column:auto!important}
  .trippy-page[data-pass23-trippy="true"] .trippy-chapters p{margin-left:0!important}

  .resonance-v2[data-pass23-resonance="true"]{min-height:420svh!important}
  .resonance-v2[data-pass23-resonance="true"]>[data-resonance-world]{filter:brightness(1.58) saturate(1.14) contrast(1.025)!important}
  .resonance-v2[data-pass23-resonance="true"] .resonance-explain{min-height:420svh!important;padding:120svh .8rem 12svh!important}
  .resonance-v2[data-pass23-resonance="true"] .resonance-explain>header{width:min(22rem,82vw)!important;margin-left:auto!important;margin-right:.4rem!important}
  .resonance-v2[data-pass23-resonance="true"] .explain-grid article{width:min(20rem,78vw)!important;margin-left:.4rem!important;margin-right:auto!important}
  .resonance-v2[data-pass23-resonance="true"] .explain-grid article:nth-child(2){margin-left:auto!important;margin-right:.4rem!important}

  .reverie-kaguya-enter-pass23{left:50%;right:auto;bottom:5.7rem;transform:translate(-50%,.7rem);white-space:nowrap}
  .reverie-kaguya-enter-pass23[data-visible="true"]{transform:translate(-50%,0)}
}

@media(prefers-reduced-motion:reduce){
  .quantum-world-page[data-pass23-quantum="true"] .quantum-state-panel,
  .quantum-world-page[data-pass23-quantum="true"] .quantum-manifesto-pass23,
  .trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23,
  .trippy-page[data-pass23-trippy="true"] .trippy-manifest-pass23 *,
  .resonance-v2[data-pass23-resonance="true"] .resonance-hero,
  .resonance-v2[data-pass23-resonance="true"] .signal-readout,
  .resonance-v2[data-pass23-resonance="true"] .frequency-rail-wrap,
  .reverie-kaguya-enter-pass23{transition:none!important}
}