
.story-navbar{
  position:sticky;
  top:0;
  z-index:50;
}

.story-progress-top{
  width:150px;
  height:3px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.08);
}
.story-progress-top span{
  display:block;
  width:5%;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#8c4dff,#c476ff);
  transition:width .3s ease;
}

.storybook-shell{
  min-height:100vh;
  padding:55px 0 80px;
  background:
    radial-gradient(circle at 15% 5%,rgba(129,73,255,.09),transparent 30%),
    radial-gradient(circle at 85% 35%,rgba(91,53,181,.06),transparent 34%),
    #0b0c10;
}

.storybook-intro{
  margin-bottom:26px;
}

.story-eyebrow{
  display:block;
  margin-bottom:9px;
  color:#a77cff;
  font-family:'Geist Mono',monospace;
  font-size:9px;
  font-weight:700;
  letter-spacing:1.5px;
}

.storybook-intro h1{
  margin:0;
  font-size:46px;
  line-height:1;
}

.storybook-intro p{
  max-width:760px;
  margin:13px 0 0;
  color:var(--muted);
  font-family:'Geist Mono',monospace;
  font-size:11px;
  line-height:1.7;
}

.book-stage{
  position:relative;
}

.book{
  position:relative;
  min-height:650px;
  perspective:1800px;
}

.book-page{
  position:absolute;
  inset:0;
  display:grid;
  grid-template-columns:1.03fr .97fr;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.075);
  border-radius:26px;
  background:#12131a;
  box-shadow:0 35px 90px rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transform:translateX(26px) rotateY(-2deg) scale(.992);
  transition:
    opacity .35s ease,
    transform .45s cubic-bezier(.2,.75,.2,1);
}

.book-page.active{
  position:relative;
  opacity:1;
  pointer-events:auto;
  transform:none;
}

.page-image{
  position:relative;
  min-height:650px;
  overflow:hidden;
  background:#15161d;
}

.page-image img{
  width:100%;
  height:100%;
  min-height:650px;
  display:block;
  object-fit:cover;
}

.page-image-shade{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,transparent 70%,rgba(18,19,26,.82) 100%),
    linear-gradient(180deg,transparent 60%,rgba(7,8,12,.24) 100%);
}

.page-roman{
  position:absolute;
  left:26px;
  bottom:18px;
  color:rgba(255,255,255,.75);
  font-family:'Geist Mono',monospace;
  font-size:11px;
  font-weight:700;
  letter-spacing:2px;
}

.page-copy{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:54px 52px 48px;
  background:
    radial-gradient(circle at 100% 0%,rgba(133,76,255,.08),transparent 36%),
    #12131a;
}

.page-kicker{
  color:#a87cff;
  font-family:'Geist Mono',monospace;
  font-size:9px;
  font-weight:700;
  letter-spacing:1.5px;
  text-transform:uppercase;
}

.page-copy h2{
  margin:10px 0 22px;
  font-size:42px;
  line-height:1.06;
  letter-spacing:-1.1px;
}

.page-text{
  max-width:560px;
}

.page-text p{
  margin:0 0 16px;
  color:#a7a9b4;
  font-family:'Geist Mono',monospace;
  font-size:12px;
  line-height:1.78;
}

.page-number{
  position:absolute;
  right:25px;
  bottom:20px;
  color:#656875;
  font-family:'Geist Mono',monospace;
  font-size:9px;
}

.book-controls{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
  margin-top:18px;
}

.book-nav{
  min-height:42px;
  padding:0 16px;
  border-radius:12px;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}

.book-nav.primary{
  border:1px solid rgba(180,133,255,.25);
  background:linear-gradient(135deg,#a55cff,#7540e8);
  color:#fff;
}

.book-nav.secondary{
  border:1px solid rgba(255,255,255,.08);
  background:#15161d;
  color:#b9bbc4;
}

.book-nav:disabled{
  opacity:.35;
  cursor:not-allowed;
}

.book-dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}

.book-dot{
  width:6px;
  height:6px;
  padding:0;
  border:0;
  border-radius:50%;
  background:#30313b;
  cursor:pointer;
  transition:.18s ease;
}

.book-dot.active{
  width:18px;
  border-radius:999px;
  background:#9f62ff;
}

.book-hint{
  margin-top:12px;
  color:#5f626e;
  text-align:center;
  font-family:'Geist Mono',monospace;
  font-size:8px;
}

.story-end{
  margin-top:42px;
}

.story-end-card{
  padding:27px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:20px;
  background:
    radial-gradient(circle at 100% 0%,rgba(140,82,255,.13),transparent 40%),
    #111219;
}

.story-end-card h2{
  margin:0;
  font-size:28px;
}

.story-end-card p{
  margin:8px 0 0;
  color:#9395a1;
  font-family:'Geist Mono',monospace;
  font-size:10px;
}

.story-end-card strong{
  color:#fff;
}

.story-end-card .pill{
  width:max-content;
  min-width:190px;
}

@media(max-width:900px){
  .book{
    min-height:780px;
  }
  .book-page{
    grid-template-columns:1fr;
  }
  .page-image{
    min-height:320px;
    height:320px;
  }
  .page-image img{
    min-height:320px;
  }
  .page-image-shade{
    background:linear-gradient(180deg,transparent 62%,rgba(18,19,26,.92) 100%);
  }
  .page-copy{
    min-height:430px;
    padding:36px 34px 42px;
  }
  .page-copy h2{
    font-size:35px;
  }
}

@media(max-width:620px){
  .storybook-shell{
    padding-top:32px;
  }
  .storybook-intro h1{
    font-size:36px;
  }
  .book{
    min-height:760px;
  }
  .page-image{
    min-height:260px;
    height:260px;
  }
  .page-image img{
    min-height:260px;
  }
  .page-copy{
    min-height:500px;
    justify-content:flex-start;
    padding:30px 22px 42px;
  }
  .page-copy h2{
    font-size:31px;
    margin-bottom:18px;
  }
  .page-text p{
    font-size:10px;
    line-height:1.7;
  }
  .book-controls{
    grid-template-columns:1fr 1fr;
  }
  .book-dots{
    grid-column:1/-1;
    grid-row:1;
    margin-bottom:4px;
  }
  .book-nav{
    width:100%;
  }
  .story-end-card{
    align-items:flex-start;
    flex-direction:column;
  }
  .story-progress-top{
    display:none;
  }
}
