/* 0.15: upgrades animate only inside their own card, never across the mine. */
#upgrades{position:relative;isolation:isolate;overflow:hidden}
#purchaseReel.card-procession{position:absolute;inset:0;z-index:4;display:block;overflow:hidden;contain:layout paint;pointer-events:none}
#purchaseReel .purchased-card{position:absolute;inset:0;width:100%;height:100%;margin:0;box-sizing:border-box;box-shadow:none;border-radius:14px;padding:clamp(8px,1.5vh,20px);gap:clamp(5px,1.5vh,15px);will-change:transform,opacity}
#purchaseReel .upgrade-art{width:min(65%,180px);height:auto;aspect-ratio:1;max-height:45%;flex-shrink:1}
#purchaseReel .purchased-card b{font-size:clamp(16px,2vw,28px)}
#purchaseReel .purchased-card strong{font-size:clamp(12px,1.4vw,20px)}
.player-info .boost-button{width:100%;min-height:64px;padding:12px 16px}
#boostBtn>span{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:12px}
#boostTitle{font-size:32px;font-weight:800;line-height:1}
#boostHint{font-size:18px;letter-spacing:0;text-align:right;text-transform:none;line-height:1.2}
#speed[hidden]{display:none!important}
.player-column .spells{position:relative;inset:auto;width:auto;height:auto;min-height:0;display:block;padding:4px 0 8px;margin:0;border:0;background:none;box-shadow:none;isolation:auto}
.spells .spell-heading{display:block;width:150px;height:66px;margin:0 auto 2px;background:url('./assets/spells-v15.webp') center bottom/100% 200% no-repeat}
.spell-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:10px;align-items:start}
.spells .spell-icon{position:relative;display:block;aspect-ratio:1;width:100%;max-width:82px;height:auto;min-height:0;padding:0;border:0;border-radius:9px;background-image:url('./assets/spells-v15.webp');background-size:200% 200%;background-position:0 0;background-color:transparent;box-shadow:none;cursor:pointer}
.spells #blessingSpell{background-position:100% 0}
.spells .spell-icon:hover,.spells .spell-icon:focus-visible{filter:brightness(1.2);outline:2px solid #f2d28b;outline-offset:2px}
.spells .spell-icon:disabled{opacity:.6;cursor:default}
.spell-icon span{position:absolute;inset:auto 5px 5px;background:#061321d9;color:#fff0bb;border-radius:5px;font-weight:800;font-size:15px;text-shadow:0 1px #000}
.spell-icon span:empty{display:none}
#spellHint,#blessingHint,#blessingUpgrade{display:none!important}
.spells #transferTarget{grid-column:1/-1}
#relicsBtn{padding:12px;border:1px solid #b69559;border-radius:8px;color:#ffedc2;background:linear-gradient(#384e57,#20343d);font-weight:700}
#bagDialog .relic-area{position:static;inset:auto;width:auto;height:auto;margin-top:12px;background:#202a39;padding:12px}
#bagDialog .relic-area #bagBtn,#bagDialog .relic-area #applyRelic,#bagDialog .relic-area #keeperBtn{display:none}
#bagDialog .relic-area header h2{font-size:14px}#shieldStatus{display:block;min-height:16px;font-size:11px;color:#355858;margin-top:4px}
@media(min-width:761px){.player-column{gap:8px}.player-info{flex:0 1 auto;min-height:0}.player-info .stats-grid{padding:10px 0;gap:10px}.player-column .spells{margin-top:4px}}
@media(max-width:760px){#relicsBtn{display:none!important}.player-column .spells{position:fixed;left:5px;right:auto;bottom:64px;width:82px;height:88px;padding:0;background:transparent;z-index:15}.spells .spell-heading{display:none}.spell-grid{grid-template-columns:1fr 1fr;gap:4px}.spells .spell-icon{max-width:none;min-height:0}.spell-icon span{font-size:10px;inset:auto 0 0}.spells #transferTarget{font-size:8px}.spells:has(#transferTarget:not([hidden])){height:114px}#shieldStatus{display:none}#purchaseReel .upgrade-art{max-height:38%}#purchaseReel .purchased-card{padding:5px;gap:5px}#purchaseReel .purchased-card b{font-size:11px}#purchaseReel .purchased-card strong,#purchaseReel .purchased-card span{font-size:9px}}
@media(min-width:761px) and (max-height:650px){.player-column .spells .spell-heading{height:42px;width:100px}.spell-grid{grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:6px}.spells .spell-icon{max-width:52px}.player-info .boost-button{min-height:44px;padding:8px}.player-info .stats-grid{padding:5px 0;gap:5px}#boostTitle{font-size:26px}#boostHint{font-size:14px}}
.spells #transferSpell,.spells #blessingSpell{grid-column:auto;grid-row:auto}
#bagDialog #mobileApplyRelic{display:block;background:#345547;color:#fff0be;padding:12px;border-radius:7px;margin:12px 0;width:100%}

@media(min-width:761px){.player-info{position:relative}.player-info .player-toolbar{display:none}.player-info .wallet{padding-right:0}.player-info .gold-total{min-height:34px}#settingsBtn{width:34px;height:34px}.player-info #boostHint{max-width:70%;overflow-wrap:anywhere}}

@media(min-width:761px){.gold-total #settingsBtn{margin-left:auto;flex-shrink:0;align-self:center}.gold-total #gold{min-width:0;font-size:clamp(22px,2.2vw,32px)}}
