:root {
  --ink: #f6f1ea;
  --ink-dim: rgba(246, 241, 234, 0.64);
  --accent: #ff7a1a;
  --bg: #0b0812;
  --paper: #fdf6ec;
  --story-ink: #2b1a12;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Barlow", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- lab intro / outro (dark bookends around a vibrant story) ---------- */

.intro { padding: max(96px, 13vh) max(24px, 6vw) 56px; max-width: 880px; }

.intro__eyebrow, .outro__eyebrow {
  margin: 0 0 10px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.intro__title {
  margin: 0 0 20px;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 800;
  font-size: clamp(50px, 8.5vw, 108px);
  line-height: 0.92;
}

.intro__lede {
  margin: 0 0 14px;
  max-width: 54ch;
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 500;
  line-height: 1.55;
}

.intro__what {
  margin: 0 0 18px;
  max-width: 60ch;
  font-size: clamp(13.5px, 1.5vw, 15.5px);
  line-height: 1.6;
  color: var(--ink-dim);
}

.intro__uses { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }

.intro__uses li {
  padding: 7px 14px;
  border: 1px solid rgba(246, 241, 234, 0.2);
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.intro__cue {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.intro__cue span { color: var(--accent); display: inline-block; animation: cue 1.6s ease-in-out infinite; }

@keyframes cue { 0%, 100% { transform: translateY(0); } 55% { transform: translateY(5px); } }

.outro { padding: 72px max(24px, 6vw) 140px; max-width: 880px; }

.outro__title {
  margin: 0 0 16px;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5.6vw, 68px);
  line-height: 0.95;
}

.outro__body { margin: 0 0 12px; max-width: 56ch; font-size: clamp(14px, 1.6vw, 16.5px); line-height: 1.6; }
.outro__body--dim { color: var(--ink-dim); }

.outro__cta {
  display: inline-block;
  margin-top: 18px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #140b03;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease;
  box-shadow: 0 8px 30px rgba(255, 122, 26, 0.25);
}

.outro__cta:hover { transform: translateY(-1px); }
.outro__cta:active { transform: scale(0.97); }

.fallback { padding: 20vh 24px; text-align: center; color: var(--ink-dim); }

/* ---------- chapter rail ---------- */

.rail {
  position: fixed;
  right: max(14px, 2vw);
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: grid;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.rail.is-on { opacity: 1; }

.rail b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(43, 26, 18, 0.5);
  background: transparent;
  transition: transform 250ms var(--ease-pop), background 250ms ease, border-color 250ms ease;
}

.rail b.is-here { background: var(--story-ink); border-color: var(--story-ink); transform: scale(1.35); }

/* ---------- chapters: vibrant color blocks with grain + paper cards ---------- */

.story { position: relative; }

.ch {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
  padding: clamp(40px, 6vh, 64px) max(22px, 5vw);
  overflow: hidden;
  color: var(--story-ink);
}

.ch:nth-child(even) .ch__scene { order: 2; }
.ch:nth-child(even) .ch__copy { order: 1; }

.ch__grain {
  position: absolute;
  inset: 0;
  filter: url(#grain);
  opacity: 0.07;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* chapter palettes — each a different hour of the day */
.ch--1 { background: linear-gradient(180deg, #f5e2cf, #eed3ba); }
.ch--2 { background: linear-gradient(180deg, #a8dcf5, #8fd0f2); }
.ch--3 { background: linear-gradient(180deg, #232a5c, #1a2049); color: #f3ecff; }
.ch--4 { background: linear-gradient(180deg, #ff9e7d, #ff8a66); }
.ch--5 { background: linear-gradient(180deg, #ffd166, #fdc14e); }

/* copy card: paper sticker with a hand-set tilt */
.ch__copy {
  position: relative;
  z-index: 2;
  background: var(--paper);
  border: 2.5px solid var(--story-ink);
  border-radius: 22px;
  box-shadow: 6px 8px 0 rgba(43, 26, 18, 0.22);
  padding: clamp(22px, 3vw, 36px);
  max-width: 480px;
  transform: rotate(0.6deg);
  color: var(--story-ink);
}

.ch:nth-child(even) .ch__copy { transform: rotate(-0.6deg); }

.ch__kicker {
  margin: 0 0 8px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(43, 26, 18, 0.55);
}

.ch__title {
  margin: 0 0 10px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.08;
}

.ch__line { margin: 0 0 18px; font-size: clamp(14px, 1.6vw, 16px); line-height: 1.55; }

.ch__stat {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.ch__stat b {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: 0.01em;
}

.ch__stat span {
  font-size: clamp(13px, 1.5vw, 15px);
  font-weight: 600;
  max-width: 16ch;
  line-height: 1.3;
}

/* scenes */
.ch__scene { position: relative; height: clamp(330px, 46vh, 470px); z-index: 1; }

/* entrance */
.ch__copy, .ch__scene { opacity: 0; transform: translateY(26px); transition: opacity 600ms ease, transform 700ms var(--ease-out); }
.ch:nth-child(even) .ch__copy { transform: translateY(26px) rotate(-0.6deg); }
.ch:nth-child(odd) .ch__copy { transform: translateY(26px) rotate(0.6deg); }

.ch.is-live .ch__scene { opacity: 1; transform: none; }
.ch.is-live .ch__copy { opacity: 1; }
.ch.is-live:nth-child(odd) .ch__copy { transform: rotate(0.6deg); }
.ch.is-live:nth-child(even) .ch__copy { transform: rotate(-0.6deg); }

/* ---------- the shop ---------- */

.shop {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  width: min(300px, 62%);
  height: 240px;
  background: #c96f4a;
  border: 3px solid var(--story-ink);
  border-radius: 14px 14px 6px 6px;
  z-index: 2;
}

/* night is a state, not a different shop: same brick, dimmed by the hour */
.shop--night::after {
  content: "";
  position: absolute;
  inset: -70px -16px -4px;
  background: rgba(23, 27, 66, 0.42);
  border-radius: 16px;
  pointer-events: none;
  z-index: 3;
}

.shop--night .shop__window,
.shop--night .shop__door,
.shop--night .shop__blooms { z-index: 4; }

/* the miniature in chapter four is the same shop, just far away */
.shop--mini {
  left: auto;
  right: 30px;
  bottom: 34px;
  transform: scale(0.5);
  transform-origin: bottom right;
}

.shop__awning {
  position: absolute;
  top: 52px;
  left: -12px;
  right: -12px;
  height: 40px;
  background: repeating-linear-gradient(90deg, #e9564f 0 26px, var(--paper) 26px 52px);
  border: 3px solid var(--story-ink);
  border-radius: 10px 10px 0 0;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat,
    radial-gradient(circle at 13px 0, #000 12px, transparent 13px) bottom left / 26px 10px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat,
    radial-gradient(circle at 13px 0, #000 12px, transparent 13px) bottom left / 26px 10px repeat-x;
}

/* a hanging plant swings from the awning's corner */
.shop__hang {
  position: absolute;
  top: 78px;
  right: -4px;
  font-size: 21px;
  line-height: 1;
  z-index: 2;
  transform-origin: top center;
  animation: hangsway 4.8s ease-in-out infinite;
  filter: drop-shadow(1px 1.5px 0 rgba(43, 26, 18, 0.3));
}

.shop__hang::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 2px;
  height: 12px;
  background: var(--story-ink);
}

@keyframes hangsway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

.shop__sign {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 5px 12px;
  background: var(--paper);
  border: 2.5px solid var(--story-ink);
  border-radius: 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: var(--story-ink);
}

.shop__window {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 55%;
  height: 44%;
  background: #4a3540;
  border: 3px solid var(--story-ink);
  border-radius: 10px;
  transition: background 700ms ease, box-shadow 700ms ease;
  overflow: hidden;
}

.shop--lit .shop__window {
  background: linear-gradient(180deg, #ffd98a, #ffb35c);
  box-shadow: 0 0 34px rgba(255, 200, 199, 0.55);
}

/* flowers live in the window, always */
.shop__blooms {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  display: flex;
  justify-content: space-evenly;
  align-items: flex-end;
  font-size: 19px;
  line-height: 1;
  border-top: 0;
}

.shop__blooms::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -4px;
  height: 7px;
  background: #8a5a43;
  border-top: 2.5px solid var(--story-ink);
}

.shop__blooms i { position: relative; z-index: 1; font-style: normal; }

.shop--dark .shop__blooms i { filter: saturate(0.55) brightness(0.72); }

/* a potted friend by the door */
.shop__pot {
  position: absolute;
  right: -26px;
  bottom: -3px;
  font-size: 24px;
  line-height: 1;
  z-index: 3;
  filter: drop-shadow(1px 1.5px 0 rgba(43, 26, 18, 0.3));
}

.shop__door {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 21%;
  height: 52%;
  background: #6c4632;
  border: 3px solid var(--story-ink);
  border-radius: 8px 8px 2px 2px;
  transition: background 700ms ease, box-shadow 700ms ease;
}

.shop__door::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 46%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--paper);
}

.shop--lit .shop__door { background: linear-gradient(180deg, #ffe4a8, #f7b45e); box-shadow: 0 0 26px rgba(255, 210, 130, 0.6); }

/* flower buckets: real containers, planted on the sidewalk against the shop */
.shop__buckets {
  position: absolute;
  left: 12px;
  bottom: -3px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  z-index: 3;
}

.bucket {
  position: relative;
  display: block;
  width: 24px;
  height: 21px;
  background: linear-gradient(180deg, #b9cdd8, #93aebc);
  border: 2.5px solid var(--story-ink);
  border-radius: 3px 3px 7px 7px;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
}

.bucket i {
  position: absolute;
  left: 50%;
  top: -15px;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 17px;
  line-height: 1;
  filter: drop-shadow(1px 1.5px 0 rgba(43, 26, 18, 0.3));
}

.shop__upstairs {
  position: absolute;
  top: -66px;
  left: 50%;
  transform: translateX(-50%);
  width: 74%;
  height: 66px;
  background: #8a5a43;
  border: 3px solid var(--story-ink);
  border-radius: 12px 12px 0 0;
}

.zzz {
  position: absolute;
  top: 8px;
  right: 14px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  color: #f3ecff;
}

.zzz i {
  font-style: normal;
  display: inline-block;
  opacity: 0;
  animation: zz 2.6s ease-in-out infinite;
  font-size: 13px;
}

.zzz i:nth-child(2) { animation-delay: 0.5s; font-size: 16px; }
.zzz i:nth-child(3) { animation-delay: 1s; font-size: 19px; }

@keyframes zz {
  0% { opacity: 0; transform: translate(0, 0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(10px, -16px); }
}

/* the cat */
.cat { position: absolute; bottom: 66px; left: 12%; z-index: 3; }

.cat__body {
  display: block;
  width: 34px;
  height: 20px;
  background: var(--story-ink);
  border-radius: 12px 14px 4px 4px;
}

.cat__body::before {
  content: "";
  position: absolute;
  top: -10px;
  right: -2px;
  width: 16px;
  height: 14px;
  background: var(--story-ink);
  border-radius: 6px 6px 8px 8px;
  clip-path: polygon(15% 100%, 0 20%, 25% 45%, 50% 10%, 75% 45%, 100% 20%, 85% 100%);
}

.cat__tail {
  position: absolute;
  left: -12px;
  top: 2px;
  width: 14px;
  height: 4px;
  background: var(--story-ink);
  border-radius: 4px;
  transform-origin: right center;
  animation: tail 3.4s ease-in-out infinite;
}

@keyframes tail { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-38deg); } }

/* sidewalk + walkers */
.walkway, [data-walkway], [data-walkway2] {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
}

.walkway::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(43, 26, 18, 0.14);
  border-top: 3px solid var(--story-ink);
}

.walker {
  position: absolute;
  bottom: 26px;
  left: -26px;
  width: 12px;
  height: 17px;
  border-radius: 6px 6px 5px 5px;
  border: 2px solid var(--story-ink);
  will-change: transform;
  animation: walkby var(--dur, 9s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.walker::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: inherit;
  border: 2px solid var(--story-ink);
}

@keyframes walkby {
  0% { transform: translateX(0); }
  100% { transform: translateX(var(--sceneW, 700px)); }
}

.walker--in { animation-name: walkin; }

@keyframes walkin {
  0% { transform: translateX(0); opacity: 1; }
  62% { transform: translateX(var(--doorX, 420px)); opacity: 1; }
  70% { transform: translate(var(--doorX, 420px), -26px) scale(0.72); opacity: 1; }
  76%, 100% { transform: translate(var(--doorX, 420px), -40px) scale(0.4); opacity: 0; }
}

/* ---------- chapter 2: the phone + beam ---------- */

.phone {
  position: absolute;
  left: 6%;
  top: 12%;
  z-index: 3;
  animation: floaty 4.5s ease-in-out infinite;
}

@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.phone__screen {
  width: 74px;
  height: 128px;
  background: var(--paper);
  border: 3px solid var(--story-ink);
  border-radius: 14px;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
}

.phone__screen i { font-style: normal; font-size: 24px; }
.phone__screen b { font-family: ui-monospace, Menlo, monospace; font-size: 8.5px; letter-spacing: 0.04em; }

.phone__beam {
  position: absolute;
  top: 46%;
  left: 68px;
  width: 0;
  height: 120px;
  background: linear-gradient(90deg, rgba(255, 224, 130, 0.85), rgba(255, 224, 130, 0));
  clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%);
  transition: width 900ms var(--ease-out) 400ms;
  pointer-events: none;
}

.ch.is-live .phone__beam { width: min(300px, 34vw); }

/* ---------- chapter 3: night ---------- */

.moon {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f6edd8;
  box-shadow: inset -12px -6px 0 rgba(43, 26, 18, 0.12), 0 0 40px rgba(246, 237, 216, 0.5);
  border: 3px solid rgba(43, 26, 18, 0.75);
}

.stars { position: absolute; inset: 0; }

.nstar {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f3ecff;
  animation: twinkle 2.8s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.tickets {
  position: absolute;
  right: 8%;
  bottom: 66px;
  width: 128px;
  height: 200px;
  z-index: 3;
}

.ticket {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 118px;
  padding: 7px 10px 9px;
  background: var(--paper);
  border: 2.5px solid var(--story-ink);
  border-radius: 8px 8px 0 0;
  color: var(--story-ink);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 4px) no-repeat,
    radial-gradient(circle at 5px 0, transparent 4px, #000 4.5px) bottom left / 10px 5px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 4px) no-repeat,
    radial-gradient(circle at 5px 0, transparent 4px, #000 4.5px) bottom left / 10px 5px repeat-x;
  opacity: 0;
  transform: translateY(-46px) rotate(var(--rot, 0deg)) scale(0.9);
}

.ticket.is-in {
  opacity: 1;
  transform: translateY(var(--stack, 0px)) rotate(var(--rot, 0deg));
  transition: opacity 240ms ease, transform 520ms var(--ease-pop);
}

.ticket b { display: block; font-size: 11px; margin-bottom: 1px; }

.ding {
  position: absolute;
  right: 40px;
  top: -16px;
  width: 26px;
  height: 26px;
  border: 2.5px solid #ffd166;
  border-radius: 50%;
  opacity: 0;
}

.ding.is-live { animation: ding 700ms var(--ease-out); }

@keyframes ding {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ---------- chapter 4: word travels ---------- */

.talker { position: absolute; left: 9%; bottom: 18%; z-index: 2; }

.talker__head {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffd166;
  border: 3px solid var(--story-ink);
}

.talker__head::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--story-ink);
  box-shadow: 16px 0 0 var(--story-ink);
}

.talker__head::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 32px;
  width: 18px;
  height: 9px;
  border: 3px solid var(--story-ink);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.talker__bubble {
  position: absolute;
  left: 40px;
  top: -64px;
  padding: 10px 14px;
  background: var(--paper);
  border: 2.5px solid var(--story-ink);
  border-radius: 16px 16px 16px 4px;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--story-ink);
  transform-origin: bottom left;
  transform: scale(0);
  transition: transform 500ms var(--ease-pop) 300ms;
}

.ch.is-live .talker__bubble { transform: scale(1); }

.starfield { position: absolute; inset: 0; z-index: 1; }

.wstar {
  position: absolute;
  left: 20%;
  top: 34%;
  width: 16px;
  height: 16px;
  background: #ffdf6b;
  border: 2px solid var(--story-ink);
  clip-path: polygon(50% 0, 63% 35%, 100% 38%, 71% 60%, 82% 100%, 50% 76%, 18% 100%, 29% 60%, 0 38%, 37% 35%);
  opacity: 0;
  will-change: transform, opacity;
}

.wstar.is-live { animation: starfly var(--fdur, 1.7s) var(--ease-out) forwards; animation-delay: var(--delay, 0s); }

@keyframes starfly {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  12% { opacity: 1; transform: translate(calc(var(--dx) * 0.18), calc(var(--dy) * 0.18)) scale(1.15) rotate(60deg); }
  100% { opacity: 0.9; transform: translate(var(--dx), var(--dy)) scale(0.75) rotate(200deg); }
}

/* chapter four's shop is the shared template at half scale (see .shop--mini) */

/* ---------- chapter 5: skyline bar chart ---------- */

.skyline {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 64px;
  top: 10%;
  display: flex;
  align-items: flex-end;
  gap: clamp(8px, 1.6vw, 18px);
  border-bottom: 3px solid var(--story-ink);
  padding-bottom: 0;
}

.bldg {
  position: relative;
  flex: 1;
  height: calc(var(--h) * 1%);
  background: var(--bldg-bg, #e9564f);
  border: 3px solid var(--story-ink);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 900ms var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.ch.is-live .bldg { transform: scaleY(1); }

.bldg__windows {
  position: absolute;
  inset: 10px 8px 6px;
  background:
    repeating-linear-gradient(0deg, rgba(43, 26, 18, 0.28) 0 8px, transparent 8px 18px),
    repeating-linear-gradient(90deg, rgba(253, 246, 236, 0.55) 0 10px, transparent 10px 20px);
  border-radius: 4px;
}

.bldg__label {
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--story-ink);
}

.bldg__val {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--story-ink);
  transition: transform 400ms var(--ease-pop);
  transition-delay: calc(var(--delay, 0s) + 700ms);
  white-space: nowrap;
}

.ch.is-live .bldg__val { transform: translateX(-50%) scale(1); }

.bldg--tower::after {
  content: "";
  position: absolute;
  top: -20px;
  left: 8px;
  width: 16px;
  height: 19px;
  background: #8a5a43;
  border: 3px solid var(--story-ink);
  border-radius: 3px 3px 6px 6px;
}

.bldg--tower .bldg__val { transform: translateX(-50%) translateX(14px) scale(0); }
.ch.is-live .bldg--tower .bldg__val { transform: translateX(-50%) translateX(14px) scale(1); }

.pigeonwire {
  position: absolute;
  top: 7%;
  left: -2%;
  right: 30%;
  height: 40px;
  border-bottom: 2.5px solid rgba(43, 26, 18, 0.7);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

.pigeon {
  position: absolute;
  bottom: 0;
  left: 58%;
  width: 16px;
  height: 12px;
  background: var(--story-ink);
  border-radius: 8px 9px 4px 4px;
  animation: hop 5s ease-in-out infinite;
}

.pigeon::before {
  content: "";
  position: absolute;
  top: -6px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--story-ink);
}

@keyframes hop {
  0%, 88%, 100% { transform: translate(0, 0); }
  92% { transform: translate(9px, -8px); }
  96% { transform: translate(16px, 0); }
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .ch { grid-template-columns: 1fr; min-height: 0; padding-top: 52px; padding-bottom: 60px; }
  .ch:nth-child(even) .ch__scene { order: 1; }
  .ch:nth-child(even) .ch__copy { order: 2; }
  .ch__scene { height: clamp(280px, 44vh, 380px); }
  .ch__copy { max-width: none; }
  .rail { display: none; }
  .tickets { right: 4%; }
  .phone { left: 3%; top: 4%; }
}

/* ---------- reduced motion: the story stands still, fully told ---------- */

@media (prefers-reduced-motion: reduce) {
  .intro__cue span, .cat__tail, .zzz i, .pigeon, .phone, .shop__hang { animation: none; }
  .walker { animation: none; opacity: 0.9; }
  .ch__copy, .ch__scene { opacity: 1; transform: none; transition: none; }
  .ch:nth-child(odd) .ch__copy { transform: rotate(0.6deg); }
  .ch:nth-child(even) .ch__copy { transform: rotate(-0.6deg); }
  .phone__beam { transition: none; width: min(300px, 34vw); }
  .talker__bubble { transition: none; transform: scale(1); }
  .bldg { transform: scaleY(1); transition: none; }
  .bldg__val { transform: translateX(-50%) scale(1); transition: none; }
  .wstar { opacity: 0.9; transform: translate(var(--dx), var(--dy)) scale(0.75); }
  .ticket { opacity: 1; transform: translateY(var(--stack, 0px)) rotate(var(--rot, 0deg)); }
  .nstar { animation: none; opacity: 0.8; }
}
