/* WillowinWorlds CSS: Lyamur page (games/lyamur.html). Loaded after upcoming-game.css.
   Signature element: a marble chain flowing along a curved jungle track, a marble shot from the lemur king and a three-marble pop.
   The whole chain is driven by one animation on registered custom properties (--lm-phase, --lm-push, --lm-pop) that feed `translate`,
   `scale` and `opacity` on each marble, so nothing changes layout. Colours repeat every six marbles and the cycle moves the chain by
   twelve slots, so the loop restarts on an identical picture. Without motion the scene is a finished still: chain in place, lemur aimed. */

@property --lm-phase { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --lm-push { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --lm-pop { syntax: "<number>"; inherits: true; initial-value: 0; }

body[data-game="lyamur"] {
  --lm-red-1: #ffd4d0; --lm-red-2: #ee4a43; --lm-red-3: #9e120e;
  --lm-blue-1: #cfe3ff; --lm-blue-2: #3a86f4; --lm-blue-3: #0e3796;
  --lm-yel-1: #fff1ae; --lm-yel-2: #f6c11d; --lm-yel-3: #a56500;
}

/* Hero scene */
.lm-hero-media {
  width: 100%;
  max-width: 600px;
  justify-self: end;
}

body[data-game="lyamur"][data-theme="dark"] .lm-hero-media {
  box-shadow: 0 30px 70px var(--ug-shadow), 0 0 0 8px color-mix(in srgb, var(--ug-fill) 14%, transparent), 0 0 110px rgb(101 202 73 / 0.16);
}

.lm-stage {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1;
  overflow: hidden;
  background: #274d12;
  --lm-r: 31cqw;
  --lm-d: 5.6cqw;
  --lm-step: 10.4deg;
  --lm-a12: 176.4deg;
  --lm-cy: 56cqw;
  --lm-aim: calc(var(--lm-a12) + 13.16 * var(--lm-step));
  --lm-hit: calc(var(--lm-a12) + 13.16 * var(--lm-step));
  --lm-hit2: calc(var(--lm-a12) + 13.6 * var(--lm-step));
}

.lm-hero-media .lm-board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lm-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lm-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background: radial-gradient(circle at 50% 53%, transparent 52%, rgb(6 28 6 / 0.42) 100%);
}

.lm-scene > span {
  position: absolute;
}

/* The track: a worn trench along an arc of the clearing, with a pit at the end */
.lm-groove {
  left: calc(50% - 35cqw);
  top: calc(var(--lm-cy) - 35cqw);
  width: 70cqw;
  height: 70cqw;
  z-index: 0;
  background: radial-gradient(circle closest-side, transparent 77%, rgb(50 31 10 / 0.62) 80%, rgb(50 31 10 / 0.62) 96.5%, transparent 99.5%);
  -webkit-mask-image: conic-gradient(from 256deg, transparent 0deg, #000 6deg, #000 204deg, transparent 213deg, transparent 360deg);
  mask-image: conic-gradient(from 256deg, transparent 0deg, #000 6deg, #000 204deg, transparent 213deg, transparent 360deg);
}

.lm-pit {
  left: 50%;
  top: var(--lm-cy);
  z-index: 1;
  width: 9.4cqw;
  height: 9.4cqw;
  margin: -4.7cqw 0 0 -4.7cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #000 0 36%, #231709 50%, #6a4a20 62%, #b98a45 69%, #5b3f1a 74%, transparent 76%);
  box-shadow: 0 0 2.6cqw rgb(0 0 0 / 0.45);
  translate:
    calc(cos(calc(var(--lm-a12) + 18.9 * var(--lm-step))) * var(--lm-r))
    calc(sin(calc(var(--lm-a12) + 18.9 * var(--lm-step))) * var(--lm-r));
}

/* A leafy mound where the chain comes out, cut from the same board art */
.lm-bush {
  left: 50%;
  top: var(--lm-cy);
  z-index: 3;
  width: 17cqw;
  height: 16cqw;
  margin: -8cqw 0 0 -8.5cqw;
  background: url("../assets/upcoming/lyamur/hero-1280.webp") 0 -56cqw / 177.8cqw 100cqw no-repeat;
  -webkit-mask-image: radial-gradient(ellipse closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side, #000 55%, transparent 100%);
  translate:
    calc(cos(calc(var(--lm-a12) + 0.1 * var(--lm-step))) * var(--lm-r))
    calc(sin(calc(var(--lm-a12) + 0.1 * var(--lm-step))) * var(--lm-r));
}

/* The chain */
.lm-chain {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.lm-chain i,
.lm-shot {
  position: absolute;
  left: 50%;
  top: var(--lm-cy);
  width: var(--lm-d);
  height: var(--lm-d);
  margin: calc(var(--lm-d) / -2) 0 0 calc(var(--lm-d) / -2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgb(255 255 255 / 0.95) 0 7%, transparent 17%),
    radial-gradient(circle at 38% 34%, var(--c1), var(--c2) 52%, var(--c3) 100%);
  box-shadow: 0 0.45cqw 0.7cqw rgb(15 10 0 / 0.45), inset -0.25cqw -0.35cqw 0.6cqw rgb(0 0 0 / 0.28);
}

.lm-chain i {
  --s: calc(var(--j) + var(--lm-phase) + var(--lm-push) * var(--aft, 0));
  --ang: calc(var(--lm-a12) + (var(--s) - 12) * var(--lm-step));
  --e: clamp(0, min(var(--s) - 12, 30 - var(--s)) / 1.6, 1);
  translate: calc(cos(var(--ang)) * var(--lm-r)) calc(sin(var(--ang)) * var(--lm-r));
  scale: calc((0.4 + 0.6 * var(--e)) * (1 + var(--lm-pop) * var(--hit, 0) * 0.5));
  opacity: min(var(--e), 1 - var(--lm-pop) * var(--hit, 0));
}

.lm-chain i:nth-child(6n+1), .lm-chain i:nth-child(6n+2) { --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.lm-chain i:nth-child(6n+3), .lm-chain i:nth-child(6n+5) { --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.lm-chain i:nth-child(6n+4), .lm-chain i:nth-child(6n+6) { --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }
.lm-chain i:nth-child(19), .lm-chain i:nth-child(20) { --hit: 1; }
.lm-chain i:nth-child(n+21) { --aft: 1; }
.lm-chain i:nth-child(1) { --j: 0; }
.lm-chain i:nth-child(2) { --j: 1; }
.lm-chain i:nth-child(3) { --j: 2; }
.lm-chain i:nth-child(4) { --j: 3; }
.lm-chain i:nth-child(5) { --j: 4; }
.lm-chain i:nth-child(6) { --j: 5; }
.lm-chain i:nth-child(7) { --j: 6; }
.lm-chain i:nth-child(8) { --j: 7; }
.lm-chain i:nth-child(9) { --j: 8; }
.lm-chain i:nth-child(10) { --j: 9; }
.lm-chain i:nth-child(11) { --j: 10; }
.lm-chain i:nth-child(12) { --j: 11; }
.lm-chain i:nth-child(13) { --j: 12; }
.lm-chain i:nth-child(14) { --j: 13; }
.lm-chain i:nth-child(15) { --j: 14; }
.lm-chain i:nth-child(16) { --j: 15; }
.lm-chain i:nth-child(17) { --j: 16; }
.lm-chain i:nth-child(18) { --j: 17; }
.lm-chain i:nth-child(19) { --j: 18; }
.lm-chain i:nth-child(20) { --j: 19; }
.lm-chain i:nth-child(21) { --j: 20; }
.lm-chain i:nth-child(22) { --j: 21; }
.lm-chain i:nth-child(23) { --j: 22; }
.lm-chain i:nth-child(24) { --j: 23; }
.lm-chain i:nth-child(25) { --j: 24; }
.lm-chain i:nth-child(26) { --j: 25; }
.lm-chain i:nth-child(27) { --j: 26; }
.lm-chain i:nth-child(28) { --j: 27; }
.lm-chain i:nth-child(29) { --j: 28; }
.lm-chain i:nth-child(30) { --j: 29; }
.lm-chain i:nth-child(31) { --j: 30; }

/* The shot: red, so it joins the red pair. At rest it sits loaded at the lemur's nose. */
.lm-shot {
  --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3);
  z-index: 2;
  translate: calc(cos(var(--lm-aim)) * 23cqw) calc(sin(var(--lm-aim)) * 23cqw);
}

/* The lemur king, seen from above, turned toward the pair */
.lm-lemur {
  left: calc(50% - 22cqw);
  top: calc(var(--lm-cy) - 9.4cqw);
  z-index: 1;
  width: 44cqw;
  aspect-ratio: 960 / 410;
  background:
    radial-gradient(ellipse 46% 38% at 50% 62%, rgb(20 15 0 / 0.38), transparent 72%),
    url("../assets/upcoming/lyamur/gallery-top-down-shooter.webp") 0 0 / 100% auto no-repeat;
  rotate: var(--lm-aim);
}

/* Aim guide */
.lm-lemur::after {
  content: "";
  position: absolute;
  left: 96%;
  top: 50%;
  width: 17%;
  height: 0.55cqw;
  margin-top: -0.27cqw;
  border-radius: 0.3cqw;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.9) 0 0.7cqw, transparent 0.7cqw 1.9cqw);
  opacity: 0.85;
}

/* The pop at the impact point */
.lm-burst {
  left: 50%;
  top: var(--lm-cy);
  z-index: 4;
  width: 0;
  height: 0;
  translate: calc(cos(var(--lm-hit)) * var(--lm-r)) calc(sin(var(--lm-hit)) * var(--lm-r));
}

.lm-burst::before,
.lm-burst::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0;
}

.lm-burst::before {
  width: 11cqw;
  height: 11cqw;
  margin: -5.5cqw 0 0 -5.5cqw;
  border: 0.55cqw solid rgb(255 244 200 / 0.95);
  box-shadow: 0 0 1.6cqw rgb(255 220 120 / 0.8), inset 0 0 1.4cqw rgb(255 220 120 / 0.6);
}

.lm-burst::after {
  width: 1cqw;
  height: 1cqw;
  margin: -0.5cqw 0 0 -0.5cqw;
  background: #fff4c4;
  box-shadow:
    0 -5cqw 0 0 #fff4c4, 3.6cqw -3.6cqw 0 0 #ffd44a, 5cqw 0 0 0 #fff4c4, 3.6cqw 3.6cqw 0 0 #ff8f84,
    0 5cqw 0 0 #fff4c4, -3.6cqw 3.6cqw 0 0 #8cc0ff, -5cqw 0 0 0 #fff4c4, -3.6cqw -3.6cqw 0 0 #ffd44a;
}

/* Foliage copies from the board art; they sway above the track and the marbles */
.lm-leaves {
  inset: 0;
  z-index: 5;
  background: url("../assets/upcoming/lyamur/hero-1280.webp") center / cover no-repeat;
}

.lm-leaves--a {
  -webkit-mask-image: radial-gradient(circle 34cqw at 0 0, #000 55%, transparent 100%), radial-gradient(circle 34cqw at 100% 100%, #000 55%, transparent 100%);
  mask-image: radial-gradient(circle 34cqw at 0 0, #000 55%, transparent 100%), radial-gradient(circle 34cqw at 100% 100%, #000 55%, transparent 100%);
}

.lm-leaves--b {
  -webkit-mask-image: radial-gradient(circle 34cqw at 100% 0, #000 55%, transparent 100%), radial-gradient(circle 34cqw at 0 100%, #000 55%, transparent 100%);
  mask-image: radial-gradient(circle 34cqw at 100% 0, #000 55%, transparent 100%), radial-gradient(circle 34cqw at 0 100%, #000 55%, transparent 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .lm-chain { animation: lmChain 15s linear infinite; }
  .lm-shot { animation: lmShot 15s linear infinite; }
  .lm-lemur { animation: lmAim 15s ease-in-out infinite; }
  .lm-lemur::after { animation: lmGuide 15s linear infinite; }
  .lm-burst::before { animation: lmRing 15s ease-out infinite; }
  .lm-burst::after { animation: lmSparks 15s ease-out infinite; }
  .lm-leaves--a { animation: lmSwayA 8s ease-in-out infinite; }
  .lm-leaves--b { animation: lmSwayB 10s ease-in-out infinite; }
}

@keyframes lmChain {
  0% { --lm-phase: 0; --lm-push: 0; --lm-pop: 0; }
  41% { --lm-push: 0; animation-timing-function: ease-in-out; }
  43% { --lm-push: 1; }
  44% { --lm-pop: 0; animation-timing-function: ease-out; }
  49% { --lm-pop: 1; }
  100% { --lm-phase: 12; --lm-push: 1; --lm-pop: 1; }
}

@keyframes lmShot {
  0%, 35% { opacity: 0; scale: 0.4; translate: calc(cos(var(--lm-aim)) * 23cqw) calc(sin(var(--lm-aim)) * 23cqw); }
  38% { opacity: 1; scale: 1; translate: calc(cos(var(--lm-aim)) * 23cqw) calc(sin(var(--lm-aim)) * 23cqw); }
  40% { opacity: 1; scale: 1; translate: calc(cos(var(--lm-aim)) * 23cqw) calc(sin(var(--lm-aim)) * 23cqw); animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.6); }
  43% { opacity: 1; scale: 1; translate: calc(cos(var(--lm-hit)) * var(--lm-r)) calc(sin(var(--lm-hit)) * var(--lm-r)); }
  44.5% { opacity: 1; scale: 1.25; }
  47% { opacity: 0; scale: 1.7; translate: calc(cos(var(--lm-hit2)) * var(--lm-r)) calc(sin(var(--lm-hit2)) * var(--lm-r)); }
  100% { opacity: 0; scale: 1.7; translate: calc(cos(var(--lm-hit2)) * var(--lm-r)) calc(sin(var(--lm-hit2)) * var(--lm-r)); }
}

@keyframes lmAim {
  0% { rotate: 262deg; scale: 1; transform: translateX(0); }
  20% { rotate: 292deg; }
  33% { rotate: 276deg; }
  38% { rotate: var(--lm-aim); }
  40% { rotate: var(--lm-aim); transform: translateX(0); animation-timing-function: ease-out; }
  41% { transform: translateX(-1.4cqw); }
  45% { transform: translateX(0); scale: 1; animation-timing-function: ease-out; }
  48% { scale: 1.06; }
  54% { scale: 1; }
  60% { rotate: var(--lm-aim); }
  80% { rotate: 270deg; }
  100% { rotate: 262deg; scale: 1; transform: translateX(0); }
}

@keyframes lmGuide {
  0%, 31% { opacity: 0; }
  35%, 39.5% { opacity: 0.85; }
  41%, 100% { opacity: 0; }
}

@keyframes lmRing {
  0%, 43% { opacity: 0; scale: 0.3; }
  44% { opacity: 1; scale: 0.4; }
  52%, 100% { opacity: 0; scale: 1.5; }
}

@keyframes lmSparks {
  0%, 43.5% { opacity: 0; scale: 0.3; }
  45% { opacity: 1; scale: 0.7; }
  51%, 100% { opacity: 0; scale: 1.6; }
}

@keyframes lmSwayA {
  0%, 100% { rotate: -1.1deg; translate: 0 0; }
  50% { rotate: 1.2deg; translate: 0.4cqw 0.3cqw; }
}

@keyframes lmSwayB {
  0%, 100% { rotate: 1.1deg; translate: 0 0.3cqw; }
  50% { rotate: -1.2deg; translate: -0.4cqw 0; }
}

@media (max-width: 920px) {
  .lm-hero-media {
    justify-self: center;
    max-width: 520px;
  }
}

/* Sections: jungle tablets. Leaf-cornered plates with a fringe of moss on top, glossy marbles as badges, a crown band on the call to action.
   Section wrappers draw no box (a vine with leaves and three marbles under the heading), so the world shows between the plates.
   Hover and press use transitions, so a paused page still shows the final state. */
body[data-game="lyamur"][data-theme="dark"] {
  --lm-moss-1: #6dbb4b;
  --lm-moss-2: #2f7522;
  --lm-plate: color-mix(in srgb, var(--ug-card-2) 90%, transparent);
  --lm-plate-2: color-mix(in srgb, var(--ug-card) 90%, transparent);
  --lm-edge: rgb(255 255 255 / 0.09);
  --lm-edge-lo: rgb(0 0 0 / 0.3);
}

body[data-game="lyamur"][data-theme="light"] {
  --lm-moss-1: #62b240;
  --lm-moss-2: #2f7a1f;
  --lm-plate: color-mix(in srgb, var(--ug-card-2) 93%, transparent);
  --lm-plate-2: color-mix(in srgb, var(--ug-card) 93%, transparent);
  --lm-edge: rgb(255 255 255 / 0.9);
  --lm-edge-lo: rgb(20 60 20 / 0.14);
}

body[data-game="lyamur"] {
  --lm-r: 24px 7px 24px 7px;
  --lm-r-s: 16px 5px 16px 5px;
  --lm-fringe:
    radial-gradient(circle at 9px 0, var(--lm-moss-1) 0 6px, transparent 6.6px) 0 0 / 23px 12px repeat-x,
    radial-gradient(circle at 12px 0, var(--lm-moss-2) 0 5px, transparent 5.6px) 7px 0 / 31px 10px repeat-x,
    radial-gradient(circle at 6px 0, var(--lm-moss-1) 0 3.2px, transparent 3.8px) 3px 0 / 17px 7px repeat-x,
    linear-gradient(var(--lm-moss-2), var(--lm-moss-2)) 0 0 / 100% 3px no-repeat;
  --lm-fringe-s:
    radial-gradient(circle at 6px 0, var(--lm-moss-1) 0 4px, transparent 4.5px) 0 0 / 13px 8px repeat-x,
    radial-gradient(circle at 8px 0, var(--lm-moss-2) 0 3px, transparent 3.5px) 4px 0 / 19px 6px repeat-x,
    linear-gradient(var(--lm-moss-2), var(--lm-moss-2)) 0 0 / 100% 2px no-repeat;
  --lm-fill: linear-gradient(165deg, var(--lm-plate), var(--lm-plate-2));
  --lm-glow: radial-gradient(ellipse 60% 50% at 92% 112%, rgb(101 202 73 / 0.14), transparent 70%);
}

/* The plate */
body[data-game="lyamur"] :is(.detail-card, .update-list li, .ug-next li, .lab-related-link) {
  border: 1px solid color-mix(in srgb, var(--ug-line) 90%, transparent);
  border-radius: var(--lm-r);
  background: var(--lm-fringe), var(--lm-glow), var(--lm-fill);
  box-shadow: inset 0 1px 0 var(--lm-edge), inset 0 -2px 0 var(--lm-edge-lo), 0 8px 18px rgb(0 0 0 / 0.2);
}

.ug-steps li,
.ug-features .detail-card,
.ug-faq .detail-card,
.ug-next li,
.ug-facts .game-page-facts > div,
.ug-shot {
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

body[data-game="lyamur"] .btn:active {
  transform: translateY(1px) scale(0.98);
}

/* Section wrapper: no box, a vine with leaves on top, and the heading on the world with a halo */
body[data-game="lyamur"] .game-page-section.soft-card {
  position: relative;
  padding-inline: 0;
  padding-top: clamp(30px, 4vw, 44px);
  border-color: transparent;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body[data-game="lyamur"] .game-page-section.soft-card:not(.ug-vote)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 6px 3px at 10px 3px, var(--lm-moss-1) 0 98%, transparent 100%) 0 0 / 52px 14px repeat-x,
    radial-gradient(ellipse 6px 3px at 36px 11px, var(--lm-moss-2) 0 98%, transparent 100%) 0 0 / 52px 14px repeat-x,
    linear-gradient(var(--lm-moss-2), var(--lm-moss-2)) 0 6px / 100% 2px no-repeat;
}

body[data-game="lyamur"] .game-page-section h2,
body[data-game="lyamur"] .lab-related-title {
  text-shadow: 0 0 20px color-mix(in srgb, var(--ug-bg) 92%, transparent), 0 0 6px color-mix(in srgb, var(--ug-bg) 78%, transparent);
}

/* Three marbles under every heading: red, blue, yellow, the colors of the chain */
body[data-game="lyamur"] .game-page-section h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 14px;
  margin-top: 12px;
  background:
    radial-gradient(circle at 4px 4px, rgb(255 255 255 / 0.9) 0 1px, transparent 2.4px),
    radial-gradient(circle at 5px 6px, var(--lm-red-2), var(--lm-red-3) 6px, transparent 6.6px),
    radial-gradient(circle at 24px 4px, rgb(255 255 255 / 0.9) 0 1px, transparent 2.4px),
    radial-gradient(circle at 25px 6px, var(--lm-blue-2), var(--lm-blue-3) 6px, transparent 6.6px),
    radial-gradient(circle at 44px 4px, rgb(255 255 255 / 0.9) 0 1px, transparent 2.4px),
    radial-gradient(circle at 45px 6px, var(--lm-yel-2), var(--lm-yel-3) 6px, transparent 6.6px);
  background-repeat: no-repeat;
}

body[data-game="lyamur"] :is(.ug-lede, .ug-vote .ug-lede) {
  color: color-mix(in srgb, var(--ug-ink) 92%, var(--ug-muted));
  text-shadow: 0 0 12px color-mix(in srgb, var(--ug-bg) 88%, transparent);
}

/* Eyebrow: a leaf tag with the yellow marble */
body[data-game="lyamur"] .eyebrow {
  border-radius: 14px 4px 14px 4px;
  background: linear-gradient(180deg, var(--lm-plate), var(--lm-plate-2));
}

body[data-game="lyamur"] .eyebrow::before {
  background:
    radial-gradient(circle at 33% 28%, rgb(255 255 255 / 0.9) 0 10%, transparent 24%),
    radial-gradient(circle at 38% 34%, var(--lm-yel-1), var(--lm-yel-2) 55%, var(--lm-yel-3));
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
}

/* Hero note: a small leaf plate with a moss edge */
body[data-game="lyamur"] .ug-status-note {
  border: 1px solid color-mix(in srgb, var(--ug-line) 90%, transparent);
  border-inline-start-width: 1px;
  border-radius: var(--lm-r-s);
  background: var(--lm-fringe-s), var(--lm-glow), var(--lm-fill);
  box-shadow: inset 0 1px 0 var(--lm-edge), inset 0 -2px 0 var(--lm-edge-lo);
  padding-top: 18px;
}

/* Facts: pebbles with a marble in the corner */
body[data-game="lyamur"] .ug-facts .game-page-facts > div {
  position: relative;
  padding-top: 20px;
  border: 1px solid color-mix(in srgb, var(--ug-line) 90%, transparent);
  border-radius: var(--lm-r-s);
  background: var(--lm-fringe-s), var(--lm-fill);
  box-shadow: inset 0 1px 0 var(--lm-edge), inset 0 -2px 0 var(--lm-edge-lo), 0 8px 18px rgb(0 0 0 / 0.2);
}

.ug-facts .game-page-facts > div::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgb(255 255 255 / 0.92) 0 8%, transparent 20%),
    radial-gradient(circle at 38% 34%, var(--c1), var(--c2) 55%, var(--c3));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

.ug-facts .game-page-facts > div:nth-child(3n+1) { --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.ug-facts .game-page-facts > div:nth-child(3n+2) { --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.ug-facts .game-page-facts > div:nth-child(3n+3) { --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }

.ug-facts .game-page-facts > div:hover {
  transform: translateY(-2px);
  border-color: var(--ug-accent);
}

/* Steps: a groove along the card bottom; the marble rolls to the far end on hover or focus. */
.ug-steps li {
  position: relative;
  container-type: inline-size;
  padding-bottom: 46px;
}

.ug-steps li::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ug-ink) 16%, transparent);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35);
}

.ug-steps li::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgb(255 255 255 / 0.92) 0 8%, transparent 20%),
    radial-gradient(circle at 38% 34%, var(--c1), var(--c2) 55%, var(--c3));
  box-shadow: 0 2px 3px rgb(0 0 0 / 0.35);
  transition: translate 0.9s var(--ease), rotate 0.9s var(--ease);
}

.ug-steps li:nth-child(3n+1), .ug-features .detail-card:nth-child(3n+1), .ug-next li:nth-child(3n+1) { --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.ug-steps li:nth-child(3n+2), .ug-features .detail-card:nth-child(3n+2), .ug-next li:nth-child(3n+2) { --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.ug-steps li:nth-child(3n+3), .ug-features .detail-card:nth-child(3n+3), .ug-next li:nth-child(3n+3) { --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }

.ug-steps li:hover,
.ug-steps li:focus-within {
  transform: translateY(-4px);
  border-color: var(--ug-accent);
  box-shadow: inset 0 1px 0 var(--lm-edge), inset 0 -2px 0 var(--lm-edge-lo), 0 16px 32px var(--ug-shadow);
}

.ug-steps li:hover::after,
.ug-steps li:focus-within::after {
  translate: calc(100cqw - 50px) 0;
  rotate: 720deg;
}

/* Features: a marble badge in the corner */
.ug-features .detail-card {
  position: relative;
  padding-top: 26px;
}

.ug-features .detail-card h3 {
  padding-right: 34px;
}

.ug-features .detail-card::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgb(255 255 255 / 0.92) 0 8%, transparent 20%),
    radial-gradient(circle at 38% 34%, var(--c1), var(--c2) 55%, var(--c3));
  box-shadow: 0 2px 3px rgb(0 0 0 / 0.35);
  transition: translate 0.28s var(--ease), scale 0.28s var(--ease);
}

.ug-features .detail-card:hover,
.ug-faq .detail-card:hover {
  transform: translateY(-3px);
  border-color: var(--ug-accent);
  box-shadow: inset 0 1px 0 var(--lm-edge), inset 0 -2px 0 var(--lm-edge-lo), 0 14px 28px var(--ug-shadow);
}

.ug-features .detail-card:hover::after {
  translate: 0 -3px;
  scale: 1.15;
}

/* FAQ: speech leaves. A small tail at the bottom corner, as if the lemur king answers. */
.ug-faq .detail-card {
  position: relative;
  padding-top: 26px;
}

.ug-faq .detail-card::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -9px;
  width: 20px;
  height: 11px;
  background: color-mix(in srgb, var(--ug-card) 90%, transparent);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Next: marbles instead of diamonds */
.ug-next li {
  position: relative;
  padding-top: 20px;
}

.ug-next li::before {
  top: 1.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgb(255 255 255 / 0.92) 0 8%, transparent 20%),
    radial-gradient(circle at 38% 34%, var(--c1), var(--c2) 55%, var(--c3));
  box-shadow: 0 2px 3px rgb(0 0 0 / 0.35);
  transform: none;
}

.ug-next li:hover {
  transform: translateX(3px);
  border-color: var(--ug-accent);
}

/* Gallery: art in a gold-studded frame (the crown beads) on a soft clearing-green spot */
body[data-game="lyamur"] .ug-shot {
  position: relative;
  border: 2px solid color-mix(in srgb, var(--ug-accent) 55%, var(--ug-line));
  border-radius: var(--lm-r);
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--ug-accent-2) 30%, transparent), transparent 66%),
    var(--ug-card-2);
}

body[data-game="lyamur"] .ug-shot figcaption {
  padding-inline: 30px;
}

.ug-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 14px 14px, #fff4c8 0 1.4px, #f2b92a 2.4px 5px, #8a5a06 5.6px 6.2px, transparent 6.8px),
    radial-gradient(circle at calc(100% - 14px) 14px, #fff4c8 0 1.4px, #f2b92a 2.4px 5px, #8a5a06 5.6px 6.2px, transparent 6.8px),
    radial-gradient(circle at 14px calc(100% - 14px), #fff4c8 0 1.4px, #f2b92a 2.4px 5px, #8a5a06 5.6px 6.2px, transparent 6.8px),
    radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), #fff4c8 0 1.4px, #f2b92a 2.4px 5px, #8a5a06 5.6px 6.2px, transparent 6.8px);
}

.ug-shot img {
  transition: transform 0.4s var(--ease);
}

.ug-shot:hover {
  transform: translateY(-3px);
  border-color: var(--ug-accent);
}

.ug-shot:hover img {
  transform: scale(1.03);
}

/* Vote: a tablet with a crown band (gold, jewels and beads) on top; a swirl marble rolls back and forth along a groove under it */
body[data-game="lyamur"] .game-page-section.ug-vote {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  padding: clamp(44px, 5vw, 56px) clamp(24px, 4vw, 38px) calc(clamp(24px, 4vw, 38px) + 24px);
  border: 1px solid color-mix(in srgb, var(--ug-line) 90%, transparent);
  border-radius: var(--lm-r);
  background:
    radial-gradient(circle at 18% 8px, #ff7a6a 0 3.4px, #a81c16 4.2px 5px, transparent 5.6px),
    radial-gradient(circle at 50% 8px, #7dea72 0 3.8px, #1d7418 4.6px 5.4px, transparent 6px),
    radial-gradient(circle at 82% 8px, #ff7a6a 0 3.4px, #a81c16 4.2px 5px, transparent 5.6px),
    radial-gradient(circle at 50% 50%, #fff4c8 0 1.6px, transparent 2.2px) 0 0 / 26px 16px repeat-x,
    linear-gradient(180deg, #ffe7a0, #e9a008 55%, #b87a06) 0 0 / 100% 16px no-repeat,
    var(--lm-glow),
    var(--lm-fill);
  box-shadow: inset 0 -2px 0 var(--lm-edge-lo), 0 14px 30px rgb(0 0 0 / 0.26);
}

.ug-vote::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 18px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ug-ink) 16%, transparent);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35);
}

.ug-vote::before {
  content: "";
  position: absolute;
  left: 22px;
  bottom: 12px;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgb(255 255 255 / 0.85) 0 8%, transparent 20%),
    conic-gradient(var(--lm-red-2), var(--lm-yel-2), var(--lm-blue-2), var(--lm-red-2));
  box-shadow: 0 2px 3px rgb(0 0 0 / 0.35);
}

body[data-game="lyamur"] .lab-related-all {
  background: var(--lm-plate);
}

/* Buttons: leaf-cornered; the primary one is a glossy gold marble */
body[data-game="lyamur"] .btn,
body[data-game="lyamur"].game-detail-page .btn:focus-visible {
  border-radius: 20px 7px 20px 7px;
}

body[data-game="lyamur"] .btn-primary {
  background: radial-gradient(ellipse 60% 70% at 24% 18%, rgb(255 255 255 / 0.38), transparent 70%), linear-gradient(135deg, var(--ug-fill), var(--ug-fill-2));
  box-shadow: inset 0 -4px 0 rgb(0 0 0 / 0.2), 0 10px 22px rgb(233 160 8 / 0.26);
}

body[data-game="lyamur"] .btn-ghost {
  background: var(--lm-plate);
}

/* Scroll reveal for the steps: movement only, so the text stays fully readable while it settles. */
@media (prefers-reduced-motion: no-preference) {
  .ug-vote::before { animation: lmVoteRoll 11s ease-in-out infinite alternate; }

  @supports (animation-timeline: view()) {
    .ug-steps li {
      animation: lmStepIn linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 58%;
    }

    .ug-steps li:nth-child(2) { animation-range: entry 10% entry 64%; }
    .ug-steps li:nth-child(3) { animation-range: entry 16% entry 70%; }
  }
}

@keyframes lmVoteRoll {
  from { translate: 0 0; rotate: 0deg; }
  to { translate: calc(100cqw - 78px) 0; rotate: 1080deg; }
}

@keyframes lmStepIn {
  from { translate: 0 22px; }
  to { translate: 0 0; }
}

/* A paused page keeps everything at its resting pose */
body.animations-paused .ug-steps li {
  animation: none;
}

/* Hero copy sits directly on the world: a soft halo keeps it readable */
body[data-game="lyamur"] :is(.ug-hero-copy h1, .ug-tagline, .ug-hero-copy .hero-copy, .ug-genre) {
  text-shadow: 0 0 16px color-mix(in srgb, var(--ug-bg) 88%, transparent), 0 1px 3px color-mix(in srgb, var(--ug-bg) 60%, transparent);
}

/* ---- Page-wide jungle world. Fixed behind every section (z-index -1), back to front:
   the clearing from the board art (a slow drift), dappled leaf shadows that slide across it, two swaying canopy layers cut from the board art,
   one clock-driven group in front of them (a marble chain rolling along each page edge, glowing orbs and pollen rising, leaves
   falling, two butterflies, the lemur king's tail swaying at the bottom corner), a text scrim and light shafts.
   One registered number (--lwt, 0 to 1 over 60 s) drives every continuous motion in the clock group, so marbles, orbs, leaves,
   butterflies and tail add a single infinite animation. Every motion uses a whole number of cycles per loop, so the loop has no seam.
   Without motion the clock stays at 0: a finished still. ---- */
/* Page-wide jungle world: independent GPU transform/opacity animations per element (no inherited clock or filter blur). */

/* main becomes the stacking context, so the world (z-index -1) paints above the page background and below the sections */
body[data-game="lyamur"] .game-detail-shell {
  position: relative;
  z-index: 0;
}

/* the related-worlds row sits outside main; lift it above main's stacking context so the world never covers it */
body[data-game="lyamur"] .lab-related {
  position: relative;
  z-index: 1;
}

body[data-game="lyamur"][data-theme="dark"] {
  --lm-floor-dim: rgb(3 18 4 / 0.42);
  --lm-dapple: rgb(3 22 5 / 0.46);
  --lm-orb-op: 1;
}

body[data-game="lyamur"][data-theme="light"] {
  --lm-floor-dim: rgb(236 248 228 / 0.2);
  --lm-dapple: rgb(36 96 30 / 0.26);
  --lm-orb-op: 0.85;
}

.lm-world {
  --lm-d: clamp(22px, 3.6vh, 34px);
  --lm-L: calc(100vh + 2 * var(--lm-d));
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  contain: layout paint;
  pointer-events: none;
}

.lm-world > * {
  position: absolute;
}

.lm-w-floor {
  inset: -4%;
  background: linear-gradient(var(--lm-floor-dim), var(--lm-floor-dim)), url("../assets/upcoming/lyamur/hero-1280.webp") center / cover no-repeat;
}

/* Dappled shade: soft shadows in a tile that repeats sideways; the layer slides by exactly one tile, so the loop has no seam */
.lm-w-shade {
  top: 0;
  left: 0;
  width: 200vw;
  height: 100%;
  background:
    radial-gradient(ellipse 11vw 12vh at 8vw 18vh, var(--lm-dapple), transparent 72%),
    radial-gradient(ellipse 8vw 9vh at 31vw 56vh, var(--lm-dapple), transparent 72%),
    radial-gradient(ellipse 13vw 10vh at 52vw 12vh, var(--lm-dapple), transparent 72%),
    radial-gradient(ellipse 9vw 13vh at 71vw 70vh, var(--lm-dapple), transparent 72%),
    radial-gradient(ellipse 12vw 9vh at 88vw 38vh, var(--lm-dapple), transparent 72%),
    radial-gradient(ellipse 7vw 8vh at 43vw 88vh, var(--lm-dapple), transparent 72%),
    radial-gradient(ellipse 10vw 7vh at 94vw 90vh, var(--lm-dapple), transparent 72%);
  background-size: 100vw 100%;
  background-repeat: repeat-x;
}

/* ---- The clock group ---- */
.lm-w-clock {
  inset: 0;
}

.lm-w-clock > * {
  position: absolute;
}

/* The lemur king's tail, cut from his portrait, swaying up from the bottom corner */
.lm-w-tail {
  --tw: clamp(104px, 11vw, 176px);
  left: clamp(6px, 3vw, 64px);
  bottom: calc(var(--tw) * -0.34);
  width: var(--tw);
  height: calc(var(--tw) * 1.31);
  background: url("../assets/upcoming/lyamur/gallery-lemur-king.webp") 0 calc(var(--tw) * -1.0345) / calc(var(--tw) * 2.2069) auto no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent 96%), linear-gradient(180deg, #000 82%, transparent);
  mask-image: linear-gradient(90deg, #000 78%, transparent 96%), linear-gradient(180deg, #000 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  transform-origin: 88% 92%;
  transform: rotate(-3deg);
}

/* A marble chain rolls along each page edge: down on the left, up on the right, weaving like the track on the board */
.lm-w-track {
  top: 0;
  bottom: 0;
  width: calc(2 * var(--lm-d));
}

.lm-w-track--l { left: clamp(-4px, 1.4vw, 28px); }
.lm-w-track--r { right: clamp(-4px, 1.4vw, 28px); }

.lm-w-track i {
  --f: 0;
  position: absolute;
  left: calc(50% - var(--lm-d) / 2);
  top: 0;
  width: var(--lm-d);
  height: var(--lm-d);
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgb(255 255 255 / 0.95) 0 7%, transparent 17%),
    radial-gradient(circle at 38% 34%, var(--c1), var(--c2) 52%, var(--c3) 100%);
  box-shadow: 0 3px 5px rgb(10 8 0 / 0.4), inset -2px -3px 5px rgb(0 0 0 / 0.26);
}

.lm-w-track--l i {
  transform: translate3d(calc(sin(calc(var(--f) * 360deg * 3)) * 0.42 * var(--lm-d)), calc(var(--f) * var(--lm-L) - var(--lm-d)), 0);
}

.lm-w-track--r i {
  transform: translate3d(calc(sin(calc(var(--f) * 360deg * 3)) * -0.42 * var(--lm-d)), calc((1 - var(--f)) * var(--lm-L) - var(--lm-d)), 0);
}

.lm-w-track i:nth-child(1) { --f: 0.000; --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.lm-w-track i:nth-child(2) { --f: 0.034; --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.lm-w-track i:nth-child(3) { --f: 0.068; --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.lm-w-track i:nth-child(4) { --f: 0.102; --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }
.lm-w-track i:nth-child(5) { --f: 0.136; --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.lm-w-track i:nth-child(6) { --f: 0.306; --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }
.lm-w-track i:nth-child(7) { --f: 0.340; --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.lm-w-track i:nth-child(8) { --f: 0.374; --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.lm-w-track i:nth-child(9) { --f: 0.510; --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }
.lm-w-track i:nth-child(10) { --f: 0.646; --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.lm-w-track i:nth-child(11) { --f: 0.680; --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }
.lm-w-track i:nth-child(12) { --f: 0.714; --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.lm-w-track i:nth-child(13) { --f: 0.748; --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }

/* Orbs: soft glowing nodes rising independently on the GPU (no filter blur). */
.lm-w-orbs i {
  --x: 50;
  --sz: 20px;
  --o: 0;
  --a: 0.5;
  position: absolute;
  left: calc(var(--x) * 1vw);
  top: 0;
  width: var(--sz);
  height: var(--sz);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, rgb(255 255 255 / 0.85) 0 10%, transparent 24%),
    radial-gradient(circle at 42% 40%, var(--c1) 0 26%, var(--c2) 58%, transparent 78%);
  opacity: calc(var(--a) * var(--lm-orb-op));
  transform: translate3d(0, calc(100vh - var(--o) * 90vh), 0);
}

.lm-w-orbs i:nth-child(n+4) {
  opacity: calc(var(--a) * var(--lm-orb-op) * 0.55);
}

.lm-w-orbs i:nth-child(n+10) {
  background: radial-gradient(circle, var(--c1) 0 32%, var(--c2) 64%, transparent 100%);
}

.lm-w-orbs i:nth-child(1) { --x: 6; --sz: 46px; --k: 1; --o: 0.1; --a: 0.34; --bl: 2.2px; --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.lm-w-orbs i:nth-child(2) { --x: 88; --sz: 52px; --k: 1; --o: 0.55; --a: 0.3; --bl: 2.4px; --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.lm-w-orbs i:nth-child(3) { --x: 46; --sz: 38px; --k: 1; --o: 0.82; --a: 0.28; --bl: 2.0px; --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }
.lm-w-orbs i:nth-child(4) { --x: 70; --sz: 34px; --k: 1; --o: 0.33; --a: 0.3; --bl: 1.8px; --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.lm-w-orbs i:nth-child(5) { --x: 22; --sz: 24px; --k: 2; --o: 0.2; --a: 0.55; --bl: 0px; --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.lm-w-orbs i:nth-child(6) { --x: 34; --sz: 18px; --k: 2; --o: 0.7; --a: 0.6; --bl: 0px; --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }
.lm-w-orbs i:nth-child(7) { --x: 58; --sz: 26px; --k: 2; --o: 0.45; --a: 0.5; --bl: 0px; --c1: var(--lm-red-1); --c2: var(--lm-red-2); --c3: var(--lm-red-3); }
.lm-w-orbs i:nth-child(8) { --x: 80; --sz: 20px; --k: 2; --o: 0.92; --a: 0.55; --bl: 0px; --c1: var(--lm-blue-1); --c2: var(--lm-blue-2); --c3: var(--lm-blue-3); }
.lm-w-orbs i:nth-child(9) { --x: 12; --sz: 16px; --k: 2; --o: 0.62; --a: 0.6; --bl: 0px; --c1: var(--lm-yel-1); --c2: var(--lm-yel-2); --c3: var(--lm-yel-3); }
.lm-w-orbs i:nth-child(10) { --x: 28; --sz: 5px; --k: 3; --o: 0.15; --a: 0.9; --bl: 0px; --c1: #fffbe0; --c2: #ffe680; --c3: #ffd24a; }
.lm-w-orbs i:nth-child(11) { --x: 52; --sz: 4px; --k: 3; --o: 0.48; --a: 0.9; --bl: 0px; --c1: #fffbe0; --c2: #ffe680; --c3: #ffd24a; }
.lm-w-orbs i:nth-child(12) { --x: 66; --sz: 6px; --k: 3; --o: 0.77; --a: 0.9; --bl: 0px; --c1: #fffbe0; --c2: #ffe680; --c3: #ffd24a; }
.lm-w-orbs i:nth-child(13) { --x: 92; --sz: 4px; --k: 3; --o: 0.3; --a: 0.9; --bl: 0px; --c1: #fffbe0; --c2: #ffe680; --c3: #ffd24a; }
.lm-w-orbs i:nth-child(14) { --x: 40; --sz: 5px; --k: 3; --o: 0.95; --a: 0.9; --bl: 0px; --c1: #fffbe0; --c2: #ffe680; --c3: #ffd24a; }

/* Leaves tumble down on a slow sway */
.lm-w-leaves i {
  --x: 20;
  --o: 0;
  --sc: 1;
  position: absolute;
  left: calc(var(--x) * 1vw);
  top: 0;
  width: calc(24px * var(--sc, 1));
  height: calc(13px * var(--sc, 1));
  border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg, var(--lf1, #a4e06b), var(--lf2, #2f7a1f));
  box-shadow: inset 0 0 0 1px rgb(20 70 10 / 0.35);
  opacity: 0.75;
  transform: translate3d(0, calc(12vh + var(--o) * 78vh), 0) rotate(calc(var(--o) * 280deg));
}

.lm-w-leaves i:nth-child(3n+2) { --lf1: #d6f08a; --lf2: #5aa328; }
.lm-w-leaves i:nth-child(3n+3) { --lf1: #f2b84a; --lf2: #b8651a; }

.lm-w-leaves i:nth-child(1) { --x: 8; --o: 0.05; --sc: 1.0; }
.lm-w-leaves i:nth-child(2) { --x: 30; --o: 0.4; --sc: 0.8; }
.lm-w-leaves i:nth-child(3) { --x: 52; --o: 0.15; --sc: 1.1; }
.lm-w-leaves i:nth-child(4) { --x: 70; --o: 0.72; --sc: 0.9; }
.lm-w-leaves i:nth-child(5) { --x: 86; --o: 0.6; --sc: 1.2; }
.lm-w-leaves i:nth-child(6) { --x: 18; --o: 0.88; --sc: 0.85; }

/* Butterflies: a slow loop across the clearing, wings that flap about the body */
.lm-w-fly {
  left: 0;
  top: 0;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: #2a1a0a;
  transform: translate3d(18vw, 34vh, 0) rotate(14deg);
}

.lm-w-fly--b {
  transform: translate3d(84vw, 62vh, 0) rotate(-18deg);
  --w1: #6fb7ff;
  --w2: #2a5fd0;
}

.lm-w-fly::before,
.lm-w-fly::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 22px;
  height: 24px;
  background: radial-gradient(ellipse at 30% 40%, var(--w1, #ffcf5a), var(--w2, #e8741a) 70%);
}

.lm-w-fly::before {
  right: 1px;
  border-radius: 80% 20% 60% 40%;
  transform-origin: 100% 50%;
}

.lm-w-fly::after {
  left: 1px;
  border-radius: 20% 80% 40% 60%;
  transform-origin: 0 50%;
}

/* Foliage cut from the board art; it sways at the page edges */
.lm-w-canopy {
  inset: -6%;
  background: url("../assets/upcoming/lyamur/hero-1280.webp") center / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 46% 42% at 50% 50%, transparent 40%, #000 92%);
  mask-image: radial-gradient(ellipse 46% 42% at 50% 50%, transparent 40%, #000 92%);
}

.lm-w-canopy--a {
  transform-origin: 50% 0;
  scale: 1.06;
  opacity: 0.9;
}

.lm-w-canopy--b {
  transform-origin: 50% 100%;
  scale: -1.32 1.32;
  opacity: 0.6;
}

.lm-w-veil {
  inset: 0;
}

.lm-w-shafts {
  inset: -20% -12%;
  background: linear-gradient(112deg, transparent 20%, rgb(255 246 190 / 0.17) 28%, transparent 38%, transparent 50%, rgb(255 246 190 / 0.13) 58%, transparent 68%, transparent 80%, rgb(255 246 190 / 0.11) 86%, transparent 94%);
}

body[data-game="lyamur"][data-theme="dark"] .lm-w-veil {
  background:
    radial-gradient(ellipse 52% 60% at 27% 52%, rgb(4 14 3 / 0.8), rgb(4 14 3 / 0.58) 58%, transparent 100%),
    radial-gradient(ellipse 80% 72% at 50% 45%, rgb(7 22 6 / 0.4) 0, rgb(7 22 6 / 0.3) 55%, rgb(5 16 5 / 0.1) 100%),
    linear-gradient(180deg, rgb(8 26 7 / 0.25), transparent 30%, rgb(3 10 3 / 0.3));
}

body[data-game="lyamur"][data-theme="light"] .lm-w-veil {
  background:
    radial-gradient(ellipse 52% 60% at 27% 52%, rgb(246 253 241 / 0.88), rgb(244 252 238 / 0.62) 58%, transparent 100%),
    radial-gradient(ellipse 80% 72% at 50% 45%, rgb(240 251 234 / 0.4) 0, rgb(236 248 228 / 0.3) 55%, rgb(226 244 214 / 0.1) 100%),
    linear-gradient(180deg, rgb(250 255 246 / 0.25), transparent 30%, rgb(214 238 200 / 0.25));
}

body[data-game="lyamur"][data-theme="light"] .lm-w-shafts {
  opacity: 0.55;
}

@media (max-width: 920px) {
  body[data-game="lyamur"][data-theme="dark"] .lm-w-veil {
    background:
      linear-gradient(180deg, rgb(4 14 3 / 0.82), rgb(4 14 3 / 0.62) 70%, rgb(4 14 3 / 0.46)),
      radial-gradient(ellipse 80% 72% at 50% 45%, rgb(7 22 6 / 0.4) 0, rgb(7 22 6 / 0.3) 55%, rgb(5 16 5 / 0.1) 100%);
  }

  body[data-game="lyamur"][data-theme="light"] .lm-w-veil {
    background:
      linear-gradient(180deg, rgb(246 253 241 / 0.88), rgb(244 252 238 / 0.68) 70%, rgb(240 250 234 / 0.48)),
      radial-gradient(ellipse 80% 72% at 50% 45%, rgb(240 251 234 / 0.4) 0, rgb(236 248 228 / 0.3) 55%, rgb(226 244 214 / 0.1) 100%);
  }
}

/* Phones: the small board art, no edge chains, no big orbs, three leaves, no butterfly, no foliage frame, no light shafts */
@media (max-width: 760px) {
  .lm-w-floor {
    background-image: linear-gradient(var(--lm-floor-dim), var(--lm-floor-dim)), url("../assets/upcoming/lyamur/hero-720.webp");
  }

  .lm-w-canopy,
  .lm-w-shafts,
  .lm-w-track,
  .lm-w-fly,
  .lm-w-tail,
  .lm-w-leaves i:nth-child(n+4),
  .lm-w-orbs i:nth-child(-n+4),
  .lm-w-orbs i:nth-child(n+13) {
    display: none;
  }

  .lm-w-track,
  .lm-w-fly,
  .lm-w-fly::before,
  .lm-w-fly::after,
  .lm-w-tail {
    animation: none !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .lm-w-floor { animation: lmFloor 70s ease-in-out infinite alternate; }
  .lm-w-shade { animation: lmShade 60s linear infinite; }
  .lm-w-canopy--a { animation: lmCanopyA 11s ease-in-out infinite; }
  .lm-w-tail { animation: lmTail 8s ease-in-out infinite alternate; }
  .lm-w-track--l { animation: lmTrackBob 9s ease-in-out infinite alternate; }
  .lm-w-track--r { animation: lmTrackBob 9s ease-in-out -4.5s infinite alternate; }
  .lm-w-fly--a { animation: lmFlyLoop 26s ease-in-out infinite alternate; }
  .lm-w-fly--a::before,
  .lm-w-fly--a::after { animation: lmWingFlap 0.42s ease-in-out infinite alternate; }
  .lm-w-leaves i:nth-child(1) { animation: lmLeafFall 24s linear -4s infinite; }
  .lm-w-leaves i:nth-child(2) { animation: lmLeafFall 28s linear -12s infinite; }
  .lm-w-leaves i:nth-child(3) { animation: lmLeafFall 21s linear -17s infinite; }
  .lm-w-orbs i:nth-child(1) { animation: lmOrbRise 26s linear -6s infinite; }
  .lm-w-orbs i:nth-child(2) { animation: lmOrbRise 30s linear -18s infinite; }
  .lm-w-orbs i:nth-child(3) { animation: lmOrbRise 22s linear -11s infinite; }
}

@media (prefers-reduced-motion: reduce) {
  .lm-world,
  .lm-world *,
  .lm-world *::before,
  .lm-world *::after {
    animation: none !important;
  }
}

@keyframes lmTail {
  from { transform: rotate(-4deg); }
  to { transform: rotate(4deg); }
}

@keyframes lmTrackBob {
  from { transform: translate3d(0, -14px, 0); }
  to { transform: translate3d(0, 14px, 0); }
}

@keyframes lmFlyLoop {
  0% { transform: translate3d(14vw, 32vh, 0) rotate(14deg); }
  25% { transform: translate3d(42vw, 20vh, 0) rotate(8deg); }
  50% { transform: translate3d(84vw, 38vh, 0) rotate(-14deg); }
  75% { transform: translate3d(52vw, 58vh, 0) rotate(-8deg); }
  100% { transform: translate3d(14vw, 32vh, 0) rotate(14deg); }
}

@keyframes lmWingFlap {
  from { transform: scaleX(0.28); }
  to { transform: scaleX(1); }
}

@keyframes lmLeafFall {
  0% { opacity: 0; transform: translate3d(-4vw, -24px, 0) rotate(0deg); }
  10%, 88% { opacity: 0.88; }
  50% { transform: translate3d(5vw, 52vh, 0) rotate(320deg); }
  100% { opacity: 0; transform: translate3d(-3vw, 106vh, 0) rotate(680deg); }
}

@keyframes lmOrbRise {
  0% { opacity: 0; transform: translate3d(0, 105vh, 0); }
  12%, 85% { opacity: calc(var(--a, 0.4) * var(--lm-orb-op)); }
  50% { transform: translate3d(2vw, 48vh, 0); }
  100% { opacity: 0; transform: translate3d(-1.5vw, -60px, 0); }
}

@keyframes lmFloor {
  from { scale: 1.02; translate: 0.8vw 0.5vh; }
  to { scale: 1.1; translate: -1.2vw -0.8vh; }
}

@keyframes lmShade {
  from { translate: 0 0; }
  to { translate: -100vw 0; }
}

@keyframes lmCanopyA {
  0%, 100% { rotate: -0.6deg; translate: 0 0; }
  50% { rotate: 0.7deg; translate: 0.6vw 0.4vh; }
}

@keyframes lmCanopyB {
  0%, 100% { rotate: 0.7deg; translate: 0 0.3vh; }
  50% { rotate: -0.8deg; translate: -0.7vw 0; }
}

@keyframes lmShafts {
  from { opacity: 0.55; translate: -4vw 0; }
  to { opacity: 1; translate: 4vw 0; }
}
