/* Card stage: sprites from an atlas painted at runtime (--atlas), sized by --cw/--ch set by CardStage.fit(). */
.cstage { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.cd { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); background-image: var(--atlas); background-size: 1300% 500%; border-radius: calc(var(--cw) * .06); box-shadow: 0 1px 2px rgba(0,0,0,.55), 0 3px 8px rgba(0,0,0,.28); transition: transform .24s cubic-bezier(.2,.8,.25,1); cursor: grab; will-change: transform; }
.cd.down { cursor: default; }
.cd.drag { transition: none; box-shadow: 0 14px 28px rgba(0,0,0,.55); cursor: grabbing; }
.cd.flipping { animation: cdflip .2s ease-in-out; }
@keyframes cdflip { 50% { filter: brightness(1.2); } }
.cd.hl { outline: 3px solid #ffe08a; outline-offset: -2px; box-shadow: 0 0 18px 4px rgba(255,224,138,.85); animation: cdpulse 1s ease-in-out infinite; }
.cd.hl2 { outline: 3px solid #8ad1ff; outline-offset: -2px; box-shadow: 0 0 16px 3px rgba(138,209,255,.8); }
.cd.sel { outline: 3px solid #fff3c0; outline-offset: -2px; box-shadow: 0 0 22px 6px rgba(255,243,192,.9); }
.cd.dim { filter: brightness(.55) saturate(.7); }
@keyframes cdpulse { 50% { box-shadow: 0 0 26px 8px rgba(255,224,138,1); } }
.cslot { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .07); border: 2px dashed rgba(240,226,190,.32); background: rgba(0,0,0,.14); display: grid; place-items: center; box-sizing: border-box; pointer-events: none; }
.cslot span { font: 700 calc(var(--cw) * .42) Cinzel, serif; color: rgba(240,226,190,.28); }
.cslot.ok { border-color: rgba(255,224,138,.9); box-shadow: 0 0 14px rgba(255,224,138,.5); }
.ccascade { position: absolute; inset: 0; z-index: 2000; pointer-events: none; }
