/* Bounded transform/opacity effects, shared SVG artwork, no canvas or particle loop. */
body .chest-batch-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 0 8px}
body .chest-batch-actions .btn{display:flex;flex-direction:column;gap:3px;min-width:0;min-height:64px;padding:10px 4px;white-space:normal}
body .chest-batch-actions strong{font-size:1.35rem;line-height:1.1}
body .chest-batch-actions small{font-size:.72rem;line-height:1.3}
body .chest-batch-actions .btn:disabled{opacity:.5;cursor:not-allowed}
body .chest-bag-space{font-size:.82rem;margin:8px 0;color:#365965}
body .chest-opening{--chest-aura:#f6cd77;color:#234f5a;min-width:0}
body .chest-opening [hidden]{display:none!important}
body .chest-opening-stage{text-align:center;overflow:hidden;padding:8px 0 22px;min-height:310px}
body .chest-opening-art{position:relative;isolation:isolate;width:min(100%,310px);margin:auto}
body .chest-opening .tidal-chest{position:relative;display:block;width:100%;height:auto;overflow:visible;z-index:2;filter:none}
body .chest-opening-rays{position:absolute;inset:14% 5%;border-radius:50%;background:radial-gradient(ellipse,var(--chest-aura),transparent 68%);opacity:.3;transform:scale(.65);z-index:0}
body .chest-opening .chest-body{transform-box:fill-box;transform-origin:50% 95%}
body .chest-opening .chest-lid{transform-box:fill-box;transform-origin:80% 70%}
body .chest-opening-caption{font-family:'Baloo 2',sans-serif;font-weight:700;font-size:1.2rem;margin:0 0 4px}
body .chest-opening [role=status]{font-size:.85rem;min-height:2em;margin:0 0 10px}
body .chest-opening-motes{position:absolute;inset:10%;pointer-events:none;z-index:3}
body .chest-opening-motes i{position:absolute;left:50%;top:50%;font-style:normal;color:#b58329;opacity:0;transform:rotate(calc(var(--n)*45deg)) translateY(0)}
body .chest-opening[data-phase=opening] .chest-body{animation:chest-unlock-shake .7s ease-in-out both}
body .chest-opening[data-phase=opening] .chest-lid{animation:chest-lid-lift .65s .7s cubic-bezier(.18,.85,.25,1.15) both}
body .chest-opening[data-phase=opening] .chest-opening-rays{animation:chest-treasure-light 1.45s .65s ease-out both}
body .chest-opening[data-phase=opening] .chest-opening-motes i{animation:chest-treasure-mote 1.2s .85s ease-out both}
body .chest-results-heading{text-align:center;margin:10px 0}
body .chest-results-heading h3{font-size:clamp(1.35rem,5vw,1.8rem);margin:3px 0;line-height:1.15}
body .chest-results-heading p{font-size:.82rem;margin:6px 0}
body .chest-haul-summary{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin:12px 0}
body .chest-haul-summary span{padding:3px 7px;font-size:.7rem;font-weight:800;background:#e5e4cf;color:#345563;border-bottom:2px solid #9cb6b5}
body .chest-haul-summary .haul-tier-3{background:#e8ddf6;color:#5b397d;border-color:#af84cd}
body .chest-haul-summary .haul-tier-4{background:#f8e7b3;color:#6c4c14;border-color:#d5ac49}
body .chest-haul-summary .haul-tier-5{background:#f7d5e7;color:#81375e;border-color:#da81ad}
body .chest-haul{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
body .chest-haul.single{grid-template-columns:minmax(0,220px);justify-content:center}
body .chest-haul-item{appearance:none;display:flex;align-items:center;flex-direction:column;gap:4px;min-width:0;padding:9px 5px 11px;color:#234e59;background:#f7efd9;border:1px solid #ccba88;border-top:3px solid var(--gear);font:inherit;text-align:center;cursor:pointer;animation:chest-item-appear .3s var(--reveal-delay) both}
body .chest-haul-item:hover{background:#fffbec;transform:translateY(-2px)}
body .chest-haul-item:focus-visible{outline:3px solid #1387a0;outline-offset:2px}
body .chest-haul-art{display:grid;place-items:center;width:100%;background:radial-gradient(ellipse,var(--gear),transparent 70%)}
body .chest-haul .gear-sprite{width:66px;height:66px;margin:0;animation:none!important;filter:none!important}
body .chest-haul.single .gear-sprite{width:120px;height:120px}
body .chest-haul-item strong{font-family:'Baloo 2',sans-serif;line-height:1.15;font-size:.94rem;overflow-wrap:anywhere}
body .chest-haul-rarity{font-size:.65rem;text-transform:uppercase;letter-spacing:.02em;line-height:1.3}
body .chest-haul-stats{font-size:.67rem;font-weight:700;font-variant-numeric:tabular-nums}
@keyframes chest-unlock-shake{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-4deg) translateY(-2px)}40%,80%{transform:rotate(4deg) translateY(-3px)}}
@keyframes chest-lid-lift{from{transform:translate(0,0) rotate(0)}to{transform:translate(3px,-30px) rotate(-26deg)}}
@keyframes chest-treasure-light{0%{opacity:0;transform:scale(.5)}40%{opacity:1}100%{opacity:.65;transform:scale(1.3)}}
@keyframes chest-treasure-mote{0%{opacity:0}20%{opacity:1}100%{opacity:0;transform:rotate(calc(var(--n)*45deg)) translateY(-125px) scale(.4)}}
@keyframes chest-item-appear{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:540px){body .chest-haul{grid-template-columns:repeat(2,minmax(0,1fr))}body .chest-opening-stage{min-height:270px}body .chest-opening-art{width:min(100%,260px)}}
@media(prefers-reduced-motion:reduce){body .chest-opening *,body .chest-haul-item{animation:none!important;transition:none!important}}
@media(prefers-reduced-motion:no-preference){html.chest-motion-paused .chest-opening *{animation-play-state:paused!important}}
