:root {
  color-scheme: light;
  --ink: #27312a;
  --ink-soft: #5d6354;
  --cream: #e5d6aa;
  --moss: #566044;
  --ochre: #b78a35;
  --rust: #a34f31;
  --teal: #315e5c;
  --stage-scale: 1;
  --camera-scale: 1;
  --camera-x: 0px;
  --camera-y: 0px;
  --well-scale: 0.23;
  --well-x: 0px;
  --well-y: -18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #dbc995;
}

body {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  user-select: none;
  background: #171813;
}

button {
  font: inherit;
}

.depth-layer {
  --shift-x: 0px;
  --shift-y: 0px;
}

#presentation {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  overflow: hidden;
  background: #171813;
}

#stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: #dbc995;
  transform: translate(-50%, -50%) scale(var(--stage-scale));
  transform-origin: center;
}

#illustration,
.paper-background,
.light-wash,
.environment-stage,
.story-props,
.ending-choices,
.curtain-call,
.foreground,
.vignette {
  position: absolute;
  inset: 0;
}

#illustration {
  z-index: 0;
  overflow: visible;
  transform: translate3d(var(--camera-x), var(--camera-y), 0) scale(var(--camera-scale));
  transform-origin: 60% 76%;
  transition: transform 1.35s cubic-bezier(0.2, 0.75, 0.24, 1);
  will-change: transform;
}

.paper-background {
  inset: -24%;
  background: url("assets/paper-stage.webp") center / cover no-repeat;
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0);
  transform-origin: 58% 63%;
  transition: transform 1.35s cubic-bezier(0.2, 0.75, 0.24, 1);
  will-change: transform;
}

.light-wash {
  z-index: 1;
  background: radial-gradient(circle at 58% 56%, rgb(255 245 206 / 0.2), transparent 32%);
  pointer-events: none;
}

[data-from] {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.72s ease,
    visibility 0s linear 0.72s,
    transform 1.05s cubic-bezier(0.18, 0.78, 0.24, 1),
    filter 0.72s ease;
}

[data-from].is-visible {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.72s ease,
    visibility 0s,
    transform 1.05s cubic-bezier(0.18, 0.78, 0.24, 1),
    filter 0.72s ease;
}

#title-card {
  position: absolute;
  z-index: 16;
  top: 12%;
  left: 7.5%;
  width: 920px;
  transform: translateY(18px);
  transition:
    opacity 0.18s ease,
    visibility 0s linear 0.18s,
    transform 0.45s ease;
}

#title-card.is-visible {
  transform: translateY(0);
  transition:
    opacity 0.45s ease,
    visibility 0s,
    transform 0.45s ease;
}

#title-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 152px;
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: -0.065em;
  text-shadow: 0 6px 0 rgb(74 60 36 / 0.12);
}

.environment-stage {
  z-index: 3;
}

.environment {
  position: absolute;
  right: 80px;
  bottom: 18px;
  width: 980px;
  max-height: 900px;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 18px 13px rgb(39 39 24 / 0.18));
  transform-origin: 64% 88%;
  will-change: transform, opacity;
}

.environment.kingdom {
  transform: translate3d(calc(var(--shift-x, 0) - 154px), calc(var(--shift-y, 0) + 90px), 0) rotate(-2deg) scaleY(0.18);
}

.environment.monastery {
  right: 40px;
  width: 1050px;
  transform: translate3d(calc(var(--shift-x, 0) + 230px), calc(var(--shift-y, 0) + 90px), 0) rotate(2deg) scaleY(0.16);
}

.environment.homestead {
  right: 70px;
  width: 980px;
  transform: translate3d(calc(var(--shift-x, 0) + 307px), calc(var(--shift-y, 0) + 35px), 0) rotate(8deg) scale(0.84);
}

.environment.is-visible {
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0) rotate(0) scale(1);
}

html[data-step="19"] .environment.homestead.is-visible,
html[data-step="20"] .environment.homestead.is-visible,
html[data-step="21"] .environment.homestead.is-visible {
  mix-blend-mode: multiply;
  transform: translate3d(calc(var(--shift-x, 0) - 8px), calc(var(--shift-y, 0) + 7px), 0) rotate(0) scale(0.9);
}

html[data-step="24"] .environment.homestead.is-visible,
html[data-step="25"] .environment.homestead.is-visible,
html[data-step="26"] .environment.homestead.is-visible {
  transform: translate3d(calc(var(--shift-x, 0) - 72px), calc(var(--shift-y, 0) + 8px), 0) rotate(0) scale(1.1);
}

html[data-step="2"] .paper-background {
  transform: translate3d(var(--shift-x, 0), calc(var(--shift-y, 0) - 12px), 0);
}

html[data-step="19"] .paper-background,
html[data-step="20"] .paper-background,
html[data-step="21"] .paper-background {
  background-position: left bottom;
  background-size: 120%;
}

html[data-step="2"] .foreground {
  transform: translate3d(var(--shift-x, 0), calc(var(--shift-y, 0) + 18px), 0) scale(1.07);
}

.story-props {
  z-index: 8;
  pointer-events: none;
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0);
  will-change: transform;
}

.story-prop {
  position: absolute;
  display: block;
  object-fit: contain;
  filter: drop-shadow(8px 13px 7px rgb(43 40 24 / 0.2));
  transform: translateY(48px) rotate(var(--rest-turn, 0deg)) scale(0.84);
  transform-origin: 50% 85%;
}

.story-prop.is-visible {
  transform: translateY(0) rotate(var(--turn, 0deg)) scale(1);
}

.prop-person {
  left: 36%;
  bottom: 9%;
  width: 150px;
  --rest-turn: -8deg;
  --turn: -2deg;
}

.opening-person {
  left: 38%;
}

html[data-step="1"] .opening-person {
  animation: reach-for-water 1.5s ease-in-out infinite alternate;
}

.prop-crossroads {
  position: absolute;
  z-index: 5;
  right: 10%;
  bottom: 3%;
  width: 650px;
  filter: drop-shadow(6px 10px 6px rgb(43 40 24 / 0.14));
  transform: translate3d(var(--shift-x, 0), calc(var(--shift-y, 0) + 70px), 0) scale(0.68);
  transform-origin: 50% 90%;
}

.prop-crossroads.is-visible {
  opacity: 0.9;
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0) scale(1);
}

.prop-king {
  top: auto;
  right: 9%;
  bottom: 12%;
  width: 150px;
  --rest-turn: 6deg;
  --turn: 2deg;
}

.prop-villagers {
  right: 42%;
  bottom: 7%;
  width: 270px;
  --rest-turn: -3deg;
}

.tax-box {
  right: 21%;
  bottom: 6%;
  width: 155px;
  --rest-turn: 5deg;
  --turn: 1deg;
}

.tax-coin {
  width: 68px;
  filter: drop-shadow(5px 8px 4px rgb(43 40 24 / 0.28));
  transform-origin: center;
}

.tax-coin.is-visible {
  animation: coin-drop 0.8s cubic-bezier(0.18, 0.78, 0.24, 1.2) both;
}

.tax-coin-one { right: 25%; bottom: 23%; --coin-turn: -7deg; }
.tax-coin-two { right: 22.5%; bottom: 18%; --coin-turn: 6deg; }
.tax-coin-three { right: 27%; bottom: 14%; --coin-turn: -3deg; }
.tax-coin-four { right: 21%; bottom: 12%; --coin-turn: 9deg; animation-delay: 0.12s !important; }
.tax-coin-five { right: 24%; bottom: 8%; --coin-turn: -10deg; animation-delay: 0.24s !important; }

html[data-phase="monks"] .tax-coin {
  right: var(--monk-right, 6%);
  bottom: var(--monk-bottom, 5%);
  width: 64px;
  animation: none;
  transform: rotate(var(--coin-turn)) scale(0.8);
}

html[data-phase="monks"] .tax-coin-one { --monk-right: 32%; --monk-bottom: 7%; --spring-x: -220px; }
html[data-phase="monks"] .tax-coin-two { --monk-right: 29%; --monk-bottom: 5%; --spring-x: -100px; }
html[data-phase="monks"] .tax-coin-three { --monk-right: 26%; --monk-bottom: 7%; --spring-x: 20px; }
html[data-phase="monks"] .tax-coin-four { --monk-right: 23%; --monk-bottom: 5%; --spring-x: 140px; }
html[data-phase="monks"] .tax-coin-five { --monk-right: 20%; --monk-bottom: 7%; --spring-x: 250px; }

html[data-step="15"] .tax-coin.is-visible {
  animation: coin-spring 1.15s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

.lifetime-cards {
  top: 9%;
  left: 54%;
  width: 290px;
}

.lifetime-cards.is-visible {
  animation: lifetime-pass 2.2s ease-in-out both;
}

.prop-grave {
  left: 29%;
  bottom: 3%;
  width: 260px;
  --rest-turn: -7deg;
  --turn: -3deg;
}

html[data-step="9"] .prop-grave.is-visible {
  animation: grave-rise 1.05s cubic-bezier(0.18, 0.8, 0.24, 1.08) both;
}

.prop-monks {
  top: auto;
  right: 27%;
  bottom: 12%;
  width: 185px;
  --rest-turn: 7deg;
  --turn: 1deg;
}

html[data-step="12"] .prop-monks {
  transform: translate(-18px, 12px) rotate(-2deg) scale(1.08);
}

.prop-road {
  z-index: -1;
  left: 30%;
  bottom: 2%;
  width: 440px;
  transform: translateX(-90px) rotate(18deg) scale(0.72);
  transform-origin: 50% 92%;
}

.prop-road.is-visible {
  transform: translateX(0) rotate(18deg) scale(1);
}

.journey-person {
  left: 25%;
  bottom: 7%;
  width: 95px;
  transform: translateX(180px) scale(0.7);
  --turn: -4deg;
}

.journey-person.is-visible {
  transform: translateX(0) rotate(-4deg) scale(1);
}

.self-person {
  left: 37%;
  bottom: 9%;
}

html[data-step="19"] .self-person.is-visible {
  animation: study-craft 1.8s ease-in-out infinite alternate;
}

.prop-craft {
  right: auto;
  left: 44%;
  bottom: 4%;
  width: 320px;
  --rest-turn: 5deg;
  --turn: 1deg;
}

.construction-scene {
  left: 61%;
  bottom: 5%;
  width: 390px;
  aspect-ratio: 1150 / 978;
  filter: none;
  transform: translate(-50%, 48px) rotate(3deg) scale(0.84);
  transform-origin: 50% 82%;
}

.construction-scene.is-visible {
  transform: translate(-50%, 0) rotate(0) scale(1);
}

.construction-tools {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(6px 10px 6px rgb(43 40 24 / 0.19));
  transform: translateX(20px);
  opacity: 0;
}

.construction-scene.is-visible .construction-tools {
  animation: tools-arrive 1.05s 0.28s cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

.construction-stone {
  position: absolute;
  z-index: 3;
  left: var(--stone-x);
  top: var(--stone-y);
  width: var(--stone-w, 42px);
  aspect-ratio: var(--stone-ratio, 150 / 81);
  background: var(--stone-image, url("assets/score-construction-stone-a.webp")) center / contain no-repeat;
  filter: drop-shadow(4px 6px 3px rgb(43 40 24 / 0.2)) var(--stone-tone, brightness(1));
  opacity: 0;
  transform: translate(var(--scatter-x), var(--scatter-y)) rotate(var(--scatter-turn)) scale(0.72) scaleX(var(--stone-flip, 1));
}

.construction-scene.is-visible .construction-stone {
  animation: stone-place 0.78s var(--stone-delay) cubic-bezier(0.16, 0.82, 0.22, 1.08) both;
}

.stone-01 { --stone-x: 92px;  --stone-y: 149px; --scatter-x: -112px; --scatter-y: 91px;  --scatter-turn: -34deg; --stone-delay: 0.04s; --settle-turn: -5deg; }
.stone-02 { --stone-x: 131px; --stone-y: 137px; --scatter-x: -68px;  --scatter-y: 121px; --scatter-turn: 27deg;  --stone-delay: 0.18s; --stone-w: 48px; --stone-image: url("assets/score-construction-stone-b.webp"); --stone-ratio: 79 / 49; --stone-flip: -1; --settle-turn: 3deg; }
.stone-03 { --stone-x: 176px; --stone-y: 133px; --scatter-x: 103px;  --scatter-y: 118px; --scatter-turn: -25deg; --stone-delay: 0.32s; --stone-w: 45px; --stone-flip: -1; --settle-turn: 2deg; --stone-tone: brightness(0.9); }
.stone-04 { --stone-x: 218px; --stone-y: 139px; --scatter-x: 121px;  --scatter-y: 69px;  --scatter-turn: 31deg;  --stone-delay: 0.46s; --stone-w: 49px; --stone-image: url("assets/score-construction-stone-b.webp"); --stone-ratio: 79 / 49; --settle-turn: -4deg; }
.stone-05 { --stone-x: 260px; --stone-y: 153px; --scatter-x: 102px;  --scatter-y: 112px; --scatter-turn: -31deg; --stone-delay: 0.6s; --stone-w: 43px; --settle-turn: 5deg; }
.stone-06 { --stone-x: 75px;  --stone-y: 177px; --scatter-x: -98px;  --scatter-y: 57px;  --scatter-turn: 37deg;  --stone-delay: 0.74s; --stone-w: 40px; --stone-image: url("assets/score-construction-stone-b.webp"); --stone-ratio: 79 / 49; --stone-flip: -1; --settle-turn: -7deg; }
.stone-07 { --stone-x: 70px;  --stone-y: 207px; --scatter-x: -82px;  --scatter-y: 37px;  --scatter-turn: -27deg; --stone-delay: 0.88s; --stone-w: 43px; --settle-turn: 4deg; --stone-tone: brightness(0.86); }
.stone-08 { --stone-x: 277px; --stone-y: 180px; --scatter-x: 87px;   --scatter-y: 50px;  --scatter-turn: 35deg;  --stone-delay: 1.02s; --stone-w: 40px; --stone-image: url("assets/score-construction-stone-b.webp"); --stone-ratio: 79 / 49; --settle-turn: 7deg; }
.stone-09 { --stone-x: 280px; --stone-y: 210px; --scatter-x: 65px;   --scatter-y: 33px;  --scatter-turn: -34deg; --stone-delay: 1.16s; --stone-w: 42px; --stone-flip: -1; --settle-turn: -3deg; }
.stone-10 { --stone-x: 95px;  --stone-y: 228px; --scatter-x: -71px;  --scatter-y: 47px;  --scatter-turn: 23deg;  --stone-delay: 1.3s; --stone-w: 48px; --stone-image: url("assets/score-construction-stone-b.webp"); --stone-ratio: 79 / 49; --settle-turn: 5deg; }
.stone-11 { --stone-x: 137px; --stone-y: 238px; --scatter-x: -34px;  --scatter-y: 58px;  --scatter-turn: -22deg; --stone-delay: 1.44s; --stone-w: 44px; --settle-turn: -6deg; }
.stone-12 { --stone-x: 182px; --stone-y: 241px; --scatter-x: 51px;   --scatter-y: 54px;  --scatter-turn: 29deg;  --stone-delay: 1.58s; --stone-w: 50px; --stone-image: url("assets/score-construction-stone-b.webp"); --stone-ratio: 79 / 49; --stone-flip: -1; --settle-turn: 2deg; }
.stone-13 { --stone-x: 228px; --stone-y: 235px; --scatter-x: 75px;   --scatter-y: 46px;  --scatter-turn: -26deg; --stone-delay: 1.72s; --stone-w: 47px; --settle-turn: 6deg; --stone-tone: brightness(0.92); }

.build-time-cards {
  top: 8%;
  right: 10%;
  width: 300px;
}

.build-time-cards.is-visible {
  animation: cards-pass 2.4s ease-in-out both;
}

.growing-plants {
  right: 25%;
  bottom: 5%;
  width: 125px;
  transform-origin: 50% 100%;
}

.growing-plants.is-visible {
  animation: plants-grow 2.5s ease-out both;
}

.painted-mark {
  right: auto;
  left: 56.5%;
  bottom: 7%;
  width: 180px;
  --rest-turn: 5deg;
  --turn: 1deg;
}

.painted-mark.is-visible {
  animation: mark-paint 0.9s steps(4, end) both;
}

.settled-mark {
  right: auto;
  left: 56.5%;
  bottom: 7%;
  width: 180px;
  --rest-turn: 4deg;
  --turn: -2deg;
}

.well-stage {
  position: absolute;
  z-index: 7;
  left: 61%;
  bottom: 20px;
  width: 590px;
  aspect-ratio: 1;
  transform: translate3d(calc(-50% + var(--shift-x, 0) + var(--well-x)), calc(var(--shift-y, 0) + var(--well-y)), 0) scale(var(--well-scale));
  transform-origin: 50% 82%;
  transition: transform 1.35s cubic-bezier(0.18, 0.78, 0.24, 1);
  will-change: transform;
}

.well-variant {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 13px rgb(40 39 24 / 0.2));
}

.animated-bucket {
  position: absolute;
  z-index: 4;
  top: 14%;
  left: 41%;
  width: 18%;
  height: 75%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(4px 7px 4px rgb(40 36 22 / 0.25));
  transform-origin: 50% 0;
}

.lowering-bucket.is-visible {
  animation: bucket-lower 1.35s cubic-bezier(0.3, 0.7, 0.25, 1) both;
}

.falling-bucket.is-visible {
  clip-path: inset(76% 0 0 0);
  animation: bucket-fall 1.15s cubic-bezier(0.35, 0.05, 0.8, 0.35) both;
}

.empty-string {
  position: absolute;
  z-index: 3;
  top: 43%;
  left: 50%;
  width: 12px;
  height: 32%;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, #7d6038 0 2px, #aa8a54 2px 4px);
  box-shadow: 2px 3px 3px rgb(43 37 22 / 0.2);
  transform: rotate(7deg);
  transform-origin: 50% 0;
}

html[data-step="13"] .empty-string.is-visible {
  animation: string-swing 1.7s ease-in-out both;
}

.well-shrine {
  position: absolute;
  z-index: 12;
  inset: 0;
  transform: translateY(54px) scale(0.82);
  transform-origin: 50% 78%;
}

.well-shrine.is-visible {
  transform: translateY(0) scale(1);
}

.shrine-flowers {
  position: absolute;
  bottom: 10%;
  width: 39%;
  mix-blend-mode: multiply;
  object-fit: contain;
  filter: saturate(0.82) drop-shadow(4px 7px 3px rgb(42 39 24 / 0.18));
  transform-origin: 50% 100%;
}

.shrine-flowers-left { left: 1%; transform: rotate(-12deg); }
.shrine-flowers-right { right: -1%; transform: scaleX(-1) rotate(-10deg); }

.well-shrine.is-visible .shrine-flowers-left { animation: shrine-grow-left 0.85s 0.18s ease-out both; }
.well-shrine.is-visible .shrine-flowers-right { animation: shrine-grow-right 0.85s 0.34s ease-out both; }

.shrine-medallion {
  position: absolute;
  z-index: 1;
  top: -14%;
  left: 50%;
  width: 27%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #f0d48a;
  background: #ae7830;
  clip-path: polygon(50% 0, 58% 21%, 75% 7%, 77% 30%, 100% 25%, 84% 44%, 100% 58%, 77% 62%, 82% 87%, 61% 75%, 50% 100%, 40% 75%, 17% 89%, 23% 63%, 0 58%, 17% 44%, 0 25%, 24% 30%, 25% 7%, 42% 21%);
  filter: drop-shadow(5px 8px 4px rgb(55 39 21 / 0.24));
  font-size: 78px;
  line-height: 1;
  text-shadow: 3px 4px 0 rgb(94 60 27 / 0.28);
  transform: translateX(-50%) rotate(-4deg);
}

.well-shrine.is-visible .shrine-medallion {
  animation: shrine-medallion-in 0.85s 0.08s cubic-bezier(0.18, 0.8, 0.24, 1.08) both;
}

.shrine-garland {
  position: absolute;
  top: 31%;
  left: 24%;
  width: 52%;
  height: 20%;
  border-top: 6px solid #785a39;
  border-radius: 50%;
  transform: rotate(-1deg);
}

.shrine-garland i {
  position: absolute;
  top: -2px;
  left: var(--shrine-left);
  width: 34px;
  height: 43px;
  background: var(--shrine-color);
  border: 3px solid rgb(75 57 37 / 0.62);
  clip-path: polygon(0 0, 100% 0, 84% 100%, 50% 80%, 15% 100%);
  transform: rotate(var(--shrine-turn));
  transform-origin: 50% 0;
}

.shrine-garland i:nth-child(1) { --shrine-left: 3%; --shrine-color: #a34f31; --shrine-turn: 7deg; }
.shrine-garland i:nth-child(2) { --shrine-left: 23%; --shrine-color: #b78a35; --shrine-turn: 3deg; }
.shrine-garland i:nth-child(3) { --shrine-left: 43%; --shrine-color: #315e5c; --shrine-turn: 0deg; }
.shrine-garland i:nth-child(4) { --shrine-left: 63%; --shrine-color: #b78a35; --shrine-turn: -3deg; }
.shrine-garland i:nth-child(5) { --shrine-left: 83%; --shrine-color: #a34f31; --shrine-turn: -7deg; }

.shrine-candle {
  position: absolute;
  bottom: 25%;
  width: 37px;
  height: 105px;
  background: linear-gradient(90deg, #c7ad74, #f1dfa5 48%, #a88b55);
  border: 3px solid #765d3c;
  box-shadow: 3px 5px 3px rgb(44 35 23 / 0.2);
}

.shrine-candle::before {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  width: 20px;
  height: 29px;
  border-radius: 68% 32% 58% 42%;
  background: #d87532;
  box-shadow: 0 0 18px rgb(255 188 61 / 0.78);
  content: "";
  transform: translateX(-50%) rotate(8deg);
}

.shrine-candle-left { left: 19%; }
.shrine-candle-right { right: 17%; }

.water-ripple {
  position: absolute;
  z-index: 10;
  top: 55%;
  left: 33%;
  width: 34%;
  height: 14%;
}

.water-ripple i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20%;
  height: 30%;
  border: 8px solid #79a9a1;
  border-radius: 50%;
  opacity: 0;
  filter: drop-shadow(1px 2px 1px rgb(38 63 60 / 0.26));
  transform: translate(-50%, -50%);
}

.water-ripple.is-visible i {
  animation: ripple 1.2s 0.85s ease-out forwards;
}

.water-ripple.is-visible i:nth-child(2) { animation-delay: 1.07s; }

html[data-step="0"] .water-ripple i {
  border-width: 4px;
}

html[data-step="20"] .well-stage { animation: build-settle 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
html[data-step="21"] .well-variant.is-visible { animation: well-complete 1.05s cubic-bezier(0.18, 0.78, 0.24, 1) both; }
html[data-step="22"] .well-stage { animation: break-jolt 0.65s ease-out; }
html[data-step="23"] .well-stage { animation: mend-settle 0.8s ease-out; }

html[data-step="26"] .light-wash {
  z-index: 13;
  background: radial-gradient(circle at 61% 68%, rgb(255 199 92 / 0.48), rgb(255 226 158 / 0.2) 34%, transparent 62%);
  mix-blend-mode: soft-light;
}

.ending-choices {
  z-index: 4;
}

.ending-choice {
  position: absolute;
  width: 440px;
  margin: 0;
  text-align: center;
  transform: translate3d(var(--shift-x, 0), calc(var(--shift-y, 0) + 38px), 0) scale(0.9);
}

.ending-choices.is-visible .ending-choice { transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0) scale(1); }

.ending-choice img { display: block; width: 100%; filter: drop-shadow(0 10px 8px rgb(41 39 24 / 0.17)); }
.ending-choice figcaption { display: none; }
.ending-king { left: 30%; bottom: 16%; }
.ending-monks { top: auto; left: 61%; bottom: 20%; width: 470px; transform: translate3d(calc(-50% + var(--shift-x, 0)), calc(var(--shift-y, 0) + 38px), 0) scale(0.9); }
.ending-monks { --choice-x: -50%; }
.ending-choices.is-visible .ending-monks { transform: translate3d(calc(-50% + var(--shift-x, 0)), var(--shift-y, 0), 0) scale(1); }
.ending-self { top: auto; right: 2%; bottom: 16%; width: 440px; }

html[data-step="28"] .ending-king,
html[data-step="28"] .ending-monks {
  animation: choice-recede 1.65s ease-in-out both;
}

html[data-step="28"] .ending-self {
  animation: choice-forward 1.65s ease-in-out both;
}

html[data-step="29"] .ending-king { animation: choice-rock 1.7s ease-in-out infinite alternate; }
html[data-step="29"] .ending-monks { animation: choice-rock 1.9s 0.16s ease-in-out infinite alternate-reverse; }
html[data-step="29"] .ending-self { animation: choice-rock 1.6s 0.3s ease-in-out infinite alternate; }

html[data-step="30"] .ending-choice figcaption,
html[data-step="31"] .ending-choice figcaption {
  opacity: 1;
}

html[data-step="31"] .ending-choice {
  top: auto;
  bottom: 24%;
  width: 330px;
}

html[data-step="31"] .ending-king { left: 34%; }
html[data-step="31"] .ending-monks { left: 67%; transform: translateX(-50%) scale(1); }
html[data-step="31"] .ending-self { right: 0; }

.shakespeare {
  position: absolute;
  z-index: 12;
  right: 1%;
  bottom: -3%;
  width: 220px;
  filter: drop-shadow(16px 20px 10px rgb(42 37 23 / 0.22));
  transform: translate3d(calc(var(--shift-x, 0) + 130px), calc(var(--shift-y, 0) + 90px), 0) rotate(8deg);
}

.shakespeare.is-visible { transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0) rotate(-2deg); }

.decision-balance {
  position: absolute;
  z-index: 3;
  right: 2%;
  bottom: 0;
  width: 1100px;
  filter: drop-shadow(13px 18px 9px rgb(42 39 24 / 0.22));
  transform: translate3d(calc(var(--shift-x, 0) + 90px), calc(var(--shift-y, 0) + 55px), 0) rotate(4deg) scale(0.86);
  transform-origin: 50% 88%;
}

.decision-balance.is-visible {
  animation: balance-settle 1.25s cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

.ending-tokens {
  position: absolute;
  z-index: 11;
  inset: 0;
  pointer-events: none;
  transform: translateY(32px);
}

.ending-tokens.is-visible {
  transform: translateY(0);
}

.ending-token {
  position: absolute;
  display: block;
  width: 110px;
  filter: drop-shadow(7px 10px 5px rgb(42 39 24 / 0.2));
}

.ending-token-coin { left: 36%; bottom: 5%; }
.ending-token-road { left: 59%; top: auto; bottom: 7%; }
.ending-token-clock { right: 9%; top: auto; bottom: 5%; }

html[data-step="31"] .ending-token {
  opacity: 0.62;
}

.curtain-call {
  z-index: 9;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 54% 58%, rgb(255 229 157 / 0.46), transparent 37%),
    linear-gradient(to bottom, rgb(70 46 29 / 0.14), transparent 29%);
  transform: scale(1.09);
  transform-origin: 50% 58%;
}

.curtain-call.is-visible {
  transform: scale(1);
}

.proscenium {
  position: absolute;
  z-index: 12;
  inset: 0;
  filter: drop-shadow(0 14px 9px rgb(42 28 20 / 0.28));
}

.proscenium::before {
  position: absolute;
  top: -38px;
  left: 0;
  width: 100%;
  height: 160px;
  background:
    linear-gradient(94deg, transparent 0 7%, rgb(255 221 165 / 0.1) 7.5% 8%, transparent 8.5% 16%, rgb(52 24 22 / 0.14) 17% 18%, transparent 19% 100%),
    linear-gradient(#733326, #98452f 54%, #6d3025);
  border-bottom: 13px solid #513326;
  box-shadow: inset 0 -7px 0 rgb(229 157 80 / 0.2);
  clip-path: polygon(0 0, 100% 0, 100% 73%, 97% 88%, 93% 75%, 89% 93%, 84% 76%, 79% 91%, 74% 77%, 69% 94%, 64% 76%, 59% 91%, 54% 76%, 49% 94%, 44% 76%, 39% 91%, 34% 76%, 29% 93%, 24% 76%, 19% 91%, 14% 75%, 9% 92%, 4% 75%, 0 88%);
  content: "";
}

.proscenium::after {
  position: absolute;
  right: 0;
  bottom: -38px;
  left: 0;
  height: 132px;
  background:
    repeating-linear-gradient(95deg, transparent 0 120px, rgb(56 35 23 / 0.12) 122px 126px),
    linear-gradient(#9c7445, #6f4e30);
  border-top: 12px solid #4b3626;
  box-shadow: inset 0 9px 0 rgb(241 195 111 / 0.14);
  content: "";
}

.proscenium i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 108px;
  background:
    linear-gradient(90deg, rgb(54 24 21 / 0.42), transparent 18% 72%, rgb(52 23 20 / 0.38)),
    linear-gradient(#88402e, #673027);
  border-inline: 7px solid #4f3026;
  box-shadow: inset 15px 0 0 rgb(231 144 75 / 0.08);
}

.proscenium i:first-child { left: -25px; transform: rotate(-0.7deg); }
.proscenium i:nth-child(2) { right: -25px; transform: rotate(0.7deg); }
.proscenium i:nth-child(3) {
  top: 92px;
  right: 0;
  bottom: auto;
  left: 0;
  width: auto;
  height: 8px;
  border: 0;
  background: #4f3026;
  box-shadow: 0 5px 0 rgb(225 151 76 / 0.14);
}

.king-act {
  position: absolute;
  z-index: 9;
  inset: 0;
  pointer-events: none;
}

.king-customer {
  position: absolute;
  z-index: 8;
  left: 48.5%;
  bottom: 146px;
  width: 145px;
  height: 310px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(8px 12px 6px rgb(42 32 22 / 0.22));
  transform: translateY(52px) rotate(-5deg) scale(0.9);
}

.king-customer.is-visible {
  transform: translateY(0) rotate(1deg) scale(1);
}

.king-service-ripple {
  position: absolute;
  z-index: 11;
  top: 75%;
  left: 62.5%;
  width: 10%;
  height: 7%;
}

.king-service-ripple i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20%;
  height: 30%;
  border: 6px solid #79a9a1;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.king-service-ripple.is-visible i { animation: ripple 1.2s 0.3s ease-out forwards; }
.king-service-ripple.is-visible i:nth-child(2) { animation-delay: 0.52s; }

.provider-gate {
  position: absolute;
  z-index: 12;
  left: 58.5%;
  bottom: 137px;
  width: 132px;
  height: 320px;
  border: 15px solid #67462d;
  border-bottom-width: 24px;
  background: repeating-linear-gradient(90deg, #8e653b 0 17px, #5e402a 18px 23px);
  box-shadow:
    9px 14px 7px rgb(43 31 21 / 0.22),
    inset 0 0 0 5px rgb(232 176 88 / 0.16);
  transform: translateY(90px) rotate(4deg) scaleY(0.72);
  transform-origin: 50% 100%;
}

.provider-gate.is-visible {
  transform: translateY(0) rotate(-1deg) scaleY(1);
}

.provider-gate > i {
  position: absolute;
  left: -7px;
  width: 116px;
  height: 13px;
  background: #5a3b27;
  box-shadow: 0 4px 0 rgb(225 154 70 / 0.16);
}

.provider-gate > i:first-child { top: 64px; }
.provider-gate > i:nth-child(2) { top: 145px; }
.provider-gate > i:nth-child(3) { top: 224px; }

.provider-gate span {
  position: absolute;
  top: -76px;
  left: 50%;
  width: 236px;
  padding: 12px 14px 14px;
  color: var(--rust);
  background: #dfcb92;
  border: 4px solid #6d5739;
  box-shadow: 6px 8px 0 rgb(54 42 28 / 0.15);
  clip-path: polygon(2% 7%, 97% 0, 100% 90%, 93% 100%, 4% 95%, 0 15%);
  font-size: 23px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%) rotate(1deg);
}

.custom-bucket {
  position: absolute;
  z-index: 14;
  left: 53.5%;
  bottom: 224px;
  width: 126px;
  height: 94px;
  background: linear-gradient(100deg, #315e5c, #6d9690 55%, #284b49);
  border: 8px solid #443b2c;
  border-radius: 4px 8px 30px 18px;
  box-shadow: 7px 10px 5px rgb(43 34 23 / 0.24);
  transform: translate(-85px, 62px) rotate(-18deg) scale(0.72);
  transform-origin: 50% 100%;
}

.custom-bucket::before {
  position: absolute;
  top: -70px;
  left: 10px;
  width: 88px;
  height: 82px;
  border: 9px solid #725b3a;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  content: "";
}

.custom-bucket.is-visible {
  animation: bucket-rejected 1.15s cubic-bezier(0.18, 0.8, 0.24, 1) both;
}

.king-premium {
  position: absolute;
  z-index: 13;
  width: 112px;
  filter: drop-shadow(7px 10px 5px rgb(42 34 23 / 0.25));
  transform-origin: 50% 100%;
}

.premium-first { left: 39.5%; bottom: 190px; transform: translateY(-620px) rotate(-12deg) scale(0.8); }
.premium-again { left: 45%; bottom: 178px; transform: translateY(-620px) rotate(10deg) scale(0.8); }
.king-premium.is-visible { animation: premium-drop 0.85s cubic-bezier(0.18, 0.78, 0.24, 1.18) both; }
.premium-again.is-visible { animation-delay: 0.58s; }

.recurring-moon {
  position: absolute;
  z-index: 8;
  top: 155px;
  left: 38%;
  width: 92px;
  aspect-ratio: 1;
  border: 7px solid #5b4b35;
  border-radius: 50%;
  background: #315e5c;
  box-shadow: 7px 10px 5px rgb(44 34 22 / 0.2);
  transform: translateX(520px) rotate(15deg) scale(0.72);
}

.recurring-moon::after {
  position: absolute;
  top: 7px;
  left: 25px;
  width: 58px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #dfcb92;
  content: "";
}

.recurring-moon.is-visible {
  animation: recurring-month 1.7s ease-in-out both;
}

.cast-member {
  --cast-turn: 0deg;
  --label-color: var(--rust);
  position: absolute;
  z-index: 10;
  bottom: 128px;
  width: 190px;
  margin: 0;
  text-align: center;
  transform: translateY(-90px) rotate(var(--cast-turn)) scale(0.92);
  transform-origin: 50% 0;
}

.cast-member::before {
  position: absolute;
  bottom: calc(100% - 12px);
  left: 50%;
  width: 3px;
  height: 620px;
  background: repeating-linear-gradient(to bottom, #715139 0 7px, #aa895b 7px 11px);
  box-shadow: 2px 0 2px rgb(55 34 22 / 0.25);
  content: "";
  transform: translateX(-50%);
}

.cast-member::after {
  position: absolute;
  z-index: -1;
  top: -70px;
  left: 50%;
  width: 360px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(255 232 169 / 0.54), transparent 68%);
  content: "";
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.7s ease;
}

.cast-member.is-visible {
  transform: translateY(0) rotate(var(--cast-turn)) scale(1);
}

.cast-member.is-visible::after {
  opacity: 1;
}

.cast-member img {
  display: block;
  width: 100%;
  height: 350px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(9px 13px 6px rgb(42 32 22 / 0.24));
}

.cast-member figcaption {
  position: relative;
  display: flex;
  width: max-content;
  min-width: 220px;
  margin: -8px 0 0 50%;
  padding: 12px 26px 15px;
  flex-direction: column;
  color: var(--ink);
  background: #dfcb92;
  border: 4px solid #6d5739;
  box-shadow:
    8px 10px 0 rgb(54 42 28 / 0.16),
    inset 0 0 0 3px rgb(255 240 192 / 0.38);
  clip-path: polygon(2% 6%, 97% 0, 100% 90%, 94% 100%, 4% 96%, 0 14%);
  transform: translateX(-50%) rotate(-1deg);
}

.cast-member strong {
  color: var(--label-color);
  font-size: 31px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.cast-member span {
  margin-top: 7px;
  font: 700 17px/1.1 system-ui, sans-serif;
  letter-spacing: 0.16em;
}

.cast-king {
  left: 31%;
  --cast-turn: -1.5deg;
  --label-color: var(--rust);
}

.cast-monks {
  left: 47%;
  width: 245px;
  --cast-turn: 0.8deg;
  --label-color: var(--teal);
}

.cast-self {
  right: 15%;
  width: 185px;
  --cast-turn: 1.5deg;
  --label-color: #8a641e;
}

.cast-solo {
  left: 28%;
  bottom: 124px;
  width: 240px;
}

html[data-step="42"] .cast-member.is-visible img {
  animation: curtain-bow 1.5s 0.18s ease-in-out both;
}

.foreground {
  z-index: 6;
  inset: -4%;
  background: url("assets/paper-stage.webp") center / cover no-repeat;
  mask-image: linear-gradient(to bottom, transparent 68%, rgb(0 0 0 / 0.12) 76%, black 91%);
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0) scale(1.04);
  pointer-events: none;
}

html[data-step="19"] .foreground,
html[data-step="20"] .foreground,
html[data-step="21"] .foreground {
  opacity: 0;
}

.vignette {
  z-index: 14;
  box-shadow: inset 0 0 100px rgb(48 43 25 / 0.13);
  pointer-events: none;
}

#verse {
  position: absolute;
  z-index: 20;
  top: 70px;
  left: 98px;
  width: 540px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
  text-shadow: 0 2px 0 rgb(255 245 209 / 0.72);
}

#verse::before {
  position: absolute;
  z-index: -1;
  inset: -18px -26px;
  background: radial-gradient(ellipse at 22% 28%, rgb(238 226 188 / 0.76), rgb(238 226 188 / 0.32) 55%, transparent 78%);
  content: "";
  opacity: 0;
  transition: opacity 0.7s ease;
}

html[data-phase="self"] #verse::before {
  opacity: 1;
}

.line {
  margin: 0;
  color: var(--ink);
  font-size: 44px;
  line-height: 1.18;
  letter-spacing: -0.025em;
  opacity: 0.55;
  transform: translateY(8px);
  animation: line-in 430ms cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

.line.current { opacity: 1; }
.line:not(.current) { transform: none; animation: none; }
.word-accent { color: #e51e4f; }
html[data-step="10"] #verse .line.current,
html[data-step="17"] #verse .line.current,
html[data-step="26"] #verse .line.current {
  margin-top: 0.12em;
  color: var(--teal);
  font-size: 58px;
  letter-spacing: -0.04em;
}
html[data-phase="ending"] #verse { width: 600px; }
html[data-step="29"] #verse .line.current { color: var(--rust); font-style: italic; }
html[data-step="31"] #verse .line:not(.current) { opacity: 0.34; transition: opacity 1s ease; }
html[data-step="31"] #verse .line.current { margin-top: 0.16em; font-size: 80px; }
html[data-phase="epilogue"] #verse { top: 145px; left: 145px; width: 620px; }
html[data-phase="epilogue"] #verse::before { opacity: 1; }
html[data-phase="epilogue"] #verse .line.current { color: var(--rust); font-size: 68px; line-height: 1.02; }
html[data-phase="epilogue"]:not([data-step="32"]) #verse .line.current { color: var(--ink); font-size: 72px; font-style: italic; }

#controls {
  position: absolute;
  z-index: 30;
  right: 20px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgb(39 49 42 / 0.2);
  border-radius: 999px;
  background: rgb(230 215 171 / 0.72);
  backdrop-filter: blur(8px);
  opacity: 0.07;
  transition: opacity 0.25s ease;
}

#controls:hover,
#controls:focus-within { opacity: 1; }
#controls button { width: 35px; height: 35px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; }
#controls button:hover,
#controls button:focus-visible { outline: none; background: rgb(39 49 42 / 0.1); }
#counter { min-width: 62px; text-align: center; font: 13px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }

@keyframes line-in { to { transform: translateY(0); } }
@keyframes ripple { 0% { opacity: 0.8; width: 20%; height: 30%; } 100% { opacity: 0; width: 125%; height: 90%; } }
@keyframes reach-for-water { to { transform: translate(16px, 4px) rotate(1deg) scale(1.03); } }
@keyframes study-craft { to { transform: translate(12px, 4px) rotate(2deg) scale(1.02); } }
@keyframes bucket-lower { from { transform: translateY(-72%) scale(0.94); } to { transform: translateY(8%) scale(1); } }
@keyframes bucket-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 48% { opacity: 1; transform: translate(18%, 88%) rotate(42deg); } 100% { opacity: 0; transform: translate(42%, 190%) rotate(96deg); } }
@keyframes string-swing { 0% { transform: rotate(0); } 30% { transform: rotate(16deg); } 58% { transform: rotate(-10deg); } 78% { transform: rotate(6deg); } 100% { transform: rotate(3deg); } }
@keyframes coin-drop { from { opacity: 0; transform: translateY(-626px) rotate(-80deg) scale(0.72); } 76% { opacity: 1; transform: translateY(8px) rotate(var(--coin-turn)) scale(1.03); } to { opacity: 1; transform: translateY(0) rotate(var(--coin-turn)) scale(1); } }
@keyframes coin-spring { 0% { opacity: 1; transform: rotate(var(--coin-turn)) scale(0.8); } 18% { opacity: 1; transform: translateY(-220px) rotate(calc(var(--coin-turn) + 8deg)) scale(0.96); } 50% { opacity: 1; transform: translate(var(--spring-x), -620px) rotate(calc(var(--coin-turn) + 16deg)) scale(0.8); } 82% { opacity: 0.8; transform: translate(var(--spring-x), -720px) rotate(calc(var(--coin-turn) + 10deg)) scale(0.68); } 100% { opacity: 0; transform: translate(var(--spring-x), -780px) rotate(var(--coin-turn)) scale(0.58); } }
@keyframes lifetime-pass { 0% { opacity: 0; transform: translateX(110px) rotate(8deg) scale(0.86); } 22%, 70% { opacity: 1; } 100% { opacity: 0.86; transform: translateX(-80px) rotate(-6deg) scale(1); } }
@keyframes grave-rise { 0% { opacity: 0; transform: translateY(180px) rotate(-8deg) scale(0.72); } 72% { opacity: 1; transform: translateY(-9px) rotate(-2deg) scale(1.03); } 100% { opacity: 1; transform: translateY(0) rotate(-3deg) scale(1); } }
@keyframes shrine-grow-left { from { opacity: 0; transform: translateY(45px) rotate(-18deg) scaleY(0.4); } to { opacity: 1; transform: translateY(0) rotate(-12deg) scaleY(1); } }
@keyframes shrine-grow-right { from { opacity: 0; transform: translateY(45px) scaleX(-1) rotate(-16deg) scaleY(0.4); } to { opacity: 1; transform: translateY(0) scaleX(-1) rotate(-10deg) scaleY(1); } }
@keyframes shrine-medallion-in { from { opacity: 0; transform: translate(-50%, 55px) rotate(-16deg) scale(0.5); } to { opacity: 1; transform: translateX(-50%) rotate(-4deg) scale(1); } }
@keyframes tools-arrive { from { opacity: 0; transform: translate(54px, 34px) rotate(3deg) scale(0.9); } to { opacity: 1; transform: translateX(20px) rotate(0) scale(1); } }
@keyframes stone-place { 0% { opacity: 0; transform: translate(var(--scatter-x), var(--scatter-y)) rotate(var(--scatter-turn)) scale(0.72) scaleX(var(--stone-flip, 1)); } 72% { opacity: 1; transform: translateY(-5px) rotate(calc(var(--settle-turn) - 2deg)) scale(1.04) scaleX(var(--stone-flip, 1)); } 100% { opacity: 1; transform: translate(0) rotate(var(--settle-turn)) scale(1) scaleX(var(--stone-flip, 1)); } }
@keyframes cards-pass { 0% { opacity: 0; transform: translate(150px, -16px) rotate(6deg) scale(0.86); } 24%, 68% { opacity: 1; } 100% { opacity: 0; transform: translate(-250px, 28px) rotate(-7deg) scale(0.92); } }
@keyframes plants-grow { from { opacity: 0.4; transform: scaleY(0.32) scaleX(0.8); } to { opacity: 1; transform: scaleY(1) scaleX(1); } }
@keyframes well-complete { 0% { opacity: 0; transform: translateY(24px) scale(0.9); } 72% { opacity: 1; transform: translateY(-4px) scale(1.015); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes mark-paint { from { clip-path: inset(0 100% 0 0); opacity: 0.6; transform: translateY(8px) rotate(2deg); } to { clip-path: inset(0); opacity: 1; transform: translateY(0) rotate(-1deg); } }
@keyframes choice-forward { 0%, 100% { opacity: 1; transform: translateX(var(--choice-x, 0)) translateY(0) scale(1); } 45% { opacity: 1; transform: translateX(var(--choice-x, 0)) translateY(34px) scale(1.25) rotate(2deg); } }
@keyframes choice-recede { 0%, 100% { opacity: 1; transform: translateX(var(--choice-x, 0)) scale(1); } 45% { opacity: 0.46; transform: translateX(var(--choice-x, 0)) scale(0.84); } }
@keyframes choice-rock { from { transform: translateX(var(--choice-x, 0)) rotate(-2.4deg) scale(1); } to { transform: translateX(var(--choice-x, 0)) rotate(2.4deg) scale(1); } }
@keyframes balance-settle { 0% { opacity: 0; transform: translate3d(calc(var(--shift-x, 0) + 80px), calc(var(--shift-y, 0) + 55px), 0) rotate(4deg) scale(0.88); } 65% { opacity: 1; transform: translate3d(var(--shift-x, 0), calc(var(--shift-y, 0) - 6px), 0) rotate(-1deg) scale(1.01); } 100% { opacity: 1; transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0) rotate(0) scale(1); } }
@keyframes build-settle { 0% { transform: translate3d(calc(-50% + var(--well-x)), calc(var(--well-y) + 90px), 0) scale(var(--well-scale)); } 70% { transform: translate3d(calc(-50% + var(--well-x)), calc(var(--well-y) - 12px), 0) scale(var(--well-scale)); } }
@keyframes break-jolt { 25% { transform: translate3d(calc(-50% + var(--well-x) - 12px), var(--well-y), 0) scale(var(--well-scale)) rotate(-3deg); } 55% { transform: translate3d(calc(-50% + var(--well-x) + 9px), var(--well-y), 0) scale(var(--well-scale)) rotate(2deg); } }
@keyframes mend-settle { 0% { filter: brightness(0.8); transform: translate3d(calc(-50% + var(--well-x)), calc(var(--well-y) + 22px), 0) scale(var(--well-scale)); } 70% { transform: translate3d(calc(-50% + var(--well-x)), calc(var(--well-y) - 8px), 0) scale(var(--well-scale)); } }
@keyframes curtain-bow {
  0%, 100% { transform: translateY(0) rotate(0); }
  42%, 68% { transform: translateY(34px) rotate(11deg) scaleY(0.9); }
}
@keyframes bucket-rejected {
  0% { opacity: 0; transform: translate(-85px, 62px) rotate(-18deg) scale(0.72); }
  58% { opacity: 1; transform: translate(12px, -6px) rotate(5deg) scale(1.04); }
  76% { transform: translate(-4px, 2px) rotate(-7deg) scale(1); }
  100% { opacity: 1; transform: translate(0) rotate(-4deg) scale(1); }
}
@keyframes premium-drop {
  from { opacity: 0; transform: translateY(-620px) rotate(-18deg) scale(0.76); }
  76% { opacity: 1; transform: translateY(8px) rotate(4deg) scale(1.04); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
@keyframes recurring-month {
  0% { opacity: 0; transform: translateX(520px) rotate(15deg) scale(0.72); }
  26%, 72% { opacity: 1; }
  100% { opacity: 0.92; transform: translateX(-120px) rotate(-8deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
