/* ==========================================================================
   MS MUN ACTIVITY BOOK SERIES: all five books in one case study.
   A dark hero where one open book turns through the five and each traces
   its first character; the shared page system and the colour guide; the
   train from plan to print; one chapter per book with one live moment
   (colouring, spot the difference, treasure hunt, ABC safari, colour by
   number); Maya's wardrobe stickers; the parent guide; every preview page
   on five shelves. Only the public preview pages appear (copyright).
   Fonts (Asif's rule): Fredoka for English titles, Geist for body text,
   Baloo Da 2 for Bangla and every playful/kid element.
   ========================================================================== */

@property --c {
  syntax: "<color>";
  inherits: true;
  initial-value: #c7cf5c;
}

.mm-page {
  --cream: #fffaf3;
  --ink: #2a2140;
  --ink-2: rgba(42, 33, 64, 0.72);
  --ink-3: rgba(42, 33, 64, 0.5);
  --line: rgba(42, 33, 64, 0.12);
  --sky: #7a6faa;
  --pink: #f2557a;
  --yellow: #ffd54a;
  --title: "Fredoka", "Baloo Da 2", system-ui, sans-serif;
  --bn: "Baloo Da 2", system-ui, sans-serif;
  --sans: "Geist", "Baloo Da 2", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --hdr: 121px;
  background: var(--cream);
  color: var(--ink);
}

@media (max-width: 767px) {
  .mm-page {
    --hdr: 66px;
  }
}

/* the header sits on the purple sky */
.mm-page .site-header {
  position: relative;
  z-index: 5;
}

.mm-page .site-header .brand,
.mm-page .site-header .menu-btn {
  color: #fff;
}

.mm-page .site-header .pill-chat {
  background: var(--pink);
  color: #fff;
}

.mm {
  position: relative;
  margin-top: calc(-1 * var(--hdr));
  overflow: clip;
  font-family: var(--sans);
}

.mm-wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 40px;
}

.mm [lang="bn"] {
  font-family: var(--bn);
}

.mm figure {
  margin: 0;
}

.mm img {
  display: block;
  max-width: 100%;
  height: auto;
}

[data-zoom] {
  cursor: zoom-in;
}

/* ---------- section label, headlines, the rail line ---------- */
.mm-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-family: var(--title);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.mm-eyebrow i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--g, var(--sky));
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--g, var(--sky)) 25%, transparent);
}

.mm-h2 {
  margin: 0;
  max-width: 900px;
  font-family: var(--title);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.mm-h2 em {
  font-style: normal;
  color: color-mix(in srgb, var(--g, var(--sky)) 82%, #000);
}

/* the dotted trace arrow under every title: it writes itself in, then crawls very slowly */
.mm-arrow {
  display: block;
  width: min(320px, 70%);
  height: 24px;
  margin: 10px 0 26px;
  overflow: visible;
}

.mm-arrow path {
  fill: none;
  stroke: var(--arw, color-mix(in srgb, var(--g, var(--sky)) 82%, #000));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mm-arrow-l {
  stroke-dasharray: 8 9;
  animation: mmCrawl 2.6s linear infinite;
}

.mm-arrow-a {
  animation: mmNudge 2.6s ease-in-out infinite;
}

@keyframes mmCrawl {
  to { stroke-dashoffset: -34; }
}

@keyframes mmNudge {
  50% { transform: translateX(4px); }
}

.mm-hero .mm-arrow {
  --arw: var(--yellow);
  margin: 0 0 22px;
}

.mm-ch .mm-arrow {
  --arw: var(--d);
  margin: 8px 0 0;
}

.mm-end .mm-arrow {
  --arw: var(--yellow);
  margin: 0 auto 24px;
}

.mm-h3 {
  margin: 0 0 10px;
  font-family: var(--title);
  font-weight: 600;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.15;
}

.mm-intro {
  max-width: 660px;
  margin: 0 0 44px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
}

.mm-intro a,
.mm-client-copy a {
  color: color-mix(in srgb, var(--sky) 80%, #000);
  text-decoration: none;
  border-bottom: 1.5px solid color-mix(in srgb, var(--sky) 40%, transparent);
}

.mm-sec {
  position: relative;
  padding-block: 88px;
}

/* the bands alternate cream and a soft wash of their colour, each with a paper cloud on top */
.mm-client,
.mm-press,
.mm-guide,
.mm-books > .mm-ch:nth-child(even) {
  background: color-mix(in srgb, var(--g, var(--c)) 13%, var(--cream));
}

.mm-sec::before,
.mm-ch::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -22px;
  height: 24px;
  background: radial-gradient(circle at 50% 100%, var(--band, var(--cream)) 66%, transparent 67%) 0 0 / 64px 48px repeat-x;
  pointer-events: none;
}

.mm-client::before,
.mm-press::before,
.mm-guide::before,
.mm-books > .mm-ch:nth-child(even)::before {
  --band: color-mix(in srgb, var(--g, var(--c)) 13%, var(--cream));
}

.mm-client::before {
  display: none;
}

/* ---------- buttons ---------- */
.mm-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--bn);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.3s var(--pop), box-shadow 0.3s var(--ease);
}

.mm-btn svg {
  width: 12px;
  height: 12px;
}

.mm-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.18);
}

.mm-btn--ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.mm-btn--ghost:hover {
  box-shadow: inset 0 0 0 2px #fff;
}

/* ============ Hero: one book turns through the five ============ */
.mm-hero {
  position: relative;
  padding: calc(var(--hdr) + 56px) 0 130px;
  background: #1f1840;
  color: #fff;
  transition: --c 0.9s var(--ease);
}

.mm-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(44% 58% at 74% 48%, color-mix(in srgb, var(--c) 58%, transparent), transparent 72%),
    radial-gradient(30% 40% at 6% 92%, rgba(242, 85, 122, 0.24), transparent 70%),
    radial-gradient(26% 34% at 40% 8%, rgba(122, 111, 170, 0.45), transparent 70%),
    radial-gradient(circle, rgba(255, 255, 255, 0.07) 1.2px, transparent 1.4px) 0 0 / 22px 22px;
  pointer-events: none;
}

.mm-hero-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 48px;
  align-items: center;
}

.mm-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.mm-kicker span {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--bn);
  font-weight: 500;
  font-size: 14px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22);
}

.mm-kicker span + span {
  background: var(--c);
  color: #1f1840;
  font-weight: 600;
  box-shadow: none;
}

.mm-h1 {
  margin: 0 0 22px;
  font-family: var(--title);
  font-weight: 600;
  font-size: clamp(48px, 5vw, 86px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.mm-hero .mm-h1 {
  margin-bottom: 8px;
}

.mm-h1 em {
  display: block;
  white-space: nowrap;
  font-style: normal;
  color: var(--yellow);
}

.mm-lead {
  max-width: 540px;
  margin: 0 0 26px;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
}

/* the five books as tabs; the one on the open book is filled */
.mm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 600px;
  margin: 0 0 26px;
}

.mm-tabs button {
  flex: 1 1 auto;
  display: grid;
  justify-items: start;
  padding: 8px 10px 6px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-family: var(--bn);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14);
  transition: background 0.35s, color 0.35s, transform 0.35s var(--pop), box-shadow 0.35s;
}

.mm-tabs b {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  color: color-mix(in srgb, var(--c) 72%, #fff);
  transition: color 0.35s;
}

.mm-tabs span {
  font-family: var(--sans);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0.72;
}

.mm-tabs button:hover {
  transform: translateY(-2px);
}

.mm-tabs button[aria-pressed="true"] {
  background: var(--c);
  color: #1f1840;
  transform: translateY(-3px);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 55%, #000);
}

.mm-tabs button[aria-pressed="true"] b {
  color: #1f1840;
}

.mm-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  max-width: 600px;
  margin: 0;
  padding: 22px 24px;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.25);
}

.mm-facts .mm-wide {
  grid-column: 1 / -1;
}

.mm-facts dt {
  margin-bottom: 2px;
  font-family: var(--bn);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(42, 33, 64, 0.72);
}

.mm-facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.mm-facts .mm-me {
  font-family: var(--title);
  font-weight: 600;
  font-size: 22px;
  color: #54488a;
}

.mm-facts a,
.mm-intro a,
.mm-client-copy a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #54488a;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(84, 72, 138, 0.35);
}

.mm-facts a svg {
  width: 10px;
  height: 10px;
}

.mm-hero-art {
  position: relative;
  padding: 10px 6px 30px;
  perspective: 1800px;
}

.mm-book {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
  aspect-ratio: 1800 / 1139;
  transform: rotateX(13deg) rotateZ(-3deg);
  transform-style: preserve-3d;
}

.mm-book::before {
  content: "";
  position: absolute;
  inset: 8% 2% -6%;
  border-radius: 30px;
  background: rgba(8, 4, 24, 0.6);
  filter: blur(30px);
  transform: translateZ(-60px);
}

.mm-spread {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  opacity: 0;
  visibility: hidden;
  transform-style: preserve-3d;
}

.mm-spread.is-on {
  opacity: 1;
  visibility: visible;
}

.mm-pg {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #fff;
}

.mm-pg img {
  width: 100%;
}

.mm-pg-l {
  border-radius: 10px 2px 2px 10px;
  transform-origin: right center;
  transform: rotateY(9deg);
  box-shadow: -3px 4px 0 #ece6f6, -6px 8px 0 #cfc6e2;
}

.mm-pg-r {
  border-radius: 2px 10px 10px 2px;
  transform-origin: left center;
  transform: rotateY(-9deg);
  box-shadow: 3px 4px 0 #ece6f6, 6px 8px 0 #cfc6e2;
}

.mm-pg-l::after,
.mm-pg-r::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  pointer-events: none;
}

.mm-pg-l::after {
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(42, 33, 64, 0.16));
}

.mm-pg-r::after {
  left: 0;
  background: linear-gradient(270deg, transparent, rgba(42, 33, 64, 0.2));
}

.mm-tr {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.mm-tr .tr {
  fill: none;
  stroke: #f6c445;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mm-tip {
  opacity: 0;
  color: #f6c445;
  filter: drop-shadow(2px 4px 3px rgba(42, 33, 64, 0.35));
}

.mm-cloud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 30px;
  background: radial-gradient(circle at 50% 100%, color-mix(in srgb, #f2557a 13%, var(--cream)) 66%, transparent 67%) 0 0 / 64px 52px repeat-x;
}

/* ============ Client ============ */
.mm-client-in {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
}

.mm-client-copy > p:not(.mm-eyebrow) {
  max-width: 580px;
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
}

.mm-client-copy b {
  color: var(--ink);
}

.mm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.mm-stats li {
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--g) 35%, #fff);
}

.mm-stats b {
  display: block;
  font-family: var(--bn);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  color: color-mix(in srgb, var(--g) 80%, #000);
}

.mm-stats span {
  font-size: 14px;
  color: var(--ink-2);
}

.mm-chars img {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  border-radius: 26px;
  transform: rotate(2deg);
  box-shadow: 0 30px 50px -30px rgba(42, 33, 64, 0.5);
}

.mm-chars figcaption {
  max-width: 420px;
  margin: 22px auto 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ============ The system: five first pages, six shared parts, 560 stripes ============ */
.mm-five {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.mm-five figure {
  transform: rotate(var(--r, -1.5deg));
  transition: transform 0.4s var(--pop);
}

.mm-five figure:nth-child(even) {
  --r: 1.5deg;
}

.mm-five figure:hover {
  transform: rotate(0) translateY(-8px);
}

.mm-five img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 22px 36px -22px rgba(42, 33, 64, 0.55), 0 0 0 1px var(--line);
}

.mm-five figcaption {
  display: grid;
  justify-items: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-3);
}

.mm-five figcaption b {
  font-family: var(--bn);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  color: color-mix(in srgb, var(--c) 70%, #000);
}

.mm-anat {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 52px 0 0;
  padding: 0;
  list-style: none;
}

.mm-anat li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 12px;
}

.mm-anat b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding-top: 3px;
  border-radius: 10px;
  background: var(--pt);
  color: #fff;
  font-family: var(--bn);
  font-size: 15px;
}

.mm-anat li:nth-child(1) { --pt: #4cadde; }
.mm-anat li:nth-child(2) { --pt: #f2557a; }
.mm-anat li:nth-child(3) { --pt: #e0981a; }
.mm-anat li:nth-child(4) { --pt: #7a6faa; }
.mm-anat li:nth-child(5) { --pt: #4fa86a; }
.mm-anat li:nth-child(6) { --pt: #f5844c; }

.mm-anat span {
  font-family: var(--title);
  font-weight: 600;
  font-size: 18px;
}

.mm-anat em {
  font-style: normal;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* the colour guide */
.mm-cg {
  margin-top: 84px;
}

.mm-cg-h {
  max-width: 660px;
  margin-bottom: 28px;
}

.mm-cg-h p,
.mm-cg-card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

.mm-cg code {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.mm-cg-box {
  padding: 34px 30px 26px;
  border-radius: 28px;
  background: #1f1840;
  color: #fff;
  box-shadow: 0 8px 0 #120d2a;
}

.mm-cg-box ul {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mm-cg-box li {
  display: grid;
  justify-items: center;
  align-items: end;
  grid-template-rows: 170px auto auto;
}

.mm-cg-box svg {
  width: 40px;
  height: var(--h);
  color: var(--c);
  transition: transform 0.35s var(--pop);
  overflow: hidden;
}

.mm-cg-box li:hover svg {
  transform: translateY(-10px);
}

.mm-cg-box b {
  margin-top: 12px;
  font-family: var(--title);
  font-weight: 600;
  font-size: 16px;
}

.mm-cg-box code {
  color: rgba(255, 255, 255, 0.62);
}

.mm-cg-two {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  margin-top: 24px;
}

.mm-cg-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 6px 0 rgba(42, 33, 64, 0.08), 0 0 0 1px var(--line);
}

.mm-cg-card h4 {
  margin: 0 0 6px;
  font-family: var(--title);
  font-weight: 600;
  font-size: 22px;
}

.mm-cg-card p {
  margin-bottom: 20px;
  font-size: 15.5px;
}

.mm-cg-pairs {
  flex: 1;
  display: grid;
  align-content: center;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mm-cg-pairs li {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.mm-cg-pairs b {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding-top: 8px;
  border-radius: 16px;
  background: var(--s);
  color: var(--l);
  font-weight: 800;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1;
}

.mm-cg-pairs code {
  font-size: 11.5px;
  line-height: 1.45;
}

.mm-cg-use {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mm-cg-use li {
  display: grid;
  grid-template-columns: 30px 118px 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.mm-cg-lead {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--c);
}

.mm-cg-use p {
  display: grid;
  margin: 0;
  line-height: 1.2;
}

.mm-cg-use p b {
  font-family: var(--bn);
  font-weight: 700;
  font-size: 17px;
}

.mm-cg-use p em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-3);
}

.mm-cg-bar {
  display: flex;
  gap: 1.5px;
  height: 20px;
  overflow: hidden;
  border-radius: 6px;
}

/* ============ The verse (Benjonborno chapter) ============ */
.mm-verse-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: center;
  margin: 0 0 44px;
  padding: 34px 38px;
  border-radius: 28px;
  background: #e7e865;
  box-shadow: 0 8px 0 #c9ca46;
}

.mm-verse-copy p {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

.mm-verse-btns {
  display: flex;
  gap: 10px;
}

.mm-verse-btns button {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding-top: 6px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--g);
  font-weight: 700;
  font-size: 30px;
  cursor: pointer;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--g) 45%, #fff), 0 5px 0 color-mix(in srgb, var(--g) 35%, #fff);
  transition: transform 0.35s var(--pop), background 0.3s, color 0.3s;
}

.mm-verse-btns button[aria-pressed="true"] {
  background: var(--g);
  color: #fff;
  transform: translateY(-4px) rotate(-3deg);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--g) 70%, #000);
}

.mm-verse p {
  margin: 0 0 6px;
  padding: 4px 12px;
  border-radius: 14px;
  font-weight: 600;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.5;
  transition: background 0.35s var(--ease);
}

.mm-verse span {
  display: block;
}

.mm-verse b {
  position: relative;
  display: inline-block;
  font-weight: 700;
  transition: color 0.3s;
}

.mm-verse b::after {
  content: "";
  position: absolute;
  left: -7px;
  right: -7px;
  top: 2px;
  bottom: -2px;
  border: 3px solid var(--g);
  border-radius: 50% 46% 52% 44%;
  transform: rotate(-8deg) scale(0.4);
  opacity: 0;
  transition: transform 0.45s var(--pop), opacity 0.25s;
}

.mm-couplet.is-on {
  background: rgba(255, 255, 255, 0.6);
}

.mm-couplet.is-on b {
  color: #e84830;
}

.mm-couplet.is-on b::after {
  transform: rotate(-8deg) scale(1);
  opacity: 1;
}

.mm-couplet.is-on b:nth-of-type(2)::after {
  transition-delay: 0.12s;
}

.mm-couplet.is-on b:nth-of-type(3)::after {
  transition-delay: 0.24s;
}

/* ============ Pencil to print: a train rides plan → low-fi → final ============ */
.mm-run.is-scroll {
  height: 260vh;
}

.mm-run.is-scroll .mm-run-stick {
  position: sticky;
  top: max(24px, calc(50vh - 350px));
}

.mm-line {
  position: relative;
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  justify-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding-top: 54px;
}

/* rails and sleepers, under the stations */
.mm-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 16px;
  border-block: 3px solid var(--ink);
  background: repeating-linear-gradient(90deg, transparent 0 10px, #b9825a 10px 18px) 0 0 / auto 100%;
  opacity: 0.85;
}

.mm-flag,
.mm-stn {
  position: relative;
  z-index: 1;
}

.mm-flag {
  margin-bottom: 4px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-family: var(--bn);
  font-weight: 700;
  font-size: 14px;
}

.mm-flag--end {
  background: #f6c445;
  color: var(--ink);
}

/* a station: a little platform sign on a post */
.mm-stn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border: 0;
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--bn);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--line);
}

.mm-stn b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding-top: 4px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink-3);
  font-size: 26px;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--c) 50%, #fff);
  transition: transform 0.4s var(--pop), background 0.3s, color 0.3s, box-shadow 0.3s;
}

.mm-stn span {
  font-weight: 600;
  font-size: 17px;
  color: var(--ink-3);
  transition: color 0.3s;
}

.mm-stn.is-done b,
.mm-stn[aria-current="step"] b {
  background: var(--c);
  color: #fff;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 70%, #000);
}

.mm-stn[aria-current="step"] b {
  transform: scale(1.1) rotate(-4deg);
}

.mm-stn[aria-current="step"] span,
.mm-stn.is-done span {
  color: var(--ink);
}

/* the engine rides above the track to the station in use */
.mm-train {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 84px;
  height: 49px;
  overflow: visible;
  transform: translateX(var(--tx, 0px));
  transition: transform 1s var(--ease);
}

.mm-smoke circle {
  fill: #fff;
  stroke: rgba(42, 33, 64, 0.2);
  stroke-width: 1.5;
  animation: mmPuff 1.6s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.mm-smoke circle:nth-child(2) {
  animation-delay: 0.3s;
}

.mm-smoke circle:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes mmPuff {
  0% { transform: translate(0, 4px) scale(0.6); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translate(-8px, -8px) scale(1.2); opacity: 0; }
}

.mm-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: center;
}

.mm-sheets {
  position: relative;
  aspect-ratio: 1224 / 774;
  margin-inline: auto;
  width: 100%;
}

.mm-run.is-scroll .mm-sheets {
  width: min(100%, calc((100vh - 250px) * 1.58));
}

.mm-sh {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 60px -36px rgba(42, 33, 64, 0.6), 0 0 0 1px var(--line);
  opacity: 0;
  transform: translateX(40px) scale(0.97);
  transition: transform 0.8s var(--ease), opacity 0.6s var(--ease);
  pointer-events: none;
}

.mm-sh.is-next {
  z-index: 1;
  opacity: 1;
  transform: translate(12px, 12px) rotate(1.5deg) scale(0.98);
}

.mm-sh.is-on {
  z-index: 2;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* done sheets roll off to the left, like a passing carriage */
.mm-sh.is-past {
  z-index: 3;
  opacity: 0;
  transform: translateX(-30%) rotate(-3deg) scale(0.94);
}

.mm-sh svg,
.mm-sh img {
  display: block;
  width: 100%;
  height: 100%;
}

/* the plan */
.mm-plan .pl-pg {
  fill: #fff;
  stroke: #ddd8e4;
  stroke-width: 1.4;
}

.mm-plan .pl-shadow {
  fill: rgba(42, 33, 64, 0.08);
}

.mm-plan .pl-gutter {
  stroke: rgba(42, 33, 64, 0.25);
  stroke-width: 1;
}

.mm-plan .pl-g {
  font-family: var(--bn);
  font-weight: 700;
  font-size: 34px;
  text-anchor: middle;
  fill: #fff;
}

.mm-plan .pl-o {
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
}

.mm-plan .pl-rule,
.mm-plan .pl-out,
.mm-plan .pl-doodle,
.mm-plan .pl-dots {
  fill: none;
  stroke: #c9c4d3;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.mm-plan .pl-dash {
  stroke-dasharray: 3 4;
}

.mm-plan .pl-doodle {
  stroke-width: 3;
}

.mm-plan .pl-dots {
  stroke-dasharray: 0.1 7;
  stroke-width: 4;
}

.mm-plan .pl-fn {
  font-family: var(--title);
  font-weight: 600;
  font-size: 13px;
  text-anchor: end;
  fill: var(--ink);
}

.mm-plan .pl-fr {
  font-family: var(--bn);
  font-weight: 600;
  font-size: 15px;
  text-anchor: end;
  fill: var(--ink-3);
}

.mm-plan .pl-chip {
  font-family: var(--bn);
  font-weight: 700;
  font-size: 15px;
}

.mm-plan .pl-ring {
  fill: none;
  stroke: #e84830;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  transition: stroke-dashoffset 1.2s 0.5s var(--ease);
}

.mm-sh.is-on .pl-ring {
  stroke-dashoffset: 0;
}

/* the low-fi */
.mm-lofi .lf-box,
.mm-lofi .lf-slot {
  fill: #f3f1f6;
  stroke: #b7b2c4;
  stroke-width: 2;
}

.mm-lofi .lf-slot {
  fill: #fff;
  stroke-dasharray: 7 6;
}

.mm-lofi .lf-x {
  stroke: #d3cfdb;
  stroke-width: 2;
}

.mm-lofi .lf-bar {
  fill: #d3cfdb;
}

.mm-lofi .lf-tag {
  fill: #fff;
  stroke: #b7b2c4;
  stroke-width: 2;
}

.mm-lofi .lf-sky {
  fill: #ecebe1;
}

.mm-lofi .lf-band {
  fill: #f6f5f8;
}

.mm-lofi .lf-maze {
  fill: none;
  stroke: #c9c4d3;
  stroke-width: 22;
  stroke-linecap: round;
}

.mm-lofi .lf-disc {
  fill: #fff;
  stroke: #b7b2c4;
  stroke-width: 2;
}

.mm-lofi .lf-disc.is-hit {
  stroke: #7a6faa;
  stroke-width: 3;
}

.mm-lofi .lf-dt {
  font-family: var(--bn);
  font-weight: 700;
  font-size: 26px;
  text-anchor: middle;
  fill: #b7b2c4;
}

.mm-lofi .lf-gutter {
  stroke: #b7b2c4;
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.mm-lofi .lf-pin circle {
  fill: var(--pink);
}

.mm-lofi .lf-pin text {
  font-family: var(--bn);
  font-weight: 700;
  font-size: 19px;
  text-anchor: middle;
  fill: #fff;
}

.mm-notes {
  display: grid;
}

.mm-notes > div {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}

.mm-notes > div.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.mm-notes h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-family: var(--title);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
}

.mm-notes h3 b {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--pink);
  color: #fff;
  font-family: var(--bn);
  font-size: 18px;
}

.mm-notes p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

.mm-legend,
.mm-pins {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  color: var(--ink-2);
}

.mm-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-legend i {
  flex: none;
  width: 30px;
  height: 18px;
  border-radius: 4px;
}

.mm-legend .lg-learn {
  background: linear-gradient(180deg, #7a6faa 0 55%, #fff 55%);
  box-shadow: inset 0 0 0 1.5px #ddd8e4;
}

.mm-legend .lg-play {
  background: color-mix(in srgb, #7a6faa 22%, #fff);
  box-shadow: inset 0 0 0 1.5px #ddd8e4;
}

.mm-legend .lg-io {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #ddd8e4, inset 0 -6px 0 #f6c445;
}

.mm-pins {
  counter-reset: pin;
}

.mm-pins li {
  position: relative;
  padding-left: 34px;
  counter-increment: pin;
}

.mm-pins li::before {
  content: counter(pin);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding-top: 2px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-family: var(--bn);
  font-weight: 700;
  font-size: 13px;
}

/* ============ The five books ============ */
.mm-books-h {
  padding-top: 96px;
  padding-bottom: 20px;
}

.mm-ch {
  position: relative;
  padding: 72px 0 96px;
  scroll-margin-top: 10px;
}

.mm-ch-h {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 34px;
  align-items: center;
  margin-bottom: 22px;
}

.mm-ch-no {
  grid-column: 1 / -1;
  justify-self: start;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--d);
  color: #fff;
  font-family: var(--title);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--d) 60%, #000);
}

.mm-ch-bn {
  margin: 0;
  font-family: var(--bn);
  font-weight: 800;
  font-size: clamp(76px, 9.6vw, 150px);
  line-height: 1.12;
  color: color-mix(in srgb, var(--c) 72%, var(--d));
  text-shadow: 5px 6px 0 color-mix(in srgb, var(--d) 28%, transparent);
  white-space: nowrap;
}

.mm-ch .mm-h2 {
  font-size: clamp(34px, 3.8vw, 56px);
}

.mm-ch .mm-h2 em {
  color: var(--d);
}

.mm-ch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.mm-ch-meta span {
  padding: 5px 13px;
  border-radius: 999px;
  background: #fff;
  font-family: var(--bn);
  font-weight: 600;
  font-size: 14px;
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.mm-ch-meta span:first-child {
  color: var(--d);
}

.mm-ch .mm-intro {
  margin-bottom: 36px;
}

/* every preview page, standing on five shelves */
.mm-shelf + .mm-shelf {
  margin-top: 46px;
}

.mm-shelf-t {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
}

.mm-shelf-t b {
  font-family: var(--bn);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.2;
  color: var(--d);
}

.mm-shelf-t span {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
}

.mm-pages {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0 12px 0;
  list-style: none;
}

.mm-pages::after {
  content: "";
  grid-column: 1 / -1;
  height: 14px;
  margin: -12px -12px 0;
  border-radius: 7px;
  background: var(--c);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 62%, #000), 0 22px 26px -18px rgba(42, 33, 64, 0.5);
}

.mm-pages li {
  transition: transform 0.35s var(--pop);
}

.mm-pages li:hover {
  transform: translateY(-10px);
}

.mm-pages img {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

/* ---------- the live moments ---------- */
.mm-cgame,
.mm-ship,
.mm-hunt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.mm-cgame {
  grid-template-columns: minmax(0, 500px) 260px;
  justify-content: center;
}

.mm-cgame-page,
.mm-ship-pic,
.mm-hunt-pic,
.mm-safari,
.mm-whale {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 50%, #fff), 0 30px 60px -36px rgba(42, 33, 64, 0.55);
  user-select: none;
  -webkit-user-select: none;
}

.mm-cgame-c,
.mm-cgame-art,
.mm-ship-pic img,
.mm-hunt-pic img,
.mm-safari img {
  display: block;
  width: 100%;
  height: auto;
}

.mm-cgame-c {
  cursor: pointer;
}

.mm-cgame-art {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.mm-ch .mm-wrap > :last-child {
  margin-bottom: 0;
}

.mm-ship-svg,
.mm-hunt-svg,
.mm-safari-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}

.mm-ship-svg {
  cursor: pointer;
}

.is-shake {
  animation: mmShake 0.4s;
}

@keyframes mmShake {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.mm-toast {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--bn);
  font-size: 16px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
  pointer-events: none;
}

.mm-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mm-side {
  position: sticky;
  top: 40px;
}

.mm-count {
  margin: 0 0 14px;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.1;
}

.mm-count b {
  display: inline-block;
  font-size: 64px;
  color: var(--d);
}

.mm-count span {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-3);
}

.mm-next {
  margin: 0 0 18px;
  font-weight: 600;
  font-size: 22px;
}

.mm-next b {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  margin-left: 4px;
  padding: 4px 8px 0;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 24px;
}

.mm-crayons {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: 10px;
  margin: 0 0 18px;
}

.mm-crayons button {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--c);
  cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.3s var(--pop), box-shadow 0.3s;
}

.mm-crayons button[aria-checked="true"] {
  transform: scale(1.08);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.15), 0 0 0 3px #fff, 0 0 0 6px var(--ink);
}

.mm-found {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.mm-found li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}

.mm-found li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px dashed #c9c4d3;
}

.mm-found li.is-found::before {
  border: 0;
  background: #e84830 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.mm-found li:not(.is-found) {
  font-size: 0;
}

.mm-found li:not(.is-found)::after {
  content: "?";
  font-family: var(--bn);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-3);
}

.mm-reset {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--bn);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--line);
}

.mm-win {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: 0 6px 0 #f6c445;
}

.mm-win[hidden] {
  display: none;
}

.mm-win svg {
  width: 54px;
  height: 54px;
  fill: #f6c445;
}

.mm-win b {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: #e84830;
}

.mm-win span {
  font-size: 14px;
  color: var(--ink-2);
}

.mm-burst {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.mm-burst i {
  position: absolute;
  top: -30px;
  width: 14px;
  height: 22px;
  border-radius: 4px;
}

/* ship */
.mm-spot circle {
  fill: none;
  stroke: #e84830;
  stroke-width: 7;
  stroke-linecap: round;
  opacity: 0;
}

.mm-spot.is-found circle {
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
}

.mm-miss text {
  font-family: var(--bn);
  font-weight: 800;
  font-size: 54px;
  text-anchor: middle;
  fill: #e84830;
  stroke: #fff;
  stroke-width: 6;
  paint-order: stroke;
}

/* treasure hunt */
.mm-hunt .hp-bg {
  display: none;
}

.mm-hunt .hp {
  fill: none;
  stroke: #e84830;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.mm-hunt .hd {
  cursor: pointer;
}

.mm-hunt .hd circle {
  fill: rgba(255, 255, 255, 0.001);
  stroke: transparent;
  stroke-width: 5;
  transition: stroke 0.3s;
}

.mm-hunt .hd text {
  font-family: var(--bn);
  font-weight: 700;
  font-size: 30px;
  text-anchor: middle;
  fill: var(--d);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mm-hunt .hd.is-print text {
  display: none;
}

.mm-hunt .hd.is-done circle {
  stroke: #e84830;
}

.mm-hunt .hd.is-done text {
  opacity: 1;
}

.mm-hunt .hd.is-next circle {
  stroke: var(--c);
  stroke-dasharray: 6 7;
  animation: mmSpin 3s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes mmSpin {
  to { transform: rotate(360deg); }
}

.mm-hunt .hunt-glow {
  fill: #fff2a8;
  opacity: 0;
  filter: blur(16px);
  transition: opacity 0.6s;
}

.mm-hunt.is-won .hunt-glow {
  opacity: 0.85;
  animation: mmGlow 1.6s ease-in-out infinite alternate;
}

@keyframes mmGlow {
  to { opacity: 0.4; }
}

/* ABC safari */
.mm-safari {
  margin-bottom: 48px;
}

.mm-safari .sd circle {
  fill: none;
}

.mm-safari .sd text {
  font-family: var(--bn);
  font-weight: 700;
  font-size: 34px;
  text-anchor: middle;
  fill: var(--d);
  opacity: 0;
  transition: opacity 0.25s;
}

.mm-safari .sd.is-print text {
  display: none;
}

.mm-safari .sd.is-in text {
  opacity: 1;
}

.mm-safari .sd-ring {
  fill: none;
  stroke: #f6c445;
  stroke-width: 6;
  opacity: 0;
  transition: cx 0.32s var(--ease), cy 0.32s var(--ease), opacity 0.3s;
  filter: drop-shadow(0 2px 2px rgba(42, 33, 64, 0.35));
}

.mm-safari.is-run .sd-ring {
  opacity: 1;
}

.mm-safari .exit {
  fill: #fff2a8;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.4s;
}

.mm-safari.is-won .exit {
  opacity: 0.9;
}

/* colour by number: the whole page, centred. The colour canvas covers the picture area (x 0, y 111 of 900 x 1139) and the page multiplies over it */
.mm-whale {
  isolation: isolate;
  max-width: 600px;
  margin: 0 auto;
}

.mm .mm-whale-c {
  position: absolute;
  left: 0;
  top: 9.745%;
  width: 100%;
  height: 80.69%;
  pointer-events: none;
}

.mm .mm-whale-page {
  position: relative;
  width: 100%;
  mix-blend-mode: multiply;
}

/* ---------- the book dock: jump between the five, shown while in the chapters ---------- */
.mm-dock {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(31, 24, 64, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 30px -12px rgba(20, 10, 50, 0.5);
  transform: translate(-50%, 160%);
  transition: transform 0.5s var(--ease);
}

.mm-dock.is-on {
  transform: translate(-50%, 0);
}

.mm-dock a {
  display: grid;
  place-items: center;
  height: 40px;
  padding: 3px 15px 0;
  border-radius: 999px;
  color: #fff;
  font-family: var(--bn);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s;
}

.mm-dock a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mm-dock a.is-on {
  background: var(--c);
  color: #1f1840;
}

/* ============ Stickers: Maya's wardrobe, on a loop ============ */
.mm-stk-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.mm-act {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  aspect-ratio: 1224 / 1720;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 60px -36px rgba(42, 33, 64, 0.5);
  user-select: none;
}

.mm-act-room {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border-radius: 22px 22px 0 0;
  pointer-events: none;
}

.mm-act-strip {
  position: absolute;
  left: 3.8%;
  right: 3.8%;
  top: 77.2%;
  bottom: 2.33%;
  border-radius: 16px;
  background: repeating-linear-gradient(-45deg, #fdf3f7 0 10px, #f9eaf0 10px 20px);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.mm-cut {
  position: absolute;
  border-radius: 18px;
  border: 1.5px dashed rgba(42, 33, 64, 0.3);
}

.mm-stk {
  position: absolute;
  z-index: 2;
  max-width: none !important;
  filter: drop-shadow(0 2px 2px rgba(42, 33, 64, 0.25));
  animation: mmStk1 9s cubic-bezier(0.45, 0, 0.25, 1) infinite;
  will-change: transform;
}

.mm-stk--2 {
  animation-name: mmStk2;
}

.mm-stk--3 {
  animation-name: mmStk3;
}

@keyframes mmStk1 {
  0%, 6% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 1; }
  10% { transform: translate(calc(var(--dx) * 100%), calc((var(--dy) - 0.2) * 100%)) rotate(-8deg) scale(1.08); }
  22% { transform: translate(0, -14%) rotate(-3deg) scale(1.06); }
  25% { transform: scale(0.97); }
  28%, 88% { transform: none; opacity: 1; }
  94% { transform: none; opacity: 0; }
  95% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 0; }
  100% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 1; }
}

@keyframes mmStk2 {
  0%, 30% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 1; }
  34% { transform: translate(calc(var(--dx) * 100%), calc((var(--dy) - 0.2) * 100%)) rotate(7deg) scale(1.08); }
  46% { transform: translate(0, -14%) rotate(3deg) scale(1.06); }
  49% { transform: scale(0.97); }
  52%, 88% { transform: none; opacity: 1; }
  94% { transform: none; opacity: 0; }
  95% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 0; }
  100% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 1; }
}

@keyframes mmStk3 {
  0%, 54% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 1; }
  58% { transform: translate(calc(var(--dx) * 100%), calc((var(--dy) - 0.2) * 100%)) rotate(-7deg) scale(1.08); }
  70% { transform: translate(0, -14%) rotate(-3deg) scale(1.06); }
  73% { transform: scale(0.97); }
  76%, 88% { transform: none; opacity: 1; }
  94% { transform: none; opacity: 0; }
  95% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 0; }
  100% { transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); opacity: 1; }
}

/* ============ For the grown-ups: the parent guide ============ */
.mm-guide-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.mm-guide-art {
  position: relative;
  padding: 10px 40px 50px 0;
}

.mm-guide-a {
  width: 74%;
  border-radius: 14px;
  transform: rotate(-4deg);
  box-shadow: 0 30px 50px -28px rgba(42, 33, 64, 0.55);
}

.mm-guide-b {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52%;
  border: 6px solid #fff;
  border-radius: 20px;
  transform: rotate(5deg);
  box-shadow: 0 30px 50px -28px rgba(42, 33, 64, 0.55);
}

.mm-guide .mm-btn {
  background: var(--g);
  color: #fff;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--g) 60%, #000);
}

/* ============ Get the set ============ */
.mm-end {
  position: relative;
  padding: 110px 0 96px;
  background: #1f1840;
  color: #fff;
}

.mm-end::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 60% at 15% 30%, rgba(122, 111, 170, 0.45), transparent 70%),
    radial-gradient(40% 60% at 85% 80%, rgba(242, 85, 122, 0.26), transparent 70%);
  pointer-events: none;
}

.mm-cloud--top {
  top: -1px;
  bottom: auto;
  z-index: 1;
  transform: scaleY(-1);
  background: radial-gradient(circle at 50% 100%, var(--cream) 66%, transparent 67%) 0 0 / 64px 52px repeat-x;
}

.mm-end-in {
  position: relative;
  z-index: 1;
  text-align: center;
}

.mm-end .mm-eyebrow {
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}

.mm-end .mm-eyebrow i {
  background: var(--pink);
  box-shadow: 0 0 0 4px rgba(242, 85, 122, 0.3);
}

.mm-end-h {
  margin: 0 0 16px;
  font-family: var(--title);
  font-weight: 600;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1.1;
}

.mm-end-h em {
  font-style: normal;
  color: var(--yellow);
}

.mm-end-in > p {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.mm-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.mm-series {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  max-width: 1000px;
  margin: 64px auto 0;
  padding: 0;
  list-style: none;
}

.mm-series a {
  display: grid;
  gap: 2px;
  padding: 16px 18px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-align: left;
  text-decoration: none;
  box-shadow: inset 0 5px 0 color-mix(in srgb, var(--c) 80%, #fff);
  transition: background 0.3s, transform 0.35s var(--pop);
}

.mm-series a:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-4px);
}

.mm-series span {
  margin-top: 4px;
  font-family: var(--bn);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.mm-series b {
  font-family: var(--bn);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: color-mix(in srgb, var(--c) 70%, #fff);
}

.mm-series em {
  font-style: normal;
  font-size: 13px;
  opacity: 0.8;
}

.mm-page .site-footer {
  position: relative;
  margin-top: 0;
  padding-top: 64px;
  background: #fff;
  color: #000;
}

/* the footer row needs to wrap on tablets */
.mm-page .footer-row {
  flex-wrap: wrap;
  gap: 16px;
}

.pre-motion .mm-hero-copy > *,
.pre-motion .mm-hero-art {
  opacity: 0;
}

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .mm-hero-in,
  .mm-client-in,
  .mm-stk-in,
  .mm-guide-in,
  .mm-desk,
  .mm-cg-two,
  .mm-verse-card {
    grid-template-columns: 1fr;
  }

  .mm-hero-art {
    width: 100%;
    max-width: 660px;
    margin-inline: auto;
  }

  .mm-ship,
  .mm-hunt {
    grid-template-columns: 1fr;
  }

  .mm-side {
    position: static;
  }

  .mm-anat {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-guide-art {
    max-width: 520px;
  }
}

@media (max-width: 767px) {
  .mm-wrap {
    padding-inline: 16px;
  }

  .mm-sec {
    padding-block: 60px;
  }

  .mm-hero {
    padding: calc(var(--hdr) + 44px) 0 84px;
  }

  .mm-hero-in {
    gap: 22px;
  }

  .mm-hero-art {
    order: -1;
    padding: 4px 0 14px;
  }

  .mm-h1 {
    font-size: clamp(44px, 12.6vw, 56px);
    line-height: 1.12;
  }

  .mm-h2 {
    font-size: clamp(34px, 9.6vw, 44px);
    line-height: 1.12;
  }

  .mm-lead,
  .mm-intro {
    font-size: 16px;
  }

  .mm-intro {
    margin-bottom: 32px;
  }

  .mm-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    max-width: none;
  }

  .mm-tabs button {
    justify-items: center;
    padding: 8px 2px 6px;
    text-align: center;
  }

  .mm-tabs b {
    font-size: 15px;
    white-space: nowrap;
  }

  .mm-tabs span {
    display: none;
  }

  .mm-facts {
    gap: 12px 16px;
    padding: 18px;
  }

  .mm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 12px;
  }

  .mm-five figcaption b {
    font-size: 17px;
  }

  .mm-anat {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mm-cg {
    margin-top: 60px;
  }

  .mm-cg-box {
    padding: 24px 12px 20px;
    border-radius: 22px;
  }

  .mm-cg-box ul {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px 2px;
  }

  .mm-cg-box li {
    grid-template-rows: 120px auto auto;
  }

  .mm-cg-box svg {
    width: 30px;
    height: calc(var(--h) * 0.75);
  }

  .mm-cg-box b {
    font-size: 14px;
  }

  .mm-cg-box code {
    font-size: 10.5px;
    letter-spacing: 0;
  }

  .mm-cg-card {
    padding: 22px 16px;
  }

  .mm-cg-pairs code {
    font-size: 9.5px;
    letter-spacing: 0;
  }

  .mm-cg-use li {
    grid-template-columns: 26px 1fr 66px;
    gap: 6px 10px;
  }

  .mm-cg-lead {
    width: 26px;
    height: 26px;
  }

  .mm-cg-bar {
    grid-column: 1 / -1;
  }

  .mm-line {
    gap: 4px;
    padding-top: 48px;
  }

  .mm-stn {
    flex-direction: column;
    gap: 4px;
    padding: 0;
    background: none;
    box-shadow: none;
  }

  .mm-stn b {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .mm-stn span {
    padding: 0 6px;
    border-radius: 999px;
    background: var(--cream);
    font-size: 13px;
  }

  .mm-track {
    bottom: 28px;
  }

  .mm-flag {
    margin-bottom: 22px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .mm-train {
    width: 64px;
    height: 37px;
  }

  .mm-desk {
    gap: 22px;
  }

  .mm-notes h3 {
    font-size: 22px;
  }

  .mm-books-h {
    padding-top: 64px;
  }

  .mm-ch {
    padding: 56px 0 70px;
  }

  .mm-ch-h {
    grid-template-columns: 1fr;
  }

  .mm-ch-bn {
    font-size: clamp(64px, 19vw, 88px);
  }

  .mm-ch .mm-h2 {
    font-size: clamp(30px, 8.6vw, 38px);
  }

  .mm-cgame {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .mm-side {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 18px;
    align-items: center;
  }

  .mm-count {
    margin: 0;
    font-size: 22px;
  }

  .mm-count b {
    font-size: 44px;
  }

  .mm-next {
    margin: 0;
    font-size: 18px;
  }

  .mm-crayons {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 0;
  }

  .mm-crayons button {
    width: 100%;
    height: 40px;
    border-radius: 13px;
  }

  .mm-found {
    display: flex;
    gap: 6px;
    margin: 0;
  }

  .mm-found li {
    font-size: 0 !important;
  }

  .mm-found li::after {
    content: none !important;
  }

  .mm-reset,
  .mm-win {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .mm-win {
    justify-self: stretch;
  }

  .mm-toast {
    font-size: 14px;
  }

  .mm-verse-card {
    gap: 22px;
    padding: 24px 16px 26px;
  }

  .mm-verse p {
    font-size: 19px;
  }

  .mm-pages {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 0 6px;
  }

  .mm-pages::after {
    margin: -8px -6px 0;
  }

  .mm-shelf-t b {
    font-size: 24px;
  }

  .mm-act {
    max-width: 360px;
  }

  .mm-guide-in {
    gap: 30px;
  }

  .mm-guide-art {
    padding: 0 20px 34px 0;
  }

  .mm-end {
    padding: 84px 0 110px;
  }

  .mm-series {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-series li:last-child {
    grid-column: 1 / -1;
  }

  .mm-dock {
    bottom: 12px;
    gap: 2px;
    padding: 5px;
  }

  .mm-dock a {
    height: 36px;
    padding: 3px 9px 0;
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-hero,
  .mm-sh,
  .mm-notes > div,
  .mm-train,
  .mm-dock {
    transition: none;
  }

  .mm-stk,
  .mm-arrow path,
  .mm-smoke circle,
  .mm-hunt .hd.is-next circle {
    animation: none;
  }
}
