.island-camera { display: none; }

.edition-scrolling .island-camera {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  background: #fff;
  pointer-events: none;
}

.puppet-world { display: block; width: 100%; height: 100%; }
.finale-caption { display: none; }
:is(.edition-static, [data-overview]) .finale-caption {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.edition-static .edition-screen { display: flex; flex-direction: column; }
.edition-static .island-camera {
  display: block;
  order: 1;
  height: min(75svh, 620px);
  min-height: 300px;
  overflow: hidden;
  background: #fff;
}
.edition-static .puppet-curtain { display: none; }

.puppet-curtain {
  position: absolute;
  z-index: 1;
  inset-block: -6% -9%;
  width: clamp(128px, 22vw, 350px);
  clip-path: polygon(0 0, 96% 0, 72% 24%, 65% 48%, 79% 71%, 100% 100%, 0 100%);
  background: repeating-linear-gradient(94deg, #f5a8c6 0 21px, #ffcade 22px 52px, #aa5379 53px 56px);
  filter: drop-shadow(3px 0 #21171f);
  transform-origin: 0 4%;
}
.curtain-left { left: 0; transform: translateX(-104%); }
.curtain-right { right: 0; transform-origin: 50% 4%; transform: translateX(104%) scaleX(-1); }
[data-crossing="left"] .curtain-left {
  transform: translateX(calc(-104% + var(--curtain-sweep, 0) * 78%)) rotate(calc(var(--curtain-sweep, 0) * -5deg));
}
[data-crossing="right"] .curtain-right {
  transform: translateX(calc(104% - var(--curtain-sweep, 0) * 78%)) scaleX(-1) rotate(calc(var(--curtain-sweep, 0) * -5deg));
}

.island-overview { display: none; }
.edition-scrolling .island-overview {
  position: absolute;
  z-index: 8;
  left: 5%;
  bottom: 12%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .65rem;
  flex-wrap: wrap;
  opacity: 0;
  visibility: hidden;
}
.edition-scrolling[data-overview] .island-overview { opacity: 1; visibility: visible; }
.edition-scrolling .edition-flyby { z-index: 0; opacity: .25; }
.edition-scrolling .press-scene::before,
.edition-scrolling :is(.scene-backdrop, .scene-wash) { display: none; }
.edition-scrolling .scene-layout { opacity: calc(1 - var(--overview, 0)); }
.edition-scrolling .scene-copy {
  width: fit-content;
  max-width: min(100%, 380px);
  border: 2px solid #19171b;
  padding: clamp(.9rem, 2vw, 1.65rem);
  background: #fff;
  box-shadow: 5px 6px #19171b;
}

.edition-scrolling .scene-title { font-size: clamp(2.5rem, 4vw, 5.5rem); }

.scene-press .scene-copy { width: min(100%, 380px); }

@media (min-width: 761px) {
  .scene-press .scene-layout {
    grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
    grid-template-areas: "art copy";
  }
  .scene-press .scene-copy { justify-self: end; }
}

.press-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: .9rem 0 0;
  border: 1px solid var(--edition-ink);
  background: #fff9e8;
}
.press-facts > div { min-width: 0; padding: .42rem .55rem; }
.press-facts > :nth-child(odd) { border-inline-end: 1px solid var(--edition-ink); }
.press-facts > :nth-child(n+3) { border-block-start: 1px solid var(--edition-ink); }
.press-facts dt {
  color: #634155;
  font: 800 .66rem/1.2 ui-monospace, monospace;
  text-transform: uppercase;
}
.press-facts dd {
  margin: .16rem 0 0;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.press-fees {
  margin-top: .6rem;
  padding: .55rem .62rem;
  border: 1px solid var(--edition-ink);
}
.press-fees { background: #eee4fb; }
.press-fees h2 {
  margin: 0 0 .28rem;
  font: 800 .69rem/1.2 ui-monospace, monospace;
  text-transform: uppercase;
}
.press-fees ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .28rem .56rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.press-fees li { font-size: .76rem; font-weight: 700; line-height: 1.22; }
.press-fees strong { display: block; font: 900 1.15rem/1 Georgia, serif; }

.edition-scrolling .press-scene:not(.scene-competition) .scene-board { display: none; }
.edition-scrolling .scene-board {
  transform: perspective(1050px) translate3d(var(--plate-x, 0px), var(--plate-y, 0px), 0)
    rotateX(var(--pitch, 0deg)) rotateY(var(--yaw, 0deg))
    rotateZ(calc(var(--lean) + var(--roll, 0deg))) scale(var(--zoom, 1));
}

.edition-scrolling .scene-competition .competition-board {
  overflow: hidden;
  width: min(100%, 375px);
  justify-self: end;
  background: #fff;
}
.edition-scrolling .scene-competition .competition-tickets > * {
  translate: 0 calc(-120% * var(--arrival-clip, 0));
}
.edition-scrolling .scene-competition .competition-tickets > :nth-child(2) {
  translate: 0 calc(-195% * var(--arrival-clip, 0));
}
.edition-scrolling .scene-competition .competition-tickets > :nth-child(3) {
  translate: 0 calc(-285% * var(--arrival-clip, 0));
}
.edition-scrolling .edition-toolbar { background: #fff; border: 2px solid #19171b; padding: .12rem .6rem; }

.scene-words { display: none; }
.edition-scrolling .scene-words {
  position: absolute;
  z-index: 4;
  top: 6%;
  left: 9%;
  right: 9%;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  opacity: calc(var(--word-in, 0) * (1 - var(--overview, 0)));
  transform: translateY(calc(2.5vh * (1 - var(--word-in, 0))));
  pointer-events: none;
}

.scene-words span, .island-arrival span {
  border: 2px solid #19171b;
  box-shadow: 3px 3px #19171b;
  padding: .4em .6em;
  background: #ffdb41;
  color: #19171b;
  font: 800 clamp(.65rem, 1.7vw, 1.15rem)/1.06 Georgia, serif;
}

.scene-words span {
  position: relative;
  rotate: -6deg;
  animation: island-bob 5.6s ease-in-out infinite;
}
.scene-words span::before {
  content: "";
  position: absolute;
  left: 65%;
  bottom: 100%;
  height: 12vh;
  width: 1px;
  background: #68505b;
  transform-origin: bottom;
  rotate: 5deg;
}
.scene-words span:nth-child(even) { background: #ffc5dc; rotate: 5deg; animation-delay: -2s; }
[data-paused] .scene-words span { animation-play-state: paused; }
.scene-flock .scene-words span:first-child { translate: calc(-18vw * var(--arrival-clip, 0)) 0; }
.scene-flock .scene-words span:last-child { translate: calc(18vw * var(--arrival-clip, 0)) 0; }
@keyframes island-bob { 50% { transform: translateY(-7px) rotate(3deg); } }

.island-arrival {
  --arrival: 1;
  --departure: .4;
  position: relative;
  isolation: isolate;
  overflow: clip;
  grid-column: 1 / -1;
  width: min(860px, 100%);
  height: clamp(105px, 19vw, 212px);
  margin: 0 auto clamp(1rem, 3vw, 2.2rem);
  border: 2px solid #19171b;
  box-shadow: 4px 5px #19171b;
  background: #fff;
  pointer-events: none;
}

.island-arrival::before {
  content: "";
  position: absolute;
  inset: 64% -10% auto;
  z-index: -1;
  height: 35%;
  border: 2px solid #21171f;
  border-radius: 50%;
  background: #fff2d4;
  transform: translate3d(calc((var(--departure) - .4) * 10%), calc((.4 - var(--departure)) * 60%), 0)
    rotate(-4deg) scale(calc(1.08 + var(--departure) * .2));
}

.island-arrival > img {
  position: absolute;
  width: 49%;
  height: 86%;
  left: 6%;
  top: 7%;
  object-fit: contain;
  opacity: calc(.12 + var(--arrival) * .88);
  transform: perspective(900px) translate3d(var(--near-x, 0%), var(--near-y, 0%), 0)
    rotate(var(--near-tilt, 0deg)) scale(var(--near-zoom, 1));
}

.island-arrival > span {
  position: absolute;
  max-width: 41%;
  right: 5%;
  bottom: 31%;
  font-size: clamp(.78rem, 2.4vw, 1.65rem);
  opacity: var(--arrival);
  transform: translate3d(calc((1 - var(--arrival)) * 70%), calc((.5 - var(--departure)) * 45%), 0) rotate(-4deg);
}

.island-arrival[data-entrance="fold"] > img {
  transform-origin: 0 50%;
  transform: perspective(650px) translate3d(var(--near-x, 0%), var(--near-y, 0%), 0)
    rotateY(var(--near-tilt, 0deg)) scale(var(--near-zoom, 1));
}
.island-arrival[data-entrance="print"] > img { clip-path: inset(0 0 calc(100% * (1 - var(--arrival))) 0); }
.island-arrival[data-entrance="iris"] > img {
  clip-path: ellipse(calc(71% * var(--arrival)) calc(75% * var(--arrival)) at 50% 50%);
}
.island-arrival[data-entrance="fork"] > span { background: #ffc5dc; transform: translateX(calc((1 - var(--arrival)) * 115%)) rotate(5deg); }
#maker > .island-arrival { width: min(860px, 92%); height: clamp(98px, 14vw, 158px); }
#castle > .island-arrival, #entry-game > .island-arrival { width: min(860px, 92%); }

@media (prefers-reduced-motion: no-preference) {
  [data-island-panel] {
    --panel-distance: 0;
    --panel-x: 0px;
    --panel-y: 0px;
    --panel-tilt: 0deg;
    --panel-scale: 1;
    translate: calc(var(--panel-x) * var(--panel-distance)) calc(var(--panel-y) * var(--panel-distance));
    rotate: y calc(var(--panel-tilt) * var(--panel-distance));
    scale: calc(1 + (var(--panel-scale) - 1) * var(--panel-distance));
    opacity: calc(1 - var(--panel-distance) * .32);
    animation: none !important;
  }
  [data-island-panel="print"] { --panel-y: -22px; --panel-scale: .98; }
  [data-island-panel="lift"] { --panel-y: 30px; --panel-scale: .96; }
  [data-island-panel="fold"] { --panel-x: calc(25px * var(--panel-direction)); --panel-tilt: calc(15deg * var(--panel-direction)); }
  [data-island-panel="slide"] { --panel-x: -24px; }
  [data-island-panel="fork"] { --panel-x: calc(19px * var(--panel-direction)); }
  [data-island-panel="iris"] { --panel-scale: 1.045; }
  [data-island-panel="pullback"] { --panel-scale: .92; --panel-y: 11px; }
  [data-island-panel]:focus-within { --panel-distance: 0 !important; }
}

.egg-event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); align-items: center; }
.egg-event img { display: block; width: 100%; height: auto; border: 2px solid #19171b; }
.ledger-edition { background: #fff7eb; }
.receipt-tools { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-block: 1.2rem .7rem; }
.receipt-tools select { color: #19171b; background: #fff; border: 2px solid #19171b; padding: .5rem; font: inherit; }
.published-receipts { display: grid; gap: .7rem; padding: 0; list-style: none; }
.published-receipts li { display: grid; grid-template-columns: 1fr 1fr 1.5fr max-content; gap: .4rem 1rem; align-items: center; padding: .8rem; background: #fff; border: 2px solid #19171b; }
.published-receipts b, .published-receipts p { overflow-wrap: anywhere; }
.published-receipts p { grid-column: 1 / -1; margin: 0; }
.published-receipts time { font-size: .85rem; }

@media (max-width: 760px) {
  :is(#maker, #round-lineup) { overflow-x: clip; }
  .edition-scrolling .press-scene { align-items: end; }
  .edition-scrolling .scene-layout { grid-template-areas: "art" "copy"; }
  .edition-scrolling .scene-copy { padding: .68rem; box-shadow: 3px 3px #19171b; }
  .edition-scrolling .scene-title { font-size: clamp(1.85rem, 9.8vw, 3.2rem); }
  .scene-press .press-facts { margin-top: .65rem; }
  .scene-press .press-facts > div { padding: .33rem .4rem; }
  .scene-press .actions { gap: .42rem; }
  .scene-press .actions .button { min-height: 39px; padding: .3rem .48rem; font-size: .8rem; }
  .edition-scrolling .scene-words { inset: .7rem 8% auto; }
  .edition-scrolling .scene-copy > p:not(.scene-slug) { font-size: .89rem; line-height: 1.3; }
  .edition-scrolling .edition-toolbar { padding-inline: .2rem; }
  .edition-scrolling .scene-competition .scene-layout { grid-template-areas: "copy" "art"; gap: .55rem; }
  .edition-scrolling .scene-competition .competition-board { justify-self: stretch; max-width: none; padding: .35rem; }
  .edition-scrolling .scene-competition .competition-board > p { display: none; }
  .edition-scrolling .scene-competition .competition-tickets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; }
  .edition-scrolling .scene-competition .competition-ticket { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .3rem; }
  .edition-scrolling .scene-competition .competition-ticket :is(.count, .eyebrow) { font-size: .59rem; }
  .edition-scrolling .scene-competition .competition-ticket strong { font-size: 1.3rem; }
  .edition-scrolling .scene-competition .competition-ticket progress { width: 100%; }
  .edition-scrolling .island-overview {
    inset: auto 5% 76px;
    flex-direction: row;
    justify-content: center;
  }
  .edition-scrolling .island-overview .button {
    min-height: 38px;
    padding: .3rem .5rem;
    font-size: .75rem;
  }
  .egg-event { grid-template-columns: 1fr; }
  .published-receipts li { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .island-arrival::before, .island-arrival > img, .island-arrival > span { transform: none !important; opacity: 1; clip-path: none !important; }
}

@media (max-width: 760px) and (max-height: 680px) {
  .edition-scrolling .scene-press .scene-title { font-size: clamp(1.7rem, 8vw, 2.1rem); }
  .edition-scrolling .scene-press .scene-copy { padding: .58rem; }
  .edition-scrolling .scene-press .scene-slug { padding: .23rem .39rem; font-size: .6rem; }
  .edition-scrolling .scene-press .press-facts dt { font-size: .59rem; }
  .edition-scrolling .scene-press .press-fees { padding: .35rem .43rem; margin-top: .42rem; }
}
