/* Carnival atmosphere around the approved single-player booth. */
.carnival-world {
  --scene-padding: clamp(26px, 4vw, 48px) clamp(16px, 5vw, 76px) clamp(48px, 8vw, 90px);
  --wheel-turn: 44s;
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: var(--scene-padding);
  overflow: hidden;
  border: 1px solid #365276;
  border-radius: 24px;
  background: #083767;
  box-shadow: 0 22px 70px #020d2999, inset 0 1px 0 #ffffff17;
}
.carnival-world > :not(.carnival-scenery) { position: relative; z-index: 2; }
.carnival-world > .game-column { margin-inline: auto; }
.carnival-scenery, .carnival-scenery * { pointer-events: none !important; user-select: none; }
.carnival-scenery { position: absolute; z-index: 0; inset: 0; overflow: hidden; contain: paint; }
/* Landscape Florida beach plates are selected by world below. Side crops on
   narrow screens retain the coast around the central game booth. */
.scene-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #072565 0%, #164581 27%, #244c82 32%, #1178ac 41%, #087dbb 64%, #14becf 88%, #277a8a 100%);
  opacity: .9;
}
.scene-backdrop::before, .scene-backdrop::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  max-width: 620px;
  background-image: url('assets/vero-carnival/water-carnival-cove-beach-v2.webp');
  background-size: auto 100%;
  background-repeat: no-repeat;
}
.scene-backdrop::before {
  left: 0;
  background-position: left top;
  mask-image: linear-gradient(90deg, #000 0%, #000 38%, transparent 65%);
}
.scene-backdrop::after {
  right: 0;
  background-position: right top;
  mask-image: linear-gradient(270deg, #000 0%, #000 44%, transparent 94%);
}
/* Keep the broad water horizon visible even in a very wide world. This crop
   contains water only, while the original outer wings supply the wharf edges. */
.scene-water-bed {
  position: absolute;
  inset: 34% 0 10.5%;
  opacity: .72;
  background: url('assets/vero-carnival/water-carnival-cove-beach-v2.webp') center 75% / 100% auto no-repeat;
  mask-image: linear-gradient(180deg, transparent 0%, #000 27%, #000 100%);
}
.scene-distance {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #04205215 0, #08265920 40%, #032a5c00 62%, #03558635 84%),
    linear-gradient(90deg, #041d4d1a, #031b4b55 44%, #031b4b55 56%, #041d4d1a);
}
.scene-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, #06153f33, transparent 16%, transparent 90%, #130e2733), linear-gradient(90deg, #08204426, transparent 16%, transparent 84%, #08204426); }

/* The visible wooden foreground follows the selected beach scenery. */
.scene-dock {
  position: absolute;
  inset: auto 0 0;
  height: clamp(85px, 15%, 145px);
  background: #974d22 url('assets/vero-carnival/water-carnival-cove-beach-v2.webp') center bottom / 100% 550% no-repeat;
  border-top: 1px solid #ffd98e8c;
  box-shadow: 0 -6px 24px #061f4370;
}
.scene-dock::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #ffdc9222, #120a242b); }

/* Broad low-opacity reflected ripples stay in the scenery, behind the lane. */
.scene-water {
  position: absolute;
  left: -6%;
  right: -6%;
  top: 44%;
  bottom: 11%;
  opacity: .29;
  background-image: repeating-radial-gradient(ellipse at 20% 53%, transparent 0 30px, #a6f9ffb3 32px 33px, transparent 36px 65px);
  background-size: 230px 58px;
  transform: skewY(-2deg);
  animation: scene-water-drift 7s ease-in-out infinite alternate;
  will-change: transform;
  mask-image: linear-gradient(180deg, transparent, #000 28%, #000 85%, transparent);
}
.scene-water-secondary { top: 50%; opacity: .15; background-size: 270px 72px; background-position: 60px 20px; animation-duration: 9s; animation-direction: alternate-reverse; }
@keyframes scene-water-drift { from { transform: translate3d(-2.3%, 0, 0) skewY(-2deg); } to { transform: translate3d(2.3%, 7px, 0) skewY(1deg); } }
.scene-reflections { position: absolute; inset: 0; }
.scene-reflection {
  position: absolute; height: 3px; margin-left: -5%; border-radius: 50%;
  background: radial-gradient(ellipse, var(--scene-reflection, #d1ffffce), transparent 72%);
  box-shadow: 0 7px 5px -2px var(--scene-reflection, #a4f1f47a);
  opacity: .38; transform-origin: 50% 50%;
  animation: scene-reflection-glide 5.6s ease-in-out var(--reflection-delay, 0s) infinite alternate;
}
@keyframes scene-reflection-glide {
  from { transform: translate3d(-12px, 0, 0) scaleX(.65); opacity: .18; }
  to { transform: translate3d(14px, 5px, 0) scaleX(1.15); opacity: .7; }
}

/* Distant ride: the wheel turns, while each suspended gondola stays upright. */
.scene-wheel { position: absolute; left: 2.2%; top: 10%; width: clamp(145px, 23%, 280px); aspect-ratio: 5 / 6; opacity: .82; filter: drop-shadow(0 0 5px #c674a344); }
.scene-wheel-supports { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-wheel-rotor { position: absolute; inset: 0 0 auto; width: 100%; aspect-ratio: 1; animation: scene-wheel-turn var(--wheel-turn) linear infinite; transform-origin: 50% 50%; will-change: transform; }
.scene-wheel-rotor > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-cabin-anchor { position: absolute; width: 0; height: 0; }
.scene-cabin { position: absolute; width: 24px; height: 27px; left: -12px; top: 0; transform-origin: 50% 0; animation: scene-cabin-turn var(--wheel-turn) linear infinite; }
.scene-cabin::before { content: ''; position: absolute; left: 11px; width: 2px; height: 10px; background: #eac68d; }
.scene-cabin-roof { position: absolute; top: 7px; left: 0; right: 0; height: 7px; border: 1px solid #ffe5aa; border-radius: 8px 8px 1px 1px; background: var(--cabin-color); }
.scene-cabin-window { position: absolute; top: 13px; left: 3px; right: 3px; height: 9px; background: #09314f; border: 2px solid #ffe2a1; border-top: 0; }
.scene-cabin-seat { position: absolute; top: 20px; left: 1px; right: 1px; height: 9px; border: 1px solid #fff1ac; border-radius: 0 0 7px 7px; background: var(--cabin-color); box-shadow: 0 1px 3px #09224855; }
@keyframes scene-wheel-turn { to { transform: rotate(360deg); } }
@keyframes scene-cabin-turn { to { transform: rotate(-360deg); } }

.scene-lights { position: absolute; top: 0; left: 0; width: 100%; height: clamp(50px, 8vw, 95px); opacity: .9; }
.scene-lights > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-bulb { position: absolute; width: 7px; height: 9px; margin-left: -3.5px; border: 1px solid #ffdfa1; border-radius: 3px 3px 50% 50%; background: #fff2b7; box-shadow: 0 0 7px 2px #ffcc6b80, 0 0 19px 5px #ffc45b30; animation: scene-light-glow 7s ease-in-out var(--glow-delay, 0s) infinite alternate; }
.scene-bulb::before { content: ''; position: absolute; width: 4px; height: 4px; top: -4px; left: .5px; background: #dca85e; border-radius: 1px; }
@keyframes scene-light-glow { from { opacity: .76; } to { opacity: 1; } }

/* Move the large sprite's circular blue foot onto the gold countertop. The
   mounting flange stays fixed when the cannon above it pivots to aim. */
.hero-cannon { bottom: 9%; filter: drop-shadow(0 2px 1px #06476b66); }
.stage-cannon { bottom: 8%; transform-origin: 50% 85%; filter: drop-shadow(0 2px 1px #06476b66); }
.cannon-mount {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 8.1%;
  width: 18%;
  height: 2.9%;
  transform: translateX(-50%);
  border: 1px solid #154763;
  border-top-color: #abefff;
  border-radius: 50%;
  background: linear-gradient(180deg, #7dd9f3 0%, #168db6 37%, #066496 55%, #093e6c 100%);
  box-shadow: inset 0 -2px 1px #423d36aa, 0 2px 1px #5b472d66;
  pointer-events: none;
}
.cannon-mount::before { content: ''; position: absolute; z-index: -1; left: -6%; right: -6%; bottom: -11%; height: 70%; border-radius: 50%; background: #413b2b70; filter: blur(1px); }
.cannon-mount::after { content: ''; position: absolute; inset: 13% 10% 12%; border: 1px solid #2b645e; border-top-color: #9beaf4; border-radius: 50%; background: linear-gradient(180deg, #559daa, #28728a 50%, #16526d); }
.cannon-mount-bolt { position: absolute; z-index: 1; top: 44%; left: 5.5%; width: 5px; height: 4px; border-radius: 50%; border: 1px solid #c3dddf; background: #6d8b95; box-shadow: 0 1px 1px #45422999; }
.cannon-mount-bolt + .cannon-mount-bolt { left: auto; right: 5.5%; }
.hero-booth .cannon-mount { bottom: 9.1%; width: 19.7%; }

/* The original lane's water gets a soft surface shimmer below the target. */
.lane-water-shimmer {
  position: absolute; z-index: 1; top: 62.5%; left: 6%; width: 88%; height: 22.7%; overflow: hidden;
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%); pointer-events: none; opacity: .17;
  background: repeating-radial-gradient(ellipse at 30% 60%, transparent 0 17px, #e8ffffcc 19px 20px, transparent 23px 43px);
  background-size: 90px 24px; animation: lane-water-flow 6s ease-in-out infinite alternate;
}
@keyframes lane-water-flow { from { background-position: 0 0; } to { background-position: 22px 6px; } }

/* Motion controls affect atmosphere only. Gameplay can still respond instantly. */
body[data-motion='off'] .lane-water-shimmer,
.scene-motion-paused .lane-water-shimmer,
body[data-motion='off'] .carnival-scenery *,
.scene-motion-paused .carnival-scenery *,
.carnival-world.scene-motion-paused .carnival-scenery * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .carnival-scenery *, .lane-water-shimmer { animation: none !important; will-change: auto; }
}
@media (max-width: 680px) {
  .carnival-world { --scene-padding: 29px 14px 51px; border-radius: 19px; }
  .scene-backdrop { opacity: .79; background: #0b3c7c url('assets/vero-carnival/water-carnival-cove-beach-v2.webp') center top / cover no-repeat; }
  .scene-backdrop::before, .scene-backdrop::after { display: none; }
  .scene-water-bed { display: none; }
  .scene-wheel { top: 11%; left: -43px; width: 170px; opacity: .62; }
  .scene-dock { height: 79px; }
  .scene-water { opacity: .17; }
  .scene-lights { height: 53px; }
}
@media (max-width: 390px) {
  .carnival-world { --scene-padding: 26px 9px 42px; }
  .scene-wheel { left: -61px; }
}

/* Five chapter settings. Gameplay geometry stays fixed; game-skins-v17.2.css adds
   selective painted booth/hair accents without changing the bullseye. */
.carnival-world[data-world='1'] {
  --scene-reflection: #d1ffffce;
  --scene-dock-tone: #974d22;
}
.carnival-world[data-world='2'] {
  --scene-reflection: #defff5a6;
  --scene-dock-tone: #bd7135;
  background: #1685b6;
  border-color: #72cddb;
}
.carnival-world[data-world='3'] {
  --scene-reflection: #ffdea9b8;
  --scene-dock-tone: #9c4f29;
  background: #925b73;
  border-color: #d59680;
}
.carnival-world[data-world='4'] {
  --scene-reflection: #c0b9ffb5;
  --scene-dock-tone: #5a4264;
  background: #10246e;
  border-color: #807fc3;
}
.carnival-world[data-world='5'] {
  --scene-reflection: #ffe7a6b5;
  --scene-dock-tone: #a26b2b;
  background: #43387d;
  border-color: #c7a366;
}
.carnival-world[data-world] .scene-backdrop {
  opacity: 1;
  background: var(--world-image) center bottom / cover no-repeat;
}
.carnival-world[data-world] .scene-backdrop::before,
.carnival-world[data-world] .scene-backdrop::after,
.carnival-world[data-world] .scene-water-bed { display: none; }
.carnival-world[data-world] .scene-distance {
  background: linear-gradient(90deg, #06234d0a, #061d4c33 43%, #061d4c33 57%, #06234d0a),
    linear-gradient(180deg, #0b205b10, transparent 28%, transparent 80%, #0b205b20);
}
.carnival-world[data-world] .scene-vignette {
  background: linear-gradient(180deg, #081b4d20, transparent 14%, transparent 89%, #100b2633),
    linear-gradient(90deg, #07234112, transparent 14%, transparent 86%, #07234112);
}
.carnival-world[data-world] .scene-dock {
  background: var(--scene-dock-tone) var(--world-image) center bottom / 100% auto no-repeat;
  border-top-color: var(--world-accent);
}
.carnival-world[data-world]:not([data-world='1']) .scene-water {
  background-image: repeating-radial-gradient(ellipse at 20% 53%, transparent 0 30px, var(--scene-reflection) 32px 33px, transparent 36px 65px);
  top: 41%; bottom: 19%; opacity: .29;
}
.carnival-world[data-world]:not([data-world='1']) .scene-water-secondary { top: 46%; opacity: .15; }
.carnival-world[data-world='2'] .scene-lights { opacity: .6; }
/* Cove owns this ride. Repeating it in the later paintings looked pasted on. */
.carnival-world[data-world]:not([data-world='1']) .scene-wheel { display: none; }
.carnival-world[data-world='3'] .scene-lights { opacity: .75; }
.carnival-world[data-world='4'] .scene-bulb { background: #e8e1ff; box-shadow: 0 0 7px 2px #b6acff70, 0 0 19px 5px #c58cff22; }

/* The extra chapter details are absent in Cove, preserving its approved scene. */
.scene-pennants, .scene-lanterns, .scene-stars, .scene-festival-sparks { display: none; position: absolute; inset: 0; }
.carnival-world[data-world='2'] .scene-pennants,
.carnival-world[data-world='5'] .scene-pennants,
.carnival-world[data-world='3'] .scene-lanterns,
.carnival-world[data-world='4'] .scene-stars,
.carnival-world[data-world='5'] .scene-festival-sparks { display: block; }
.scene-pennants { height: 90px; opacity: .95; }
.scene-pennant-cord { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-pennant {
  position: absolute; width: clamp(15px, 2.1vw, 30px); height: clamp(22px, 3vw, 43px);
  background: linear-gradient(120deg, #ffffff35, transparent 55%), var(--flag-color);
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0;
  box-shadow: inset 0 1px 0 #fff3c4;
  animation: scene-pennant-sway 3.2s ease-in-out var(--sway-delay, 0s) infinite alternate;
}
@keyframes scene-pennant-sway { from { transform: rotate(-7deg) skewX(-4deg); } to { transform: rotate(7deg) skewX(4deg); } }
.scene-paper-lantern {
  --lantern-drop: clamp(105px, 11vw, 160px);
  position: absolute; top: var(--lantern-drop); left: 4.4%; width: 51px; height: 66px;
  border: 1px solid #d19b3e; border-radius: 44%;
  background: repeating-linear-gradient(0deg, transparent 0 7px, #ad702c44 8px 9px),
    radial-gradient(ellipse at 48% 42%, #fffbdc 5%, #ffdc7c 37%, #e7a84f 70%, #bf692f);
  box-shadow: inset 5px 0 8px #b4722b33, inset -4px 0 9px #9a442547, 0 0 25px 7px #ffc77230, 0 4px 8px #773d3940;
  opacity: .98;
  transform-origin: 50% calc(-1 * var(--lantern-drop));
  animation: scene-lantern-sway 4.6s ease-in-out var(--sway-delay, 0s) infinite alternate;
}
.scene-paper-lantern::before { content: ''; position: absolute; left: calc(50% - 1px); top: calc(-1 * var(--lantern-drop)); width: 2px; height: var(--lantern-drop); background: linear-gradient(90deg, #634339, #b48a4e); }
.scene-paper-lantern::after { content: ''; position: absolute; left: calc(50% - 3px); top: calc(100% + 3px); width: 6px; height: 22px; background: repeating-linear-gradient(90deg, #d9574c 0 1px, #f38a57 1px 2px); border-radius: 0 0 2px 2px; }
.scene-lantern-cap, .scene-lantern-base { position: absolute; left: 22%; width: 56%; height: 7px; background: linear-gradient(180deg, #ffeeb0, #b07a31 45%, #643f28); border: 1px solid #a06b2c; border-radius: 50%; }
.scene-lantern-cap { top: -3px; }
.scene-lantern-base { bottom: -3px; }
.scene-paper-lantern:nth-child(2) { --lantern-drop: clamp(62px, 6vw, 90px); left: 17%; width: 34px; height: 44px; opacity: .9; }
.scene-paper-lantern:nth-child(3) { --lantern-drop: clamp(90px, 9vw, 130px); left: auto; right: 4.4%; }
.scene-paper-lantern:nth-child(4) { --lantern-drop: clamp(60px, 5.5vw, 83px); left: auto; right: 17%; width: 33px; height: 43px; opacity: .9; }
@keyframes scene-lantern-sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.scene-star {
  position: absolute; width: clamp(12px, 1.4vw, 21px); aspect-ratio: 1;
  background: #fff0b6; opacity: .64;
  clip-path: polygon(50% 0, 60% 38%, 100% 50%, 60% 62%, 50% 100%, 40% 62%, 0 50%, 40% 38%);
  animation: scene-star-glow 5.5s ease-in-out var(--glow-delay, 0s) infinite alternate;
}
@keyframes scene-star-glow { from { opacity: .4; transform: translateY(-3px) scale(.9); } to { opacity: .85; transform: translateY(4px) scale(1.12); } }
.scene-festival-spark {
  position: absolute; width: 6px; height: 10px; border-radius: 2px;
  background: linear-gradient(135deg, #ffefb5, #dcad54); opacity: .7;
  box-shadow: 0 0 9px #ffe09955;
  animation: scene-festival-float 6s ease-in-out var(--spark-delay, 0s) infinite alternate;
}
.scene-festival-spark:nth-child(even) { width: 9px; height: 5px; background: linear-gradient(135deg, #ffe1cb, #eeb186); }
@keyframes scene-festival-float { from { transform: translate3d(-8px, -10px, 0) rotate(-18deg); opacity: .35; } to { transform: translate3d(10px, 12px, 0) rotate(35deg); opacity: .8; } }

/* An image-led preview lets players see each named chapter from the level map. */
.world-preview {
  --preview-image: url('assets/vero-carnival/water-carnival-cove-beach-v2.webp');
  --preview-position: center 31%;
  --preview-accent: #6ddcea;
  position: relative; isolation: isolate; overflow: hidden; contain: paint;
  height: clamp(230px, 25vw, 300px); margin: 0 0 24px;
  border: 1px solid #537f9d; border-radius: 20px; background-color: #0c3265;
  background-image: var(--preview-image); background-size: cover; background-position: var(--preview-position);
  box-shadow: inset 0 1px 0 #ffffff25, 0 14px 30px #010c251f;
}
.world-preview[data-world='2'] { --preview-image: url('assets/vero-carnival/water-boardwalk-breeze-beach-v2.webp'); --preview-position: center 24%; --preview-accent: #85eee4; }
.world-preview[data-world='3'] { --preview-image: url('assets/vero-carnival/water-sunset-splash-coastal-v1.webp'); --preview-position: center 23%; --preview-accent: #ffcf8d; }
.world-preview[data-world='4'] { --preview-image: url('assets/vero-carnival/water-starlight-pier-beach-v2.webp'); --preview-position: center 22%; --preview-accent: #c5b6ff; }
.world-preview[data-world='5'] { --preview-image: url('assets/vero-carnival/water-grand-festival-stage-coastal-v1.webp'); --preview-position: center 21%; --preview-accent: #ffe19b; }
.world-preview::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #071b3610 28%, #071b3640 55%, #06182de8 100%),
    linear-gradient(90deg, #071b3626, transparent 65%);
}
.world-preview::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: var(--preview-accent); opacity: .8; }
.world-preview-caption { position: absolute; z-index: 1; left: clamp(20px, 3vw, 34px); bottom: 25px; display: grid; gap: 7px; max-width: calc(100% - 40px); color: #fff9e9; text-shadow: 0 2px 8px #02132c77; }
.world-preview-caption small { color: #fff8df; font-size: 9px; font-weight: 700; letter-spacing: .2em; line-height: 1.4; }
.world-preview-caption strong { font-size: clamp(27px, 3.4vw, 42px); line-height: 1.05; letter-spacing: -.035em; }
.world-preview-caption > span { color: #e5eef4; font-size: 12px; line-height: 1.5; }

@media (max-width: 680px) {
  /* Separate side crops retain the chapter's architecture around a narrow lane,
     instead of filling both visible margins with the center of the lagoon. */
  .carnival-world[data-world] .scene-backdrop::before,
  .carnival-world[data-world] .scene-backdrop::after {
    display: block; width: 55%; max-width: none;
    background-image: var(--world-image); background-size: auto 100%; opacity: .8;
  }
  .carnival-world[data-world] .scene-backdrop::before { background-position: left top; mask-image: linear-gradient(90deg, #000 10%, #000 50%, transparent 100%); }
  .carnival-world[data-world] .scene-backdrop::after { background-position: right top; mask-image: linear-gradient(270deg, #000 10%, #000 50%, transparent 100%); }
  .carnival-world[data-world]:not([data-world='1']) .scene-water { opacity: .25; }
  .carnival-world[data-world]:not([data-world='1']) .scene-water-secondary { opacity: .13; }
  .scene-pennants { height: 54px; opacity: .9; }
  .scene-paper-lantern { --lantern-drop: 92px; left: 2.5%; width: 29px; height: 37px; opacity: .95; }
  .scene-paper-lantern:nth-child(2), .scene-paper-lantern:nth-child(4) { display: none; }
  .scene-paper-lantern:nth-child(3) { --lantern-drop: 76px; right: 2.5%; }
  .world-preview { height: 190px; border-radius: 16px; margin-bottom: 20px; }
  .world-preview-caption { left: 20px; bottom: 20px; gap: 6px; }
  .world-preview-caption strong { font-size: 28px; }
  .world-preview-caption small { font-size: 8px; }
  .world-preview-caption > span { font-size: 11px; }
}
@media (max-width: 390px) {
  .world-preview { height: 180px; }
  .world-preview-caption strong { font-size: 26px; }
}

@media (max-width: 620px) {
  /* A visible top strip leaves room for each world's motion above the compact
     chapter sign. The booth keeps its full approved phone width. */
  .scene-pennants { top: -2px; height: 35px; }
  .scene-pennant { width: 14px; height: 21px; }
  .scene-paper-lantern { --lantern-drop: 7px; left: 9%; width: 22px; height: 28px; }
  .scene-paper-lantern:nth-child(3) { --lantern-drop: 7px; right: 9%; }
  .scene-paper-lantern::after { width: 3px; height: 7px; left: calc(50% - 1.5px); top: 100%; }
  .scene-lantern-cap, .scene-lantern-base { height: 4px; }
  .scene-lantern-cap { top: -2px; }
  .scene-lantern-base { bottom: -2px; }
  .scene-stars { bottom: auto; height: 43px; }
  .scene-star { width: 11px; }
  .scene-festival-sparks { bottom: auto; height: 100px; }
  .scene-festival-spark { width: 3px; height: 6px; }
  .scene-festival-spark:nth-child(even) { width: 6px; height: 3px; }
}
/* Grand Festival rides are registered to the painted stage, not placed as
   independent screen-space decorations. The carousel canopy stays still while
   its horses circulate and rise; gondolas counter-rotate with their wheel. */
.scene-festival-rides { display: none; position: absolute; inset: 0; overflow: hidden; }
.carnival-world[data-world='5'] .scene-festival-rides { display: block; }
.festival-main-plate { display: block; width: 100%; height: 100%; }
.festival-wheel { filter: drop-shadow(0 .45px .3px #802c1255); }
.festival-wheel-rotor {
  transform-origin: 86px 86px;
  animation: festival-wheel-turn 32s linear infinite;
}
.festival-gondola {
  transform-origin: 0 0;
  animation: festival-gondola-turn 32s linear infinite;
}
@keyframes festival-wheel-turn { to { transform: rotate(360deg); } }
@keyframes festival-gondola-turn { to { transform: rotate(-360deg); } }

.festival-carousel-orbit {
  transform-origin: 0 0;
  animation: festival-carousel-orbit 16s linear var(--horse-delay) infinite,
    festival-carousel-front 16s steps(1, end) var(--horse-delay) infinite;
}
.festival-carousel-back {
  animation-name: festival-carousel-orbit, festival-carousel-back;
}
.festival-carousel-back-ring { filter: brightness(.72) saturate(.88); opacity: .9; }
.festival-carousel-front-ring { filter: drop-shadow(0 0 .55px #ffbe6680); }
.festival-carousel-bob {
  animation: festival-horse-bob 1.7s ease-in-out var(--horse-bob-delay) infinite alternate;
}
@keyframes festival-horse-bob { from { transform: translateY(-2.5px); } to { transform: translateY(2.5px); } }
@keyframes festival-carousel-front {
  0%, 24.999% { opacity: 1; }
  25%, 74.999% { opacity: 0; }
  75%, 100% { opacity: 1; }
}
@keyframes festival-carousel-back {
  0%, 24.999% { opacity: 0; }
  25%, 74.999% { opacity: 1; }
  75%, 100% { opacity: 0; }
}
@keyframes festival-carousel-orbit {
  0% { transform: translate(227px, 355px) scale(1, 1); }
  3.125% { transform: translate(251.9716px, 354.8271px) scale(0.9793, 0.9985); }
  6.25% { transform: translate(275.9835px, 354.3149px) scale(0.9183, 0.9939); }
  9.375% { transform: translate(298.113px, 353.4832px) scale(0.8203, 0.9865); }
  12.5% { transform: translate(317.5097px, 352.364px) scale(0.6905, 0.9766); }
  15.625% { transform: translate(333.4281px, 351.0001px) scale(0.5358, 0.9644); }
  18.75% { transform: translate(345.2566px, 349.4442px) scale(0.3638, 0.9506); }
  21.875% { transform: translate(352.5405px, 347.7558px) scale(0.1825, 0.9356); }
  25% { transform: translate(355px, 346px) scale(0, 0.92); }
  28.125% { transform: translate(352.5405px, 344.2442px) scale(-0.1764, 0.9044); }
  31.25% { transform: translate(345.2566px, 342.5558px) scale(-0.3404, 0.8894); }
  34.375% { transform: translate(333.4281px, 340.9999px) scale(-0.4864, 0.8756); }
  37.5% { transform: translate(317.5097px, 339.636px) scale(-0.6105, 0.8634); }
  40.625% { transform: translate(298.113px, 338.5168px) scale(-0.7096, 0.8535); }
  43.75% { transform: translate(275.9835px, 337.6851px) scale(-0.7817, 0.8461); }
  46.875% { transform: translate(251.9716px, 337.1729px) scale(-0.8254, 0.8415); }
  50% { transform: translate(227px, 337px) scale(-0.84, 0.84); }
  53.125% { transform: translate(202.0284px, 337.1729px) scale(-0.8254, 0.8415); }
  56.25% { transform: translate(178.0165px, 337.6851px) scale(-0.7817, 0.8461); }
  59.375% { transform: translate(155.887px, 338.5168px) scale(-0.7096, 0.8535); }
  62.5% { transform: translate(136.4903px, 339.636px) scale(-0.6105, 0.8634); }
  65.625% { transform: translate(120.5719px, 340.9999px) scale(-0.4864, 0.8756); }
  68.75% { transform: translate(108.7434px, 342.5558px) scale(-0.3404, 0.8894); }
  71.875% { transform: translate(101.4595px, 344.2442px) scale(-0.1764, 0.9044); }
  75% { transform: translate(99px, 346px) scale(0, 0.92); }
  78.125% { transform: translate(101.4595px, 347.7558px) scale(0.1825, 0.9356); }
  81.25% { transform: translate(108.7434px, 349.4442px) scale(0.3638, 0.9506); }
  84.375% { transform: translate(120.5719px, 351.0001px) scale(0.5358, 0.9644); }
  87.5% { transform: translate(136.4903px, 352.364px) scale(0.6905, 0.9766); }
  90.625% { transform: translate(155.887px, 353.4832px) scale(0.8203, 0.9865); }
  93.75% { transform: translate(178.0165px, 354.3149px) scale(0.9183, 0.9939); }
  96.875% { transform: translate(202.0284px, 354.8271px) scale(0.9793, 0.9985); }
  100% { transform: translate(227px, 355px) scale(1, 1); }
}
.carnival-world:not([data-world='5']) .scene-festival-rides * { animation-play-state: paused; }
.festival-mobile-panorama { display: none; }

/* The full-width booth occupies most of a phone. Two joined crops show the
   real rides above its chapter sign; the lane itself keeps its approved size. */
@media (max-width: 900px) {
  .carnival-world[data-world='5'][data-skin] { padding-top: 138px; }
  .festival-mobile-panorama {
    display: block; position: absolute; inset: 0 0 auto; height: 133px;
    mask-image: linear-gradient(180deg, #000 0%, #000 83%, transparent 100%);
  }
  .festival-mobile-plate { position: absolute; top: 0; height: 100%; width: 58%; }
  .festival-mobile-left { left: 0; mask-image: linear-gradient(90deg, #000 0%, #000 74%, transparent 100%); }
  .festival-mobile-right { right: 0; mask-image: linear-gradient(270deg, #000 0%, #000 74%, transparent 100%); }
}
@media (min-width: 621px) and (max-width: 900px) {
  .festival-mobile-panorama { left: 50%; width: 540px; transform: translateX(-50%); }
}

/* Detailed shared ride replaces Cove’s former flat illustration. */
.scene-wheel{width:clamp(160px,24%,300px);aspect-ratio:500/640;opacity:1;filter:drop-shadow(0 7px 5px #092f4b33)}
@media(max-width:700px){.scene-wheel{width:190px;left:-45px;top:7%;opacity:.92}}
