body.in-battle .enemy .phase-warning{color:#f3cfa1;font-size:12px;line-height:1.5;border-top:1px solid #cead7955;padding-top:4px}
body.in-battle .enemy .intent-special{font-size:11px;line-height:1.45;text-shadow:0 1px 4px #000}
#modal[data-view=upgrade] .modal-body:has(.refinement){max-height:calc(90dvh - 190px);overflow-y:auto;padding-block:8px}
#modal .refinement{padding:0 12px}
#modal .refinement .flow-upgrade-pair{margin:10px 0;gap:30px}
#modal .refinement .flow-upgrade-pair .hand-card{width:170px!important;height:255px!important;flex:0 0 170px!important;margin-bottom:22px}
#modal .refinement .flow-upgrade-detail{padding:8px 0}
#modal .refinement .flow-upgrade-detail p{margin:5px 0}
#modal .refinement-actions{flex-shrink:0;margin:0;padding:12px 20px;border-top:1px solid #b6a0cb55;background:linear-gradient(90deg,#17111ee8,#272030,#17111ee8);position:relative;z-index:5;gap:16px}
#modal .refinement-actions .button{min-height:46px;margin:0}
body.in-result .front-header small:empty{display:none}
@media(max-width:700px){
 #modal .refinement .flow-upgrade-pair{gap:12px}
 #modal .refinement .flow-upgrade-pair .hand-card{width:125px!important;height:200px!important;flex-basis:125px!important}
 #modal .refinement-actions{gap:8px;padding:8px}
 #modal .refinement-actions .button{font-size:12px;min-width:0;padding:8px 15px}
}

/* Lift selected opening cards independently of the fan's rotation and hover. */
body.in-battle .fan-hand.mulligan-hand>.hand-card.card-surface[data-action=swap]{translate:0 0;transition:translate .18s ease,filter .18s,box-shadow .18s}
body.in-battle .fan-hand.mulligan-hand>.hand-card.card-surface.swap-selected[data-action=swap]{translate:0 -68px;z-index:45!important;outline:2px solid #e3bcff;outline-offset:3px;filter:drop-shadow(0 0 12px #c18ce777);box-shadow:0 16px 24px #090411a6}
body.in-battle .fan-hand.mulligan-hand>.hand-card.card-surface[data-action=swap]{transform:translateX(calc(var(--shift)*var(--step))) translateY(var(--rise)) rotate(var(--tilt))!important}
body.in-battle .fan-hand.mulligan-hand>.card-surface.swap-selected[data-action=swap] .card-bottom{display:block;inset:auto 5px 7px;height:24px;line-height:24px;padding:0;background:#302039f2;color:#f6e7ff;border:1px solid #caa6de99;text-align:center;font-size:10px;letter-spacing:1px;z-index:12}
body.in-battle .hand-center:has(.mulligan-hand) .hand-instructions{visibility:visible;font-size:12px;height:26px;bottom:-28px;left:0;right:0;justify-content:center;color:#f0dafa;text-shadow:0 2px 5px #000;background:linear-gradient(90deg,transparent,#160e24d9 20%,#160e24d9 80%,transparent)}
@media(max-width:700px){
 body.in-battle .fan-hand.mulligan-hand{padding-top:50px!important}
 body.in-battle .fan-hand.mulligan-hand>.hand-card.card-surface.swap-selected[data-action=swap]{translate:0 -40px}
 body.in-battle .fan-hand.mulligan-hand>.hand-card.card-surface[data-action=swap]{transform:none!important}
 body.in-battle .hand-center:has(.mulligan-hand) .hand-instructions{font-size:10px}
}
@media(prefers-reduced-motion:reduce){body.in-battle .fan-hand.mulligan-hand>.hand-card.card-surface[data-action=swap]{transition:none}}
