/* Small, readable pixel stages; each game owns its movement and reveal. */
.adventure-board.has-adventure-visual { gap: 13px; grid-template-columns: minmax(0, 1fr); }
.game-stage:has(> .has-adventure-visual) { min-height: 455px; }
.has-adventure-visual .adventure-scene { width: 100%; grid-template-columns: 38px minmax(0, 1fr); padding: 7px 0 9px; gap: 10px; border-top: 0; background: transparent; }
.has-adventure-visual .adventure-sigil { width: 34px; height: 34px; box-shadow: none; border: 0; background: transparent; }
.has-adventure-visual .adventure-sigil svg { width: 22px; height: 22px; }
.has-adventure-visual .adventure-scene b { font-size: 16px; }
.has-adventure-visual .adventure-scene small { margin-top: 3px; color: #b4a891; }
.has-adventure-visual .adventure-choices button { min-height: 92px; }
.has-adventure-visual.is-playing .adventure-sigil { animation: none; }
.adv-visual { --scene-progress: 0; position: relative; width: 100%; height: 176px; isolation: isolate; container-type: inline-size; overflow: hidden; pointer-events: none; border-bottom: 1px solid #4b3c25; background: radial-gradient(ellipse at 50% 100%, #292116 0, #131516 48%, #0b0d0f 86%); }
.adv-visual::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 21px; height: 1px; background: linear-gradient(90deg, transparent, #5d4b31 20%, #5d4b31 80%, transparent); }
.adv-visual .adv-art { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; user-select: none; }
.adv-visual > span, .adv-visual span > span { position: absolute; display: block; }
.adv-name { position: absolute; display: block; left: 50%; bottom: -18px; width: max-content; max-width: 110px; transform: translateX(-50%); color: #bcb095; font-size: 10px; line-height: 15px; text-align: center; white-space: nowrap; }
.adv-visual .is-outcome > .adv-name, .adv-visual .is-outcome .adv-name { color: #ffdb78; }
.adv-visual .is-picked > .adv-name { text-decoration: underline; text-decoration-color: #85baff; text-underline-offset: 4px; }
.adv-visual .is-unpicked { opacity: .3; }
.adv-visual.is-stopped *, .adv-visual.is-stopped *::before, .adv-visual.is-stopped *::after { animation-play-state: paused !important; }
.adv-visual.is-offscreen *, .adv-visual.is-offscreen *::before, .adv-visual.is-offscreen *::after,
.adv-visual.is-document-hidden *, .adv-visual.is-document-hidden *::before, .adv-visual.is-document-hidden *::after { animation-play-state: paused !important; }
.adv-visual.is-settling *, .adv-visual.is-stopped * { transition: none !important; }
.adv-torch { width: 36px; height: 64px; bottom: 41px; opacity: .7; }
.adv-torch-left { left: 7%; }.adv-torch-right { right: 7%; }

/* Maze: a warrior actually follows the branching stone passage. */
.adv-redmoon-maze { background: radial-gradient(ellipse at 74% 60%, #281b1c, #0d1012 72%); }
.adv-maze-path { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #554638; stroke-width: 13; stroke-linejoin: bevel; }
.adv-maze-path path { vector-effect: non-scaling-stroke; }
.adv-maze-path path:first-child { stroke: #75634a; }
.adv-maze-entry { left: 1%; top: 48px; width: 37px; height: 64px; opacity: .65; }
.adv-maze-exit { left: var(--exit-x); top: var(--exit-y); width: 45px; height: 44px; transform: translateX(-50%); transition: opacity 350ms; }
.adv-maze-exit .adv-art { position: relative; z-index: 1; }
.adv-maze-exit .adv-name { bottom: -12px; }
.adv-door-light { z-index: -1; inset: 10% 25%; background: #fbd879; opacity: 0; box-shadow: 0 2px 20px #dda654; transform: scaleX(.1); }
.adv-maze-runner { z-index: 3; left: 8%; top: 66px; width: 46px; height: 53px; margin-left: -23px; transition: transform 850ms cubic-bezier(.16, 1, .3, 1); }
.adv-maze-key { left: 45%; top: 86px; width: 22px; height: 22px; opacity: .65; }
.adv-redmoon-maze.is-running .adv-maze-runner { transform: translate(var(--maze-travel-x, 0cqw), var(--maze-travel-y, 0px)); transition: none; }
.adv-redmoon-maze.is-running .adv-maze-runner > .adv-art { animation: adv-march 270ms ease-in-out infinite alternate; }
.adv-redmoon-maze.is-running .adv-maze-key { animation: adv-small-glimmer 1s ease-in-out infinite alternate; }
.adv-redmoon-maze.is-revealed .adv-maze-runner { transform: translate(var(--maze-final-x), var(--maze-final-y)); }
.adv-redmoon-maze.is-revealed .is-outcome .adv-art { transform: perspective(120px) rotateY(-48deg); transform-origin: left; transition: transform 500ms 180ms ease; }
.adv-redmoon-maze.is-revealed .is-outcome .adv-door-light { opacity: .9; transform: scaleX(1); transition: transform 650ms, opacity 450ms; }
.adv-redmoon-maze.is-revealed .adv-maze-key { opacity: 0; }

/* Corpse King: blows land in the gap between two full character sprites. */
.adv-corpse-book { --duel-travel: 104px; background: radial-gradient(ellipse at 62% 80%, #213235, #0c0f12 72%); }
.adv-duelist { left: calc(50% - 135px); bottom: 20px; width: 78px; height: 94px; }
.adv-corpse { left: calc(50% + 55px); bottom: 18px; width: 105px; height: 116px; transition: transform 650ms, opacity 550ms; }
.adv-blade-flash { left: calc(50% + 22px); top: 63px; width: 57px; height: 4px; background: #fff1b5; transform: rotate(-43deg) scaleX(0); box-shadow: 0 3px 12px #e9a842; }
.adv-hit-sparks { left: calc(50% + 70px); top: 95px; width: 1px; height: 1px; }
.adv-hit-sparks i, .adv-battle-sparks i { position: absolute; width: 3px; height: 3px; background: #f1c45d; opacity: 0; }
.adv-book-drop { left: calc(50% + 75px); bottom: 37px; width: 54px; height: 58px; opacity: 0; transform: translateY(20px) scale(.5); }
.adv-book-drop[data-scene-choice="mage"] > .adv-art { filter: hue-rotate(130deg); }
.adv-book-drop[data-scene-choice="taoist"] > .adv-art { filter: hue-rotate(65deg); }
.adv-corpse-book.is-running .adv-duelist { animation: adv-duel-lunge 880ms ease-in-out infinite; }
.adv-corpse-book.is-running .adv-corpse { opacity: calc(1 - var(--scene-progress) * .34); animation: adv-corpse-recoil 880ms ease-in-out infinite; }
.adv-corpse-book.is-running .adv-blade-flash { animation: adv-sword-hit 880ms ease-out infinite; }
.adv-corpse-book.is-running .adv-hit-sparks i { animation: adv-impact 880ms calc(var(--p) * 13ms) ease-out infinite; }
.adv-corpse-book.is-revealed .adv-corpse { opacity: .2; transform: translate(27px, 24px) rotate(18deg) scale(.82); }
.adv-corpse-book.is-revealed .adv-duelist { transform: translateX(5cqw); transition: transform 450ms; }
.adv-corpse-book.is-revealed .adv-book-drop.is-outcome { opacity: 1; transform: translateY(-26px) scale(1.08); transition: transform 700ms cubic-bezier(.16, 1, .3, 1), opacity 220ms; filter: drop-shadow(0 5px 11px #bb91384d); }
.adv-corpse-book .adv-book-drop.is-unpicked, .adv-mine-gold .adv-found-ore.is-unpicked { opacity: 0; }
@keyframes adv-duel-lunge { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(var(--duel-travel)) rotate(-7deg); } 55% { transform: translateX(calc(var(--duel-travel) * .7)); } }
@keyframes adv-corpse-recoil { 0%, 27%, 100% { transform: translateX(0); } 40% { transform: translate(10px, -4px) rotate(7deg); } 72% { transform: translateX(-28px); } }
@keyframes adv-sword-hit { 0%, 25%, 64%, 100% { opacity: 0; transform: rotate(-43deg) scaleX(.2); } 33% { opacity: 1; transform: rotate(-43deg) scaleX(1.2); } 50% { opacity: .4; transform: rotate(-43deg) scaleX(.8); } }
@keyframes adv-impact { 0%, 28%, 70%, 100% { opacity: 0; transform: translate(0, 0); } 36% { opacity: 1; } 67% { opacity: 0; transform: translate(calc((var(--p) - 3) * 8px), calc((var(--p) * 7px) - 30px)); } }

/* Mining: a hinged pick meets the rock, stone chips break away, ore appears. */
.adv-mine-gold { background: radial-gradient(ellipse at 64% 80%, #342b1b, #101211 70%); }
.adv-mine-lamp { left: 10%; top: 18px; width: 36px; height: 57px; opacity: .6; }
.adv-miner { left: calc(50% - 130px); bottom: 18px; width: 75px; height: 92px; }
.adv-pickaxe { z-index: 3; left: calc(50% - 71px); top: 40px; width: 66px; height: 76px; transform: rotate(-30deg); transform-origin: 20% 90%; }
.adv-ore-rock { left: calc(50% + 19px); bottom: 16px; width: 105px; height: 100px; transition: transform 450ms, opacity 400ms; }
.adv-ore-rock-back { left: calc(50% + 96px); bottom: 24px; width: 86px; height: 76px; opacity: .55; }
.adv-stone-chips { left: calc(50% + 28px); top: 95px; }
.adv-stone-chips i, .adv-statue-dust i { position: absolute; width: calc(3px + var(--p) * .6px); height: 4px; opacity: 0; background: #9b8054; }
.adv-found-ore { left: calc(50% + 25px); bottom: 31px; width: 85px; height: 87px; opacity: 0; transform: translateY(30px) scale(.4); }
.adv-mine-gold.is-running .adv-pickaxe { animation: adv-pick-strike 800ms cubic-bezier(.5, .05, .7, .7) infinite; }
.adv-mine-gold.is-running .adv-miner { animation: adv-miner-brace 800ms ease-in-out infinite; }
.adv-mine-gold.is-running .adv-ore-rock:not(.adv-ore-rock-back) { animation: adv-rock-hit 800ms linear infinite; }
.adv-mine-gold.is-running .adv-stone-chips i { animation: adv-rock-chips 800ms calc(var(--p) * 9ms) ease-out infinite; }
.adv-mine-gold.is-running .adv-ore-rock:not(.adv-ore-rock-back)::after { content: ""; position: absolute; inset: 19% 21% 11%; background: #10100d; clip-path: polygon(49% 0, 39% 28%, 59% 46%, 33% 76%, 49% 100%, 46% 76%, 72% 46%, 51% 25%, 59% 0); opacity: var(--scene-progress); }
.adv-mine-gold.is-revealed .adv-ore-rock:not(.adv-ore-rock-back) { transform: translate(16px, 34px) rotate(16deg) scale(.62); opacity: .3; }
.adv-mine-gold.is-revealed .adv-found-ore.is-outcome { opacity: 1; transform: translateY(-16px) scale(1); transition: transform 700ms cubic-bezier(.16, 1, .3, 1), opacity 300ms; filter: drop-shadow(0 5px 11px #b2964d55); }
@keyframes adv-pick-strike { 0%, 100% { transform: rotate(-40deg); } 25% { transform: rotate(-66deg); } 43%, 51% { transform: rotate(39deg); } 78% { transform: rotate(-17deg); } }
@keyframes adv-miner-brace { 0%, 100% { transform: rotate(-3deg); } 45% { transform: translateX(8px) rotate(6deg); } }
@keyframes adv-rock-hit { 0%, 39%, 64%, 100% { transform: translateX(0); } 45% { transform: translate(4px, 2px); } 51% { transform: translate(-3px, 0); } }
@keyframes adv-rock-chips { 0%, 39%, 100% { opacity: 0; transform: translate(0, 0) rotate(0); } 44% { opacity: 1; } 90% { opacity: 0; transform: translate(calc((var(--p) - 4) * 13px), calc(var(--p) * 4px + 7px)) rotate(120deg); } }

/* Escort: scenery passes, wheels turn; arrival and ambush use opposite exits. */
.adv-escort-cart { background: linear-gradient(#0e1917, #1f2821 63%, #262019 64%, #171713); }
.adv-road-track { inset: auto -40% 30px; height: 30px; border-block: 1px solid #514832; transform: skewY(-2deg); }
.adv-road-scenery { inset: 0 -15% 0 0; }
.adv-road-rock { bottom: 18px; width: var(--rock-size); height: var(--rock-size); opacity: .65; }
.adv-road-rock:nth-child(even) { bottom: 54px; }
.adv-escort-gate { right: 1%; bottom: 28px; width: 90px; height: 108px; opacity: .48; }
.adv-convoy { z-index: 2; left: 39%; bottom: 30px; width: 105px; height: 105px; transform: translateX(-22cqw); transition: transform 800ms cubic-bezier(.16, 1, .3, 1); }
.adv-cart-body { inset: 0; }
.adv-cart-wheel { z-index: 2; bottom: 8px; width: 20px; height: 20px; border: 3px solid #997249; border-radius: 50%; background: #201b17; box-shadow: 0 2px 4px #050505; }
.adv-cart-wheel::before, .adv-cart-wheel::after { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 2px; background: #997249; }
.adv-cart-wheel::after { transform: rotate(90deg); }
.adv-cart-wheel-front { right: 14px; }.adv-cart-wheel-back { left: 14px; }
.adv-cart-guard { left: -55px; bottom: -4px; width: 58px; height: 81px; }
.adv-road-dust { left: -7px; bottom: 5px; }
.adv-road-dust i { position: absolute; width: 9px; height: 3px; background: #91744d; opacity: 0; }
.adv-bandit { bottom: 27px; width: 70px; height: 90px; opacity: 0; transition: transform 550ms ease-out, opacity 280ms; }
.adv-bandit-front { left: 70%; transform: translateX(70px); }.adv-bandit-rear { left: 17%; transform: translateX(-70px); }
.adv-destination { right: 3%; bottom: 26px; width: 62px; }
.adv-destination .adv-name { bottom: 0; }
.adv-escort-cart.is-running .adv-road-scenery { transform: translateX(calc(var(--scene-progress) * -20%)); }
.adv-escort-cart.is-running .adv-convoy { transform: translateX(calc((-22 + var(--scene-progress) * 42) * 1cqw)); transition: none; }
.adv-escort-cart.is-running .adv-cart-wheel { animation: adv-wheel-turn 530ms linear infinite; }
.adv-escort-cart.is-running .adv-cart-body { animation: adv-cart-rumble 280ms ease-in-out infinite alternate; }
.adv-escort-cart.is-running .adv-cart-guard { animation: adv-march 240ms ease-in-out infinite alternate; }
.adv-escort-cart.is-running .adv-road-dust i { animation: adv-cart-dust 800ms calc(var(--p) * 130ms) ease-out infinite; }
.adv-escort-cart.is-revealed[data-result="safe"] .adv-convoy { transform: translateX(37cqw) scale(.8); }
.adv-escort-cart.is-revealed[data-result="safe"] .adv-escort-gate { opacity: 1; filter: drop-shadow(0 3px 10px #bd9c3c55); }
.adv-escort-cart.is-revealed[data-result="ambush"] .adv-bandit { opacity: 1; transform: translateX(0); }
.adv-escort-cart.is-revealed[data-result="ambush"] .adv-convoy { transform: translateX(20cqw); }
.adv-escort-cart.is-revealed[data-result="ambush"] .adv-cart-body { transform: rotate(-9deg); transition: transform 450ms 180ms; }
.adv-escort-cart.is-revealed[data-result="ambush"] .adv-cart-guard { transform: translateX(-18px) rotate(-13deg); transition: transform 400ms; }
@keyframes adv-wheel-turn { to { transform: rotate(360deg); } }
@keyframes adv-cart-rumble { to { transform: translateY(2px) rotate(.7deg); } }
@keyframes adv-march { to { transform: translateY(-4px) rotate(2deg); } }
@keyframes adv-cart-dust { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 18% { opacity: .5; } 100% { opacity: 0; transform: translate(-43px, -12px) scale(1.6); } }

/* Altar: four distinct runes orbit the sealed creature and one is awakened. */
.adv-woma-altar { background: radial-gradient(ellipse at 50% 73%, #382818, #101012 64%); }
.adv-altar-ring { left: 50%; top: 27px; width: 138px; height: 138px; margin-left: -69px; border: 1px solid #796033; border-radius: 50%; transform: scaleY(.54); }
.adv-altar-ring::before, .adv-altar-ring::after { content: ""; position: absolute; inset: 15px; border: 1px solid #5b4b2d; transform: rotate(45deg); }
.adv-altar-ring::after { transform: rotate(0); }
.adv-altar-ring-inner { top: 44px; width: 104px; height: 104px; margin-left: -52px; opacity: .65; }
.adv-altar-spirit { left: 50%; top: 40px; width: 86px; height: 97px; margin-left: -43px; opacity: .58; filter: grayscale(.9); transition: filter 650ms, opacity 650ms, transform 650ms; }
.adv-rune-orbit { z-index: 3; left: 50%; top: 60px; width: 29px; height: 32px; margin-left: -14px; transform: rotate(var(--phase)) translateX(58px) rotate(calc(-1 * var(--phase))); }
.adv-rune-orbit .adv-art { filter: drop-shadow(0 2px 6px var(--tint)); }
.adv-rune-orbit .adv-name { bottom: -14px; color: var(--tint); }
.adv-altar-motes { left: 50%; top: 105px; }
.adv-altar-motes i { position: absolute; width: 2px; height: 5px; background: #d6a74d; opacity: 0; }
.adv-woma-altar.is-running .adv-rune-orbit { animation: adv-rune-revolve 3.6s linear infinite; }
.adv-woma-altar.is-running .adv-altar-spirit { opacity: calc(.58 + var(--scene-progress) * .27); filter: grayscale(calc(.9 - var(--scene-progress) * .45)); }
.adv-woma-altar.is-running .adv-altar-ring-inner { animation: adv-seal-charge 1.2s ease-in-out infinite alternate; }
.adv-woma-altar.is-running .adv-altar-motes i { animation: adv-rune-motes 1.3s calc(var(--p) * 130ms) ease-out infinite; }
.adv-woma-altar.is-revealed .adv-altar-spirit { filter: grayscale(0); opacity: 1; transform: translateY(-7px); }
.adv-woma-altar.is-revealed .adv-rune-orbit.is-outcome { transform: translate(0, -39px) scale(1.25); transition: transform 700ms cubic-bezier(.16, 1, .3, 1); }
.adv-woma-altar.is-revealed .adv-altar-ring { border-color: #d8ae52; }
@keyframes adv-rune-revolve { from { transform: rotate(var(--phase)) translateX(58px) rotate(calc(-1 * var(--phase))); } to { transform: rotate(calc(var(--phase) + 360deg)) translateX(58px) rotate(calc(-1 * var(--phase) - 360deg)); } }
@keyframes adv-seal-charge { to { opacity: 1; transform: scaleY(.65) scale(1.12); } }
@keyframes adv-rune-motes { 0% { opacity: 0; transform: translate(calc((var(--p) - 4) * 16px), 7px); } 20% { opacity: .75; } 100% { opacity: 0; transform: translate(calc((var(--p) - 4) * 8px), -70px); } }

/* Statues: heavy stone remains grounded; the chosen guardian leaves its plinth. */
.adv-zuma-statue { background: radial-gradient(ellipse at 50% 100%, #353126, #111313 75%); }
.adv-statue { left: calc(20% + var(--slot) * 30%); bottom: 37px; width: 86px; height: 108px; margin-left: -43px; transition: opacity 350ms; }
.adv-statue > .adv-art { filter: grayscale(1) brightness(.64); transition: transform 650ms cubic-bezier(.16, 1, .3, 1), filter 650ms; }
.adv-statue-plinth { z-index: -1; bottom: -3px; left: 4%; width: 92%; height: 13px; border-top: 3px solid #726348; background: #332e24; transform: skewX(-15deg); }
.adv-statue-seal { left: 50%; top: 51%; width: 23px; height: 27px; margin-left: -12px; opacity: .48; }
.adv-statue-dust { left: 50%; bottom: 40%; }
.adv-statue .adv-name { bottom: -24px; }
.adv-zuma-statue.is-running .adv-statue > .adv-art { animation: adv-stone-tremor 820ms calc(var(--slot) * 130ms) linear infinite; }
.adv-zuma-statue.is-running .adv-statue > .adv-art { filter: grayscale(calc(1 - var(--scene-progress) * .3)) brightness(calc(.64 + var(--scene-progress) * .26)); }
.adv-zuma-statue.is-running .adv-statue-seal { animation: adv-small-glimmer 600ms calc(var(--slot) * 130ms) ease-in-out infinite alternate; }
.adv-zuma-statue.is-running .adv-statue-seal { transform: rotate(calc(var(--scene-progress) * 180deg)); }
.adv-zuma-statue.is-running .adv-statue-dust i { animation: adv-statue-grit 1.4s calc(var(--p) * 130ms) ease-in infinite; }
.adv-zuma-statue.is-revealed .adv-statue.is-outcome > .adv-art { filter: grayscale(0) brightness(1.28) drop-shadow(0 6px 9px #c8ab4355); transform: translateY(-13px) scale(1.08); }
.adv-zuma-statue.is-revealed .is-outcome .adv-statue-seal { opacity: 0; transform: scale(2); transition: opacity 450ms, transform 450ms; }
@keyframes adv-stone-tremor { 0%, 55%, 100% { transform: translateX(0); } 60%, 72% { transform: translateX(-1px) rotate(-.8deg); } 66%, 78% { transform: translateX(1px) rotate(.8deg); } }
@keyframes adv-statue-grit { 0% { opacity: 0; transform: translate(calc((var(--p) - 2) * 12px), -5px); } 24% { opacity: .75; } 100% { opacity: 0; transform: translate(calc((var(--p) - 2) * 16px), 45px); } }

/* Stone tomb: the mage casts across a fire wall against a moving boar pack. */
.adv-stone-tomb { background: radial-gradient(ellipse at 56% 90%, #3c2518, #121115 70%); }
.adv-fire-mage { z-index: 3; left: 13%; bottom: 20px; width: 75px; height: 100px; transition: transform 600ms, opacity 500ms; }
.adv-cast-orb { z-index: 4; left: calc(13% + 57px); top: 67px; width: 13px; height: 13px; border-radius: 50%; opacity: 0; background: #fff5ad; box-shadow: 0 3px 17px #fb8339; }
.adv-boar { z-index: 2; left: calc(48% + var(--slot) * 11%); bottom: calc(22px + (var(--slot) / 2) * 10px); width: 66px; height: 64px; transition: opacity 550ms, transform 700ms cubic-bezier(.16, 1, .3, 1); }
.adv-firewall { z-index: 4; left: 38%; bottom: 23px; width: 35%; height: 70px; opacity: .32; }
.adv-flame { position: absolute; left: calc(var(--p) * 14%); bottom: 0; width: 22px; height: calc(29px + var(--p) * 4px); border-radius: 70% 30% 50% 50%; transform: rotate(8deg); background: linear-gradient(0deg, #fbbd48, #ef6f24 55%, #bb392000); opacity: .7; }
.adv-fire-embers { z-index: 5; left: 47%; top: 110px; }
.adv-fire-embers i { position: absolute; width: 3px; height: 4px; background: #f7bb45; opacity: 0; }
.adv-tomb-reward { left: 57%; bottom: 31px; width: 39px; height: 40px; opacity: 0; }
.adv-stone-tomb.is-running .adv-fire-mage { animation: adv-mage-cast 1s ease-in-out infinite; }
.adv-stone-tomb.is-running .adv-cast-orb { animation: adv-firebolt 1s linear infinite; }
.adv-stone-tomb.is-running .adv-firewall { opacity: 1; }
.adv-stone-tomb.is-running .adv-flame { animation: adv-fire-flare 520ms calc(var(--p) * -90ms) ease-in-out infinite alternate; }
.adv-stone-tomb.is-running .adv-boar { animation: adv-boar-charge 1.4s calc(var(--slot) * -270ms) ease-in-out infinite; }
.adv-stone-tomb.is-running .adv-boar > .adv-art { animation: adv-march 230ms calc(var(--slot) * -60ms) ease-in-out infinite alternate; }
.adv-stone-tomb.is-running .adv-fire-embers i { animation: adv-fire-ember 1.1s calc(var(--p) * 115ms) ease-out infinite; }
.adv-stone-tomb.is-revealed[data-result="cleared"] .adv-boar { transform: translate(38px, 5px) rotate(17deg) scale(.65); opacity: .12; }
.adv-stone-tomb.is-revealed[data-result="cleared"] .adv-tomb-reward { opacity: 1; transform: translateY(-20px); transition: transform 700ms, opacity 500ms; }
.adv-stone-tomb.is-revealed[data-result="overrun"] .adv-boar { transform: translateX(-34cqw); }
.adv-stone-tomb.is-revealed[data-result="overrun"] .adv-fire-mage { transform: translate(-20px, 10px) rotate(-16deg); opacity: .4; }
.adv-stone-tomb.is-revealed .adv-firewall { opacity: .12; transition: opacity 500ms; }
@keyframes adv-mage-cast { 0%, 100% { transform: translateX(0); } 38% { transform: translateX(6px) rotate(4deg); } }
@keyframes adv-firebolt { 0%, 21% { opacity: 0; transform: translate(0, 0) scale(.3); } 27% { opacity: 1; } 72% { opacity: .8; transform: translate(21cqw, 40px) scale(1.4); } 80%, 100% { opacity: 0; transform: translate(22cqw, 42px) scale(2); } }
@keyframes adv-fire-flare { to { transform: rotate(-9deg) scaleY(1.35) scaleX(.8); opacity: 1; } }
@keyframes adv-boar-charge { 0%, 100% { transform: translate(0, 0); } 46% { transform: translate(-9cqw, -3px); } 63% { transform: translate(-7cqw, 2px) rotate(5deg); } }
@keyframes adv-fire-ember { 0% { opacity: 0; transform: translate(calc(var(--p) * 9px), 0); } 16% { opacity: .9; } 100% { opacity: 0; transform: translate(calc(var(--p) * 12px), -70px); } }

/* Illusion: adjacent doors exchange places before the true portal opens. */
.adv-illusion-tower { background: radial-gradient(ellipse at 50% 70%, #202e3a, #101017 74%); }
.adv-illusion-ring { bottom: 23px; left: 8%; width: 84%; height: 40px; border: 1px solid #455b73; border-radius: 50%; opacity: .6; }
.adv-illusion-door { left: calc(12.5% + var(--slot) * 25%); bottom: 42px; width: 66px; height: 92px; margin-left: -33px; transition: opacity 500ms, transform 550ms; }
.adv-portal { inset: 3px 5px; opacity: .34; transition: opacity 500ms, transform 600ms; }
.adv-illusion-frame { inset: 0; }
.adv-illusion-door:nth-of-type(2) .adv-portal { filter: hue-rotate(95deg); }
.adv-illusion-door:nth-of-type(3) .adv-portal { filter: hue-rotate(170deg); }
.adv-illusion-door:nth-of-type(4) .adv-portal { filter: hue-rotate(260deg); }
.adv-illusion-wanderer { z-index: 3; left: 50%; bottom: -3px; width: 41px; height: 57px; margin-left: -20px; transition: transform 800ms cubic-bezier(.16, 1, .3, 1), opacity 800ms; }
.adv-illusion-tower.is-running .adv-illusion-door { animation: adv-door-shift-right 2.5s ease-in-out infinite; }
.adv-illusion-tower.is-running .adv-illusion-door:nth-of-type(odd) { animation-name: adv-door-shift-left; }
.adv-illusion-tower.is-running .adv-portal { animation: adv-small-glimmer 700ms calc(var(--slot) * -130ms) ease-in-out infinite alternate; }
.adv-illusion-tower.is-running .adv-illusion-wanderer { transform: translate(var(--wanderer-x, 0cqw), calc(var(--scene-progress) * -5px)); transition: none; }
.adv-illusion-tower.is-running .adv-illusion-wanderer > .adv-art { animation: adv-march 290ms ease-in-out infinite alternate; }
.adv-illusion-tower.is-revealed .adv-illusion-door.is-outcome { transform: translateY(-6px) scale(1.08); }
.adv-illusion-tower.is-revealed .is-outcome .adv-portal { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 3px 12px #79b9eb66); }
.adv-illusion-tower.is-revealed .is-outcome .adv-illusion-frame { opacity: .5; transform: perspective(150px) rotateY(-35deg); transform-origin: left; transition: transform 500ms, opacity 500ms; }
.adv-illusion-tower.is-revealed .adv-illusion-wanderer { transform: translate(calc((var(--winning-slot) * 25 - 37.5) * 1cqw), -42px) scale(.6); opacity: .6; }
@keyframes adv-door-shift-right { 0%, 12%, 100% { transform: translate(0, 0); } 42%, 62% { transform: translate(25cqw, -9px) scale(.9); } }
@keyframes adv-door-shift-left { 0%, 12%, 100% { transform: translate(0, 0); } 42%, 62% { transform: translate(-25cqw, 5px) scale(1.03); } }

/* Guild war: all three squads contest the capture point, one flag is raised. */
.adv-guild-banner { background: linear-gradient(#131819, #232421 68%, #29251b); }
.adv-capture-ring { left: 50%; bottom: 21px; width: 80px; height: 22px; margin-left: -40px; border: 1px solid #977a3f; border-radius: 50%; background: #57431f22; }
.adv-guild-squad { left: calc(18% + var(--slot) * 32%); bottom: 26px; width: 66px; height: 107px; margin-left: -33px; transition: opacity 500ms, transform 600ms; }
.adv-guild-flag { left: 17px; bottom: 34px; width: 48px; height: 80px; transform-origin: 50% 90%; }
.adv-guild-flag .adv-name { bottom: 3px; left: 48%; padding: 0 4px; background: #151718d9; color: #e2c77f; font-size: 9px; }
.adv-guild-squad:nth-of-type(2) .adv-guild-flag > .adv-art { filter: hue-rotate(140deg); }
.adv-guild-squad:nth-of-type(3) .adv-guild-flag > .adv-art { filter: saturate(.12) brightness(1.5); }
.adv-guild-squad:nth-of-type(4) .adv-guild-flag > .adv-art { filter: hue-rotate(330deg); }
.adv-guild-soldier { z-index: 2; left: 0; bottom: 0; width: 63px; height: 78px; }
.adv-guild-reinforcement { left: -23px; bottom: 5px; width: 42px; height: 60px; opacity: .7; }
.adv-battle-sparks { left: 50%; bottom: 62px; }
.adv-guild-banner.is-running .adv-guild-soldier { animation: adv-squad-charge 1.6s calc(var(--slot) * -280ms) ease-in-out infinite; }
.adv-guild-banner.is-running .adv-guild-squad { transform: translateX(calc((1 - var(--slot)) * var(--scene-progress) * 10cqw)); transition: none; }
.adv-guild-banner.is-running .adv-guild-reinforcement { animation: adv-squad-charge 1.6s calc(var(--slot) * -280ms + 130ms) ease-in-out infinite; }
.adv-guild-banner.is-running .adv-guild-flag { animation: adv-flag-wind 650ms calc(var(--slot) * -210ms) ease-in-out infinite alternate; }
.adv-guild-banner.is-running .adv-battle-sparks i { animation: adv-impact 800ms calc(var(--p) * 25ms) ease-out infinite; }
.adv-guild-banner.is-revealed .adv-guild-squad.is-outcome { transform: translateX(calc((1 - var(--slot)) * 32cqw)); }
.adv-guild-banner.is-revealed .is-outcome .adv-guild-flag { transform: translateY(-21px) scale(1.16); transition: transform 800ms cubic-bezier(.16, 1, .3, 1); }
.adv-guild-banner.is-revealed .is-unpicked .adv-guild-flag { transform: translateY(17px) rotate(32deg); transition: transform 500ms; }
@keyframes adv-squad-charge { 0%, 100% { transform: translate(0, 0); } 43% { transform: translate(calc((1 - var(--slot)) * 21cqw), -3px) rotate(calc((1 - var(--slot)) * 6deg)); } 64% { transform: translate(calc((1 - var(--slot)) * 18cqw), 1px); } }
@keyframes adv-flag-wind { to { transform: skewX(-5deg) rotate(3deg); } }

/* Dragon lair: the dragon patrols above three nests; only the winning chest opens. */
.adv-dragon-lair { background: radial-gradient(ellipse at 50% 100%, #3b2a20, #15121a 74%); }
.adv-dragon-nest { left: calc(20% + var(--slot) * 30%); bottom: 29px; width: 77px; height: 66px; margin-left: -38px; transition: opacity 400ms; }
.adv-nest-rock { inset: -7px -7px -1px; opacity: .58; }
.adv-nest-closed, .adv-nest-open { inset: 9px 12px 3px; z-index: 2; }
.adv-nest-open { opacity: 0; }
.adv-dragon-nest .adv-name { bottom: -18px; }
.adv-flying-dragon { z-index: 4; left: 50%; top: 2px; width: 111px; height: 85px; margin-left: -55px; transition: transform 750ms cubic-bezier(.16, 1, .3, 1); }
.adv-dragon-shadow { left: 50%; bottom: 39px; width: 68px; height: 9px; margin-left: -34px; border-radius: 50%; background: #03040580; }
.adv-treasure-coins { z-index: 3; left: 50%; top: 28px; }
.adv-treasure-coins i { position: absolute; width: 5px; height: 7px; background: #e6b849; border: 1px solid #ffe288; opacity: 0; }
.adv-dragon-lair.is-running .adv-flying-dragon { animation: adv-dragon-patrol 3.2s ease-in-out infinite; }
.adv-dragon-lair.is-running .adv-flying-dragon > .adv-art { animation: adv-dragon-wingbeat 450ms ease-in-out infinite alternate; }
.adv-dragon-lair.is-running .adv-dragon-shadow { animation: adv-dragon-shadow 3.2s ease-in-out infinite; }
.adv-dragon-lair.is-revealed .adv-flying-dragon { transform: translate(calc((var(--winning-slot) - 1) * 30cqw), 10px) scale(.88); }
.adv-dragon-lair.is-revealed .is-outcome .adv-nest-closed { opacity: 0; }
.adv-dragon-lair.is-revealed .is-outcome .adv-nest-open { opacity: 1; transform: translateY(-8px) scale(1.12); transition: transform 650ms cubic-bezier(.16, 1, .3, 1), opacity 250ms; filter: drop-shadow(0 3px 10px #e0b95666); }
.adv-dragon-lair.is-revealed .is-outcome .adv-treasure-coins i { animation: adv-coin-spill 850ms calc(var(--p) * 65ms) ease-out both; }
@keyframes adv-dragon-patrol { 0%, 100% { transform: translate(-21cqw, 7px) rotate(-6deg); } 28% { transform: translate(0, -8px) rotate(0); } 50% { transform: translate(21cqw, 5px) rotate(8deg); } 76% { transform: translate(0, 13px) rotate(-3deg); } }
@keyframes adv-dragon-wingbeat { to { transform: scaleY(.84) scaleX(1.07); } }
@keyframes adv-dragon-shadow { 0%, 100% { transform: translateX(-21cqw) scale(.85); } 50% { transform: translateX(21cqw) scale(1.1); } }
@keyframes adv-coin-spill { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 25% { opacity: 1; transform: translate(calc((var(--p) - 2.5) * 7px), -30px); } 100% { opacity: 1; transform: translate(calc((var(--p) - 2.5) * 10px), 26px) rotate(calc(var(--p) * 35deg)); } }
@keyframes adv-small-glimmer { to { opacity: 1; filter: brightness(1.4); } }

@media (max-width: 640px) {
  .game-stage:has(> .has-adventure-visual) { min-height: 520px; }
  .adventure-board.has-adventure-visual { gap: 10px; min-height: 0; padding-top: 18px; }
  .has-adventure-visual .adventure-choices button { min-height: 83px; }
  .adv-visual { height: 166px; }
  .adv-name { font-size: 9px; }
  .adv-maze-exit { width: 35px; height: 38px; }
  .adv-maze-runner { width: 40px; height: 47px; margin-left: -20px; }
  .adv-corpse-book { --duel-travel: 68px; }
  .adv-duelist { left: calc(50% - 108px); width: 64px; height: 86px; }
  .adv-corpse { left: calc(50% + 32px); width: 82px; height: 105px; }
  .adv-blade-flash { left: calc(50% + 14px); width: 40px; }
  .adv-hit-sparks { left: calc(50% + 49px); }
  .adv-book-drop { left: calc(50% + 45px); }
  .adv-miner { left: calc(50% - 115px); width: 64px; height: 86px; }
  .adv-pickaxe { left: calc(50% - 60px); width: 57px; height: 72px; }
  .adv-ore-rock { left: calc(50% + 12px); width: 88px; height: 91px; }
  .adv-ore-rock-back { left: calc(50% + 70px); width: 65px; height: 69px; }
  .adv-convoy { left: 34%; width: 94px; height: 94px; }
  .adv-cart-wheel-front { right: 12px; }.adv-cart-wheel-back { left: 12px; }
  .adv-cart-guard { width: 48px; left: -41px; }
  .adv-escort-gate { width: 70px; height: 92px; }
  .adv-bandit { width: 57px; height: 78px; }
  .adv-bandit-rear { left: 5%; }.adv-bandit-front { left: 73%; }
  .adv-statue { width: 69px; height: 99px; margin-left: -34px; }
  .adv-fire-mage { left: 6%; width: 61px; height: 88px; }
  .adv-cast-orb { left: calc(6% + 46px); }
  .adv-boar { width: 50px; height: 53px; }
  .adv-illusion-door { width: 54px; height: 82px; margin-left: -27px; }
  .adv-guild-squad { width: 51px; margin-left: -25px; }
  .adv-guild-flag { width: 41px; height: 75px; left: 12px; }
  .adv-guild-soldier { width: 51px; height: 72px; }
  .adv-guild-reinforcement { width: 34px; height: 53px; left: -16px; }
  .adv-dragon-nest { width: 63px; height: 59px; margin-left: -31px; }
}

@media (prefers-reduced-motion: reduce) {
  .has-adventure-visual.is-playing .adventure-sigil { animation: none !important; }
  /* Keep movement that explains gameplay. Only flashing and impact debris are
     suppressed; reduced motion must not turn a whole round into a still image. */
  .adv-visual .adv-blade-flash, .adv-visual .adv-hit-sparks i, .adv-visual .adv-battle-sparks i,
  .adv-visual .adv-stone-chips i, .adv-visual .adv-statue-dust i, .adv-visual .adv-fire-embers i,
  .adv-visual .adv-road-dust i, .adv-visual .adv-altar-motes i { animation: none !important; opacity: 0; }
  .adv-visual .adv-maze-key, .adv-visual .adv-statue-seal, .adv-visual .adv-portal { animation: none !important; }
  .adv-visual .adv-cart-body, .adv-visual .adv-ore-rock, .adv-visual .adv-statue > .adv-art { animation: none !important; }
  .adv-visual.is-running .adv-duelist, .adv-visual.is-running .adv-corpse { animation-duration: 1200ms; }
  .adv-visual.is-running .adv-pickaxe, .adv-visual.is-running .adv-miner { animation-duration: 1100ms; }
  .adv-visual.is-running .adv-flame, .adv-visual.is-running .adv-flying-dragon > .adv-art,
  .adv-visual.is-running .adv-guild-flag { animation-duration: 1100ms; }
  .adv-visual.is-running { border-bottom-color: #c8a150; }
  .adv-visual.is-running .adv-maze-key, .adv-visual.is-running .adv-altar-spirit, .adv-visual.is-running .adv-portal, .adv-visual.is-running .adv-firewall { opacity: .85; }
}
