/* ============================================================
   MGM Shop — Frontend Styles
   ============================================================ */

:root {
    --mgms-purple:       #e8c96b;
    --mgms-purple-light: #f0d47b;
    --mgms-purple-dark:  #c9a83e;
    --mgms-gold:         #e8c96b;
    --mgms-bg:           #0e0e1a;
    --mgms-surface:      #16162a;
    --mgms-surface2:     #1e1e2e;
    --mgms-border:       rgba(232,201,107,.35);
    --mgms-text:         #c8d0e8;
    --mgms-text-muted:   #808098;
    --mgms-radius:       12px;
    --mgms-transition:   .2s ease;
    --mgms-primary-rgb:  232, 201, 107;
}

/* ── Login wall ──────────────────────────────────────────── */

.mgms-login-wall {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--mgms-surface) 0%, var(--mgms-surface2) 100%);
    border: 1px solid var(--mgms-border);
    border-radius: var(--mgms-radius);
}

.mgms-login-crystal svg {
    width: 60px;
    height: 72px;
    filter: drop-shadow(0 0 16px rgba(var(--mgms-primary-rgb),.7));
    animation: mgms-float 3s ease-in-out infinite;
}

@keyframes mgms-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.mgms-login-wall h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.mgms-login-wall p {
    color: var(--mgms-text-muted);
    margin: 0;
    font-size: 1rem;
}

.mgms-login-btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--mgms-purple-dark) 0%, var(--mgms-purple) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: opacity var(--mgms-transition);
}

.mgms-login-btn:hover { opacity: .88; color: #fff; }

/* ── Wrapper ─────────────────────────────────────────────── */

.mgms-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--mgms-text);
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ── Profile Card ─────────────────────────────────────────── */

.mgms-profile-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, var(--mgms-surface) 0%, var(--mgms-surface2) 100%);
    border: 1px solid var(--mgms-border);
    border-left: 4px solid var(--rank-color, var(--mgms-purple));
    border-radius: var(--mgms-radius);
    padding: 24px 28px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.4), 0 0 60px rgba(var(--mgms-primary-rgb),.06);
    flex-wrap: wrap;
}

.mgms-profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(var(--mgms-primary-rgb),.12) 0%, transparent 60%);
    pointer-events: none;
}

/* Avatar */
.mgms-profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.mgms-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--rank-color, var(--mgms-purple));
    object-fit: cover;
    display: block;
    box-shadow: 0 0 20px rgba(var(--mgms-primary-rgb),.4);
}

.mgms-rank-icon {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--mgms-bg);
}

.mgms-rank-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--mgms-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

/* Profile info */
.mgms-profile-info {
    flex: 1;
    min-width: 180px;
}

.mgms-profile-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.mgms-profile-title {
    font-size: .85rem;
    font-style: italic;
    margin-top: 2px;
    opacity: .9;
}

.mgms-profile-rank {
    font-size: .9rem;
    font-weight: 600;
    margin-top: 4px;
    opacity: .85;
}

.mgms-xp-bar-wrap {
    margin-top: 10px;
    height: 26px;
    background: var(--mgms-bg);
    border: 1px solid var(--mgms-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    max-width: 320px;
}

.mgms-xp-bar {
    height: 100%;
    border-radius: 8px;
    min-width: 38px;            /* keep the % label readable at low progress */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width .6s ease;
}

.mgms-xp-pct {
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

.mgms-xp-detail {
    margin-top: 7px;
    font-size: .82rem;
    color: var(--mgms-text-muted);
    max-width: 320px;
}
.mgms-xp-detail strong { color: var(--mgms-text); }

/* Shard panel */
.mgms-shard-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(var(--mgms-primary-rgb),.1);
    border: 1px solid var(--mgms-border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-left: auto;
}

.mgms-shard-crystal svg {
    width: 40px;
    height: 48px;
    filter: drop-shadow(0 0 8px rgba(var(--mgms-primary-rgb),.6));
}

.mgms-shard-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mgms-shard-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--mgms-text-muted);
}

.mgms-shard-balance {
    font-size: 2rem;
    font-weight: 800;
    color: var(--mgms-purple-light);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mgms-shard-lifetime {
    font-size: .75rem;
    color: var(--mgms-text-muted);
}

/* ── Shop Container ──────────────────────────────────────── */

.mgms-shop {
    background: var(--mgms-surface);
    border: 1px solid var(--mgms-border);
    border-radius: var(--mgms-radius);
    overflow: hidden;
}

.mgms-shop-header {
    padding: 28px 28px 0;
}

.mgms-shop-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.mgms-shop-icon {
    margin-right: 8px;
}

.mgms-shop-subtitle {
    color: var(--mgms-text-muted);
    font-size: .9rem;
    margin: 0 0 20px;
}

/* ── Game Tabs — big tile-style ──────────────────────────── */

.mgms-game-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px 28px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mgms-game-tabs::-webkit-scrollbar { display: none; }

.mgms-game-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    padding: 16px 18px 12px;
    background: var(--mgms-surface2);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--mgms-text-muted);
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--mgms-transition);
    flex-shrink: 0;
}

.mgms-game-tab:hover {
    color: var(--mgms-text);
    background: rgba(var(--mgms-primary-rgb),.08);
    border-color: rgba(var(--mgms-primary-rgb),.2);
}

.mgms-game-tab--active {
    color: #fff;
    background: rgba(var(--mgms-primary-rgb),.15);
    border-color: var(--mgms-purple);
    box-shadow: 0 0 16px rgba(var(--mgms-primary-rgb),.25);
}

.mgms-game-tab-logo {
    width: 120px;
    height: 80px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.mgms-game-tab-emoji {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

.mgms-game-tab-name {
    text-align: center;
    line-height: 1.2;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Category Filter Bar ─────────────────────────────────── */

.mgms-cat-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 28px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--mgms-border);
}

.mgms-cat-bar::-webkit-scrollbar { display: none; }

.mgms-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: var(--mgms-surface2);
    border: 1px solid transparent;
    border-radius: 20px;
    color: var(--mgms-text-muted);
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--mgms-transition);
    flex-shrink: 0;
}

.mgms-cat-pill:hover {
    color: var(--mgms-text);
    background: rgba(var(--mgms-primary-rgb),.08);
    border-color: rgba(var(--mgms-primary-rgb),.2);
}

.mgms-cat-pill--active {
    color: #fff;
    background: var(--mgms-purple-dark);
    border-color: var(--mgms-purple);
}

.mgms-cat-pill-icon {
    font-size: .9em;
    line-height: 1;
}

/* Legacy small tabs (kept for backward compat) */
.mgms-tabs {
    display: flex;
    gap: 4px;
    padding: 0 28px;
    border-bottom: 1px solid var(--mgms-border);
    overflow-x: auto;
    scrollbar-width: none;
}
.mgms-tabs::-webkit-scrollbar { display: none; }
.mgms-tab {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px; background: none; border: none;
    border-bottom: 3px solid transparent;
    color: var(--mgms-text-muted); font-size: .9rem; font-weight: 500;
    cursor: pointer; white-space: nowrap;
    transition: color var(--mgms-transition), border-color var(--mgms-transition);
    margin-bottom: -1px; border-radius: 6px 6px 0 0;
}
.mgms-tab:hover { color: var(--mgms-text); background: rgba(255,255,255,.04); }
.mgms-tab--active { color: var(--mgms-purple-light); border-bottom-color: var(--mgms-purple); }
.mgms-tab-icon { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }

/* ── Items Grid ───────────────────────────────────────────── */

.mgms-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 24px 28px 28px;
    min-height: 200px;
}

.mgms-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--mgms-text-muted);
    padding: 60px 0;
}

/* ── Item Card ─────────────────────────────────────────────── */

.mgms-item {
    background: var(--mgms-surface2);
    border: 1px solid var(--mgms-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--mgms-transition), box-shadow var(--mgms-transition), border-color var(--mgms-transition);
    cursor: default;
}

.mgms-item:hover:not(.mgms-item--oos) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,.5), 0 0 20px rgba(var(--mgms-primary-rgb),.15);
    border-color: rgba(var(--mgms-primary-rgb),.5);
}

.mgms-item--oos {
    opacity: .55;
    filter: grayscale(.4);
}

/* Item icon */
.mgms-item-icon-wrap {
    position: relative;
    background: linear-gradient(135deg, var(--mgms-bg) 0%, var(--mgms-surface2) 100%);
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mgms-item-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(var(--mgms-primary-rgb),.5));
}

.mgms-item-icon-placeholder {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(var(--mgms-primary-rgb),.4));
}

.mgms-item-category {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.6);
    border: 1px solid var(--mgms-border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--mgms-purple-light);
}

/* Item body */
.mgms-item-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mgms-item-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.mgms-item-desc {
    font-size: .83rem;
    color: var(--mgms-text-muted);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.mgms-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mgms-item-delivery {
    font-size: .75rem;
    color: var(--mgms-text-muted);
}

.mgms-item-stock {
    font-size: .75rem;
    color: var(--mgms-gold);
    font-weight: 600;
}

.mgms-item-stock--oos {
    color: #ef4444;
}

/* Item footer */
.mgms-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--mgms-border);
    background: rgba(0,0,0,.2);
}

.mgms-item-cost {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mgms-purple-light);
}

.mgms-shard-mini {
    width: 14px;
    height: 18px;
    flex-shrink: 0;
}

/* Buy button */
.mgms-buy-btn {
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--mgms-purple-dark) 0%, var(--mgms-purple) 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--mgms-transition), transform var(--mgms-transition);
}

.mgms-buy-btn:hover:not(:disabled) {
    opacity: .9;
    transform: scale(1.02);
}

.mgms-buy-btn--disabled,
.mgms-buy-btn:disabled {
    background: var(--mgms-surface2);
    color: var(--mgms-text-muted);
    cursor: not-allowed;
}

/* ── Modal ─────────────────────────────────────────────────── */

.mgms-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: mgms-fade-in .15s ease;
}

.mgms-modal-overlay[hidden] {
    display: none;
}

.mgms-modal {
    background: var(--mgms-surface);
    border: 1px solid var(--mgms-border);
    border-radius: 14px;
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 40px rgba(var(--mgms-primary-rgb),.15);
    animation: mgms-slide-up .2s ease;
}

.mgms-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--mgms-text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.mgms-modal-close:hover { color: #fff; }

.mgms-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--mgms-border);
}

.mgms-modal-item-icon {
    font-size: 2.2rem;
}

.mgms-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.mgms-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--mgms-text-muted);
    font-size: .9rem;
}

.mgms-modal-body p { margin: 0; }

.mgms-modal-item-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

.mgms-modal-cost-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--mgms-purple-light);
}

/* Character field */
.mgms-char-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mgms-char-field[hidden] { display: none; }

.mgms-char-field label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--mgms-text);
}

.mgms-char-field input {
    width: 100%;
    padding: 10px 14px;
    background: var(--mgms-surface2);
    border: 1px solid var(--mgms-border);
    border-radius: 8px;
    color: var(--mgms-text);
    font-size: .9rem;
    box-sizing: border-box;
    transition: border-color var(--mgms-transition);
}

.mgms-char-field input:focus {
    outline: none;
    border-color: var(--mgms-purple);
}

.mgms-char-note {
    font-size: .78rem;
    color: var(--mgms-text-muted);
    margin: 0;
}

/* Modal message */
.mgms-modal-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
}

.mgms-modal-msg[hidden] { display: none; }

.mgms-modal-msg--success {
    background: rgba(34,197,94,.15);
    border: 1px solid rgba(34,197,94,.3);
    color: #86efac;
}

.mgms-modal-msg--error {
    background: rgba(239,68,68,.15);
    border: 1px solid rgba(239,68,68,.3);
    color: #fca5a5;
}

/* Modal footer */
.mgms-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--mgms-border);
}

.mgms-btn-cancel,
.mgms-btn-confirm {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity var(--mgms-transition);
}

.mgms-btn-cancel {
    background: var(--mgms-surface2);
    color: var(--mgms-text-muted);
    border: 1px solid var(--mgms-border);
}

.mgms-btn-cancel:hover { color: #fff; }

.mgms-btn-confirm {
    background: linear-gradient(135deg, var(--mgms-purple-dark) 0%, var(--mgms-purple) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mgms-btn-confirm:hover:not(:disabled) { opacity: .9; }
.mgms-btn-confirm:disabled { opacity: .6; cursor: not-allowed; }

.mgms-btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mgms-spin .6s linear infinite;
}

.mgms-btn-spinner[hidden] { display: none; }

/* Login notice */
.mgms-login-notice {
    text-align: center;
    padding: 40px;
    color: var(--mgms-text-muted);
}

.mgms-login-notice a {
    color: var(--mgms-purple-light);
    text-decoration: underline;
}

/* ── Animations ────────────────────────────────────────────── */

@keyframes mgms-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes mgms-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes mgms-spin {
    to { transform: rotate(360deg); }
}

/* ── Loading skeleton ──────────────────────────────────────── */

.mgms-skeleton {
    background: linear-gradient(90deg, var(--mgms-surface2) 25%, var(--mgms-surface) 50%, var(--mgms-surface2) 75%);
    background-size: 200% 100%;
    animation: mgms-shimmer 1.4s infinite;
    border-radius: 6px;
}

@keyframes mgms-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 640px) {
    .mgms-profile-card { flex-direction: column; align-items: flex-start; }
    .mgms-shard-panel { width: 100%; }
    .mgms-items-grid { grid-template-columns: 1fr; padding: 16px; }
    .mgms-tabs { padding: 0 16px; }
    .mgms-shop-header { padding: 20px 16px 0; }
    .mgms-game-tabs { padding: 16px; gap: 8px; }
    .mgms-game-tab { min-width: 100px; padding: 12px 10px 10px; }
    .mgms-game-tab-logo { width: 90px; height: 56px; }
    .mgms-game-tab-emoji { font-size: 2.2rem; }
    .mgms-game-tab-name { font-size: .72rem; }
    .mgms-cat-bar { padding: 0 16px 12px; gap: 4px; }
    .mgms-cat-pill { padding: 5px 10px; font-size: .72rem; }
}

/* ══════════════════════════════════════════════════════════════
   CART / VIEW SWITCH / INVENTORY / REDEEM
══════════════════════════════════════════════════════════════ */

.mgms-shop-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.mgms-shop-header-actions { display: flex; align-items: center; gap: 12px; }

.mgms-view-switch { display: inline-flex; background: var(--mgms-surface2); border: 1px solid var(--mgms-border); border-radius: 8px; overflow: hidden; }
.mgms-view-btn { background: transparent; border: 0; color: var(--mgms-text-muted); padding: 8px 16px; font-weight: 600; cursor: pointer; transition: var(--mgms-transition); }
.mgms-view-btn--active { background: var(--mgms-purple); color: #15151f; }
.mgms-view-btn:not(.mgms-view-btn--active):hover { color: var(--mgms-text); }

.mgms-cart-toggle { position: relative; background: var(--mgms-surface2); border: 1px solid var(--mgms-border); border-radius: 8px; padding: 8px 14px; font-size: 1.1rem; cursor: pointer; color: var(--mgms-text); }
.mgms-cart-toggle:hover { border-color: var(--mgms-purple); }
.mgms-cart-count { position: absolute; top: -6px; right: -6px; background: var(--mgms-purple); color: #15151f; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; padding: 0 4px; }

/* Cart drawer */
.mgms-cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99998; }
.mgms-cart-drawer { position: fixed; top: 0; right: 0; height: 100%; width: 380px; max-width: 92vw; background: var(--mgms-surface); border-left: 1px solid var(--mgms-border); z-index: 99999; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease; box-shadow: -8px 0 30px rgba(0,0,0,.4); }
.mgms-cart-drawer--open { transform: translateX(0); }
.mgms-cart-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--mgms-border); }
.mgms-cart-head h3 { margin: 0; color: var(--mgms-text); font-size: 1.1rem; }
.mgms-cart-close { background: 0; border: 0; color: var(--mgms-text-muted); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.mgms-cart-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.mgms-cart-line { display: grid; grid-template-columns: 44px 1fr auto auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.mgms-cart-line-icon { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--mgms-surface2); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.mgms-cart-line-emoji { line-height: 44px; text-align: center; }
.mgms-cart-line-name { color: var(--mgms-text); font-weight: 600; font-size: .9rem; }
.mgms-cart-line-cost { color: var(--mgms-text-muted); font-size: .75rem; }
.mgms-cart-qty { display: inline-flex; align-items: center; gap: 6px; }
.mgms-qty-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--mgms-border); background: var(--mgms-surface2); color: var(--mgms-text); cursor: pointer; font-size: 1rem; line-height: 1; }
.mgms-qty-val { min-width: 18px; text-align: center; color: var(--mgms-text); font-weight: 600; }
.mgms-cart-line-total { color: var(--mgms-purple-light); font-weight: 700; font-size: .85rem; min-width: 54px; text-align: right; }
.mgms-cart-line-remove { background: 0; border: 0; color: var(--mgms-text-muted); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.mgms-cart-line-remove:hover { color: #e06b6b; }
.mgms-cart-foot { border-top: 1px solid var(--mgms-border); padding: 16px 20px; }
.mgms-cart-total-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--mgms-text); font-weight: 700; margin-bottom: 4px; }
.mgms-cart-total-val { color: var(--mgms-purple-light); }
.mgms-cart-after-row { color: var(--mgms-text-muted); font-size: .8rem; margin-bottom: 12px; }
.mgms-cart-short { color: #e06b6b; font-weight: 600; }
.mgms-checkout-btn { width: 100%; padding: 12px; border: 0; border-radius: 8px; background: var(--mgms-purple); color: #15151f; font-weight: 700; font-size: 1rem; cursor: pointer; transition: var(--mgms-transition); }
.mgms-checkout-btn:disabled { opacity: .5; cursor: not-allowed; }
.mgms-checkout-btn:not(:disabled):hover { background: var(--mgms-purple-light); }
.mgms-cart-msg { margin-top: 10px; padding: 8px 10px; border-radius: 6px; font-size: .85rem; }

/* Inventory */
.mgms-inv-header { padding: 20px 24px 0; }
.mgms-inv-header h3 { margin: 0 0 4px; color: var(--mgms-text); }
.mgms-inv-sub { color: var(--mgms-text-muted); margin: 0; font-size: .85rem; }
.mgms-inv-qty { position: absolute; top: 8px; right: 8px; background: var(--mgms-purple); color: #15151f; font-weight: 700; font-size: .72rem; padding: 2px 7px; border-radius: 10px; }
.mgms-inv-footer { justify-content: center; }
.mgms-redeem-locked { color: var(--mgms-text-muted); font-size: .82rem; font-style: italic; }
