/* =====================================================================
   MAHA · Special Birthday Issue
   One-off manga-magazine for 26 May: a Soda-Pop-sky cover, then pages
   printed on manga manuscript paper (blue guide rulers, screentone),
   a red Flamin' Hot advert spread, a letter, and a back cover.
   Rule of thumb in this file: `transform` = entrance/reveal motion,
   `rotate` = resting tilt, `translate` = parallax (set by main.js).
   ===================================================================== */
:root {
  --ink: #15203B;
  --ink-soft: #4C5A78;
  --cobalt: #2C66D2;
  --sky: #8FCBF0;
  --sky-pale: #DDF0FA;
  --paper: #F7F9FB;
  --guide: #9FD3EC;
  --hot: #DC2F1C;
  --hot-deep: #A71A0E;
  --yuzu: #F7CF3F;
  --blush: #F6B5C6;
  --mint: #C4EBDA;

  --f-mast: "Dela Gothic One", "Arial Black", "Hiragino Sans", Impact, sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --f-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", ui-rounded, system-ui, sans-serif;
  --f-pixel: "DotGothic16", ui-monospace, Menlo, monospace;
  --f-ar: "Reem Kufi", "Geeza Pro", "Noto Kufi Arabic", sans-serif;

  --ease: cubic-bezier(.22, .8, .24, 1);
  --soft: cubic-bezier(.34, 1.36, .5, 1);
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --mx: 0; --my: 0; --sy: 0;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden;
  font-family: var(--f-body); font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--paper);
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yuzu); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
main { overflow: clip; }

/* ================= COVER ================= */
.cover {
  position: relative; isolation: isolate;
  display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "mast" "art" "greet" "la" "lb" "foot";
  overflow: hidden;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-bottom: 28px;
  padding-left: var(--gl); padding-right: var(--gr);
  background: linear-gradient(180deg, #2459C4 0%, var(--cobalt) 16%, #5CA6E8 44%, var(--sky) 62%, var(--sky-pale) 84%, var(--paper) 100%);
  color: var(--ink);
}
.cover::after {          /* faint screentone over the top of the sky */
  content: ""; position: absolute; inset: 0 0 50% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.4px) 0 0 / 7px 7px;
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent);
}
.cover-sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cloud { position: absolute; fill: #fff; filter: drop-shadow(0 10px 18px rgba(21,32,59,.10)); }
.cloud.c1 { width: 62vw; max-width: 520px; left: -14%; top: 27%; animation: drift 70s linear infinite alternate; }
.cloud.c2 { width: 46vw; max-width: 380px; right: -10%; top: 42%; animation: drift 90s linear -20s infinite alternate-reverse; }
.cloud.c3 { width: 34vw; max-width: 260px; left: 42%; top: 9%; opacity: .55; animation: drift 80s linear -40s infinite alternate; }
@keyframes drift { from { transform: translateX(-4vw); } to { transform: translateX(6vw); } }
.fizz i {
  position: absolute; bottom: -30px; left: var(--x);
  width: var(--s); height: var(--s); border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.9);
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.95) 0 14%, rgba(255,255,255,.08) 32%);
  animation: fizz var(--t) linear var(--delay) infinite;
}
@keyframes fizz {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(var(--sway), -105vh); opacity: .1; }
}

.cover-top {
  grid-area: top;
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--f-pixel); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; border-bottom: 1.5px solid rgba(255,255,255,.55); padding-bottom: 8px;
}

/* Masthead */
.mast-wrap { grid-area: mast; position: relative; padding-right: 17%; }
.mast {
  margin: 0; display: flex; justify-content: space-between;
  font-family: var(--f-mast); font-weight: 400;
  font-size: clamp(4.6rem, 22.5vw, 15.5rem); line-height: .86; letter-spacing: -.02em;
  color: #fff;
  -webkit-text-stroke: .045em var(--ink); paint-order: stroke fill;
  text-shadow: .07em .07em 0 var(--hot);
}
.mast span { display: inline-block; }
.mast-jp {
  position: absolute; right: 0; top: 2%;
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--f-mast); font-size: clamp(.8rem, 3.4vw, 1.25rem); line-height: 1;
  letter-spacing: .06em; white-space: nowrap;
  padding: .45em .3em; color: #fff; background: var(--hot); border: 2px solid var(--ink);
}
.mast-ar {
  position: absolute; right: 16%; bottom: -46%;
  display: grid; place-items: center;
  width: clamp(3.2rem, 15vw, 5.6rem); aspect-ratio: 1; border-radius: 50%;
  font-family: var(--f-ar); font-weight: 700; font-size: clamp(1.15rem, 5.4vw, 2rem); line-height: 1;
  color: var(--ink); background: var(--yuzu); border: 2px solid var(--ink);
  rotate: -10deg; z-index: 3;
}

/* Hippers: they cling to things. */
.hipper { position: absolute; z-index: 4; width: var(--w, 64px); }
.hipper img { width: 100%; filter: drop-shadow(0 6px 8px rgba(21,32,59,.25)); transform-origin: 50% 90%; }
.hipper.is-hop img { animation: hop .6s var(--soft); }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-22%) rotate(-6deg) scale(1.05); } 70% { transform: translateY(2%) scale(1.04, .96); } 100% { transform: none; } }
.hip-1 { --w: clamp(64px, 19vw, 130px); right: 11%; top: -34%; rotate: 8deg; }

/* Cover artwork */
.cover-art {
  grid-area: art; position: relative;
  aspect-ratio: 1 / .98; max-width: 100%;
  margin-top: 6px;
}
.layer { position: absolute; translate: calc(var(--mx) * var(--d) * 14px) calc(var(--my) * var(--d) * 12px + var(--sy) * var(--d) * -1px); will-change: translate; }
.big26 { inset: 0; display: grid; place-items: center; pointer-events: none; overflow: visible; }
.big26-n {
  font-family: var(--f-mast); font-size: clamp(9rem, 62vw, 40rem); line-height: .8; letter-spacing: -.04em;
  color: transparent;
  background: radial-gradient(rgba(255,255,255,.95) 1.6px, transparent 2px) 0 0 / 7px 7px, linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.22));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 3px #fff;
  translate: 0 -20%;
}
.big26-may {
  position: absolute; right: 2%; top: 30%;
  font-family: var(--f-pixel); font-size: clamp(14px, 4vw, 22px); letter-spacing: .5em;
  writing-mode: vertical-rl; color: #fff;
}
.art-seal { left: 9%; right: 9%; bottom: 3%; z-index: 3; }
.seal-btn { display: block; width: 100%; }
.seal-btn img { width: 100%; transform-origin: 50% 85%; }
.seal-btn.is-booped img { animation: squish .55s var(--soft); }
@keyframes squish { 30% { transform: scale(1.1, .86); } 60% { transform: scale(.95, 1.07); } 100% { transform: none; } }
.art-bag { left: -3%; top: 9%; width: 30%; z-index: 1; rotate: -14deg; }
.art-bag img { filter: drop-shadow(0 14px 18px rgba(21,32,59,.28)); }
.art-capy { right: -4%; bottom: 0; width: 37%; z-index: 4; }
.art-kfc { right: 5%; top: 7%; width: 18%; z-index: 2; rotate: 9deg; }
.art-kfc img { border-radius: 22%; border: 2.5px solid #fff; box-shadow: 0 10px 20px rgba(21,32,59,.25); }

/* Greeting */
.greeting {
  grid-area: greet; position: relative; z-index: 5;
  margin: -9% 0 0;
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(3.3rem, 15.5vw, 8.6rem); line-height: .9; letter-spacing: -.015em;
  text-wrap: balance;
}
.g-line { display: inline-block; }
.g-name { color: var(--hot); }

/* Cover lines */
.coverlines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cl-a { grid-area: la; } .cl-b { grid-area: lb; }
.coverlines li { min-width: 0; }
.coverlines a, .cl-hip { display: grid; grid-template-columns: 2.6em 1fr; gap: 10px; align-items: baseline; text-decoration: none; }
.coverlines b {
  font-family: var(--f-pixel); font-weight: 400; font-size: 13px; color: var(--hot);
  border-top: 2px solid var(--ink); padding-top: 2px;
}
.coverlines span { font-family: var(--f-serif); font-size: 1.3rem; line-height: 1.12; }
.coverlines a:hover span { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.cover-foot { grid-area: foot; display: flex; justify-content: space-between; align-items: end; margin-top: 8px; }
.price {
  font-family: var(--f-mast); font-size: 1.05rem; padding: .25em .55em;
  background: var(--yuzu); border: 2px solid var(--ink); rotate: -4deg;
}
.barcode { display: grid; gap: 2px; padding: 6px 8px 4px; background: #fff; border: 1.5px solid var(--ink); }
.bars { display: block; width: 116px; height: 40px; }
.digits { font-family: var(--f-pixel); font-size: 11px; letter-spacing: .26em; text-align: center; }

@media (min-width: 900px) {
  .cover {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr) minmax(0, 1fr);
    grid-template-areas:
      "top  top   top"
      "mast mast  mast"
      "la   art   lb"
      "greet greet greet"
      "foot foot  foot";
    column-gap: clamp(20px, 3vw, 48px);
    padding-bottom: 40px;
  }
  .mast-wrap { padding-right: 8%; }
  .mast { font-size: clamp(9rem, 21vw, 19rem); }
  .mast-ar { right: 10%; }
  .hip-1 { right: 9%; top: -20%; }
  .cl-a, .cl-b { align-self: center; gap: 26px; }
  .cl-b { text-align: right; }
  .cl-b a, .cl-b .cl-hip { grid-template-columns: 1fr 2.6em; }
  .cl-b b { order: 2; }
  .coverlines span { font-size: clamp(1.35rem, 1.9vw, 1.8rem); }
  .greeting { text-align: center; margin-top: -1%; font-size: clamp(5rem, 9vw, 9.5rem); }
  .cover-art { aspect-ratio: 1 / .78; }
  .art-seal { left: 18%; right: 18%; }
  .art-capy { right: 6%; width: 27%; }
  .art-bag { left: 4%; width: 22%; }
  .art-kfc { right: 10%; width: 13%; }
  .big26-n { translate: 0 -12%; }
  .big26-n { font-size: clamp(20rem, 40vw, 40rem); }
}

/* Cover entrance (runs once on load) */
.is-in .mast span { animation: mastIn 1s var(--soft) both; }
.is-in .mast span:nth-child(1) { animation-delay: .05s; }
.is-in .mast span:nth-child(2) { animation-delay: .13s; }
.is-in .mast span:nth-child(3) { animation-delay: .21s; }
.is-in .mast span:nth-child(4) { animation-delay: .29s; }
@keyframes mastIn { from { opacity: 0; transform: translateY(.5em) rotate(-6deg) scale(.8); } to { opacity: 1; transform: none; } }
.is-in .mast-jp { animation: dropIn .7s var(--soft) .55s both; }
.is-in .mast-ar { animation: stamp .6s var(--soft) .8s both; }
.is-in .cover-top { animation: fade .8s var(--ease) both; }
.is-in .big26 { animation: big26 1.6s var(--ease) .2s both; }
.is-in .art-seal .seal-btn { animation: rise 1.1s var(--soft) .5s both, breathe 5.5s ease-in-out 1.8s infinite; }
.is-in .art-bag img { animation: rise 1s var(--soft) .7s both, bob 6s ease-in-out 1.9s infinite; }
.is-in .art-capy img { animation: peek 1s var(--soft) .9s both; }
.is-in .art-kfc img { animation: stamp .6s var(--soft) 1.05s both; }
.is-in .hip-1 img { animation: dropIn .8s var(--soft) 1.15s both; }
.is-in .g-line { animation: lineIn 1s var(--ease) both; }
.is-in .g-line:nth-child(1) { animation-delay: 1s; }
.is-in .g-name { animation-delay: 1.18s; }
.is-in .coverlines li { animation: fadeUp .8s var(--ease) both; }
.is-in .cl-a li:nth-child(1) { animation-delay: 1.35s; } .is-in .cl-a li:nth-child(2) { animation-delay: 1.45s; }
.is-in .cl-b li:nth-child(1) { animation-delay: 1.55s; } .is-in .cl-b li:nth-child(2) { animation-delay: 1.65s; } .is-in .cl-b li:nth-child(3) { animation-delay: 1.75s; }
.is-in .cover-foot { animation: fade 1s var(--ease) 1.8s both; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-40px) rotate(-10deg); } }
@keyframes stamp { from { opacity: 0; transform: scale(1.8) rotate(-18deg); } }
@keyframes big26 { from { opacity: 0; transform: scale(1.18); filter: blur(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(26%) scale(.88); } }
@keyframes peek { from { opacity: 0; transform: translate(40%, 20%) rotate(12deg); } }
@keyframes lineIn { from { opacity: 0; transform: translateY(.35em); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -20% 0); } }
@keyframes breathe { 0%, 100% { transform: none; } 50% { transform: translateY(-2.2%) scale(1.012, .99); } }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(-4%) rotate(2deg); } }

/* ================= INNER PAGES: manga manuscript paper ================= */
.page {
  position: relative;
  padding-block: clamp(56px, 10vw, 110px);
  padding-left: calc(var(--gl) + 10px); padding-right: calc(var(--gr) + 10px);
  background:
    repeating-linear-gradient(90deg, var(--guide) 0 1px, transparent 1px 8px) left 0 top 0 / 7px 100% no-repeat,
    repeating-linear-gradient(90deg, var(--guide) 0 1px, transparent 1px 8px) right 0 top 0 / 7px 100% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(159,211,236,.9) 15px 16px) left 0 top 0 / 7px 100% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(159,211,236,.9) 15px 16px) right 0 top 0 / 7px 100% no-repeat,
    var(--paper);
}
.page > * { max-width: 1120px; margin-inline: auto; }
.page-head { display: grid; gap: 8px; margin-bottom: clamp(28px, 5vw, 56px); }
.folio { margin: 0; font-family: var(--f-pixel); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.folio b { font-weight: 400; color: #fff; background: var(--hot); padding: 1px 7px; margin-right: 8px; }
.page-head h2 {
  margin: 0; font-family: var(--f-serif); font-weight: 400;
  font-size: clamp(2.8rem, 11vw, 6rem); line-height: .95; letter-spacing: -.015em; text-wrap: balance;
}
.page-dek { margin: 0; max-width: 46ch; font-size: 1.05rem; color: var(--ink-soft); }

/* Reveals (only for content that starts below the fold) */
.rv.await { opacity: 0; transform: translateY(36px); }
.rv.await.in { opacity: 1; transform: none; transition: opacity .9s var(--ease) var(--rd, 0ms), transform 1.1s var(--ease) var(--rd, 0ms); }

/* ================= p.2 COMIC ================= */
.comic { display: grid; }
@media (min-width: 900px) {
  .comic { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); column-gap: 64px; align-items: start; max-width: none; }
  .comic > * { margin-inline: 0; }
  .comic .page-head { position: sticky; top: 80px; justify-self: end; max-width: 460px; }
}
.yonkoma { display: grid; gap: 12px; width: 100%; max-width: 470px; padding: 12px; background: var(--ink); justify-self: center; }
.kp {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10.4;
  background: #fff; border: 3px solid var(--ink); outline: 2px solid #fff; outline-offset: -6px;
}
.kp-no {
  position: absolute; left: 10px; bottom: 9px; z-index: 6;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-pixel); font-size: 12px; color: #fff; background: var(--ink);
}
.tone { position: absolute; inset: 0; }
.tone-corner { background: radial-gradient(rgba(21,32,59,.2) 1.1px, transparent 1.5px) 0 0 / 7px 7px; -webkit-mask-image: linear-gradient(215deg, #000, transparent 55%); mask-image: linear-gradient(215deg, #000, transparent 55%); }
.tone-full { background: radial-gradient(rgba(21,32,59,.22) 1.1px, transparent 1.5px) 0 0 / 6px 6px, #E9EEF5; }
.tone-soft { background: radial-gradient(rgba(220,47,28,.14) 1.2px, transparent 1.6px) 0 0 / 8px 8px, #FFF6F1; }
.focus-lines { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(21,32,59,.16) 0 1.4deg, transparent 1.4deg 6deg); -webkit-mask-image: radial-gradient(circle, transparent 18%, #000 42%); mask-image: radial-gradient(circle, transparent 18%, #000 42%); }

.bubble {
  position: absolute; z-index: 5; margin: 0;
  padding: .55em .9em; max-width: 56%;
  font-family: var(--f-body); font-weight: 700; font-size: clamp(13px, 3.7vw, 16px); line-height: 1.3; text-align: center;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 50% / 46%;
}
.bubble::after {
  content: ""; position: absolute; width: 16px; height: 16px; background: #fff;
  border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
}
.b-r { right: 6%; top: 10%; }
.b-r::after { left: 22%; bottom: -9px; transform: skewX(-28deg) rotate(42deg); }
.b-l { left: 6%; top: 10%; }
.b-l::after { right: 24%; bottom: -9px; transform: skewX(28deg) rotate(48deg); }
.b-loud { border-radius: 14px; font-family: var(--f-mast); font-weight: 400; font-size: clamp(15px, 4.6vw, 20px); top: 8%; left: 5%; }
.kp1 .seal-btn { position: absolute; left: 2%; bottom: -6%; width: 54%; z-index: 2; }
.kp2 .kp-capy { position: absolute; right: 9%; bottom: -4%; width: 44%; z-index: 2; }
.zz { position: absolute; right: 8%; top: 12%; z-index: 3; font-family: var(--f-mast); font-size: clamp(18px, 5vw, 24px); color: var(--ink-soft); }
.zz span { font-size: 1.4em; }
.kp3 .kp-seal3 { position: absolute; left: -2%; bottom: -8%; width: 50%; z-index: 2; }
.cal { position: absolute; right: 8%; top: 18%; width: 32%; z-index: 3; perspective: 500px; rotate: 6deg; }
.cal-rings { display: block; height: 10px; margin: 0 14%; background: radial-gradient(circle at 50% 50%, var(--ink) 3px, transparent 3.5px) 0 0 / 25% 10px repeat-x; position: relative; z-index: 2; }
.cal-sheet { display: grid; margin-top: -4px; border: 2.5px solid var(--ink); background: #fff; transform-origin: 50% 0; box-shadow: 4px 4px 0 var(--ink); }
.cal-m { font-family: var(--f-pixel); font-size: clamp(12px, 3.6vw, 16px); letter-spacing: .3em; text-align: center; color: #fff; background: var(--hot); border-bottom: 2.5px solid var(--ink); padding: 2px 0 1px .3em; }
.cal-d { font-family: var(--f-mast); font-size: clamp(2.2rem, 11vw, 3.4rem); line-height: 1.12; text-align: center; }
.kp3.in .cal-sheet, .kp3:not(.await) .cal-sheet { animation: flip 1s var(--soft) .35s both; }
@keyframes flip { from { transform: rotateX(-100deg); opacity: 0; } 40% { opacity: 1; } to { transform: none; } }
.don {
  position: absolute; left: 40%; bottom: 12%; z-index: 4;
  font-family: var(--f-mast); font-size: clamp(30px, 10vw, 46px); line-height: 1;
  color: var(--yuzu); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; rotate: -12deg;
}
.kp4 .kp-seal4 { position: absolute; left: -2%; bottom: -8%; width: 44%; z-index: 2; }
.capy-btn { position: absolute; right: 3%; bottom: -4%; width: 34%; z-index: 2; }
.yuzus { position: absolute; left: 34%; bottom: 82%; width: 24%; aspect-ratio: 1; }
.yuzu {
  position: absolute; left: 0; bottom: calc(var(--i) * 70%); width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #FFF6BE 0 12%, var(--yuzu) 44%, #E2A112 100%);
  border: 2px solid var(--ink);
  rotate: var(--r);
  animation: yuzuIn .55s var(--soft) both;
}
.yuzu::after { content: ""; position: absolute; top: -22%; left: 46%; width: 42%; height: 30%; background: #6DBE78; border: 1.5px solid var(--ink); border-radius: 0 80% 0 80%; }
@keyframes yuzuIn { from { transform: translateY(-240%); opacity: 0; } 40% { opacity: 1; } }
.yuzus.is-rolling .yuzu { animation: yuzuOut .8s ease-in forwards; animation-delay: calc(var(--i) * 50ms); }
@keyframes yuzuOut { to { transform: translate(260%, 500%) rotate(300deg); opacity: 0; } }
.cake { position: absolute; left: 44%; bottom: 7%; width: 18%; z-index: 3; display: grid; justify-items: center; }
.cake-flame {
  width: 26%; aspect-ratio: .62; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #FFFBE0 0 18%, #FFD34D 42%, #FF7A1A 86%);
  box-shadow: 0 0 14px 4px rgba(255,186,73,.55);
  transform-origin: 50% 90%; animation: flicker 1.2s ease-in-out infinite;
  transition: scale .25s var(--ease), opacity .25s;
}
.cake.is-out .cake-flame { scale: 0; opacity: 0; }
.cake-smoke { position: absolute; top: 0; width: 18%; aspect-ratio: 1; border-radius: 50%; background: rgba(150,160,180,.6); opacity: 0; }
.cake.is-out .cake-smoke { animation: smoke 1.4s ease-out forwards; }
@keyframes smoke { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: translate(10px, -40px) scale(3); } }
@keyframes flicker { 0%, 100% { transform: rotate(-3deg); } 50% { transform: scale(1.08, .9) rotate(3deg); } }
.cake-candle { width: 12%; height: 22px; background: repeating-linear-gradient(-45deg, var(--blush) 0 4px, #fff 4px 8px); border: 1.5px solid var(--ink); }
.cake-top { width: 76%; height: 18px; background: var(--blush); border: 2px solid var(--ink); border-radius: 8px 8px 2px 2px; margin-top: -1px; }
.cake-base { width: 100%; height: 22px; background: #FFE6BD; border: 2px solid var(--ink); border-radius: 8px 8px 3px 3px; margin-top: -2px; }
.b-big { left: 4%; top: 7%; max-width: 62%; font-size: clamp(14px, 4.2vw, 18px); }
.b-big::after { left: 22%; bottom: -9px; transform: skewX(-28deg) rotate(42deg); }
.b-small { right: 3%; top: 8%; max-width: 40%; font-size: clamp(11px, 3vw, 13px); font-weight: 500; border-style: dashed; }
.b-small::after { left: 46%; bottom: -9px; border-style: dashed; transform: rotate(45deg); }

/* ================= p.3 POSTER WALL ================= */
.wall { background-color: #EEF3F7; }
.posters {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(14px, 4vw, 44px); row-gap: clamp(30px, 6vw, 56px);
  padding-top: 18px;
}
.poster {
  position: relative; cursor: zoom-in;
  padding: 8px 8px 0; background: #fff;
  box-shadow: 0 22px 34px -18px rgba(21,32,59,.5), 0 2px 4px rgba(21,32,59,.12);
  rotate: var(--rot);
  translate: 0 calc(var(--sy2, 0) * var(--d) * 1px);
  transition: rotate .5s var(--ease), box-shadow .5s var(--ease), scale .5s var(--ease);
}
.poster:nth-child(even) { margin-top: 48px; }
.poster:nth-child(3) { margin-top: -24px; }
.poster img { width: 100%; }
.poster figcaption { padding: 8px 2px 12px; font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); }
.poster figcaption b { display: block; font-family: var(--f-serif); font-weight: 400; font-size: clamp(1rem, 3.8vw, 1.3rem); line-height: 1.1; color: var(--ink); margin-bottom: 3px; }
@media (hover: hover) { .poster:hover { rotate: 0deg; scale: 1.03; box-shadow: 0 34px 50px -20px rgba(21,32,59,.55), 0 2px 4px rgba(21,32,59,.12); z-index: 5; } }
.tape {
  position: absolute; top: -12px; left: 50%; width: 72px; height: 24px; margin-left: -36px; z-index: 2;
  background: rgba(247,207,63,.62); rotate: -4deg;
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent calc(100% - 2px));
}
.p-soda .tape { background: rgba(246,181,198,.7); rotate: 5deg; }
.p-mind .tape { background: rgba(196,235,218,.75); }
.gogo { position: absolute; right: -8%; top: 22%; z-index: 3; display: grid; gap: 0; pointer-events: none; }
.gogo i {
  font-style: normal; font-family: var(--f-mast); font-size: clamp(26px, 8vw, 46px); line-height: .95;
  color: #A260D8; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  animation: gogo 2.6s ease-in-out infinite;
}
.gogo i:nth-child(2) { margin-left: 30%; animation-delay: -.6s; }
.gogo i:nth-child(3) { animation-delay: -1.2s; }
@keyframes gogo { 0%, 100% { transform: none; } 50% { transform: translate(-3px, -5px) scale(1.06); } }
.hip-2 { --w: clamp(70px, 20vw, 110px); left: -12%; top: -8%; rotate: -12deg; }
.hip-3 { --w: clamp(70px, 20vw, 110px); right: -12%; top: 34%; rotate: 10deg; }
@media (min-width: 900px) {
  .posters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .poster:nth-child(even) { margin-top: 70px; }
  .poster:nth-child(3) { margin-top: 0; }
}

/* ================= p.4 FLAMIN' HOT ADVERT ================= */
.snacks { padding-left: var(--gl); padding-right: var(--gr); padding-block: 0; background: var(--hot); }
.ad {
  position: relative; overflow: hidden; isolation: isolate;
  max-width: 1120px; margin-inline: auto;
  display: grid; gap: 22px; justify-items: center;
  grid-template-areas: "tag" "head" "bag" "receipt";
  padding-block: clamp(56px, 10vw, 110px);
  color: #fff;
}
.snacks { background:
  radial-gradient(rgba(120,10,0,.32) 1.4px, transparent 1.9px) 0 0 / 9px 9px,
  linear-gradient(180deg, var(--hot) 0%, #E8481E 70%, #F27A22 100%); }
.ad-dust i {      /* red-dust thumbprints */
  position: absolute; z-index: -1; width: 74px; height: 96px; border-radius: 50%;
  background: repeating-radial-gradient(ellipse at 50% 55%, rgba(120,10,0,.32) 0 1.5px, transparent 1.5px 6px);
  opacity: .8; rotate: var(--r);
}
.ad-dust i:nth-child(1) { --r: -18deg; left: 6%; top: 8%; }
.ad-dust i:nth-child(2) { --r: 24deg; right: 8%; top: 38%; }
.ad-dust i:nth-child(3) { --r: -6deg; left: 12%; bottom: 10%; }
.ad-tag { grid-area: tag; margin: 0; justify-self: start; font-family: var(--f-pixel); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.ad-tag b { font-weight: 400; color: var(--hot); background: #fff; padding: 1px 7px; margin-right: 8px; }
.ad-head {
  grid-area: head; margin: 0; justify-self: start;
  display: grid; font-family: var(--f-mast); font-weight: 400;
  font-size: clamp(3.8rem, 19.5vw, 11rem); line-height: .86; letter-spacing: -.02em;
  color: var(--yuzu); -webkit-text-stroke: .04em var(--ink); paint-order: stroke fill;
  text-shadow: .06em .06em 0 var(--ink);
}
.ad-head span:nth-child(2) { padding-left: .5em; }
.ad-head small { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.5rem, 6.4vw, 2.6rem); line-height: 1.1; color: #fff; -webkit-text-stroke: 0; text-shadow: none; margin-top: .4em; letter-spacing: 0; }
.ad-bag-wrap { grid-area: bag; position: relative; width: min(62vw, 300px); }
.ad-bag { display: block; width: 100%; rotate: 7deg; }
.ad-bag img { filter: drop-shadow(0 24px 26px rgba(80,5,0,.45)); transform-origin: 50% 80%; }
.ad-bag.is-shaking img { animation: shake .7s ease-in-out; }
@keyframes shake { 15% { transform: rotate(-12deg) translateY(-6px); } 30% { transform: rotate(10deg); } 45% { transform: rotate(-8deg) translateY(-4px); } 60% { transform: rotate(6deg); } 80% { transform: rotate(-3deg); } }
.shake-me {
  position: absolute; left: -10%; top: 6%; z-index: 2;
  display: grid; place-items: center; width: 66px; aspect-ratio: 1; border-radius: 50%;
  font-family: var(--f-pixel); font-size: 12px; line-height: 1.1; text-align: center; color: var(--ink);
  background: var(--yuzu); border: 2px solid var(--ink); rotate: -14deg; pointer-events: none;
  animation: nudge 3.2s ease-in-out infinite;
}
@keyframes nudge { 0%, 80%, 100% { transform: none; } 86% { transform: rotate(-10deg) scale(1.08); } 93% { transform: rotate(8deg); } }
.curl {
  position: absolute; z-index: 6; pointer-events: none;
  width: 30px; height: 11px; border-radius: 999px;
  background: linear-gradient(180deg, #FF5B2E, #C3200E);
  box-shadow: inset 0 -2px 0 rgba(90,0,0,.35), 0 2px 3px rgba(80,5,0,.3);
}
.receipt {
  grid-area: receipt; position: relative;
  width: min(100%, 330px); padding: 34px 20px 34px;
  background: #fff; color: var(--ink);
  font-family: var(--f-pixel); font-size: 13.5px; line-height: 1.55;
  rotate: -2deg;
  filter: drop-shadow(0 18px 20px rgba(80,5,0,.35));
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}
.receipt p { margin: 0; }
.receipt hr { border: 0; border-top: 1.5px dashed rgba(21,32,59,.5); margin: 10px 0; }
.r-c { text-align: center; } .r-s { font-size: 11.5px; color: var(--ink-soft); }
.r-l { display: flex; justify-content: space-between; gap: 12px; }
.r-l span:first-child { min-width: 0; }
.r-t { font-size: 15px; margin-bottom: 10px !important; }
.r-bar { height: 40px; margin-top: 14px !important; }
.receipt-kfc { position: absolute; right: 12px; top: 10px; width: 54px; border-radius: 22%; rotate: 12deg; box-shadow: 0 4px 10px rgba(21,32,59,.25); }
.hip-4 { --w: clamp(60px, 17vw, 96px); right: -16%; bottom: 4%; rotate: 14deg; }
@media (min-width: 900px) {
  .ad { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) 330px; grid-template-areas: "tag tag tag" "head bag receipt"; align-items: center; column-gap: 36px; }
  .ad-head { font-size: clamp(6rem, 10vw, 10rem); }
  .ad-bag-wrap { width: 100%; max-width: 320px; }
}

/* ================= p.5 LETTER ================= */
.letter-page { background-color: var(--paper); }
.letter-wrap { display: grid; gap: clamp(28px, 5vw, 48px); justify-items: center; }
@media (min-width: 900px) {
  .letter-wrap { grid-template-columns: minmax(0, 640px) 260px; grid-template-areas: "letter haiku" "letter nap"; align-items: start; justify-content: center; column-gap: 56px; }
  .letter { grid-area: letter; } .haiku { grid-area: haiku; } .nap { grid-area: nap; align-self: end; }
}
.letter {
  position: relative; width: 100%; max-width: 640px;
  padding: clamp(30px, 6vw, 56px) clamp(22px, 5vw, 52px) clamp(28px, 5vw, 46px);
  background: #fff; border: 2.5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  font-size: clamp(1.02rem, 3.9vw, 1.12rem); line-height: 1.75;
}
.letter::before {      /* manuscript corner marks */
  content: ""; position: absolute; inset: 12px; pointer-events: none;
  background:
    linear-gradient(var(--guide), var(--guide)) 0 0 / 18px 1.5px no-repeat, linear-gradient(var(--guide), var(--guide)) 0 0 / 1.5px 18px no-repeat,
    linear-gradient(var(--guide), var(--guide)) 100% 100% / 18px 1.5px no-repeat, linear-gradient(var(--guide), var(--guide)) 100% 100% / 1.5px 18px no-repeat;
}
.letter > * { position: relative; }
.letter p { margin: 0 0 1.05em; max-width: 60ch; }
.letter-greet { font-family: var(--f-serif); font-style: italic; font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.1; margin-bottom: .55em !important; }
.letter-close { margin-top: 1.6em !important; }
.letter-from { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.8rem, 7vw, 2.5rem); line-height: 1; color: var(--hot); margin: 0 !important; }
.hip-5 { --w: clamp(76px, 22vw, 116px); right: -18px; top: -62px; rotate: 6deg; }
.haiku {
  position: relative; width: min(100%, 300px);
  padding: 34px 26px 24px; background: var(--mint); border: 1.5px solid var(--ink); rotate: -2deg;
  font-family: var(--f-serif); font-size: 1.3rem; line-height: 1.45;
}
.haiku p { margin: 0; }
.haiku::before { content: ""; position: absolute; top: 12px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); }
.nap { position: relative; width: min(220px, 56vw); }
.nap-seal img { transform-origin: 50% 85%; animation: sleep 4.5s ease-in-out infinite; }
.nap-seal.is-booped img { animation: squish .55s var(--soft); }
@keyframes sleep { 0%, 100% { transform: none; } 50% { transform: scale(1.02, .975); } }
.nap-z { position: absolute; right: 2%; top: -6%; font-family: var(--f-mast); font-size: 22px; color: var(--ink-soft); }
.nap-z span { display: inline-block; animation: zz 2.8s ease-in-out infinite; }
.nap-z span:nth-child(1) { font-size: 1.25em; animation-delay: .3s; }
.nap-z span:nth-child(2) { font-size: 1.5em; animation-delay: .6s; }
@keyframes zz { 0%, 100% { transform: none; opacity: .5; } 50% { transform: translateY(-6px); opacity: 1; } }

/* ================= BACK COVER ================= */
.back {
  padding-left: var(--gl); padding-right: var(--gr);
  padding-block: clamp(64px, 12vw, 120px) calc(110px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.4px) 0 0 / 7px 7px,
    linear-gradient(180deg, var(--paper) 0, var(--sky) 22%, var(--cobalt) 70%, #1E4DB0 100%);
  color: #fff; text-align: center;
}
.back-inner { position: relative; max-width: 640px; margin-inline: auto; display: grid; justify-items: center; gap: 18px; }
.back-kicker { margin: 0; font-family: var(--f-pixel); font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); }
.next-issue {
  display: inline-flex; align-items: center; gap: .3em;
  font-family: var(--f-mast); font-size: clamp(2.6rem, 12vw, 5rem); line-height: 1;
  color: #fff; -webkit-text-stroke: .04em var(--ink); paint-order: stroke fill; text-shadow: .06em .06em 0 var(--hot);
  transition: transform .4s var(--soft);
}
.next-issue:hover { transform: rotate(-2deg) scale(1.03); }
.ni-arrow { display: inline-block; animation: point 2.4s ease-in-out infinite; }
@keyframes point { 0%, 100% { transform: none; } 50% { transform: translateX(8px); } }
.hip-6 { position: relative; --w: 120px; margin-top: 4px; }
.credits { margin: 18px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; font-size: 14px; }
.credits div { display: grid; gap: 2px; }
.credits dt { font-family: var(--f-pixel); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.credits dd { margin: 0; font-family: var(--f-serif); font-size: 1.25rem; }

/* ================= To be continued (JoJo freeze frame) ================= */
body.tbc-on main { filter: sepia(.9) saturate(.85) contrast(1.12) brightness(.92); scale: 1.015; transition: filter .12s, scale .5s var(--ease); }
.tbc {
  position: fixed; inset: 0; z-index: 90; cursor: pointer; overflow: hidden;
  background:
    radial-gradient(rgba(60,35,10,.22) 1.2px, transparent 1.6px) 0 0 / 6px 6px,
    radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(70,40,10,.55) 100%);
  animation: fade .15s both;
}
.tbc::before {          /* the freeze flash */
  content: ""; position: absolute; inset: 0; background: #FFF3D6; animation: flash .45s ease-out both;
}
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
.tbc-gogo { position: absolute; right: calc(6% + env(safe-area-inset-right, 0px)); top: 14%; display: grid; gap: .1em; }
.tbc-gogo i {
  font-style: normal; font-family: var(--f-mast); font-size: clamp(34px, 11vw, 78px); line-height: .9;
  color: #8E3FC4; -webkit-text-stroke: 3px #1A0F05; paint-order: stroke fill;
  opacity: 0; animation: gogoIn .4s var(--soft) both, gogo 2.2s ease-in-out infinite;
}
.tbc-gogo i:nth-child(even) { margin-left: .9em; }
.tbc-gogo i:nth-child(1) { animation-delay: .35s, .75s; } .tbc-gogo i:nth-child(2) { animation-delay: .45s, .85s; }
.tbc-gogo i:nth-child(3) { animation-delay: .55s, .95s; } .tbc-gogo i:nth-child(4) { animation-delay: .65s, 1.05s; }
.tbc-gogo i:nth-child(5) { animation-delay: .75s, 1.15s; } .tbc-gogo i:nth-child(6) { animation-delay: .85s, 1.25s; }
@keyframes gogoIn { from { opacity: 0; transform: scale(1.6) rotate(-12deg); } to { opacity: 1; } }
.tbc-arrow {
  position: absolute;
  left: calc(10px + env(safe-area-inset-left, 0px));
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  width: min(78vw, 620px);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.45));
  animation: tbcIn .7s cubic-bezier(.2, .9, .25, 1) .2s both;
}
@keyframes tbcIn { from { transform: translateX(-115%); } }

/* ================= Music: album sleeve + record ================= */
.record {
  position: fixed; z-index: 60;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px;
  padding: 5px 16px 5px 5px; border-radius: 14px;
  background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: padding .6s var(--soft);
}
.record-label { font-family: var(--f-pixel); font-size: 13px; white-space: nowrap; max-width: 200px; overflow: hidden; transition: max-width .5s var(--ease), opacity .4s; }
.record.is-compact { padding-right: 5px; gap: 0; }
.record.is-compact .record-label { max-width: 0; opacity: 0; }
.record-sleeve { position: relative; width: 44px; height: 44px; }
.record-cover { position: relative; z-index: 1; width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1.5px solid var(--ink); }
.record-disc {
  position: absolute; top: 2px; left: 2px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: repeating-radial-gradient(circle, #17171D 0 1.5px, #2C2C36 1.5px 3px);
  transition: translate .6s var(--soft);
}
.record-centre { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.record.is-playing .record-disc { translate: -22px 0; }
.record.is-playing .record-centre { animation: spin 3.2s linear infinite; }
.record.is-playing .record-disc { animation: spin 3.2s linear infinite; }
.record.is-playing { padding-left: 28px; }
@keyframes spin { to { transform: rotate(360deg); } }
.credit-track dd { display: flex; align-items: center; gap: 8px; }
.credit-track img { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; border: 1.5px solid #fff; }

/* floating words (boops etc.) */
.pop-word {
  position: fixed; z-index: 70; pointer-events: none;
  font-family: var(--f-mast); font-size: 20px; color: var(--ink);
  -webkit-text-stroke: 4px #fff; paint-order: stroke fill;
  translate: -50% -50%;
  animation: popWord 1s var(--ease) forwards;
}
@keyframes popWord { 0% { opacity: 0; transform: scale(.5); } 20% { opacity: 1; transform: translateY(-14px) scale(1.1); } 100% { opacity: 0; transform: translateY(-70px); } }

/* Lightbox */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(14,20,38,.86); }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; object-fit: contain; border: 6px solid #fff; }
.lightbox-close { position: absolute; top: -16px; right: -10px; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; font-size: 24px; line-height: 1; }

/* Reduced motion: keep everything, drop the movement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .fizz, .cloud { animation: none !important; }
  .fizz { display: none; }
  .layer, .poster { translate: none !important; }
}
