@font-face {
  font-family: "Carny Archivo Black";
  src: url("assets/fonts/archivo-black-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --carny-nav-height: min(96px, calc(100vw * 96 / 390));
  --carny-section-headline-size: 1.92rem;
  /* A Mother's Poison is the master vertical position for every section headline. */
  --carny-section-headline-top: 67px;
  --carny-section-headline-line-height: 1.01;
  --carny-bold-intro-size: 1.12rem;
  --carny-body-copy-size: 1rem;
  --carny-closing-logo-x: 5px;
  --carny-closing-logo-y: -90px;
}

@font-face {
  font-family: "Carny Inter";
  src: url("assets/fonts/inter-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background:
    linear-gradient(rgba(83, 189, 221, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 189, 221, 0.18) 1px, transparent 1px),
    #08090b;
  background-size: 46px 46px;
}

/* The approved narrative sequence follows source order; keep all story blocks in one flex-order lane. */
body > .site-nav { order: 0; }
body > .section-stage { order: 10; flex: 0 0 auto; }
body > .video-section { order: 10; }
body > script { order: 100; }

.site-nav {
  width: 100%;
  height: var(--carny-nav-height);
  margin: 0 auto;
  padding:
    clamp(4px, 2vw, 8px)
    max(16px, calc((100vw - 390px) / 2 + 16px))
    clamp(4px, 2vw, 8px)
    max(18px, calc((100vw - 390px) / 2 + 18px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  overflow: hidden;
  background: #180b24;
  border-bottom: 1px solid #00f52a;
}

.site-nav-logo {
  display: block;
  width: clamp(46px, 18.5%, 72px);
  max-width: none;
  aspect-ratio: 1;
  height: auto;
  object-fit: contain;
}

.site-menu-toggle {
  width: clamp(46px, 18.5%, 72px);
  max-width: none;
  aspect-ratio: 1;
  padding: clamp(7px, 2.2vw, 9px) 2px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.site-menu-toggle span {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 2px;
  background: #00f52a;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
  background: rgba(0, 245, 42, 0.12);
}

.site-menu-toggle:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Disclosure only: the approved closed navigation and frame layout stay intact. */
.site-menu {
  position: fixed;
  top: var(--carny-nav-height);
  right: max(0px, calc((100vw - 390px) / 2));
  z-index: 101;
  width: min(390px, 100%);
  max-height: calc(100vh - var(--carny-nav-height));
  max-height: calc(100dvh - var(--carny-nav-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  background: #180b24;
  border-bottom: 1px solid #00f52a;
  font-family: "Carny Inter", sans-serif;
}

.site-menu[hidden] { display: none; }
.site-menu ul { list-style: none; margin: 0; padding: 0; }
.site-menu a {
  display: block;
  min-height: 44px;
  padding: 12px 8px;
  color: #9da0a6;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
}
.site-menu a:hover,
.site-menu a:focus-visible {
  color: #00f52a;
  background: rgba(0, 245, 42, 0.12);
}
.site-menu a:focus-visible { outline: 2px solid #ffffff; outline-offset: -2px; }

.section-stage,
.video-section {
  scroll-margin-top: calc(var(--carny-nav-height) + 8px);
}

.section-stage {
  width: 390px;
  height: 844px;
  margin: 0 auto;
}

.video-section {
  position: relative;
  width: min(390px, 100vw);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  background: #08090b;
}

.video-section::before {
  content: "9:16 VIDEO PLACEHOLDER\A UNCLE SHRIFT’S SUPPER CLUB";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 42px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  white-space: pre-line;
  background:
    radial-gradient(circle at center, rgba(101, 70, 199, 0.22), transparent 42%),
    #08090b;
}

.video-section::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 0 0 3px rgba(0, 255, 52, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  z-index: 2;
}

.video-section iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.inline-video-play { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 24px; border: 0; background: #08090b; color: #00f52a; font: 700 22px/1.5 "Carny Inter",sans-serif; cursor: pointer; }
.inline-video-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .65; }
.inline-video-play span { position: relative; padding: 12px 18px; background: #08090b; border: 1px solid #00f52a; }

main {
  width: 390px;
  height: 844px;
  margin: 0;
  position: relative;
  overflow: hidden;
  transform-origin: top left;
  background: transparent;
}

.carny-frame {
  display: block;
  width: 100%;
  height: auto;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

/* Fill the authored aperture, registered to the same 9:16 plane as its frame.
   Masks extend just beneath the opaque stroke, never into the page-level grid. */
.where-section::before,
.wrecking-ball-section::before,
.nine-ways-section::before,
.bogan-bros-section::before,
.future-placeholder-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
  transform: translateY(-50%);
  z-index: 0;
  -webkit-mask-image: var(--frame-interior-mask, url("assets/frame-interiors/white.png"));
  mask-image: var(--frame-interior-mask, url("assets/frame-interiors/white.png"));
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-mode: alpha;
  pointer-events: none;
}

.section-copy-scroll {
  position: absolute;
  inset: 104px 0;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y pinch-zoom;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 8px,
    #000 30px,
    #000 42%,
    rgba(0, 0, 0, 0.78) 48%,
    rgba(0, 0, 0, 0.32) 58%,
    transparent 70%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 8px,
    #000 30px,
    #000 42%,
    rgba(0, 0, 0, 0.78) 48%,
    rgba(0, 0, 0, 0.32) 58%,
    transparent 70%,
    transparent 100%
  );
  z-index: 3;
}

.section-copy-scroll::-webkit-scrollbar {
  display: none;
}

/* The rotated opening ghosts must not widen the native iOS scroll surface.
   Clip at the inner stage boundary, preserving their authored transforms. */
[aria-label="Introduction copy"] > .section-copy {
  width: 100%;
  overflow: clip;
}

.section-copy-scroll:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.32);
  outline-offset: -2px;
}

.section-copy {
  min-height: 980px;
  padding: 38px 26px 470px;
  color: #adb0b6;
  font-family: "Carny Inter", Arial, Helvetica, sans-serif;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.96);
}

/* The Welcome keeps the authored internal scroll, but now works as a short
   invitation rather than a second contents page. */
.welcome-copy {
  min-height: 0;
  padding-bottom: 260px;
}

/* Let the opening artwork remain readable almost to the foot of the frame.
   The global section mask fades much earlier to tease long scrolling panels. */
.welcome-section .section-copy-scroll {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 8px,
    #000 30px,
    #000 78%,
    rgba(0, 0, 0, 0.78) 84%,
    rgba(0, 0, 0, 0.32) 91%,
    transparent 97%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 8px,
    #000 30px,
    #000 78%,
    rgba(0, 0, 0, 0.78) 84%,
    rgba(0, 0, 0, 0.32) 91%,
    transparent 97%,
    transparent 100%
  );
}

.welcome-house {
  width: 165%;
  max-width: none;
  margin: 12px -32.5% 20px;
}

.welcome-section .welcome-board-invitation {
  margin: 0 auto 30px;
  text-transform: none !important;
}

.section-copy p.welcome-ten-years {
  margin: 12px auto 4px;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  line-height: 1.15;
}

.section-copy p.welcome-invitation {
  position: absolute;
  right: 0;
  bottom: 42px;
  left: 0;
  margin: 0 auto;
  color: #00f52a;
  font-size: 1.08rem;
  line-height: 1.45;
}

.welcome-ending {
  margin-top: 12px;
}

.welcome-section .section-scrollbar {
  left: 28px;
  top: 134px;
  bottom: 122px;
}

.section-copy h1,
.section-copy h2 {
  max-width: none;
  margin: 0 auto 30px;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: var(--carny-section-headline-size);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: var(--carny-section-headline-line-height);
  text-transform: none;
}

.section-copy p {
  max-width: 31ch;
  margin: 0 auto 18px;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.5;
  text-transform: none;
}

/* Locked editorial grammar: headline -> bold hook -> plain setup. */
.section-bold-intro {
  max-width: 29ch !important;
  margin-bottom: 24px !important;
  font-size: var(--carny-bold-intro-size) !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}

.section-body-copy {
  margin-top: 24px !important;
  font-size: var(--carny-body-copy-size) !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}

.title-and-gross {
  white-space: nowrap;
}

.section-copy .section-intro {
  max-width: none;
}

.intro-line {
  white-space: nowrap;
}

.creator-byline {
  white-space: nowrap;
}

.legacy-lead {
  white-space: nowrap;
}

.legacy-title {
  color: #6546c7;
  font-weight: 800;
}

.section-copy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.scroll-art {
  display: block;
  height: auto;
}

.shrift-phone {
  width: 112%;
  margin: 8px -6% 0;
}

.welcome-new-art.welcome-mongril { width: 75%; }

.sister-gruell {
  width: 112%;
  margin: 20px -6% 0;
}

.backstory-rasper {
  width: 88%;
  margin: 8px auto 18px;
}

.ghost-procession {
  margin-top: 34px;
}

.ghost-pink {
  width: 102%;
  margin-left: -10%;
  transform: rotate(-4deg);
}

.ghost-vinnie {
  width: 92%;
  margin: -52px 0 0 18%;
  transform: rotate(5deg);
}

.ghost-hero {
  width: 114%;
  margin: -46px 0 0 -10%;
  transform: rotate(-3deg);
}

.section-finale {
  margin-top: -24px;
}

/* Welcome copy interleaves the existing art without moving the ghosts. */
.welcome-new-art {
  width: 100%;
  margin: 24px auto;
}
.section-copy p.welcome-story-copy {
  margin: 24px auto;
  font-size: var(--carny-body-copy-size);
  line-height: 1.45;
}
.welcome-story-copy + .ghost-procession,
.welcome-story-copy + .section-finale {
  margin-top: 24px;
}
.section-copy p.welcome-story-copy + p.welcome-story-copy {
  margin-top: 18px;
}

.finale-boobashbah {
  width: 114%;
  margin-left: -7%;
}

.finale-logo {
  width: 47%;
  margin: 30px auto 0;
}

.section-scrollbar {
  position: absolute;
  /* Locked to Brett's approved Welcome control, on the 390px master. */
  top: 134px;
  bottom: 122px;
  left: 28px;
  width: 14px;
  display: none;
  grid-template-rows: 13px minmax(0, 1fr) 13px;
  justify-items: center;
  color: rgba(255, 255, 255, 0.34);
  z-index: 6;
}

/* Brett's 15 October shared layout: the bottom cue replaces the left rail.
   Existing equal copy gutters retain the frame's centre line. */
[data-carny-section] {
  --carny-closing-logo-x: 0px;
}

[data-carny-section] .section-copy {
  margin-inline: auto;
  text-align: center;
}

.scroll-arrow {
  appearance: none;
  width: 14px;
  height: 13px;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-family: "Carny Inter", Arial, Helvetica, sans-serif;
  font-size: 7px;
  line-height: 13px;
}

.scroll-rail {
  position: relative;
  width: 10px;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.scroll-thumb {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.22);
  cursor: grab;
  touch-action: none;
  transform: translateY(0);
}

.scroll-thumb:active {
  cursor: grabbing;
}

.section-audio-toggle {
  position: absolute;
  left: 12px;
  bottom: 46px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(174, 153, 255, 0.76);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(101, 70, 199, 0.76);
  cursor: pointer;
  z-index: 6;
}

.section-audio-toggle:hover,
.section-audio-toggle:focus-visible,
.section-audio-toggle.is-playing {
  color: #ffffff;
  border-color: rgba(220, 210, 255, 0.94);
  background: rgba(101, 70, 199, 0.96);
}

.section-audio-toggle:disabled {
  cursor: default;
}

.section-audio-toggle:focus-visible {
  outline: 2px solid rgba(101, 70, 199, 0.82);
  outline-offset: 2px;
}

.section-audio-toggle svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.speaker-body {
  fill: currentColor;
}

.speaker-wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.section-audio-toggle:not(.is-playing) .speaker-wave {
  opacity: 0.34;
}

.section-art {
  display: block;
  width: 100%;
  height: auto;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 1;
}

/* The Scritch-to-Stein transformation is the Welcome's thematic foreground:
   it fills the open space above the frame without joining the copy scroll. */
.stein-formation {
  top: -1px;
  transform: translateY(-28.7%);
  z-index: 5;
}

.backstory-section {
  isolation: isolate;
}

.backstory-background {
  display: block;
  width: 100%;
  height: auto;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

.backstory-frame {
  z-index: 5;
}

.backstory-section .section-copy-scroll,
.gweedos-section .section-copy-scroll,
.ghosts-section .section-copy-scroll,
.carnies-section .section-copy-scroll,
.hosts-section .section-copy-scroll,
.threats-section .section-copy-scroll,
.necronomics-section .section-copy-scroll,
.graverobbers-house-section .section-copy-scroll,
.boobytraps-section .section-copy-scroll {
  inset: 104px 0;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 28px,
    #000 76%,
    rgba(0, 0, 0, 0.78) 84%,
    rgba(0, 0, 0, 0.34) 91%,
    transparent 98%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 28px,
    #000 76%,
    rgba(0, 0, 0, 0.78) 84%,
    rgba(0, 0, 0, 0.34) 91%,
    transparent 98%
  );
  z-index: 3;
}

.backstory-copy {
  min-height: 2500px;
  padding: 38px 50px 260px;
}

.backstory-copy h2 {
  margin-bottom: 30px;
  font-size: var(--carny-section-headline-size);
  line-height: var(--carny-section-headline-line-height);
}

.backstory-copy p {
  max-width: 29ch;
  font-size: 1rem;
  line-height: 1.45;
}

.backstory-primal {
  font-size: 1.12rem !important;
  font-weight: 700 !important;
}

.backstory-teaser {
  margin-top: 24px !important;
}

.read-story {
  appearance: none;
  margin: 24px auto 10px;
  padding: 10px 16px;
  border: 1px solid rgba(0, 255, 42, 0.72);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  font-family: "Carny Inter", Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.read-story:hover,
.read-story:focus-visible {
  border-color: #00ff2a;
  background: rgba(0, 255, 42, 0.14);
}

.read-story:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.backstory-story {
  padding-top: 90px;
}

.story-beat {
  margin: 0 auto 94px;
}

.story-beat h3 {
  max-width: 11ch;
  margin: 0 auto 18px;
  color: #00f52a;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1;
}

.story-beat p:last-child {
  margin-bottom: 0;
}

.story-art {
  position: relative;
  width: calc(100% + 18px);
  margin: 22px -9px 6px;
  overflow: hidden;
}

.story-art img {
  display: block;
}

.cybil-art {
  height: 390px;
}

.cybil-art img {
  position: absolute;
  top: -130px;
  left: -5%;
  width: 110%;
  height: auto;
}

.shrift-eating-art {
  height: 280px;
  margin-top: 28px;
}

.shrift-eating-art img {
  position: absolute;
  top: 0;
  left: -37%;
  width: 174%;
  height: auto;
}

.gates-of-hell-art {
  height: 245px;
  margin-top: 28px;
  margin-bottom: 24px;
}

.gates-of-hell-art img {
  position: absolute;
  top: 0;
  left: -12%;
  width: 124%;
  height: auto;
}

.burial-ground-art {
  height: 270px;
  margin-top: 28px;
}

.burial-ground-art img {
  position: absolute;
  top: 0;
  left: -30%;
  width: 160%;
  height: auto;
}

.story-sting {
  color: #ffffff;
  font-weight: 800 !important;
}

.backstory-closing {
  margin-top: 130px !important;
  color: #00f52a;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: 1.8rem !important;
  line-height: 1.04 !important;
  text-transform: uppercase !important;
}

.backstory-end-logo {
  display: block;
  width: 82%;
  height: auto;
  margin: 38px auto 80px;
}

.where-section {
  isolation: isolate;
  --frame-interior-mask: url("assets/frame-interiors/where-world.png");
}

.where-section::before {
  background: #08090b;
}

.where-section .section-copy-scroll {
  z-index: 3;
  /* Headline-first opening uses the shared top; retain bottom skeleton clearance. */
  inset: 104px 0 164px;
}

.where-copy {
  min-height: 0;
  padding-bottom: 48px;
}

.where-copy .section-body-copy {
  margin-bottom: 0 !important;
}

.where-story {
  padding-top: 48px;
}

.where-art {
  position: relative;
  margin: 0;
}

.where-art img {
  display: block;
  width: 100%;
  height: auto;
}

.where-art figcaption {
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 8px auto 0;
  padding: 5px 10px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.72);
  font-family: "Carny Inter", Arial, Helvetica, sans-serif;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.where-heading-sign {
  width: calc(100% + 24px);
  height: 300px;
  margin: -22px -12px 20px;
  overflow: hidden;
}

.where-heading-sign img {
  position: absolute;
  top: 0;
  left: -100%;
  width: 178%;
  max-width: none;
}

.where-story .story-beat {
  margin-bottom: 24px;
}

/* Frame transparent canvas only; retain the complete supplied PNGs unchanged. */
.where-arrival-art {
  overflow: hidden;
  width: 100%;
  margin: 0 auto 24px;
}
.where-arrival-art img {
  position: absolute;
  max-width: none;
  height: auto;
}
.where-express { aspect-ratio: 1877 / 2091; }
.where-express img { width: 204.58178%; left: -39.31806%; top: -0.90866%; }
.where-turnstiles { width: 80%; aspect-ratio: 885 / 429; margin-top: 24px; }
.where-turnstiles img { width: 433.89831%; left: -176.72316%; top: -175.05828%; }

.where-story .story-beat p + .where-art,
.where-story .story-beat p + .where-art-pair {
  margin-top: 12px;
}

.where-inline-art {
  width: calc(100% + 30px);
  margin: 14px -15px 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #000000;
}

.where-art-panorama,
.where-art-cyclorama,
.where-art-gameplay {
  height: 225px;
}

.where-art-panorama img,
.where-art-cyclorama img,
.where-art-gameplay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.where-art-panorama img {
  object-position: center;
}

.where-art-panorama figcaption,
.where-art-cyclorama figcaption,
.where-art-gameplay figcaption {
  position: absolute;
  right: 9px;
  bottom: 9px;
}

.where-art-entrance {
  height: 205px;
  margin-bottom: 0;
  border: 0;
}

.where-art-entrance img {
  position: absolute;
  top: -64px;
  left: 0;
}

.where-art-cyclorama {
  height: 235px;
}

.where-art-cyclorama img {
  object-position: 52% center;
}

.where-art-gameplay {
  height: auto;
  aspect-ratio: 16 / 9;
}

.where-art-gameplay img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.where-art-ceiling {
  height: 320px;
}

.where-art-ceiling img {
  height: 100%;
  object-fit: cover;
}

.where-art-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: calc(100% + 30px);
  margin-right: -15px;
  margin-left: -15px;
}

.where-art-pair .where-art {
  height: 235px;
  overflow: hidden;
  background: #000000;
}

.where-art-pair img {
  height: 100%;
  object-fit: cover;
}

.where-art-gobo {
  height: 320px;
  margin-bottom: 0;
}

.where-art-gobo img {
  height: 100%;
  object-fit: cover;
  object-position: center 47%;
}

.where-narrative-art {
  width: calc(100% + 26px);
  height: 245px;
  margin: 14px -13px 18px;
  overflow: hidden;
  background: #000000;
}

.where-narrative-art img {
  height: 100%;
  object-fit: contain;
}

.where-closing-line {
  margin: 28px auto 0 !important;
  color: #00f52a;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: 1.22rem !important;
  line-height: 1.06 !important;
  text-align: center;
  text-transform: uppercase;
}

.where-ending-logo {
  width: 92%;
  margin: 24px auto 0;
}

.season-table {
  width: 100%;
  max-width: 292px;
  margin: 30px auto;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  font-size: 0.73rem;
  line-height: 1.25;
  text-align: left;
}

.season-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.75fr;
  gap: 8px;
  padding: 9px 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.season-row:first-child {
  border-top: 0;
}

.season-head {
  color: #00f52a;
  font-weight: 800;
  text-transform: uppercase;
}

.where-art-progression {
  min-height: 72px;
}

.where-frame {
  z-index: 5;
}

.wrecking-ball-section {
  isolation: isolate;
}

.wrecking-ball-section::before {
  --frame-interior-mask: url("assets/frame-interiors/purple.png");
  background:
    radial-gradient(circle at 50% 36%, rgba(101, 70, 199, 0.18), transparent 34%),
    #08090b;
}

.wrecking-ball-section .section-copy-scroll {
  z-index: 3;
}

.wrecking-rotor-anchor {
  position: absolute;
  right: -58px;
  bottom: 70px;
  z-index: 6;
  display: block;
  width: 289px;
  height: auto;
  pointer-events: none;
}

.wrecking-ball-copy {
  min-height: 0;
  padding-bottom: 84px;
}

.wrecking-ball-copy h2 {
  max-width: 9ch;
  font-size: 1.74rem;
}

.wrecking-ball-copy h2,
.wrecking-ball-copy p,
.wrecking-feature-card,
.wrecking-tagline {
  position: relative;
  z-index: 7;
}

.wrecking-story {
  padding-top: 18px;
}

.wrecking-story .story-beat {
  margin-bottom: 38px;
}

.wrecking-art {
  position: relative;
  width: calc(100% + 8px);
  margin: 24px -4px 28px;
  overflow: hidden;
}

.wrecking-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wrecking-art-hump,
.wrecking-art-storyboard {
  height: 286px;
}

.wrecking-art-gore {
  height: 330px;
}

.wrecking-art-gore img {
  width: 124%;
  max-width: none;
  margin-left: -12%;
  object-position: center bottom;
}

.wrecking-art-blood {
  height: 254px;
}

.wrecking-rule {
  margin-top: 34px !important;
  color: #00f52a;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: 1.38rem !important;
  line-height: 1.08 !important;
  text-transform: uppercase;
}

.wrecking-deeper {
  margin-top: 34px !important;
  color: #00f52a;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: 1.28rem !important;
  line-height: 1.08 !important;
}

.wrecking-feature-card {
  margin: 46px -4px 44px;
  padding: 28px 22px;
  border: 2px solid #6546c7;
  background: rgba(24, 11, 36, 0.88);
}

.wrecking-feature-card h3 {
  margin: 0 auto 20px;
  color: #ffffff;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.03;
}

.wrecking-feature-card p {
  max-width: 26ch;
}

.wrecking-tagline {
  margin: 0 auto;
  color: #00f52a;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.1;
}

.wrecking-ball-frame {
  z-index: 5;
}

.world-placeholder-section {
  isolation: isolate;
  overflow: visible;
  background: transparent;
}

/* Scritch content only: the approved shared frame and ending stay unchanged. */
.player-copy {
  min-height: 0;
  padding-top: 38.333333px;
  padding-bottom: 180px;
}

.player-story {
  padding-top: 8px;
}

.player-section .section-scrollbar {
  left: 28px;
}

.player-copy .story-beat {
  margin-bottom: 32px;
}

.player-art {
  width: calc(100% + 18px);
  margin: 20px -9px 24px;
}

.player-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.player-portrait {
  width: 244px;
  margin: 22px auto 28px;
}

.player-walking {
  width: 114px;
  margin-inline: auto;
}

.player-art-pair {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  align-items: end;
  gap: 14px;
}

.player-art-pair img {
  min-width: 0;
}

.player-parts {
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 18px;
}

.player-parts img {
  max-height: 220px;
}

.player-trolley {
  width: 230px;
  margin: 12px auto 24px;
}

.player-designer-underwear {
  width: calc(100% + 10px);
  margin-left: -5px;
  margin-right: -5px;
}

.player-superstein {
  width: 236px;
  margin-inline: auto;
}

.player-zombie {
  width: 252px;
  margin-inline: auto;
}

/* Graves only: Brett's replacement background uses white, unshadowed copy.
   The shared frame, scroll viewport, controls and page gaps stay unchanged. */
.graves-copy {
  min-height: 0;
  padding-top: 38.333333px;
  padding-bottom: 240px;
  color: #ffffff;
  text-shadow: none;
}

.graves-copy .story-beat {
  margin-bottom: 32px;
}

.graves-keep-together {
  white-space: nowrap;
}

.graves-section .section-scrollbar {
  color: rgba(255, 255, 255, 0.62);
}

.graves-section .scroll-rail {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.graves-section .scroll-thumb {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.48);
}

.graves-art {
  width: 100%;
  margin: 24px auto 28px;
}

.graves-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.graves-coffin {
  width: 224px;
}

.graves-decay {
  width: 208px;
}

.graves-organ-art {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 24px;
  margin: 24px auto 28px;
}

.graves-organ-art .graves-art {
  min-width: 0;
  margin: 0;
}

.graves-father-arthur {
  width: 226px;
}

/* Nine Ways only: preserve the assigned cat-tail frame and shared geometry. */
.nine-ways-section::before {
  --frame-interior-mask: url("assets/frame-interiors/nine-lives.png");
  background: var(--panel-color);
}

.nine-lives-copy {
  min-height: 0;
  padding-top: 38.333333px;
  padding-bottom: 220px;
}

.nine-lives-copy h2 {
  color: var(--section-accent);
  text-shadow: none;
}

.nine-lives-copy .story-beat {
  margin-bottom: 32px;
}

.nine-lives-art {
  width: 100%;
  margin: 22px auto 28px;
}

.nine-lives-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.nine-lives-art-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 16px;
  margin: 24px auto 28px;
}

.nine-lives-art-pair .nine-lives-art {
  min-width: 0;
  margin: 0;
}

.nine-lives-claws {
  grid-template-columns: 1.2fr 1fr;
  width: 78%;
  margin-inline: auto;
}

.nine-lives-bomb {
  width: 226px;
}

/* Centre the visible trap, not the faint outer marks on its source canvas. */
.nine-lives-trap {
  transform: translateX(35px);
}

.nine-lives-art img[data-src="assets/nine-lives/guillotine-drop.webp"] {
  width: 72%;
  margin-inline: auto;
}

/* Supplied Tools / Weapons copy inherits the shared scroll template. */
.tools-copy {
  min-height: 0;
  padding-top: 70px;
  padding-bottom: 180px;
}

.tools-copy .story-beat {
  margin-bottom: 32px;
}

/* Brett requested -90 degrees. Reserve the rotated footprint in the scroll. */
.tools-art {
  position: relative;
  width: 240px;
  aspect-ratio: 451 / 1170;
  margin: 24px auto 28px;
}

.tools-art img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: calc(240px * 1170 / 451);
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.tools-story-art {
  width: 100%;
  margin-inline: auto;
}

.tools-story-art img {
  display: block;
  width: 100%;
  height: auto;
}

.tools-wide-art {
  width: calc(100% + 18px);
  margin-left: -9px !important;
  margin-right: -9px !important;
}

.tools-portrait-art {
  width: 88%;
}

.tools-art-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 14px;
}

.tools-art-pair .tools-story-art {
  margin: 0 !important;
}

/* Excavation & Desecration: the grave-robbing loop between equipment and grave types. */
.excavation-copy {
  min-height: 0;
  padding-top: 38.333333px;
  padding-bottom: 180px;
  color: #ffffff;
  text-shadow: none;
}

.excavation-copy h2 {
  color: #ffffff;
}

.excavation-copy .story-beat {
  margin-bottom: 32px;
}

.excavation-grass-reveal {
  position: absolute;
  inset: 312px 12px 84px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  overflow: visible;
  pointer-events: none;
}

.excavation-grass-reveal.is-cleared {
  opacity: 0;
  visibility: hidden;
}

.excavation-grass-patch {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform: none;
  -webkit-tap-highlight-color: transparent;
}

:is(.excavation-grass-reveal, .excavation-ant-farm, .excavation-daisy-field) {
  user-select: none;
  -webkit-user-select: none;
}
.excavation-ant-farm img,
.excavation-grass-reveal img,
.excavation-daisy-field img {
  -webkit-user-drag: none;
}

.excavation-grass-patch:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -6px;
}

.excavation-grass-patch.is-removed {
  visibility: hidden;
  pointer-events: none;
}

.excavation-grass-patch img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 140%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%) scale(var(--grass-flip-x, 1), var(--grass-flip-y, 1));
  pointer-events: none;
}

/* The cue follows the first fixed patch and disappears with its clump. */
.excavation-grass-reveal > .excavation-click-cue { display: none; }
.excavation-click-cue {
  position: absolute;
  left: 10px;
  top: -72px;
  width: 50px;
  height: 47.49035px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.excavation-grass-patch .excavation-click-cue img {
  width: 208.49421px;
  height: auto;
  left: -29.44015px;
  top: -63.12741px;
  transform: none;
}

.excavation-grass-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.excavation-daisy-field {
  --daisy-ground-inset: 85.333333px;
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: visible;
  /* Fixed ground-level matte, behind the frame; only the artwork travels. */
  clip-path: inset(0 0 var(--daisy-ground-inset) 0);
  pointer-events: none;
}

.excavation-daisy {
  position: absolute;
  left: var(--daisy-left, 50%);
  bottom: var(--daisy-ground-inset);
  width: auto;
  height: var(--daisy-height, 285px);
  transform: translate(-50%, 100%) scaleX(var(--daisy-flip, 1));
}

.excavation-daisy-field.is-growing .excavation-daisy {
  animation: excavation-daisies-grow var(--daisy-duration, 20s) linear var(--daisy-delay, 0s) forwards;
}

.excavation-daisy-field.is-paused .excavation-daisy {
  animation-play-state: paused;
}

.excavation-daisy-1 {
  --daisy-left: 18%;
  --daisy-height: 216px;
  --daisy-duration: 21s;
  --daisy-delay: 0s;
}

.excavation-daisy-2 {
  --daisy-left: 30%;
  --daisy-height: 200px;
  --daisy-duration: 19s;
  --daisy-delay: 0.9s;
  --daisy-flip: -1;
}

.excavation-daisy-3 {
  --daisy-left: 43%;
  --daisy-height: 244px;
  --daisy-duration: 22s;
  --daisy-delay: 1.8s;
}

.excavation-daisy-4 {
  --daisy-left: 57%;
  --daisy-height: 252px;
  --daisy-duration: 22s;
  --daisy-delay: 9.5s;
  --daisy-flip: -1;
}

.excavation-daisy-5 {
  --daisy-left: 70%;
  --daisy-height: 208px;
  --daisy-duration: 19s;
  --daisy-delay: 10.4s;
}

.excavation-daisy-6 {
  --daisy-left: 82%;
  --daisy-height: 232px;
  --daisy-duration: 21s;
  --daisy-delay: 11.3s;
  --daisy-flip: -1;
}

.excavation-daisy-7 {
  --daisy-left: 25%;
  --daisy-height: 164px;
  --daisy-duration: 23s;
  --daisy-delay: 18s;
}

.excavation-daisy-8 {
  --daisy-left: 51%;
  --daisy-height: 184px;
  --daisy-duration: 24s;
  --daisy-delay: 19.5s;
  --daisy-flip: -1;
}

.excavation-daisy-9 {
  --daisy-left: 75%;
  --daisy-height: 172px;
  --daisy-duration: 22s;
  --daisy-delay: 21s;
}

@keyframes excavation-daisies-grow {
  from { transform: translate(-50%, 100%) scaleX(var(--daisy-flip, 1)); }
  to { transform: translate(-50%, 0) scaleX(var(--daisy-flip, 1)); }
}

@media (prefers-reduced-motion: reduce) {
  .excavation-daisy-field.is-growing .excavation-daisy {
    animation: none;
    transform: translate(-50%, 0) scaleX(var(--daisy-flip, 1));
  }
}

.excavation-art {
  width: calc(100% + 18px);
  margin-right: -9px;
  margin-left: -9px;
}

.excavation-copy > .excavation-ant-farm {
  position: relative;
  top: -20px;
}

.excavation-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.excavation-snowed-headstone {
  position: relative;
  aspect-ratio: 2069 / 2643;
  overflow: hidden;
}

.excavation-snowed-headstone img {
  position: absolute;
  width: 104.39826%;
  max-width: none;
  left: -1.20831%;
  top: -18.16118%;
}

.excavation-sunset {
  position: relative;
  aspect-ratio: 1504 / 1424;
  overflow: hidden;
}

.excavation-sunset img {
  position: absolute;
  width: 143.61702%;
  max-width: none;
  left: -21.80851%;
  top: -85.81461%;
}

.excavation-noise-bombs {
  position: relative;
  width: 280px;
  aspect-ratio: 741 / 1170;
  margin: 18px auto 28px;
}

.excavation-noise-bombs img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(280px * 1170 / 741);
  max-width: none;
  transform: translate(-50%, -50%) rotate(-90deg);
}

/* Bogan Bros: retain its assigned blue field inside the existing frame. */
.bogan-bros-section::before {
  background: var(--panel-color);
}

.bogan-bros-copy {
  min-height: 0;
  padding-top: 38.333333px;
  padding-bottom: 180px;
}

.bogan-bros-copy h2 {
  color: var(--section-accent);
  text-shadow: none;
}

.bogan-bros-keep-together {
  white-space: nowrap;
}

.bogan-bros-art {
  width: 100%;
  margin: 24px auto 28px;
}

.bogan-bros-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.world-placeholder-section .section-audio-toggle {
  top: calc(100% - 5px);
  bottom: auto;
}

.world-placeholder-copy {
  position: absolute;
  inset: var(--carny-section-headline-top) 44px auto;
  z-index: 3;
  text-align: center;
}

.world-placeholder-copy h2 {
  margin: 0;
  color: #ffffff;
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
  font-size: var(--carny-section-headline-size);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: var(--carny-section-headline-line-height);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.78);
}

.world-placeholder-frame {
  z-index: 4;
}

.future-placeholder-section {
  --section-accent: #ffffff;
  --panel-color: #08090b;
  background: transparent;
}

.future-placeholder-section::before {
  background: var(--panel-color);
}

.future-placeholder-section .world-placeholder-copy h2 {
  color: var(--section-accent);
  text-shadow: none;
}

.future-placeholder-section .world-placeholder-frame {
  filter: none;
}

.nine-ways-section {
  --section-accent: #ff173d;
  --panel-color: #08090b;
}

.necronomics-section {
  --section-accent: #00f52a;
  --panel-color: #52139a;
}

.necronomics-art {
  display: block;
  width: 100%;
  height: auto;
  margin: 22px auto;
}

.necronomics-gitcoin {
  width: 92%;
  transform: translateX(5%);
}


.harvest-price-board {
  margin: 28px 0;
  padding: 18px 14px;
  color: #101010;
  background: #e9ff35;
  border: 5px solid #08090b;
  transform: rotate(-0.35deg);
}

.harvest-price-board h3,
.harvest-price-board > p {
  margin: 0 0 14px;
  text-align: center;
}

.harvest-price-board h3,
.harvest-price-board caption,
.harvest-price-board td {
  font-family: "Carny Archivo Black", Arial, Helvetica, sans-serif;
}

.harvest-price-board table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: clamp(0.82rem, 3.2vw, 1rem);
}

.harvest-price-board caption {
  padding: 8px;
  color: #fff;
  background: #52139a;
  text-align: left;
  text-transform: uppercase;
}

.harvest-price-board th,
.harvest-price-board td {
  padding: 7px 6px;
  border-bottom: 2px solid rgba(8, 9, 11, 0.3);
}

.harvest-price-board th {
  font-weight: 600;
  text-align: left;
}

.harvest-price-board td {
  text-align: right;
}

.harvest-price-board .price-disclaimer {
  margin: 8px 0 0;
  font-weight: 900;
}

.where-howling-grid {
  display: grid;
  gap: 22px;
}

.gweedos-section {
  --section-accent: #00f52a;
  --panel-color: #08090b;
  --frame-interior-mask: url("assets/frame-interiors/gweedos.png");
}

.gweedos-panels {
  padding: 24px 22px 160px;
}

.gweedos-panels img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 24px;
}

.carnies-section {
  --section-accent: #000000;
  --panel-color: #ff00a8;
}

.threats-section {
  --section-accent: #ff6b00;
  --panel-color: #08090b;
  --frame-interior-mask: url("assets/frame-interiors/juju.png");
}

.boobytraps-section {
  --section-accent: #180b24;
  --panel-color: #ffe600;
}

.graverobbers-house-section {
  --section-accent: #ff35ca;
  --panel-color: #08090b;
}

.bogan-bros-section {
  --section-accent: #20e0d0;
  --panel-color: #071a52;
}

.ghosts-section {
  --section-accent: #ff65e8;
}

.ghosts-art {
  padding: 28px 50px 160px;
}

.carnies-art,
.hosts-art,
.pox-news-art {
  padding: 28px 50px 160px;
}

.carnies-art img,
.hosts-art img,
.pox-news-art img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 36px;
}

.ghosts-art img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 36px;
}

/* Welcome artwork keeps its authored scale after moving into the section
   where its subject is explained. */
.ghosts-art .ghost-pink {
  width: 96%;
  margin: 8px 0 30px -6%;
}

.ghosts-art .ghost-vinnie {
  width: 86%;
  margin: 8px 0 30px 14%;
}

.ghosts-art .ghost-hero {
  width: 104%;
  margin: 8px 0 30px -2%;
}

.ghosts-toolbox-composite {
  position: relative;
  width: 100%;
  aspect-ratio: 1170 / 725;
  overflow: hidden;
}

.ghosts-art .ghosts-toolbox-composite > img {
  position: absolute;
  height: auto;
  margin: 0;
}

.ghosts-art .ghosts-toolbox-base {
  inset: 0;
  width: 100%;
  clip-path: inset(0 0 0 40%);
}

.ghosts-art .ghosts-toolbox-meter {
  top: 15%;
  left: 0;
  width: 40%;
}

.ghosts-art .story-subhead {
  margin: 0 auto 18px;
  color: var(--section-accent);
  font-size: clamp(1.3rem, 6vw, 1.75rem);
  line-height: 1.05;
}

.ghost-classification {
  max-width: 31ch;
  margin: 0 auto 28px;
  padding-left: 1.2em;
  text-align: left;
}

.ghost-classification li {
  margin-bottom: 14px;
  line-height: 1.35;
}

.ghost-classification-group {
  margin-bottom: 18px;
}

.ghost-type-art {
  margin: 0 auto 18px;
}

.ghost-classification strong,
.ghost-core-types {
  color: var(--section-accent);
}

.ghost-core-types {
  font-weight: 900;
  font-size: clamp(1.4rem, 7vw, 2rem);
  line-height: 1.05;
}

.relocated-welcome-art {
  position: relative;
}

.hosts-section {
  --section-accent: #ffffff;
  --panel-color: #08090b;
  --frame-interior-mask: url("assets/frame-interiors/hosts.png");
}

/* Source-backed universe copy inherits the approved story typography. */
.authored-story {
  color: #ffffff;
  font-family: "Carny Inter", Arial, Helvetica, sans-serif;
  text-align: center;
}

.doggones-section { --section-accent: #00f52a; }
.doggones-copy { padding-bottom: 100px; }
.doggones-art { width: 100%; height: auto; margin: 24px auto; }
.doggones-track { padding: 24px 0; border-top: 1px solid #46634b; text-align: left; }
.doggones-track .track-number { color: #00f52a; font-size: 12px; margin: 0 0 6px; }
.doggones-track h3 { font-size: 20px; line-height: 1.25; margin: 0 0 16px; color: #fff; }
.doggones-audio { display: block; width: 100%; max-width: 100%; height: 44px; }
.doggones-track details { margin-top: 14px; font-size: 14px; line-height: 1.6; }
.doggones-track summary { color: #00f52a; cursor: pointer; padding: 8px 0; }

.authored-story p {
  margin: 0 auto 18px;
  max-width: 29ch;
  letter-spacing: normal;
  text-transform: none;
}

.juju-story,
.universe-story {
  padding: 28px 50px 160px;
}

.carnies-art.authored-story,
.pox-news-art.authored-story {
  color: #000000;
}

.gweedos-panels.authored-story p {
  padding: 0 28px;
}

.tower-levels {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  font: 400 1rem/1.45 "Carny Inter", Arial, Helvetica, sans-serif;
}

.tower-levels li {
  margin: 0 0 18px;
}

.juju-story img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.juju-good-art,
.juju-faces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 20px;
  margin: 30px 0;
}

/* Brett's Hero Graves exception: the Ballad speaker sits above the scroll rail. */
.hero-audio-toggle {
  position: absolute;
  left: 27px;
  top: 80px;
  z-index: 6;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 1px solid #ae99ff;
  border-radius: 50%;
  color: #fff;
  background: #6546c7;
  cursor: pointer;
}
.hero-audio-toggle[hidden] { display: none; }
.hero-audio-toggle svg { display: block; width: 100%; height: 100%; }
.hero-audio-toggle:not(.is-playing) .hero-speaker-waves { opacity: .4; }
.hero-audio-toggle:hover, .hero-audio-toggle.is-playing { background: #815fe9; }
.hero-audio-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero-audio-status {
  position: absolute;
  top: 30px;
  left: 74px;
  right: 40px;
  z-index: 6;
  font-size: 11px;
  color: #fff;
}
.hero-story-art { margin: 24px 0; }
.hero-story-art img { display: block; width: 100%; height: auto; }
.hero-graves-section { --hero-coffin-height: 320px; }
.hero-graves-section .ghost-hero { margin-top: 24px; }
.hero-story-art.hero-vinnie-child { width: 75%; margin-inline: auto; }
.hero-story-art.hero-coffin {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--hero-coffin-height);
}
.hero-story-art.hero-coffin img {
  width: auto;
  height: var(--hero-coffin-height);
  max-width: 100%;
  object-fit: contain;
}
.hero-story-art.hero-coffin-vinnie img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--hero-coffin-height);
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%) rotate(90deg);
}
.uncle-shrift-section .scroll-art, .club-section .shrift-phone {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px auto;
}

/* The last panel fills the scroll viewport: its logo stops exactly at centre.
   Further scrolling chains to the document and brings the next frame upward. */
.has-section-ending .section-copy {
  min-height: 0;
  padding-bottom: 0;
}

.section-copy .section-ending,
.placeholder-scroll .section-ending {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--ending-height, 636px);
  margin: 0;
  padding: 0;
}

.section-ending > img,
.section-ending > .section-ending-logo {
  display: block;
  width: 47%;
  height: auto;
  max-height: calc(var(--ending-height, 636px) - 64px);
  margin: 0;
  object-fit: contain;
  /* Brett's optical alignment: higher in the frame, slightly right of the rail. */
  transform: translate(var(--carny-closing-logo-x), var(--carny-closing-logo-y));
}

.section-copy-scroll.is-ending-visible {
  -webkit-mask-image: linear-gradient(transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(transparent, #000 28px, #000 calc(100% - 28px), transparent);
}

.world-placeholder-section .placeholder-scroll {
  inset: 28px 0;
}

.placeholder-scroll .world-placeholder-copy {
  position: relative;
  inset: auto;
  padding: 39px 44px 0;
}

.placeholder-scroll .section-ending {
  padding: 0 50px;
}

.world-placeholder-section .section-scrollbar {
  /* These stages start at the frame top, 75 1/3px above standard stages. */
  top: 58.666667px;
  bottom: 46.666667px;
}

/* Brett's 6 October spacing pass. One compact rhythm inside the story,
   without changing art dimensions, opening ghost offsets, frames or endings. */
:root { --story-gap: 24px; --paragraph-gap: 18px; }
.section-copy :is(.backstory-story, .where-story, .wrecking-story, .player-story) {
  padding-top: 0;
  margin-block: var(--story-gap) 0;
}
.section-copy .story-beat {
  margin-block: 0 var(--story-gap);
}
.section-copy .story-beat > :is(h3, p, figure, div),
.authored-story > :is(p, img, figure, ul, div) {
  margin-top: 0 !important;
  margin-bottom: var(--story-gap) !important;
}
.section-copy .story-beat > p,
.authored-story > p {
  margin-bottom: var(--paragraph-gap) !important;
}
.section-copy .story-beat > :last-child {
  margin-bottom: 0 !important;
}
.section-copy .story-beat > .tools-art-pair + .tools-story-art {
  margin-top: -130px !important;
}
.carnies-art img[data-src="assets/juju/unsmiley.webp"] {
  width: 72%;
  margin-inline: auto;
}
.section-copy .backstory-closing {
  margin-top: var(--story-gap) !important;
}
.section-copy .where-art-pair,
.section-copy .where-howling-grid {
  row-gap: var(--story-gap);
}
.section-copy .where-art-pair > figure,
.section-copy .where-howling-grid > figure {
  margin-block: 0;
}
.authored-story { padding-bottom: 0; }

/* Carnies only: remove the Boner export's empty lower canvas, not its scale. */
.carnies-art > .carnies-boner-trim {
  width: 100%;
  aspect-ratio: 1170 / 930;
  overflow: hidden;
  margin-inline: 0;
}
.carnies-boner-trim img { margin: 0; }

/* Lighting bank: show source rows 300–810, excluding only empty black canvas.
   Keep the existing full-width scale and the untouched source PNG. */
.where-art-pair[aria-label="Crookwood lighting details"] > figure:first-child {
  height: auto;
  aspect-ratio: 1200 / 510;
}
.where-art-pair[aria-label="Crookwood lighting details"] > figure:first-child img {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: auto;
  transform: translateY(-25%);
}

/* Suspended lamps: retain their scale, trim only empty source rows outside 52–762. */
.where-art-pair[aria-label="Crookwood suspended lights"] > figure {
  height: auto;
  aspect-ratio: 1200 / 710;
}
.where-art-pair[aria-label="Crookwood suspended lights"] img {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: auto;
  transform: translateY(-4.333333%);
}

/* Brett's closing invitation, before the public social links. */
.audience-footer .halloween-closing-invitation {
  margin: 0 auto 40px;
  color: #adb0b6;
}
.audience-footer .halloween-closing-invitation h2 {
  margin: 0 auto 24px;
  color: #00f52a;
  font: 400 1.92rem / 1.08 "Carny Archivo Black", Arial, sans-serif;
  text-transform: none !important;
}
.audience-footer .halloween-closing-invitation p {
  max-width: 31ch;
  margin: 18px auto;
}

.audience-footer .halloween-closing-invitation .kickstarter-launch-date {
  margin-top: 28px;
  color: #00f52a;
}

.audience-footer .closing-copy-line {
  display: block;
  white-space: nowrap;
}
