/* spark-store modal — flat Stage-themed design (matches proposal-spark-store.html).
   Modal renders OUTSIDE the Stage shell; colours hardcoded except the theme accent
   (--button-color is global on :root) used for the spend/buy actions. */

/* hide the modal-content scrollbar (modal scrolls as a whole, as before) */
.spark-store-modal-content { scrollbar-width: none; -ms-overflow-style: none; }
.spark-store-modal-content::-webkit-scrollbar { display: none; }

@keyframes ssRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── header (close pinned top-right like the leaderboard; .mg-mtitle carries
   margin:0 !important so we can't push via margin-right:auto — use space-between) ── */
.ss-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }

/* ── balance row (label left, amount right) ── */
.ss-bal { display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin: 16px 22px 0; padding: 16px 18px; border-radius: 18px;
    background: rgba(255,200,61,0.07); border: 1px solid rgba(255,200,61,0.20); }
.ss-bal-lbl { font-size: 13px; color: rgba(255,255,255,0.6); font-weight: 600; }
.ss-bal-amt { font-size: 24px; font-weight: 800; color: #ffc83d; display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.ss-bal-amt .lt { font-size: 19px; }

/* ── body / grid ── */
.ss-body { padding: 16px 22px 22px; }
.ss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* login notice (logged out) */
.ss-login { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px;
    border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.ss-login-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.ss-login-ic svg { width: 17px; height: 17px; }
.ss-login-txt { flex: 1; min-width: 0; }
.ss-login-txt .t { color: #fff; font-weight: 700; font-size: 13px; }
.ss-login-txt .d { color: rgba(255,255,255,0.4); font-size: 11.5px; margin-top: 1px; }
.ss-login-btn { background: var(--button-color, #ff2e68); color: #fff; padding: 8px 16px; border-radius: 11px;
    text-decoration: none; font-weight: 800; font-size: 12.5px; white-space: nowrap; flex: none; transition: filter .16s; }
.ss-login-btn:hover { filter: brightness(1.08); }

/* ── perk card ── */
.ss-card { position: relative; display: flex; flex-direction: column; padding: 16px; border-radius: 18px; cursor: pointer;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
    transition: transform .16s, border-color .16s, background .16s; animation: ssRise .4s ease both; }
.ss-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.07); }
/* featured (most valuable) — subtle accent highlight, no badge */
.ss-card.ss-featured { border-color: rgba(255,46,104,0.32); background: rgba(255,46,104,0.05); }
/* active pass — subtle green highlight, not clickable */
.ss-card.is-active { border-color: rgba(54,211,153,0.32); background: rgba(54,211,153,0.05); }

.ss-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.ss-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.07); color: #fff; }
.ss-ic svg { width: 21px; height: 21px; }
.ss-price { font-weight: 800; font-size: 15px; color: #ffc83d; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ss-price .lt { font-size: 13px; }
.ss-title { font-size: 15.5px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.ss-desc { font-size: 12.5px; line-height: 1.45; color: rgba(255,255,255,0.6); margin-bottom: 14px; flex: 1; }

.ss-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ss-dur { font-size: 11.5px; color: rgba(255,255,255,0.4); font-weight: 600; }
.ss-buy { appearance: none; border: 0; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 12.5px; color: #fff;
    padding: 9px 18px; border-radius: 12px; background: var(--button-color, #ff2e68);
    box-shadow: 0 8px 20px -8px rgba(255,46,104,0.5); transition: filter .16s, transform .16s; }
.ss-card:hover .ss-buy { filter: brightness(1.08); transform: translateY(-1px); }
.ss-state { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; padding: 8px 14px; border-radius: 12px;
    background: rgba(54,211,153,0.14); color: #36d399; border: 1px solid rgba(54,211,153,0.3); }
.ss-state.ss-state-gold { background: rgba(255,200,61,0.14); color: #ffc83d; border-color: rgba(255,200,61,0.3); }

/* ── purchase confirm dialog ── */
.meetgle-modal-content.ss-cf { max-width: 400px; background: #141417; border: 1px solid rgba(255,255,255,0.14);
    border-radius: 22px; text-align: center; padding: 26px 24px 22px; }
.ss-cf-ic { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 16px;
    background: rgba(255,46,104,0.12); border: 1px solid rgba(255,46,104,0.28); font-size: 30px; line-height: 1; }
.ss-cf-title { font-size: 19px; font-weight: 800; color: #fff; margin: 0 0 6px; }
.ss-cf-sub { font-size: 13.5px; color: rgba(255,255,255,0.6); line-height: 1.5; margin: 0 0 18px; }
.ss-cf-sub strong { color: #fff; }
.ss-cf-actions { display: flex; gap: 10px; }
.ss-cf-btn { flex: 1; appearance: none; border: 0; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 14.5px;
    padding: 14px; border-radius: 14px; transition: filter .16s, background .16s; }
.ss-cf-cancel { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.6); }
.ss-cf-cancel:hover { background: rgba(255,255,255,0.12); color: #fff; }
.ss-cf-confirm { background: var(--button-color, #ff2e68); color: #fff; box-shadow: 0 12px 28px -10px rgba(255,46,104,0.5); }
.ss-cf-confirm:hover { filter: brightness(1.08); }

/* ── responsive column sizing ── */
@media (min-width: 560px) { .ss-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; } }
@media (min-width: 901px) { .ss-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; } }

/* ── Mobile fullscreen (PRESERVED — same sizing as before) ── */
@media (max-width: 900px) {
    #sparkStoreModal { padding: 0 !important; }
    #sparkStoreModal > .spark-store-modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100svh !important;
        max-height: 100vh !important;
        max-height: 100svh !important;
        border-radius: 0 !important;
    }
    .ss-head { padding: 18px 16px 0; }
    .ss-bal { margin: 14px 16px 0; }
    .ss-body { padding: 14px 16px 20px; }
}
