/* Multi-plane construction: front artwork, side walls, lid surface, metal frame and lock. */
.chest-zone { transform-style:preserve-3d; }
.chest-volume { position:absolute; inset:0; transform-style:preserve-3d; }
.chest-back-plane { position:absolute; left:8%; right:8%; top:14%; bottom:11%; transform:translateZ(-38px); border-radius:30px 30px 18px 18px; background:linear-gradient(90deg,#0b1720,#513a29 26%,#20160f 72%,#071017); box-shadow:inset 0 0 0 5px #7d9ba4a3,inset 0 0 26px #000d,0 20px 30px #001020b8; }
.chest-side { position:absolute; z-index:1; top:21%; height:60%; width:78px; transform-style:preserve-3d; border:4px solid #9eb8bd; box-shadow:inset 0 0 0 4px #25404a,inset 0 0 18px #120c08,0 0 11px #9de7e53d; background:repeating-linear-gradient(0deg,#28170e 0 10px,#51321e 11px 16px,#1b100b 17px 23px),linear-gradient(90deg,#0b2029,#583c24 48%,#10232a); }
.chest-side::before,.chest-side::after { content:""; position:absolute; left:-8px; right:-8px; height:9px; background:linear-gradient(#d7f1ef,#627f88 35%,#182b32 65%,#b6d7d5); box-shadow:0 1px 4px #001015; }
.chest-side::before { top:22%; }.chest-side::after { bottom:20%; }
.chest-side-right { left:84%; transform:translateZ(35px) rotateY(90deg); transform-origin:left center; border-radius:4px 14px 14px 4px; }
.chest-side-left { right:84%; transform:translateZ(35px) rotateY(-90deg); transform-origin:right center; border-radius:14px 4px 4px 14px; filter:brightness(.65); }
.chest-top-plane { position:absolute; z-index:2; left:12%; top:5%; width:76%; height:83px; transform:translateZ(37px) rotateX(73deg); transform-origin:center bottom; border:4px solid #b4d5d5; border-radius:52% 52% 13px 13px; background:radial-gradient(ellipse at 50% 10%,#96714c,#4d311e 45%,#140d09 86%); box-shadow:inset 0 12px 16px #d9f5eb38,inset 0 -13px 16px #000b,0 -7px 15px #9de9e451; }
.chest-top-plane::before,.chest-top-plane::after { content:""; position:absolute; top:5%; bottom:5%; width:11px; background:linear-gradient(#e0f9f2,#6e8e93 32%,#1d3339 69%,#b8d7d7); box-shadow:0 0 5px #00151c; }
.chest-top-plane::before { left:21%; }.chest-top-plane::after { right:21%; }
.chest-top-plane i { position:absolute; left:8%; right:8%; top:40%; height:10px; display:block; border-radius:50%; background:#d5fff49b; filter:blur(4px); opacity:.42; }
.chest-top-plane b { position:absolute; inset:12px 20px 20px; border-top:2px solid #ecfffb81; border-radius:50%; }
.chest-piece { z-index:4; transform:translateZ(38px); backface-visibility:hidden; }
.chest-lid { z-index:5; }
.chest-front-frame { position:absolute; z-index:7; inset:11% 8% 12%; transform:translateZ(44px); border:5px solid #9db8bb; border-radius:28px 28px 18px 18px; box-shadow:inset 0 0 0 3px #19323a,inset 0 0 0 6px #bedad5a6,0 0 8px #d2fff861; pointer-events:none; }
.chest-front-frame::before,.chest-front-frame::after { content:""; position:absolute; top:4%; bottom:4%; width:10px; background:linear-gradient(#e1fbf2,#6d8b91 36%,#1d3038 66%,#c0e0d9); box-shadow:0 0 5px #001b24; }
.chest-front-frame::before { left:26%; }.chest-front-frame::after { right:26%; }
.chest-lock-layer { position:absolute; z-index:8; inset:0; transform:translateZ(51px); pointer-events:none; overflow:hidden; }
.chest-lock-layer img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; clip-path:polygon(39% 30%,61% 30%,64% 69%,36% 69%); filter:brightness(1.2) saturate(1.12) drop-shadow(0 0 7px #89fff3a8); }
.charge .chest-shadow { animation:weightShadow 2.35s ease-in both; }
.charge .chest-side,.charge .chest-top-plane,.charge .chest-front-frame { animation:edgePulse 2.35s ease-in both; }
.charge .chest-volume { filter:drop-shadow(0 22px 14px #001529d9); }
.open .chest-volume,.open .chest-back-plane { opacity:0; transition:opacity .08s .1s; }
@keyframes weightShadow { 0% { transform:scale(.82); opacity:.4; } 42% { transform:scale(1.2); opacity:.82; } 76% { transform:scale(1.5); opacity:1; } 100% { transform:scale(1.28); opacity:.94; } }
@keyframes edgePulse { 0% { filter:brightness(.82); } 55% { filter:brightness(1.12); } 84% { filter:brightness(1.42) drop-shadow(0 0 6px #9ffff5); } 100% { filter:brightness(1.2); } }
