:root {
  --night: #04051a;
  --deep: #0a0d33;
  --ink: #02030c;
  --paper: #eaf3ff;
  --blue: #2f6bff;
  --cyan: #45dcff;
  --violet: #8d5cff;
  --magenta: #c86bff;
  --glow: 0 0 18px rgba(69, 220, 255, 0.55);
  --spine-w: 104px;
  --border: 4px solid var(--paper);
  --shadow: 8px 8px 0 var(--blue);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Comic Neue", "Chakra Petch", sans-serif;
  color: var(--paper);
  background-color: var(--night);
  background-image:
    radial-gradient(rgba(69, 220, 255, 0.09) 1.2px, transparent 1.4px),
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(47, 107, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 60% 50% at 90% 45%, rgba(141, 92, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 70% 40% at 30% 95%, rgba(69, 220, 255, 0.14), transparent 70%),
    linear-gradient(180deg, #04051a 0%, #070a2c 50%, #04051a 100%);
  background-size: 14px 14px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
  line-height: 1.55;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ================= SPINE ================= */
.spine {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--spine-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  background: linear-gradient(180deg, #0b1450, #060828 60%, #120a45);
  border-right: var(--border);
  box-shadow: 6px 0 0 var(--blue);
  z-index: 50;
}

.spine-logo img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border: 3px solid var(--paper);
  border-radius: 50%;
  box-shadow: var(--glow);
  background: var(--ink);
}

.spine-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0 12px;
}

.spine-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border: 3px solid transparent;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.spine-nav .num {
  font-family: "Bangers", cursive;
  font-size: 1.7rem;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--cyan);
}

.spine-nav .lbl {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  opacity: 0.8;
}

.spine-nav a:hover,
.spine-nav a.active {
  border-color: var(--paper);
  background: var(--blue);
  box-shadow: 4px 4px 0 var(--ink);
}
.spine-nav a.active .num,
.spine-nav a:hover .num { color: var(--paper); }

.spine-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spine-social a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
}
.spine-social a:hover { background: var(--violet); transform: scale(1.1); }

/* ================= BOOK LAYOUT ================= */
.book {
  margin-left: var(--spine-w);
  padding: 34px clamp(16px, 4vw, 60px) 30px;
}

.page {
  position: relative;
  max-width: 1280px;
  margin: 0 auto 70px;
  padding: clamp(20px, 3vw, 38px);
  border: var(--border);
  border-radius: 4px;
  background:
    radial-gradient(rgba(234, 243, 255, 0.05) 1px, transparent 1.2px) 0 0 / 10px 10px,
    linear-gradient(160deg, rgba(14, 22, 80, 0.92), rgba(6, 8, 36, 0.95));
  box-shadow: 12px 12px 0 var(--blue), 12px 12px 0 4px var(--paper);
  scroll-margin-top: 30px;
}

.panel {
  position: relative;
  border: var(--border);
  border-radius: 3px;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.panel.in { opacity: 1; transform: none; }

/* ================= SHARED COMIC PIECES ================= */
.caption-box {
  display: inline-block;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink);
  background: var(--cyan);
  border: 3px solid var(--ink);
  padding: 6px 14px;
  box-shadow: 4px 4px 0 var(--ink);
}

.speech {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 28px;
  padding: 18px 24px;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 6px 6px 0 var(--violet);
}
.speech::after {
  content: "";
  position: absolute;
  left: 44px;
  bottom: -22px;
  border-width: 22px 22px 0 0;
  border-style: solid;
  border-color: var(--ink) transparent transparent transparent;
}
.speech::before {
  content: "";
  position: absolute;
  left: 48px;
  bottom: -13px;
  border-width: 14px 14px 0 0;
  border-style: solid;
  border-color: var(--paper) transparent transparent transparent;
  z-index: 1;
}
.speech i { color: var(--blue); }

.burst {
  position: absolute;
  font-family: "Bangers", cursive;
  color: var(--paper);
  background: var(--violet);
  border: 4px solid var(--ink);
  letter-spacing: 2px;
  clip-path: polygon(50% 0%, 61% 18%, 82% 6%, 78% 30%, 100% 34%, 84% 52%, 100% 70%, 76% 72%, 82% 96%, 60% 82%, 50% 100%, 40% 82%, 18% 96%, 24% 72%, 0% 70%, 16% 52%, 0% 34%, 22% 30%, 18% 6%, 39% 18%);
  padding: 34px 34px;
  text-shadow: 2px 2px 0 var(--ink);
  pointer-events: none;
  z-index: 3;
}

/* Buttons */
.btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Bangers", cursive;
  font-size: 1.35rem;
  letter-spacing: 1.5px;
  padding: 12px 22px;
  border: 4px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-ink:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn-ink:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn-buy { background: var(--cyan); color: var(--ink); }
.btn-dex { background: var(--violet); color: var(--paper); }
.btn-x   { background: var(--paper); color: var(--ink); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Contract strip */
.ca-strip {
  display: flex;
  align-items: stretch;
  border: 4px solid var(--paper);
  background: var(--ink);
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
}
.ca-label {
  display: grid;
  place-items: center;
  padding: 0 14px;
  font-family: "Bangers", cursive;
  font-size: 1.3rem;
  letter-spacing: 1px;
  background: var(--blue);
  color: var(--paper);
  border-right: 4px solid var(--paper);
}
.ca-value {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-family: "Chakra Petch", monospace;
  font-size: 0.95rem;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ca-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  font-family: "Bangers", cursive;
  font-size: 1.1rem;
  letter-spacing: 1px;
  background: var(--paper);
  color: var(--ink);
  border: none;
  border-left: 4px solid var(--paper);
  cursor: pointer;
}
.ca-copy:hover { background: var(--cyan); }

/* ================= COVER ================= */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 4px solid var(--paper);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.mast-left { display: flex; align-items: center; gap: 10px; }
.mast-issue { color: var(--cyan); font-weight: 700; }
.mast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
.mast-title {
  font-family: "Bangers", cursive;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: 3px;
  text-transform: none;
  color: var(--paper);
  text-shadow: 3px 3px 0 var(--blue);
}
.mast-title em { font-style: normal; color: var(--cyan); }
.mast-right { justify-self: end; }
.price-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--violet);
}

.cover-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
}

.cover-text { display: flex; flex-direction: column; gap: 26px; }

.cover-title { display: flex; flex-direction: column; line-height: 0.9; }
.t-line {
  font-family: "Bangers", cursive;
  font-size: clamp(5rem, 12vw, 10rem);
  letter-spacing: 4px;
  color: var(--paper);
  -webkit-text-stroke: 3px var(--ink);
  text-shadow:
    6px 6px 0 var(--blue),
    12px 12px 0 var(--violet),
    0 0 40px rgba(69, 220, 255, 0.6);
}
.t-sub {
  margin-top: 16px;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--cyan);
}

.cover-text .speech { margin-bottom: 10px; }

.cover-art { display: flex; flex-direction: column; gap: 14px; }

.panel-hero { box-shadow: 12px 12px 0 var(--violet); }
.panel-hero img { width: 100%; height: auto; }

.burst-a { top: -34px; right: -26px; font-size: 1.8rem; background: var(--cyan); color: var(--ink); text-shadow: none; }
.burst-b { bottom: -30px; left: -26px; font-size: 1.5rem; }

.cover-footnote {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.75;
}
.cover-footnote i { color: var(--cyan); }

/* ================= CHAPTER HEADS ================= */
.chapter-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 12px 20px;
  background: var(--paper);
  color: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--blue);
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.chapter-head.in { opacity: 1; transform: none; }
.chapter-no {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 4px 10px;
  background: var(--blue);
  color: var(--paper);
}
.chapter-head h2 {
  flex: 1;
  font-family: "Bangers", cursive;
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: 2px;
  line-height: 1;
}
.page-no {
  font-family: "Bangers", cursive;
  font-size: 1.2rem;
  color: var(--violet);
}

/* ================= ABOUT ================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 26px;
}

.panel-banner { grid-column: 1 / -1; }
.panel-banner img { width: 100%; height: auto; }

.panel-story {
  padding: 28px;
  background: linear-gradient(160deg, #0d1560, #07092b);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.story-lead { font-size: 1.35rem; font-weight: 700; }
.story-lead strong { color: var(--cyan); }
.panel-story p { font-size: 1.08rem; }

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}
.fact {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border: 3px solid var(--paper);
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--violet);
}
.fact-k {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
}
.fact-v {
  font-family: "Bangers", cursive;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: var(--cyan);
  line-height: 1.15;
}

.panel-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  gap: 14px;
  background: var(--ink);
  box-shadow: 8px 8px 0 var(--violet);
}
.panel-logo img { width: 100%; max-width: 380px; height: auto; border: 3px solid var(--paper); }
.thought {
  font-family: "Comic Neue", sans-serif;
  font-style: italic;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  padding: 8px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
}

.panel-quote {
  grid-column: 1 / -1;
  padding: 34px 30px;
  text-align: center;
  background:
    repeating-linear-gradient(90deg, rgba(69, 220, 255, 0.08) 0 2px, transparent 2px 22px),
    linear-gradient(90deg, #1238b8, #3a1c9e);
}
.panel-quote blockquote {
  font-family: "Bangers", cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 2px;
  line-height: 1.1;
  text-shadow: 3px 3px 0 var(--ink);
}
.hl { color: var(--cyan); }
.quote-by { display: block; margin-top: 10px; font-weight: 700; opacity: 0.8; }
.sfx {
  position: absolute;
  top: -22px;
  left: 24px;
  font-family: "Bangers", cursive;
  font-size: 1.6rem;
  letter-spacing: 2px;
  padding: 4px 14px;
  background: var(--cyan);
  color: var(--ink);
  border: 3px solid var(--ink);
}

/* ================= HOW TO BUY ================= */
.storyboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  padding: 22px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #0e1864, #060826);
}
.step:nth-child(even) { background: linear-gradient(180deg, #25127a, #080626); box-shadow: 8px 8px 0 var(--violet); }

.step-top { display: flex; justify-content: space-between; align-items: center; }
.step-no {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-family: "Bangers", cursive;
  font-size: 2rem;
  color: var(--ink);
  background: var(--cyan);
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--paper);
}
.step-top i { font-size: 2rem; color: var(--cyan); filter: drop-shadow(var(--glow)); }
.step h3 {
  font-family: "Bangers", cursive;
  font-weight: 400;
  font-size: 1.8rem;
  letter-spacing: 1.5px;
  line-height: 1;
}
.speech-sm { font-size: 1rem; padding: 14px 16px; border-radius: 20px; box-shadow: 4px 4px 0 var(--blue); }

.buy-bar {
  margin-top: 36px;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: linear-gradient(90deg, #0b1a6e, #2a1486);
}
.buy-bar-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; }
.buy-bar-text .ca-strip { width: 100%; }
.buy-bar-btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* ================= COMMUNITY ================= */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.panel-callout {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  background: linear-gradient(160deg, #0d1560, #1d0f63);
}
.speech-xl { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 14px; }

.panel-hero-small { box-shadow: 10px 10px 0 var(--cyan); }
.panel-hero-small img { width: 100%; height: auto; }
.burst-c { top: -30px; left: -24px; font-size: 1.8rem; }

.the-end {
  margin-top: 46px;
  text-align: right;
}
.the-end span {
  display: inline-block;
  font-family: "Bangers", cursive;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 2px;
  padding: 8px 20px;
  background: var(--paper);
  color: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--violet);
}

/* ================= FOOTER ================= */
.colophon {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0 10px;
  border-top: 3px dashed rgba(234, 243, 255, 0.35);
  font-size: 0.9rem;
  opacity: 0.85;
}
.colophon img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; border: 2px solid var(--paper); }

/* ================= TOAST ================= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 120px);
  font-family: "Bangers", cursive;
  font-size: 1.4rem;
  letter-spacing: 1.5px;
  padding: 10px 24px;
  background: var(--cyan);
  color: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.3s ease;
  z-index: 100;
}
.toast.show { transform: translate(-50%, 0); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .storyboard { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --spine-w: 0px; }

  .spine {
    inset: auto 0 0 0;
    width: 100%;
    height: 72px;
    flex-direction: row;
    padding: 0 12px;
    border-right: none;
    border-top: var(--border);
    box-shadow: 0 -5px 0 var(--blue);
  }
  .spine-logo img { width: 44px; height: 44px; }
  .spine-nav { flex-direction: row; justify-content: center; gap: 4px; padding: 0 6px; }
  .spine-nav a { padding: 4px 6px; }
  .spine-nav .num { font-size: 1.2rem; }
  .spine-nav .lbl { font-size: 0.55rem; }
  .spine-social { flex-direction: row; gap: 6px; }
  .spine-social a { width: 36px; height: 36px; font-size: 0.95rem; }

  .book { padding-bottom: 100px; }

  .masthead { grid-template-columns: 1fr; text-align: center; }
  .mast-left, .mast-right { justify-self: center; }

  .cover-grid,
  .about-grid,
  .community-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page { box-shadow: 7px 7px 0 var(--blue), 7px 7px 0 3px var(--paper); margin-bottom: 50px; }
  .storyboard { grid-template-columns: 1fr; }
  .fact-row { grid-template-columns: 1fr; }
  .spine-nav .lbl { display: none; }
  .spine-social a.js-buy { display: none; }
  .chapter-head { flex-wrap: wrap; gap: 10px; }
  .page-no { display: none; }
  .burst { padding: 24px; }
  .burst-a { right: -8px; font-size: 1.3rem; }
  .burst-b { left: -8px; font-size: 1.1rem; }
  .burst-c { left: -8px; font-size: 1.3rem; }
  .btn-ink { font-size: 1.15rem; padding: 10px 16px; }
  .ca-copy span { display: none; }
}
