/* Species labels, a reusable evolution seal and Vaelgor's living card treatment. */
.dl-card:has(> .dl-species) { margin-bottom: calc(var(--w) * .2); }
.dl-species { position: absolute; bottom: calc(var(--w) * -.19); left: 7.5%; width: 85%; height: calc(var(--w) * .25); display: grid; place-items: center; padding-top: calc(var(--w) * .025); color: #fff1d3; font: 700 .55em/1 'DM Sans',sans-serif; text-align: center; z-index: 3; white-space: nowrap; background: url('/duel/evolution-art/species-plaque.webp') center/100% auto no-repeat; filter: drop-shadow(0 3px 2px #0006); text-shadow: 0 1px 2px #000; }
.dl-evo-badge { position: absolute; right: -8%; top: 26%; width: 21%; height: 22%; z-index: 8; filter: drop-shadow(0 0 4px #b363ff); }
.dl-evo-badge svg { width: 100%; height: 100%; fill: #251142; stroke: #e8bdff; stroke-width: 1.6; }
.dl-evo-badge img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dl-evo-badge svg path+path { fill: none; stroke: #fff0bf; stroke-width: 2; }
.dl-evolution { filter: drop-shadow(0 0 7px #ac60e655); }
.dl-evolution .dl-art { overflow: hidden; flex-basis: 49%; min-height: 0; }
.dl-evolution .dl-art .dl-img { object-position: 50% 24%; animation: evo-portrait 7s ease-in-out infinite; }
.dl-evolution .dl-card-body { min-height: 0; padding: 4% 7% 13%; }
.dl-evolution .dl-card-body small { -webkit-line-clamp: 6; font-size: .57em; line-height: 1.15; }
.dl-evo-art-fx { position: absolute; pointer-events: none; top: 2%; left: 2%; right: 2%; height: 49%; overflow: hidden; border-radius: 7% 7% 0 0; background: radial-gradient(ellipse at 50% 80%,#b35bff33,transparent 65%); mix-blend-mode: screen; }
.dl-evo-art-fx::before,.dl-evo-art-fx::after { content: ''; position: absolute; border: 1px solid #ddb5ffa0; border-radius: 50%; width: 45%; aspect-ratio: 1; right: 3%; top: 7%; animation: evo-rune 12s linear infinite; box-shadow: 0 0 9px #c975ff, inset 0 0 8px #be6cff; border-style: dashed; }
.dl-evo-art-fx::after { width: 32%; right: 10%; top: 15%; animation-direction: reverse; border-style: dotted; }
.dl-evo-art-fx i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff2cb; bottom: -10%; left: 15%; box-shadow: 0 0 5px 2px #bd70ff; animation: evo-soul 3.7s linear infinite; }
.dl-evo-art-fx i:nth-child(2) { left: 33%; animation-delay: -1.7s; }.dl-evo-art-fx i:nth-child(3) { left: 57%; animation-delay: -2.8s; }.dl-evo-art-fx i:nth-child(4) { left: 81%; animation-delay: -1s; }.dl-evo-art-fx i:nth-child(5) { left: 70%; animation-delay: -3.3s; }.dl-evo-art-fx i:nth-child(6) { left: 44%; animation-delay: -.4s; }
.dl-unit.evolved .dl-unit-body { box-shadow: 0 0 8px 2px #b36dff88,0 0 24px #8d3de744; }
.dl-unit.evolved .dl-art img { animation: evo-portrait 7s ease-in-out infinite; }
.dl-evo-scene.dl-standin { position: fixed; inset: 0; width: 100vw; height: 100dvh; z-index: 30; background: radial-gradient(ellipse,#251244cc,#050815cc); backdrop-filter: blur(4px); pointer-events: none; }
.dl-evo-center { position: absolute; left: 50%; top: 50%; width: 210px; height: 294px; transform: translate(-50%,-50%); perspective: 800px; }
.dl-evo-before,.dl-evo-after { position: absolute; inset: 0; }
.dl-evo-after { opacity: 0; }
.dl-evo-center .dl-card { --w: 210px; }
.dl-evo-caption { position: absolute; top: max(25px,calc(50% - 235px)); width: 100%; text-align: center; display: grid; gap: 10px; color: #f3d7ff; }
.dl-evo-caption small { letter-spacing: .4em; font: 800 11px 'DM Sans',sans-serif; }
.dl-evo-caption strong { font: 700 clamp(20px,3vw,34px) 'Fraunces',Georgia,serif; text-shadow: 0 0 24px #c574ff; }
.dl-evo-ritual { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; }
.dl-evo-ritual i { position: absolute; width: min(65vw,400px); aspect-ratio: 1; border: 2px dashed #d5adff; border-radius: 50%; box-shadow: 0 0 40px #b255ff66,inset 0 0 30px #b255ff44; animation: evo-rune 7s linear infinite; }
.dl-evo-ritual i:nth-child(2) { width: min(78vw,490px); border-width: 1px; border-style: dotted; animation-direction: reverse; }.dl-evo-ritual i:nth-child(3) { width: min(85vw,560px); border-width: 1px; opacity: .4; }
.rvg-evo-demo { position: relative; min-height: 270px; display: flex; justify-content: center; align-items: center; gap: 60px; margin-block: 22px; background: radial-gradient(ellipse,#35275d55,transparent 70%); border: 1px solid #bbaa8a; border-radius: 8px; overflow: hidden; }
.rvg-evo-base,.rvg-evo-lord { transition: opacity .6s,transform .7s,filter .7s; }
.rvg-evo-lord { opacity: .4; transform: scale(.85); }.rvg-evo-rune { font-size: 45px; color: #75409b; position: absolute; left: calc(50% - 14px); }
[data-chapter="evolution"][data-step="1"] .rvg-evo-lord { opacity: 1; transform: translateX(-35px) rotate(-7deg); }
[data-chapter="evolution"][data-step="2"] .rvg-evo-base,[data-chapter="evolution"][data-step="3"] .rvg-evo-base { opacity: 0; transform: translateX(55px) scale(.3); filter: brightness(3); }
[data-chapter="evolution"][data-step="2"] .rvg-evo-lord,[data-chapter="evolution"][data-step="3"] .rvg-evo-lord { opacity: 1; transform: translateX(-70px) scale(1.13); filter: drop-shadow(0 0 20px #ae5cf5); }
.rv-market-v2 .rv-market-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rv-evo-offer { display: grid; grid-template-columns: minmax(270px,.9fr) minmax(0,1.1fr); gap: 45px; padding: 40px; border: 1px solid #ba9ac8; border-top: 4px solid #9360b7; background: radial-gradient(ellipse at 15% 30%,#a95be820,transparent 55%),#fff8eb; }
.rv-evo-showcase { position: relative; min-height: 390px; display: flex; align-items: center; justify-content: center; padding: 20px; isolation: isolate; background: radial-gradient(ellipse,#78429d55,transparent 70%); }
.rv-evo-showcase > .dl-card { position: relative; z-index: 1; box-shadow: 0 18px 35px #27153755; }
.rv-evo-orbit { position: absolute; inset: 0; display: grid; place-items: center; z-index: -1; }
.rv-evo-orbit i { position: absolute; width: 95%; aspect-ratio: 1; border: 1px dashed #b384cc; border-radius: 50%; animation: evo-rune 24s linear infinite; }.rv-evo-orbit i+i { width: 82%; animation-direction: reverse; border-style: dotted; }
.rv-evo-exclusive { position: absolute; bottom: 0; text-transform: uppercase; font-size: 9px; font-weight: 800; letter-spacing: .15em; color: #83569b; }
.rv-evo-copy h2 { font: 800 clamp(30px,3vw,44px)/1.05 'Fraunces',Georgia,serif; margin: 15px 0; color: #172d44; }.rv-evo-copy h2 em { color: #7a479a; font-style: normal; }
.rv-evo-copy p { font-size: 12px; line-height: 1.65; color: #6c6870; }.rv-evo-copy .rv-evo-name { font-weight: 800; color: #3e3354; }
.rv-evo-stats { display: flex; gap: 17px; margin-block: 20px; }.rv-evo-stats span { display: flex; align-items: center; gap: 6px; color: #4f4662; font-size: 11px; font-weight: 700; }.rv-evo-stats img { width: 27px; height: 27px; object-fit: contain; }
.rv-evo-price { display: flex; align-items: center; gap: 11px; padding-block: 17px; border-block: 1px solid #dbc7a7; margin-top: 22px; }.rv-evo-price strong { font: 800 29px 'Fraunces',Georgia,serif; color: #523f29; }.rv-evo-price strong small { font: 700 11px 'DM Sans',sans-serif; }.rv-evo-price > span { margin-left: auto; font-size: 10px; color: #817361; line-height: 1.5; }
.rv-evo-buy { width: 100%; background: linear-gradient(150deg,#4e306b,#192b47); color: #ffedc4; border: 1px solid #a47cba; border-radius: 3px; min-height: 48px; padding: 13px; font: 800 12px 'DM Sans',sans-serif; box-shadow: 0 3px #16283f; cursor: pointer; margin-top: 17px; }.rv-evo-buy:disabled { opacity: .65; cursor: default; }.rv-evo-buy:hover:not(:disabled) { filter: brightness(1.13); }
.rv-evo-requirement { display: block; margin-top: 17px; color: #837768; font-size: 10px; line-height: 1.6; }.rv-evo-wallet { display: inline-block; color: #714b90; font-size: 11px; margin-top: 10px; }.rv-evo-status { color: #73528b; font-size: 12px; }
body.rv-evo-modal-open { overflow: hidden; }.rv-evo-modal { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; background: #09172bcc; backdrop-filter: blur(6px); }.rv-evo-modal section { position: relative; width: min(480px,100%); max-height: 90dvh; overflow: auto; padding: 34px; background: #fff8e9; border: 1px solid #b69b65; border-radius: 8px; color: #21344d; }.rv-evo-modal h2 { font: 700 32px 'Fraunces',Georgia,serif; margin: 16px 0; }.rv-evo-modal p { font-size: 12px; line-height: 1.6; }.rv-evo-modal dl div { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid #d8c8a6; font: 12px 'DM Sans',sans-serif; }.rv-evo-modal dd { margin: 0; font-weight: 800; }.rv-evo-close { position: absolute; right: 14px; top: 10px; background: none; color: #746681; font-size: 25px; }
@keyframes evo-portrait { 0%,100% { transform: scale(1.02) translateY(0); filter: brightness(1); } 50% { transform: scale(1.06) translateY(-1.5%); filter: brightness(1.12) saturate(1.12); } }
@keyframes evo-rune { to { rotate: 360deg; } }
@keyframes evo-soul { 0% { transform: translateY(0) translateX(0); opacity: 0; } 15% { opacity: 1; } 80% { opacity: .6; } 100% { transform: translateY(-160px) translateX(12px); opacity: 0; } }
body.rv-market-motion-paused .dl-evolution *,body.rv-market-motion-paused .dl-unit.evolved *,body.rv-market-motion-paused .rv-evo-orbit i { animation-play-state: paused; }
@media(max-width:720px) { .rv-evo-offer { grid-template-columns: minmax(0,1fr); padding: 22px; gap: 30px; }.rv-evo-showcase { min-height: 375px; }.rv-evo-stats { gap: 11px; }.rv-market-v2 .rv-market-tabs { grid-template-columns: minmax(0,1fr); }.rv-evo-modal section { padding: 27px 21px; } }
@media(prefers-reduced-motion:reduce) { .dl-evolution *,.dl-unit.evolved *,.rv-evo-orbit i,.dl-evo-ritual i { animation: none !important; }.rvg-evo-base,.rvg-evo-lord { transition: none; } }

/* Legends tab: shop cards and the Darkness unlock */
.rv-brothers-offer { margin-bottom: 28px; border-top-color: #d98c3a; background: radial-gradient(ellipse at 12% 45%,#f799332d,transparent 50%),radial-gradient(ellipse at 60% 20%,#9455cb22,transparent 55%),#fff8eb; }
.rv-brothers-cards { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 350px; min-width: 0; }
.rv-brothers-cards .dl-card { --w: clamp(90px,14vw,180px) !important; }
.rv-brothers-cards > div:first-child { transform: rotate(-5deg) translateY(-9px); }
.rv-brothers-cards > div:last-child { transform: rotate(5deg) translateY(9px); }
.rv-brothers-cards > div { cursor: zoom-in; }
.rv-brothers-cards > div:focus-visible { outline: 3px solid #9763c1; outline-offset: 6px; }
@media(max-width:720px) { .rv-brothers-cards { min-height: 280px; }.rv-brothers-cards .dl-card { --w: clamp(90px,30vw,180px) !important; } }
.rv-legend-vip { margin: 0 0 18px; padding: 10px 14px; background: #163958; color: #ffe1a0; font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.rv-legend-title { margin: 42px 0 18px; font: 800 28px 'Fraunces', Georgia, serif; color: #1d2f45; }
.rv-legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.rv-legend-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; padding: 24px; border: 1px solid #ba9ac8; background: #fffaf2; }
.rv-legend-face { display: grid; place-items: start center; }
.rv-legend-copy h3 { margin: 6px 0 8px; font: 800 22px 'Fraunces', Georgia, serif; color: #1d2f45; }
.rv-legend-copy p { margin: 0 0 14px; font-size: 12px; line-height: 1.6; color: #6a6258; }
.rv-legend-price { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.rv-legend-price strong { font: 800 26px 'Fraunces', Georgia, serif; color: #8c6a1d; }
.rv-legend-price small { color: #8a806e; font-size: 11px; }
.rv-faction-unlock { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 28px; padding: 28px; border: 1px solid #5e4a78; background: linear-gradient(120deg, #241a35, #3a2a52); color: #f1e6ff; }
.rv-faction-unlock h3 { margin: 6px 0 8px; font: 800 26px 'Fraunces', Georgia, serif; color: #fff; }
.rv-faction-unlock p { margin: 0; font-size: 13px; line-height: 1.65; color: #d6c6ec; }
.rv-faction-unlock .rv-eyebrow { color: #d9b8ff; }
.rv-faction-actions { display: grid; gap: 10px; }
.rv-faction-owned { font: 800 18px 'Fraunces', Georgia, serif; color: #bff5d4 !important; text-align: center; }
@media (max-width: 720px) { .rv-legend-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } .rv-faction-unlock { grid-template-columns: 1fr; } }

/* RL07 uses square portraits with headroom, including the shorter evolution art window. */
.dl-card .dl-art[data-art-set="RL07"] .dl-img { object-position: 50% 0%; }
.dl-unit .dl-art[data-art-set="RL07"] .dl-img { object-position: 50% 50%; }
.dl-evolution .dl-art[data-art-set="RL07"] .dl-img,
.dl-unit.evolved .dl-art[data-art-set="RL07"] .dl-img { animation: rl07-portrait-light 7s ease-in-out infinite; }
@keyframes rl07-portrait-light { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.08) saturate(1.08); } }

/* SB01 shares the original Vesa portrait framing: square art with headroom. */
.dl-card .dl-art[data-art-set="SB01"] .dl-img { object-position:50% 0%; }
.dl-unit .dl-art[data-art-set="SB01"] .dl-img { object-position:50% 50%; }

/* Keep the rising soul entirely in the square spell illustration. */
.dl-card .dl-art[data-art-set="MG01"] .dl-img { object-position:50% 0%; }

/* WD01 wedding bundle: all four cards stay visible and can be opened in the card viewer. */
.rv-wedding-offer{margin-bottom:28px;border-color:#c8b278;border-top-color:#b29045;background:radial-gradient(ellipse at 10% 20%,#e8d9a144,transparent 52%),radial-gradient(ellipse at 80% 80%,#c2e2d72b,transparent 55%),#fff9ed;align-items:center}
.rv-wedding-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-items:center;align-items:start;gap:22px 12px;min-width:0}.rv-wedding-cards>div{cursor:zoom-in;transition:transform .2s}.rv-wedding-cards>div:hover{transform:translateY(-5px)}.rv-wedding-cards>div:focus-visible{outline:3px solid #a4843d;outline-offset:5px}.rv-wedding-cards .dl-card{--w:clamp(100px,13vw,160px)!important}.rv-wedding-details{list-style:none;padding:0;margin:18px 0;display:grid;gap:13px}.rv-wedding-details li{border-left:2px solid #c9ab61;padding-left:13px}.rv-wedding-details b,.rv-wedding-details small,.rv-wedding-details span{display:block}.rv-wedding-details b{font-size:13px;color:#493c27}.rv-wedding-details small{font-size:10px;color:#8a7248;margin:3px 0}.rv-wedding-details span,.rv-wedding-synergy{font-size:12px;line-height:1.6;color:#6b6653}.rv-wedding-offer .rv-evo-copy h2{color:#5d4930}.rv-wedding-offer .rv-evo-copy h2 em{color:#a58139}.dl-card .dl-art[data-art-set="WD01"] .dl-img{object-position:50% 0%}.dl-unit .dl-art[data-art-set="WD01"] .dl-img{object-position:50% 50%}
@media(max-width:720px){.rv-wedding-cards{gap:18px 10px}.rv-wedding-cards .dl-card{--w:clamp(95px,34vw,155px)!important}.rv-wedding-offer{gap:26px}.rv-wedding-details{gap:12px}}
@media(prefers-reduced-motion:reduce){.rv-wedding-cards>div{transition:none}.rv-wedding-cards>div:hover{transform:none}}
