:root {
  /* Compliance typography tokens: coordinates should snap into sharper contrast. Let Roboto Flex headings shift width as they are focused Interface annotation:** **IBM Plex Mono** for page coordinates Roboto Flex `MMIDDL.ai` wordmark stretched across the top shelf Roboto Flex** for the `MMIDDL.ai` wordmark */
  --candy-coral: #FF6B9A;
  --marshmallow: #FFFDF7;
  --milk: #FFF8E8;
  --sherbet: #FFB347;
  --licorice: #151326;
  --mint: #59E6C4;
  --blueberry: #26224A;
  --violet: #B56CFF;
  --display: "Roboto Flex", Inter, system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--blueberry);
  background:
    radial-gradient(circle at 51% 14%, rgba(181, 108, 255, .18), transparent 22rem),
    radial-gradient(circle at 78% 38%, rgba(89, 230, 196, .14), transparent 25rem),
    linear-gradient(120deg, var(--milk), var(--marshmallow) 48%, #fff1d9);
  font-family: var(--display);
}

body.focus-mode .zoom-fragment:not(.is-focused) { filter: blur(2px); opacity: .62; }

button { font: inherit; }

.compliance-ink {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.milk-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: .38;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(38, 34, 74, .08) 0 1px, transparent 1.6px),
    radial-gradient(circle at 75% 55%, rgba(255, 107, 154, .08) 0 1px, transparent 1.8px);
  background-size: 42px 42px, 57px 57px;
  mix-blend-mode: multiply;
}

.spine-canal {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: clamp(88px, 10vw, 140px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 14px;
  background: linear-gradient(180deg, rgba(255, 253, 247, .88), rgba(255, 248, 232, .68));
  border-right: 1px solid rgba(38, 34, 74, .08);
  box-shadow: 20px 0 80px rgba(255, 179, 71, .12);
}

.spine-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--blueberry);
}

.spine-line {
  position: relative;
  width: 26px;
  flex: 1;
  margin: 22px 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 107, 154, .14), rgba(181, 108, 255, .16), rgba(89, 230, 196, .16));
}

.progress-bead {
  position: absolute;
  left: 50%;
  top: 0;
  width: 22px;
  height: 34px;
  border-radius: 52% 48% 62% 38% / 45% 56% 44% 55%;
  transform: translate(-50%, 0);
  background: radial-gradient(circle at 35% 24%, var(--marshmallow), var(--mint) 42%, var(--violet));
  box-shadow: 0 10px 28px rgba(181, 108, 255, .35);
}

.page-beads {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.page-bead {
  width: 44px;
  height: 28px;
  border: 0;
  border-radius: 999px 999px 999px 40px;
  color: var(--blueberry);
  background: rgba(255, 253, 247, .72);
  box-shadow: inset 0 0 0 1px rgba(38, 34, 74, .08);
  cursor: pointer;
  transition: transform .35s ease, background .35s ease, box-shadow .35s ease;
}

.page-bead span { font-family: var(--mono); font-size: 10px; }

.page-bead.active {
  transform: scale(1.14) translateX(5px);
  background: linear-gradient(135deg, var(--candy-coral), var(--sherbet));
  box-shadow: 0 12px 30px rgba(255, 107, 154, .28);
}

.spine-coordinate {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
  color: rgba(38, 34, 74, .72);
}

.reading-room {
  width: 100%;
  padding-left: clamp(88px, 10vw, 140px);
}

.scene {
  position: relative;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 72px) clamp(22px, 5vw, 78px) clamp(44px, 8vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: clamp(28px, 5vw, 58px);
  isolation: isolate;
}

.scene::before {
  content: "";
  position: absolute;
  left: clamp(18px, 5vw, 54px);
  top: 18%;
  width: 1px;
  height: 64%;
  background: linear-gradient(transparent, rgba(38, 34, 74, .16), transparent);
  z-index: -1;
}

.upper-shelf {
  width: min(1040px, 92%);
  min-height: 220px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 56px 90px 64px 46px / 52px 58px 90px 48px;
  background: rgba(255, 253, 247, .62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .76), 0 28px 86px rgba(21, 19, 38, .08);
  backdrop-filter: blur(12px);
}

.mono-kicker, .page-chip, .chapter-label, .citation-ribbon, .index-card span {
  font-family: var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mono-kicker { margin: 0 0 18px; font-size: clamp(10px, 1.2vw, 13px); color: rgba(38, 34, 74, .66); }

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(66px, 16vw, 214px);
  line-height: .82;
  letter-spacing: -.09em;
  color: var(--blueberry);
  font-variation-settings: "wdth" 132, "wght" 760, "opsz" 104, "GRAD" 20;
  transition: font-variation-settings .65s ease, letter-spacing .65s ease, transform .65s ease;
}

.scene.active .focus-heading, .focus-heading.is-focused {
  font-variation-settings: "wdth" 151, "wght" 820, "opsz" 124, "GRAD" 80;
  letter-spacing: -.065em;
}

h2 {
  max-width: 920px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(42px, 7.2vw, 112px);
  line-height: .92;
  letter-spacing: -.07em;
  font-variation-settings: "wdth" 108, "wght" 680, "opsz" 88, "GRAD" 0;
  transition: font-variation-settings .6s ease, letter-spacing .6s ease;
}

.manuscript-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
}

.manuscript-card, .bubble-footnote, .quote-niche, .index-card {
  position: relative;
  border-radius: 34px 48px 38px 62px / 44px 32px 58px 36px;
  background: rgba(255, 253, 247, .72);
  box-shadow: 0 24px 68px rgba(21, 19, 38, .08), inset 0 0 0 1px rgba(255, 255, 255, .78);
  transition: transform .45s ease, filter .45s ease, opacity .45s ease, box-shadow .45s ease;
}

.zoom-fragment.is-focused, .zoom-fragment:hover {
  transform: scale(1.08);
  z-index: 4;
  box-shadow: 0 34px 110px rgba(181, 108, 255, .2), inset 0 0 0 1px rgba(255, 255, 255, .9);
}

.manuscript-card { width: min(330px, 100%); padding: 22px; }
.manuscript-card p { margin: 12px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.22; }
.coral-card { background: linear-gradient(135deg, rgba(255,107,154,.26), rgba(255,253,247,.8)); }
.mint-card { background: linear-gradient(135deg, rgba(89,230,196,.27), rgba(255,253,247,.78)); }
.page-chip { font-size: 10px; color: var(--blueberry); }

.middle-dot-blob {
  position: absolute;
  left: 48%;
  top: 44%;
  width: clamp(178px, 24vw, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 54% 46% 63% 37% / 43% 58% 42% 57%;
  color: var(--marshmallow);
  background:
    radial-gradient(circle at 36% 25%, rgba(255,253,247,.86), transparent 12%),
    radial-gradient(circle at 68% 70%, rgba(89,230,196,.46), transparent 24%),
    linear-gradient(135deg, var(--violet), var(--candy-coral));
  box-shadow: 0 44px 120px rgba(181, 108, 255, .33);
  animation: pulseBlob 4.8s ease-in-out infinite;
}

.middle-dot-blob span { font-size: clamp(130px, 18vw, 290px); line-height: .55; }
.middle-dot-blob small { position: absolute; bottom: 23%; font-family: var(--mono); letter-spacing: .16em; text-transform: uppercase; }

.annotation-shelf {
  align-self: end;
  width: min(760px, 88%);
  margin-left: clamp(12px, 16vw, 220px);
  padding: 28px;
  border-radius: 44px 26px 66px 30px / 32px 54px 34px 62px;
  background: linear-gradient(135deg, rgba(255, 179, 71, .23), rgba(255, 253, 247, .62));
}

.serif-note { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 36px); line-height: 1.18; font-variation-settings: "SOFT" 84, "WONK" 1; }
.citation-ribbon { display: inline-block; margin-top: 18px; padding: 10px 18px; border-radius: 999px; font-size: 10px; background: var(--mint); }

.chapter-label {
  width: max-content;
  padding: 10px 16px;
  border-radius: 999px 999px 999px 18px;
  font-size: 11px;
  color: var(--marshmallow);
  background: var(--blueberry);
}

.melted-shelf { background: linear-gradient(140deg, rgba(255,107,154,.22), rgba(255,253,247,.7) 54%, rgba(181,108,255,.17)); }
.split-annotations { display: flex; flex-wrap: wrap; gap: 24px; width: min(940px, 94%); background: transparent; padding: 0; }
.bubble-footnote, .quote-niche { padding: 30px; flex: 1 1 300px; }
.bubble-footnote { background: linear-gradient(150deg, rgba(89,230,196,.28), rgba(255,253,247,.76)); }
.quote-niche { background: linear-gradient(150deg, rgba(255,179,71,.30), rgba(255,253,247,.76)); }
.glyph { display: block; font-size: 72px; line-height: .8; color: var(--candy-coral); }
.quote-niche p, .bubble-footnote p { margin: 0; font-family: var(--serif); font-size: clamp(24px, 3vw, 42px); line-height: 1.08; }
.quote-niche span { display: block; margin-top: 18px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }

.droplet-glass {
  position: absolute;
  right: 10%;
  bottom: 12%;
  width: 120px;
  height: 150px;
  border-radius: 58% 42% 54% 46% / 62% 54% 46% 38%;
  background: radial-gradient(circle at 35% 20%, var(--marshmallow), rgba(89,230,196,.42));
  box-shadow: 0 24px 60px rgba(89, 230, 196, .22);
}

.middle-scene { align-content: center; }
.middle-chamber {
  position: relative;
  width: min(1040px, 94%);
  margin-left: clamp(0px, 8vw, 120px);
  padding: clamp(34px, 6vw, 78px);
  overflow: hidden;
  border-radius: 88px 120px 96px 68px / 72px 88px 126px 66px;
  background: linear-gradient(135deg, rgba(181,108,255,.22), rgba(255,253,247,.72) 38%, rgba(255,107,154,.18));
  box-shadow: 0 36px 118px rgba(21, 19, 38, .1);
}
.contour-blob {
  position: absolute;
  right: -70px;
  top: -60px;
  width: 360px;
  aspect-ratio: 1;
  border-radius: 48% 52% 58% 42% / 54% 42% 58% 46%;
  opacity: .58;
  background: repeating-radial-gradient(ellipse at 45% 45%, rgba(38,34,74,.16) 0 2px, transparent 2px 22px), linear-gradient(135deg, var(--sherbet), var(--mint));
}
.middle-chamber > *:not(.contour-blob) { position: relative; z-index: 2; }

.token-crumbs { margin-left: clamp(50px, 32vw, 420px); display: flex; gap: 12px; }
.token-crumbs span { width: 16px; height: 16px; border-radius: 50%; background: var(--candy-coral); animation: crumb 2.8s ease-in-out infinite; }
.token-crumbs span:nth-child(2) { background: var(--sherbet); animation-delay: .2s; }
.token-crumbs span:nth-child(3) { background: var(--mint); animation-delay: .4s; }
.token-crumbs span:nth-child(4) { background: var(--violet); animation-delay: .6s; }
.token-crumbs span:nth-child(5) { background: var(--blueberry); animation-delay: .8s; }
.token-crumbs span:nth-child(6) { background: var(--candy-coral); animation-delay: 1s; }

.index-fragments {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 18px;
  width: min(1120px, 96%);
  margin-left: clamp(0px, 6vw, 96px);
}
.index-card { min-height: 230px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.index-card:nth-child(1) { background: linear-gradient(145deg, rgba(255,107,154,.24), rgba(255,253,247,.76)); }
.index-card:nth-child(2) { background: linear-gradient(145deg, rgba(255,179,71,.28), rgba(255,253,247,.76)); }
.index-card:nth-child(3) { background: linear-gradient(145deg, rgba(181,108,255,.22), rgba(255,253,247,.76)); }
.index-card:nth-child(4) { background: linear-gradient(145deg, rgba(89,230,196,.28), rgba(255,253,247,.76)); }
.index-card p { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); line-height: 1.05; }

.afterword-scene { align-content: center; }
.book-constellation {
  position: relative;
  width: min(980px, 94%);
  min-height: 560px;
  margin-left: clamp(0px, 10vw, 160px);
  padding: clamp(34px, 7vw, 82px);
  display: grid;
  align-content: center;
  border-radius: 74px 112px 84px 138px / 86px 68px 126px 72px;
  background: rgba(255, 253, 247, .68);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.82), 0 30px 100px rgba(38,34,74,.1);
}
.constellation-page { position: absolute; border-radius: 42px 62px 48px 74px / 52px 44px 70px 40px; opacity: .72; }
.page-a { left: 8%; top: 12%; width: 180px; height: 230px; background: rgba(255,107,154,.34); }
.page-b { right: 14%; top: 8%; width: 220px; height: 180px; background: rgba(89,230,196,.32); }
.page-c { left: 22%; bottom: 9%; width: 240px; height: 150px; background: rgba(255,179,71,.34); }
.page-d { right: 10%; bottom: 13%; width: 170px; height: 220px; background: rgba(181,108,255,.28); }
.book-constellation > p, .book-constellation > h2 { position: relative; z-index: 2; }

@keyframes pulseBlob {
  0%, 100% { transform: translate(-2%, -2%) scale(1); border-radius: 54% 46% 63% 37% / 43% 58% 42% 57%; }
  50% { transform: translate(2%, 2%) scale(1.055); border-radius: 44% 56% 47% 53% / 57% 42% 58% 43%; }
}

@keyframes crumb {
  0%, 100% { transform: translateY(0) scale(1); opacity: .68; }
  50% { transform: translateY(-12px) scale(1.2); opacity: 1; }
}

@media (max-width: 900px) {
  .spine-canal { width: 72px; padding-inline: 8px; }
  .reading-room { padding-left: 72px; }
  .scene { padding-inline: 18px; }
  .middle-dot-blob { position: relative; left: auto; top: auto; margin-left: 16%; }
  .annotation-shelf { margin-left: 0; width: 100%; }
  .index-fragments { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .spine-canal { width: 58px; }
  .reading-room { padding-left: 58px; }
  .page-bead { width: 36px; }
  .wordmark { font-size: clamp(52px, 18vw, 86px); }
  .index-fragments { grid-template-columns: 1fr; }
}
