: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{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px 18px;
}
#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{
  position:absolute;
  inset:0;
}
.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);
}
.pageInner{
  height:100%;
  overflow:auto;
  padding:68px 78px 110px 78px;
}
.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{
  position:absolute;
  inset:0;
  overflow:hidden;
  background:none !important;
}
.coverImage{
  position:absolute;
  inset:0;
  z-index:1;
  background:url("front-cover.jpg") center/cover no-repeat;
  pointer-events:none;
}
.coverTitle{
  position:absolute;
  left:50%;
  top:65%;
  transform:translateX(-50%);
  z-index:2;
  font-size:38px;
  letter-spacing:1px;
  text-align:center;
  color:#fff;
  text-shadow:0 2px 10px rgba(0,0,0,.85);
}
.startBtn{
  position:absolute;
  left:50%;
  top:76%;
  transform:translateX(-50%);
  z-index:2;
  background:rgba(0,0,0,.55);
  color:#fff;
  border:1px solid rgba(255,255,255,.22);
  border-radius:10px;
  padding:10px 22px;
  font-size:16px;
  cursor:pointer;
}
.startBtn:hover{background:rgba(0,0,0,.68);}

/* NAV */
#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;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
}
#book .navBtn:hover{background:#fff;}
#book .navBtn:disabled{opacity:.35;cursor:not-allowed;}

/* NODES */
.choices{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-start;
}
.choiceBtn{
  appearance:none;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(0,0,0,.35);
  color:rgba(255,255,255,.92);
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  font-size:15px;
  line-height:1.2;
  white-space:normal;
  text-align:left;
  max-width:820px;
}
.choiceBtn:hover{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.4);
}
.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;}

@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;}
}
.page.cover .coverTitle{
  top:65% !important;
}
.page.cover .startBtn{
  top:76% !important;
  transform:translateX(-50%) !important;
}
.brand,
.brand:visited{
  color:#fff;
  text-decoration:none;
  letter-spacing:3px;
}

.brand:hover{
  opacity:.7;
}
