/* One card shell for both demos; only their text, numbers and images differ. */
.hand-card.shared-card{box-sizing:border-box;width:162px;height:246px;padding:0;border:0;border-radius:10px;background:transparent;color:#302b24;touch-action:none;user-select:none;cursor:grab;overflow:visible;transform-origin:50% 110%;transition:transform .16s ease-out,filter .16s ease-out}
.hand-card.shared-card:active{cursor:grabbing}
.hand-card.shared-card.role-attack{--accent:#a05542;--accent-dark:#6e2d22}.hand-card.shared-card.role-defense{--accent:#477184;--accent-dark:#28495b}.hand-card.shared-card.role-skill{--accent:#75669a;--accent-dark:#443d66}.hand-card.shared-card.role-power{--accent:#997c47;--accent-dark:#65502f}
.hand-card.shared-card .card-face{position:relative;box-sizing:border-box;display:flex;flex-direction:column;width:100%;height:100%;padding:8px;overflow:hidden;border:3px solid var(--accent);border-radius:10px;background:linear-gradient(100deg,#f0e4c3,#d4c49c);box-shadow:inset 0 0 0 1px #352918,inset 0 0 0 3px #c4ae72,0 5px 14px #0009;transition:transform .16s ease-out,box-shadow .16s ease-out}
.hand-card.shared-card .card-cost{position:absolute;top:-10px;left:-10px;display:flex;align-items:center;justify-content:center;width:33px;height:33px;z-index:2;border:2px solid #d9c28b;outline:1px solid #463925;border-radius:50%;background:radial-gradient(circle at 35% 25%,var(--accent),var(--accent-dark));box-shadow:0 2px 4px #0007;color:#fff6d8;font:700 21px Georgia,serif}
.hand-card.shared-card .card-title{display:block;flex:none;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;font-weight:800;line-height:24px;color:#251e19}
.hand-card.shared-card .card-portrait{position:relative;display:flex;align-items:center;justify-content:center;flex:none;height:103px;min-height:103px;margin-top:3px;overflow:hidden;border:1px solid var(--accent-dark);border-radius:4px;background:radial-gradient(ellipse at 50% 20%,#ffffff22,transparent 65%),linear-gradient(150deg,var(--accent),var(--accent-dark));box-shadow:inset 0 0 20px #0004}
.hand-card.shared-card .card-portrait img,.hand-card.shared-card .card-portrait svg{width:100%;height:100%;object-fit:cover;display:block}
.hand-card.shared-card .card-portrait .portrait-role{position:absolute;bottom:4px;left:4px;z-index:2;padding:1px 4px;background:#101a20ce;border-radius:2px;color:#f4e8cb;font-size:8px;letter-spacing:1px}
.hand-card.shared-card .card-tactic{display:block;flex:none;text-align:center;font-size:12px;font-weight:700;line-height:23px;letter-spacing:.5px;color:#473621;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hand-card.shared-card .card-effect{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:center;gap:2px;padding:2px 0;margin:0;overflow:hidden;text-align:center;font-size:11px;line-height:1.4;color:#2f2c25;overflow-wrap:anywhere}
.hand-card.shared-card .card-effect>span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hand-card.shared-card .card-foot{display:block;flex:none;text-align:center;color:#857651;font-size:8px;line-height:12px;letter-spacing:1px}
.hand-card.shared-card:hover:not(.selected),.hand-card.shared-card:focus-visible:not(.selected){z-index:40;filter:drop-shadow(0 0 10px #edce8270)}
.hand-card.shared-card:hover:not(.selected) .card-face,.hand-card.shared-card:focus-visible:not(.selected) .card-face{transform:translateY(-12px) scale(1.05)}
.hand-card.shared-card.selected{z-index:41;outline:2px solid #f1d383;outline-offset:3px;filter:drop-shadow(0 0 13px #d7b75f88)}
.hand-card.shared-card.selected .card-face{box-shadow:0 0 24px #ebcc6d66,inset 0 0 0 2px #ccb579}
.hand-card.shared-card.unplayable,.hand-card.shared-card.not-playable{filter:saturate(.42) brightness(.78)}
.hand-card.shared-card.card-drag-origin{opacity:.28}
body>.hand-card.shared-card.card-drag-proxy{position:fixed!important;left:0;top:0;bottom:auto!important;z-index:2000!important;transform:translate(-50%,-50%) rotate(-5deg) scale(1.07)!important;pointer-events:none!important;opacity:.95;cursor:grabbing;filter:drop-shadow(0 16px 20px #000b) drop-shadow(0 0 12px #e8c87655)!important;transition:none!important}
body>.card-drag-proxy .card-face{transform:none!important}
.battle .hand-card.shared-card::before{content:none}
.battle .hand-area{position:relative;display:block;min-height:270px;overflow:visible;padding:0;perspective:none;--step:clamp(36px,calc((100vw - 430px)/var(--slots)),135px)}
.battle .hand-area .hand-card.shared-card{position:absolute;left:50%;bottom:20px;flex:none;transform:translateX(calc(-50% + var(--offset)*var(--step))) translateY(min(var(--bend),18px)) rotate(var(--tilt));z-index:calc(3 + var(--order));width:162px;height:246px}
.battle .hand-area .hand-card.shared-card:hover:not(.selected),.battle .hand-area .hand-card.shared-card:focus-visible:not(.selected){transform:translateX(calc(-50% + var(--offset)*var(--step))) translateY(-19px) rotate(0)}
.battle .hand-area .hand-card.shared-card.selected{transform:translateX(calc(-50% + var(--offset)*var(--step))) translateY(-29px) rotate(0) scale(1.055)}
.combat-screen .hand-fan .hand-card.shared-card{width:162px;height:246px}
.battle .hand-area .hand-card.shared-card.role-attack{--accent:#a05e4e;--accent-dark:#683c32}
.battle .hand-area .hand-card.shared-card.role-skill{--accent:#597c88;--accent-dark:#344f64}
.battle .hand-area .hand-card.shared-card.role-power{--accent:#8b7195;--accent-dark:#574562}
.battle .hand-area .hand-card.shared-card.role-status{--accent:#73695e;--accent-dark:#40352f}
@media(max-width:1100px){.combat-screen .hand-fan .hand-card.shared-card,.battle .hand-area .hand-card.shared-card{width:146px;height:218px}.hand-card.shared-card .card-portrait{height:84px;min-height:84px}.hand-card.shared-card .card-title{font-size:12px;line-height:20px}.hand-card.shared-card .card-tactic{font-size:10px;line-height:20px}.hand-card.shared-card .card-effect{font-size:10px}}
@media(max-width:720px){.combat-screen .hand-fan{display:flex;flex-wrap:nowrap;align-items:flex-start;gap:10px;overflow-x:auto;overflow-y:hidden;padding:25px 8px 10px;scroll-snap-type:x proximity}}
@media(max-width:720px){.battle .hand-area{display:flex;align-items:flex-start;gap:10px;min-height:245px;overflow-x:auto;overflow-y:hidden;padding:24px 9px 12px;scroll-snap-type:x proximity}.combat-screen .hand-fan .hand-card.shared-card,.battle .hand-area .hand-card.shared-card{position:relative;left:auto;bottom:auto;width:142px;min-width:142px;height:212px;flex:0 0 142px;transform:none;scroll-snap-align:center;z-index:1}.combat-screen .hand-fan .hand-card.shared-card:hover:not(.selected),.battle .hand-area .hand-card.shared-card:hover:not(.selected){transform:translateY(-7px)}.combat-screen .hand-fan .hand-card.shared-card.selected,.battle .hand-area .hand-card.shared-card.selected{transform:translateY(-15px);z-index:2}.hand-card.shared-card .card-face{padding:7px;border-width:2px}.hand-card.shared-card .card-title{font-size:11px}.hand-card.shared-card .card-effect{font-size:9px}.hand-card.shared-card .card-foot{font-size:7px;line-height:11px}.hand-card.shared-card .card-cost{width:26px;height:26px;font-size:17px;top:-7px;left:-7px}}
@media(max-width:390px){.combat-screen .hand-fan .hand-card.shared-card,.battle .hand-area .hand-card.shared-card{width:124px;min-width:124px;height:177px;flex-basis:124px}.hand-card.shared-card .card-face{padding:5px}.hand-card.shared-card .card-portrait{height:64px;min-height:64px}.hand-card.shared-card .card-title{font-size:10px;line-height:18px}.hand-card.shared-card .card-tactic{font-size:9px;line-height:18px}.hand-card.shared-card .card-effect{font-size:8px}}
@media(prefers-reduced-motion:reduce){.hand-card.shared-card,.hand-card.shared-card .card-face{transition:none!important}}
@media(max-width:720px){.hand-card.shared-card{touch-action:pan-x}}
