.crystal-economy{margin:16px 0;padding:14px;border:1px solid #9d804c;border-radius:10px;background:#111e23;color:#f5e4be;max-width:100%;box-sizing:border-box}
.crystal-economy h4{margin:0 0 8px;font-size:16px}.crystal-economy p{margin:6px 0;line-height:1.5;overflow-wrap:anywhere}.crystal-balance{font-weight:700}.crystal-status{font-size:13px;min-height:20px}.crystal-actions{display:flex;gap:8px;flex-wrap:wrap}.crystal-actions .menu-btn{flex:1 1 130px;min-height:44px;white-space:normal;margin:0;padding:10px}.crystal-actions button:disabled{opacity:.48;cursor:default}
.lore-side .crystal-economy p{font-style:normal;color:inherit}
/* Collection footer: the total follows the actual settings button bounds. */
body:has(#deckBuilder.active) #settingsGearBtn.settings-gear-btn{top:auto!important;bottom:14px!important}
#collectionCrystalBalance{position:fixed;z-index:6;display:flex;align-items:center;gap:12px;min-height:40px;padding:4px 14px;box-sizing:border-box;border:1px solid #9d804c;border-radius:5px;background:#111e23;color:#f5e4be;font-size:15px;pointer-events:none;overflow:hidden}
#collectionCrystalBalance[hidden]{display:none}
#collectionCrystalBalance span{white-space:nowrap}
#collectionCrystalBalance strong{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
/* Reserve the footer area beneath the editor's back button. */
#deckBuilder.active{padding-bottom:76px!important}
#deckBuilder.deck-editor-c.active .builder-col.deck-side{height:calc(100dvh - 100px)}
@media(max-width:1100px){#deckBuilder.deck-editor-c.active .builder-col.deck-side{height:auto}}

/* Reuse the two blue crystal shapes from the matching reward badge. */
.crystal-icon{display:block;width:32px;height:34px;flex:0 0 auto;object-fit:contain}
.crystal-balance{display:flex;align-items:center;gap:7px}
#collectionCrystalBalance .crystal-icon{width:27px;height:29px}

/* Mobile lobby uses the existing footer strip; keep editor and desktop styles intact. */
@media (max-width:1000px) {
  #lobby > #collectionCrystalBalance {
    position:absolute;right:12px;bottom:0;width:max-content;max-width:43vw;
    min-height:20px;height:20px;gap:4px;padding:0 10px;
    border:0;border-radius:0;background:var(--selected-skin) center/100% 100% no-repeat;
    color:#e8d4a3;font-family:var(--fs-ui-font);font-size:14px;line-height:18px;
  }
  #lobby > #collectionCrystalBalance .crystal-icon {width:18px;height:18px;}
  #lobby > #collectionCrystalBalance strong {white-space:nowrap;overflow-wrap:normal;}
}
