:root{
  --bg:#d7d7d7;
  --panel:#0b0b0c;
  --panel2:#111113;
  --text:#f2f2f2;
  --muted:rgba(255,255,255,.72);
  --bar:rgba(0,0,0,.86);
  --btnBg:rgba(255,255,255,.92);
  --btnText:#111;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  background:var(--bg);
  font-family: Georgia, "Times New Roman", serif;
  color:var(--text);
}

/* stage centers the book */
.stage{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px 18px;
}

/* book */
#book{
  width:min(1100px, 92vw);
  height:min(700px, 86vh);
  position:relative;
  border-radius:18px;
  overflow:hidden;
  background:var(--panel);
  border:1px solid rgba(0,0,0,.25);
  box-shadow:0 18px 60px rgba(0,0,0,.35);
}

/* pages container */
.pages{
  position:absolute;
  inset:0;
}

/* each page */
.page{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transform:translateY(6px);
  transition:opacity .18s ease, transform .18s ease;
  background:
    radial-gradient(1200px 700px at 25% 15%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(180deg, var(--panel2), var(--panel));
}

.page.active{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

/* inner content scroll area, keep space for navBar */
.pageInner{
  height:100%;
  overflow:auto;
  padding:68px 78px 110px 78px;
}

/* typography */
.chapterTitle{
  margin:0 0 18px 0;
  font-size:44px;
  font-weight:600;
  letter-spacing:.2px;
}

.nodeTitle{
  margin:0 0 18px 0;
  font-size:40px;
  font-weight:600;
  letter-spacing:.2px;
}

.subtitle{
  margin:0 0 22px 0;
  font-size:26px;
  font-weight:600;
  color:rgba(255,255,255,.88);
}

p{
  margin:0 0 18px 0;
  font-size:20px;
  line-height:1.7;
  color:rgba(255,255,255,.86);
}

p.blank{margin:0 0 18px 0;}
p.muted{color:var(--muted); font-size:16px; line-height:1.6;}

a.aboutLink{
  display:inline-block;
  margin-top:10px;
  color:rgba(255,255,255,.85);
  text-decoration:underline;
}

/* cover */
.page.cover{
  background:#000;
}

.coverImage{
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:url("Front Cover.jpg");
  background-size:cover;
  background-position:center;
}

.startBtn{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  background:rgba(0,0,0,.55);
  color:#fff;
  border:1px solid rgba(255,255,255,.22);
  border-radius:10px;
  padding:10px 20px;
  font-size:16px;
  cursor:pointer;
  backdrop-filter: blur(6px);
}

.startBtn:hover{background:rgba(0,0,0,.68);}

/* nav bar inside book */
#book .navBar{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:78px;
  background:var(--bar);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 22px;
  z-index:10;
}

#book .brand{
  font-size:18px;
  letter-spacing:2px;
  opacity:.92;
}

#book .pageLabel{
  font-size:16px;
  opacity:.8;
}

#book .navBtns{
  display:flex;
  gap:10px;
}

#book .navBtn{
  width:36px;
  height:36px;
  border-radius:8px;
  background:var(--btnBg);
  color:var(--btnText);
  border:none;
  font-size:18px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

#book .navBtn:hover{background:#fff;}
#book .navBtn:disabled{opacity:.35; cursor:not-allowed;}

/* reflection button */
.beginAgainBtn{
  display:inline-block;
  margin:8px 0 18px 0;
  background:rgba(255,255,255,.92);
  color:#111;
  border:none;
  border-radius:10px;
  padding:10px 16px;
  font-size:14px;
  cursor:pointer;
}

.beginAgainBtn:hover{background:#fff;}

/* responsive */
@media (max-width: 720px){
  .pageInner{padding:48px 26px 110px 26px;}
  .chapterTitle{font-size:34px;}
  .nodeTitle{font-size:32px;}
  p{font-size:18px;}
  #book .brand{font-size:16px;}
  #book .navBar{padding:0 14px;}
}
/* hard-hide the cover after Start, prevents it from sitting on top */
.page.cover.dismissed{display:none!important}
/* style.css, add or replace these blocks */
#book { position: relative; }

/* NAV BAR INSIDE BOOK */
#book .navBar{
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:70px;
  background:rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 22px;
  box-sizing:border-box;
  z-index:10;
}

#book .brand{
  letter-spacing:0.22em;
  font-size:14px;
  opacity:0.9;
}

#book .pageLabel{
  font-size:14px;
  opacity:0.8;
}

#book .navBtns{
  display:flex;
  gap:10px;
}

#book .navBtn{
  width:36px;
  height:36px;
  border-radius:8px;
  background:rgba(255,255,255,0.9);
  color:#111;
  border:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  line-height:1;
}

#book .navBtn:hover{ background:#fff; }
#book .navBtn:disabled{ opacity:0.35; cursor:not-allowed; }

#prevBtn::before{ content:"‹"; }
#nextBtn::before{ content:"›"; }

/* NODE CHOICES */
.choices{
  margin-top:18px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.choiceBtn{
  appearance:none;
  border:1px solid rgba(255,255,255,0.25);
  background:rgba(0,0,0,0.35);
  color:rgba(255,255,255,0.92);
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  font-size:15px;
  line-height:1.2;
  max-width:100%;
}

.choiceBtn:hover{
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.4);
}
.choices{display:flex;flex-direction:column;gap:10px;align-items:flex-start;}
.choiceBtn{white-space:normal;text-align:left;max-width:820px;
}

.brand,
.brand:visited{
  color:#fff;
  text-decoration:none;
  letter-spacing:3px;
}

.brand:hover{
  opacity:.7;
}
