/* A brief triumph, then a readable reward ledger. All decoration is real game art. */
#infoDialog:has(.boss-victory),#infoDialog:has(.premium-chest){width:min(720px,calc(100% - 20px));max-width:720px;border:1px solid #ad8953;background:#0d1722;box-shadow:0 20px 90px #000a}
#infoDialog:has(.boss-victory)::backdrop,#infoDialog:has(.premium-chest)::backdrop{background:#03070bd9;backdrop-filter:blur(4px)}
#infoDialog:has(.boss-victory) .dialogcontent,#infoDialog:has(.premium-chest) .dialogcontent{padding:22px}
#infoDialog:has(.boss-victory) #infoTitle{font-size:24px;margin:0 0 12px;color:#b8c4cb}
.boss-triumph{display:flex;align-items:center;gap:20px;padding:8px 0 20px;border-bottom:1px solid #6a573d}
.boss-portrait{display:block;flex:none;width:112px;height:112px;background-size:400% 300%;background-position:0 0;filter:saturate(.55) drop-shadow(0 4px 14px #d6ae4f33)}
.boss-portrait.milestone-portrait{background-size:400% 400%}
#infoDialog .boss-triumph h3{font-size:32px;margin:7px 0;color:#f2d6a0}
#infoDialog .boss-triumph p{font-size:14px;line-height:1.5;color:#b8c4cd;margin:0}
.boss-ledger{margin-top:18px}
.boss-ledger-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
#infoDialog .boss-ledger-heading h3{margin:0;font-size:20px;color:#e4ccb0}
#infoDialog [data-skip-rewards]{font-size:12px;min-height:44px;padding:7px 10px;background:#1b2935;color:#c0cbd2;border-color:#485867}
#infoDialog .boss-ledger table{margin-top:10px;font-size:14px;table-layout:fixed}
#infoDialog .boss-ledger th:first-child{width:40%}
#infoDialog .boss-ledger th,#infoDialog .boss-ledger td{padding:9px 4px;border-bottom:1px solid #354453}
#infoDialog .boss-ledger thead th{font-size:12px;color:#aebdc8}
#infoDialog .boss-ledger tbody tr:last-child{font-weight:400;color:#d5c4a7}
.boss-resource-total{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:14px;border:1px solid #8b704b;border-radius:10px;background:#20262c;padding:14px 8px;gap:8px;text-align:center}
.boss-resource-total small{display:block;font-size:13px;color:#c0b7a4}
.boss-resource-total strong{display:block;margin-top:5px;font-size:28px;font-variant-numeric:tabular-nums;color:#f5d49b;overflow-wrap:anywhere}
#infoDialog .boss-ledger>p{font-size:12px;text-align:center;color:#a4b5c2;margin:8px 0 0}
.boss-chest-prize{display:flex;align-items:center;gap:18px;margin:20px 0 4px;padding:12px;border:1px solid #756044;border-radius:12px;background:#101d2b}
.boss-chest-prize>img{width:112px;height:112px;object-fit:contain;flex:none;border-radius:8px}
#infoDialog .boss-chest-prize h3{margin:6px 0;font-size:23px;color:#efd09b}
#infoDialog .boss-chest-prize p,#infoDialog .boss-chest-claimed{font-size:14px;line-height:1.5;color:#bdc8d0;margin:0}
#infoDialog .boss-victory .wave-result-details{margin:10px 0 0}
#infoDialog .boss-victory .wave-result-details summary{min-height:44px;padding:12px 0;font-size:14px;color:#c8b79b}
#infoDialog .boss-victory .wave-result-details p{font-size:14px;line-height:1.5}
#infoDialog .premium-chest{width:190px;height:150px;margin:0 auto 8px}
.premium-chest img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transition:opacity .25s,transform .3s}
.premium-chest .chest-open{opacity:0;transform:scale(.94)}
.opened .premium-chest .chest-closed{opacity:0;transform:scale(1.03)}
.opened .premium-chest .chest-open{opacity:1;transform:none}
#infoDialog:has(.premium-chest) #infoTitle{color:#efcd95;font-size:28px}
#infoDialog:has(.premium-chest) .chest-reveal>p{font-size:16px;line-height:1.5;color:#c1cbd3}
#infoDialog .milestone-rewards{gap:8px}
#infoDialog .milestone-rewards button{display:flex;align-items:center;gap:14px;border:1px solid #675842;background:#142330;padding:10px;text-align:left;min-height:84px}
.milestone-rewards img{width:62px;height:62px;object-fit:contain;flex:none;border-radius:8px}
#infoDialog .milestone-rewards strong{color:#ead0a4;font-size:17px;margin:3px 0}
#infoDialog .milestone-rewards small{font-size:12px;margin:0;color:#bca783}
#infoDialog .milestone-rewards span>span{display:block;font-size:14px;line-height:1.4;color:#b9c7d1}
.opened .milestone-rewards,.opened .chest-reveal-intro,.opened #openChestAction{display:none!important}
#infoDialog .chest-reward>img{display:block;width:128px;height:128px;object-fit:contain;margin:0 auto 12px;border-radius:12px;box-shadow:0 0 30px #d6ab5022}
#infoDialog .chest-reward p{font-size:16px;line-height:1.5;color:#d0d9dd}
#infoDialog .chest-reward strong{font-size:14px;color:#c6dcbd}
.celebrating .boss-ledger tbody tr{animation:reward-row .3s both;animation-delay:calc(var(--reward-order)*.15s)}
.celebrating .boss-chest-prize{animation:reward-row .35s .5s both}
@keyframes reward-row{from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:560px){
 #infoDialog:has(.boss-victory) .dialogcontent,#infoDialog:has(.premium-chest) .dialogcontent{padding:14px}
 .boss-triumph{gap:12px;padding-bottom:14px}.boss-portrait{width:82px;height:82px}
 #infoDialog .boss-triumph h3{font-size:26px}.boss-resource-total strong{font-size:23px}
 .boss-chest-prize{gap:10px;padding:8px}.boss-chest-prize>img{width:80px;height:80px}
 #infoDialog .boss-chest-prize h3{font-size:20px}
 #infoDialog .boss-ledger table{font-size:13px}.milestone-rewards img{width:48px;height:48px}
 #infoDialog .milestone-rewards button{gap:10px}
}
@media(prefers-reduced-motion:reduce){.celebrating .boss-ledger tbody tr,.celebrating .boss-chest-prize{animation:none}.premium-chest img{transition:none}}
