/* A quiet, physical motion language. Battlefield effects never intercept input. */
.yasa-motion-layer{position:fixed;z-index:25;pointer-events:none;overflow:hidden;contain:layout paint style;border-radius:6px}
.motion-vectors{position:absolute;inset:0;overflow:hidden;z-index:3;pointer-events:none}
.motion-card{position:absolute;object-fit:contain;pointer-events:none;z-index:2;transform-origin:50% 75%;border-radius:3px;filter:drop-shadow(0 5px 5px #171a1e70);will-change:transform,opacity}
.motion-path{filter:drop-shadow(0 0 2px #e0bf733b)}
.motion-emblem{color:#f4dc9e;filter:drop-shadow(0 0 2px var(--empire));pointer-events:none}
.motion-accord{color:#eee6d7}.motion-shield{color:#d2edf2}.motion-ambush{color:#edbaaa}.motion-standard{color:#efce85}
.motion-smoke{filter:blur(2px)}
.motion-projectile{filter:drop-shadow(0 0 2px #f3d7a967)}
.site-footer #motionSettings{border:0;border-radius:0;background:none;color:inherit;font:inherit;padding:0;text-align:left;text-decoration:underline;text-underline-offset:3px;box-shadow:none;min-height:32px;cursor:pointer}

/* Moving haze sits over the painting, below the readable menu and controls. */
.hero-atmosphere{position:absolute;inset:0 0 0 35%;z-index:-1;overflow:hidden;pointer-events:none;mask-image:linear-gradient(90deg,transparent,#000 30%);-webkit-mask-image:linear-gradient(90deg,transparent,#000 30%)}
.hero-atmosphere:before,.hero-atmosphere:after{content:"";position:absolute;inset:-8%;opacity:.28;pointer-events:none;will-change:transform;background:radial-gradient(ellipse at 68% 79%,#ddccac35,transparent 44%),radial-gradient(ellipse at 38% 80%,#a48e7133,transparent 30%);animation:yasa-haze 22s ease-in-out infinite alternate}
.hero-atmosphere:after{opacity:.2;inset:15% -20% -15%;background:radial-gradient(ellipse at 70% 70%,#e2d8c844,transparent 48%);animation-duration:29s;animation-delay:-11s}
.hero-atmosphere[data-atmosphere="prussian"]:before{background:radial-gradient(ellipse at 60% 80%,#bacada44,transparent 48%)}
.hero-atmosphere[data-atmosphere="ayyubid"]:before{background:radial-gradient(ellipse at 60% 83%,#d1ad7944,transparent 44%)}
.menu-hero[data-motion-paused="true"] .hero-atmosphere:before,.menu-hero[data-motion-paused="true"] .hero-atmosphere:after{animation-play-state:paused}
@keyframes yasa-haze{from{transform:translate3d(-3%,2%,0) scale(1)}to{transform:translate3d(4%,-2%,0) scale(1.04)}}

/* The illustrated cards retain their original proportions and colours. */
@media(hover:hover) and (pointer:fine){
 .leader-choice,.collection button,.hand-card{transition:transform 180ms ease,box-shadow 180ms ease,border-color 180ms ease}
 .leader-choice:hover,.collection button:hover,.hand-card:hover{transform:translateY(-3px);box-shadow:0 7px 18px #171a1e55}
}
dialog[open]{animation:yasa-dialog 180ms ease-out}
dialog::backdrop{animation:yasa-backdrop 180ms ease-out}
@keyframes yasa-dialog{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes yasa-backdrop{from{opacity:0}to{opacity:1}}
.battle-result .result-banner{width:130px;height:88px;margin:0 auto 18px;display:grid;place-items:center;background:linear-gradient(135deg,color-mix(in srgb,var(--result-accent) 70%,#171a1e),#171a1e);clip-path:polygon(0 0,100% 0,100% 80%,50% 100%,0 80%);animation:yasa-banner 420ms cubic-bezier(.22,.72,.18,1) both;border-top:2px solid #dbc18b}
.result-banner svg{width:86px;height:56px;fill:none;stroke:#e9d3a1;stroke-width:1.5;stroke-linecap:round;animation:yasa-seal 360ms ease-out 130ms both}
@keyframes yasa-banner{from{opacity:0;transform:translateY(-10px) scaleY(.85)}to{opacity:1;transform:none}}
@keyframes yasa-seal{from{opacity:0;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}
@media(max-width:700px){.hero-atmosphere{inset:0 0 auto;height:350px;mask-image:linear-gradient(#000 55%,transparent);-webkit-mask-image:linear-gradient(#000 55%,transparent)}.hero-atmosphere:after{display:none}}
html[data-motion="reduced"] .hero-atmosphere{display:none}
html[data-motion="reduced"] dialog,html[data-motion="reduced"] dialog::backdrop,html[data-motion="reduced"] .result-banner,html[data-motion="reduced"] .result-banner svg{animation:none!important}
html[data-motion="reduced"] .hero-art,html[data-motion="reduced"] .hero-dot:before,html[data-motion="reduced"] .hand-card,html[data-motion="reduced"] .leader-choice,html[data-motion="reduced"] .collection button{transition:none!important;transform:none!important}
@media(prefers-reduced-motion:reduce){
 html:not([data-motion="full"]) .hero-atmosphere{display:none}
 html:not([data-motion="full"]) dialog,html:not([data-motion="full"]) dialog::backdrop,html:not([data-motion="full"]) .result-banner,html:not([data-motion="full"]) .result-banner svg{animation:none!important}
}

/* The result carries YASA's actual wordmark, on every outcome. */
.battle-result .result-banner.result-yasa{width:200px;height:195px;border:0;clip-path:none;background:none;margin:0 auto 24px}
.result-yasa img{display:block;width:100%;height:auto;object-fit:contain}
