/* One accelerating spin sequence, followed by a single soft light burst. */
dialog.evolution-modal{width:min(620px,calc(100vw - 24px));max-width:620px;max-height:calc(100dvh - 24px);background:#091d26;color:#eef4e7;border:1px solid #b5d8d53a;border-radius:24px;overflow-x:hidden;box-shadow:0 30px 110px #0009}
.evolution-modal::backdrop{background:#06131ce6;backdrop-filter:blur(10px)}
.evolution-modal .modal-close{z-index:10;background:#ffffff10;color:#eff5e9;border:1px solid #ffffff25}
.evolution-scene{position:relative;isolation:isolate;overflow:hidden;text-align:center;padding:30px 28px 24px;background:radial-gradient(ellipse at 50% 48%,color-mix(in srgb,var(--evo-accent),transparent 87%),transparent 65%),linear-gradient(150deg,#18343d,#091b24 75%);border-radius:23px}
.evolution-scene-header,.evolution-scene-footer{position:relative;z-index:5}
.evolution-scene-header{height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.evolution-scene-header>.eyebrow{font-size:9px;letter-spacing:.2em;color:#adc9c6;padding:0 30px}
.evolution-scene-status{margin:0;font-size:11px;font-weight:700;letter-spacing:.16em;color:var(--evo-accent)}
.evolution-scene-header h2{margin:0;font-size:32px;line-height:1.1;color:#f3f6ea;letter-spacing:-.03em}
.evolution-scene-stage{position:relative;perspective:1100px;display:grid;place-items:center;height:375px;z-index:2}
.evolution-card{position:relative;width:228px;aspect-ratio:2/3;filter:drop-shadow(0 14px 18px #0006);z-index:2}
.evolution-card-turner{position:relative;width:100%;height:100%;transform-style:preserve-3d}
.evolution-card-front,.evolution-card-back{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.evolution-card-front>.kin-card{width:100%;filter:none}
.evolution-card-back{transform:rotateY(180deg);border:1px solid var(--evo-accent);border-radius:18px;background:radial-gradient(ellipse at center,color-mix(in srgb,var(--evo-accent),#14343e 78%),#0b242f 80%);box-shadow:inset 0 0 0 8px #0c2832,inset 0 0 0 9px #b3e3d15c}
.evolution-card-back:before,.evolution-card-back:after{content:'';position:absolute;inset:16%;border:1px solid #c1ebdd50;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}
.evolution-card-back:after{inset:26%;background:linear-gradient(45deg,transparent,var(--evo-accent),transparent);opacity:.2}
.evolution-halo{position:absolute;left:50%;top:45%;width:340px;height:340px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle,#e9ffe955,color-mix(in srgb,var(--evo-accent),transparent 62%) 28%,transparent 70%);opacity:.5;filter:blur(16px);pointer-events:none}
.evolution-rays{position:absolute;inset:-30%;background:repeating-conic-gradient(from 0deg at 50% 50%,transparent 0deg 19deg,color-mix(in srgb,var(--evo-accent),transparent 93%) 22deg 27deg,transparent 30deg 40deg);mask-image:radial-gradient(ellipse,#000,transparent 64%);pointer-events:none;opacity:.5}
.evolution-floor{position:absolute;left:10%;right:10%;bottom:5px;height:110px;border:1px solid color-mix(in srgb,var(--evo-accent),transparent 67%);border-radius:50%;transform:rotateX(65deg);box-shadow:0 0 35px color-mix(in srgb,var(--evo-accent),transparent 85%),inset 0 0 30px color-mix(in srgb,var(--evo-accent),transparent 90%)}
.evolution-spinning .evolution-card-turner{animation:evolutionSpin 3.7s cubic-bezier(.65,0,1,.5) .5s both}
.evolution-spinning .evolution-halo{animation:evolutionCharge 4.2s ease-in both}
.evolution-spinning .evolution-rays{animation:evolutionRays 4.2s ease-in both}
.evolution-burst{position:absolute;inset:0;z-index:4;pointer-events:none;opacity:0;background:radial-gradient(ellipse at 50% 48%,#f5fff9 0%,#e8fff4e8 24%,color-mix(in srgb,var(--evo-accent),transparent 35%) 55%,transparent 85%)}
.evolution-revealed .evolution-burst{animation:evolutionBurst .85s ease-out both}
.evolution-revealed .evolution-card{animation:evolutionArrive .8s cubic-bezier(.15,.8,.2,1) both;filter:drop-shadow(0 0 25px color-mix(in srgb,var(--evo-accent),transparent 58%))}
.evolution-revealed .evolution-scene-header,.evolution-revealed .evolution-scene-footer{animation:evolutionWords .65s .25s both}
.evolution-revealed .evolution-scene-status{font-family:'Clash Display',sans-serif;font-size:29px;font-weight:700;letter-spacing:.18em;text-shadow:0 0 22px color-mix(in srgb,var(--evo-accent),transparent 40%)}
.evolution-sparks{position:absolute;inset:0;pointer-events:none;z-index:1}
.evolution-sparks i{position:absolute;left:50%;top:50%;width:3px;height:3px;background:var(--evo-accent);box-shadow:0 0 7px var(--evo-accent);border-radius:50%;opacity:0}
.evolution-revealed .evolution-sparks i{animation:evolutionSpark 1.2s ease-out var(--delay) both}
.evolution-scene-footer{min-height:116px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px}
.evolution-scene-footer>p{margin:0;font-size:12px;line-height:1.6;color:#bfcec8}
.evolution-scene-footer>small{font-size:10px;color:#8db6a3}
.evolution-form-change{display:flex;justify-content:center;gap:9px;flex-wrap:wrap}
.evolution-form-change strong{color:#eff7e9}
.evolution-result-actions{display:flex;gap:10px;justify-content:center;width:100%}
.evolution-result-actions .btn{font-size:12px;padding:12px 18px}
.evolution-result-actions .primary{background:var(--evo-accent);border-color:var(--evo-accent);color:#112c35}
.evolution-result-actions .secondary{background:#ffffff08;border-color:#ffffff30;color:#e2eee7}
.evolution-skip{border:0;background:none;color:#d1e5d9;text-decoration:underline;text-underline-offset:4px;font-size:11px;padding:6px 16px}
.evolution-skipped *{animation:none!important;transition:none!important}.evolution-skipped .evolution-burst,.evolution-skipped .evolution-sparks{display:none}
.evolution-preload{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
@keyframes evolutionSpin{from{transform:rotateY(0deg) scale(1)}to{transform:rotateY(3240deg) scale(1.06)}}
@keyframes evolutionCharge{from{opacity:.4;transform:translate(-50%,-50%) scale(.85)}70%{opacity:.8}to{opacity:1;transform:translate(-50%,-50%) scale(1.9)}}
@keyframes evolutionRays{from{transform:rotate(0);opacity:.25}to{transform:rotate(85deg);opacity:.8}}
@keyframes evolutionBurst{0%{opacity:.96;transform:scale(.9)}25%{opacity:.9;transform:scale(1.5)}100%{opacity:0;transform:scale(2)}}
@keyframes evolutionArrive{from{opacity:0;transform:scale(.86) translateY(12px)}45%{opacity:1;transform:scale(1.035)}to{opacity:1;transform:none}}
@keyframes evolutionWords{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
@keyframes evolutionSpark{0%{opacity:0;transform:rotate(var(--angle)) translateX(35px)}20%{opacity:.9}to{opacity:0;transform:rotate(var(--angle)) translateX(var(--distance)) scale(.3)}}
@media(max-width:520px){.evolution-scene{padding:25px 14px 20px}.evolution-scene-header{height:105px}.evolution-scene-header h2{font-size:28px}.evolution-scene-stage{height:345px}.evolution-card{width:208px}.evolution-result-actions{gap:8px}.evolution-result-actions .btn{flex:1;padding:12px 8px;font-size:11px}.evolution-halo{width:290px;height:290px}}
@media(max-height:740px){.evolution-scene{padding-top:23px;padding-bottom:16px}.evolution-scene-header{height:94px;gap:9px}.evolution-scene-stage{height:290px}.evolution-card{width:180px}.evolution-scene-footer{min-height:112px;gap:10px}.evolution-scene-header h2{font-size:26px}.evolution-revealed .evolution-scene-status{font-size:25px}}
@media(prefers-reduced-motion:reduce){.evolution-scene *{animation:none!important;transition:none!important}.evolution-burst,.evolution-sparks{display:none}}
