/* ═══════════════════════════════
   ACCOUNT PAGE
═══════════════════════════════ */
/* Follows the Nightmare Shop: rounded panels with a gold edge, a red glow in a corner, a small
   tag over a big uppercase heading, and pill buttons. The marketplace loads this file too, for
   its tabs, coins and vaults. */
.account-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

.page-main.account-main {
    align-items: flex-start;
    padding: 2.5rem 1.5rem;
}

.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.loading-state p {
    margin-top: 1rem;
    font-family: var(--font-display);
}

/* The tag over a heading, as in the shop. */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(184,134,11,0.12);
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ═══════════════════════════════
   ACCOUNT HERO
═══════════════════════════════ */
.account-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding: 1.8rem 2rem;
    background:
        radial-gradient(ellipse 45% 120% at 0% 0%, rgba(187,24,24,0.3) 0%, transparent 70%),
        radial-gradient(ellipse 35% 100% at 100% 100%, rgba(184,134,11,0.14) 0%, transparent 70%),
        linear-gradient(135deg, rgba(24,18,28,0.92) 0%, rgba(10,8,13,0.94) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}

.account-avatar {
    position: relative;
    flex: none;
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 35%, rgba(187,24,24,0.45) 0%, rgba(40,12,16,0.95) 70%);
    border: 2px solid var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(184,134,11,0.12), 0 0 30px rgba(187,24,24,0.35);
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
}

.account-info { flex: 1; min-width: 0; }

.account-name {
    margin: 0.55rem 0 0.6rem;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--text-bright);
    overflow-wrap: anywhere;
}

.account-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dim);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 500;
}

.meta-item i { color: var(--gold-bright); font-size: 0.7rem; }

.meta-item.meta-vip {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    border-color: var(--gold-bright);
    color: #1a1207;
    font-weight: 700;
}

.meta-item.meta-vip i { color: #1a1207; }

.account-actions {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.account-action i { color: var(--gold-bright); }

.account-action:hover {
    background: rgba(184,134,11,0.12);
    border-color: var(--gold);
}

.account-action.is-primary {
    background: linear-gradient(135deg, var(--red-bright), var(--red-blood));
    border-color: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: 0 6px 20px var(--red-glow);
}

.account-action.is-primary i { color: #fff; }

.account-action.is-primary:hover {
    background: linear-gradient(135deg, #e52a2a, var(--red));
    box-shadow: 0 8px 26px var(--red-glow-lg);
}

/* ═══════════════════════════════
   TABS
═══════════════════════════════ */
/* The category menu of the shop: a dark bar with a gold pill on the tab being shown. */
.tabs-bar {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 0 1.5rem;
    padding: 0.5rem;
    background: linear-gradient(180deg, rgba(20,15,25,0.96) 0%, rgba(12,9,15,0.96) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.55);
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-bar::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: none;
    width: auto;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tab-btn::before { content: none; }
.tab-btn i { color: var(--gold); font-size: 0.8rem; }

.tab-btn:hover {
    color: var(--text-bright);
    background: rgba(184,134,11,0.08);
    border-color: var(--border-gold);
    box-shadow: none;
}

.tab-btn.active {
    color: #1a1207;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    border-color: var(--gold-bright);
    box-shadow: 0 0 18px rgba(224,178,62,0.35);
}

.tab-btn.active i { color: #1a1207; }

.tab-panel { display: none; }

.tab-panel.active {
    display: block;
    animation: fadeSlideIn 0.3s cubic-bezier(0.22,1,0.36,1);
}

/* ═══════════════════════════════
   SECTION
═══════════════════════════════ */
.section {
    margin-bottom: 1.25rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(160deg, rgba(24,18,28,0.95) 0%, rgba(12,9,15,0.96) 100%);
    border: 1px solid var(--border-dim);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 1.25rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-bright);
}

/* The icon sits on a small gold tile, like the columns of the VIP table. */
.section-title > i {
    flex: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(184,134,11,0.1);
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    color: var(--gold-bright);
    font-size: 0.9rem;
}

.section-title .section-title-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    border-radius: 999px;
    color: #1a1207;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(184,134,11,0.25);
    transition: filter 0.2s;
}

.section-title .section-title-link:hover { filter: brightness(1.1); }

.section-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: -0.5rem 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.section-hint i { color: var(--gold); }

/* ═══════════════════════════════
   COINS
═══════════════════════════════ */
.coins-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.coin-card {
    --coin: 224,178,62;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1.1rem 1.25rem;
    background:
        radial-gradient(ellipse 70% 120% at 0% 0%, rgba(var(--coin),0.14) 0%, transparent 65%),
        rgba(9,7,12,0.7);
    border: 1px solid rgba(var(--coin),0.28);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.coin-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--coin),0.55);
    box-shadow: 0 14px 30px rgba(0,0,0,0.45), 0 0 24px rgba(var(--coin),0.12);
}

.coin-card.bcoin { --coin: 96,165,250; }
.coin-card.hcoin { --coin: 248,113,113; }

.coin-icon {
    flex: none;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.1rem;
}

.coin-icon.ncoin { background: rgba(184,134,11,0.16); color: var(--gold-bright); border: 1px solid rgba(224,178,62,0.4); }
.coin-icon.bcoin { background: rgba(96,165,250,0.14); color: #60a5fa; border: 1px solid rgba(96,165,250,0.4); }
.coin-icon.hcoin { background: rgba(248,113,113,0.14); color: #f87171; border: 1px solid rgba(248,113,113,0.4); }

.coin-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.coin-label {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.coin-value {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-bright);
}

.coin-action {
    margin-left: auto;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(184,134,11,0.12);
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s, border-color 0.2s;
}

.coin-action:hover { background: rgba(184,134,11,0.22); border-color: var(--gold); }

/* ═══════════════════════════════
   JEWEL BANK
═══════════════════════════════ */
.jewel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.jewel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.8rem 0.6rem 0.6rem;
    background: rgba(9,7,12,0.7);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.jewel-item:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    background: rgba(184,134,11,0.06);
}

/* A jewel picture has a lot of empty border around the gem, so it is drawn larger than its
   tile and the tile clips it. */
.jewel-img-wrap {
    flex: none;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(187,24,24,0.25) 0%, rgba(7,5,10,0.9) 75%);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    overflow: hidden;
}

.jewel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.8);
}

.jewel-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.jewel-name {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jewel-count {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-bright);
}

/* A jewel the account has none of stays in its place, but quietly. */
.jewel-item.is-empty { border-color: var(--border-dim); }
.jewel-item.is-empty .jewel-img-wrap { filter: grayscale(0.8); opacity: 0.45; }
.jewel-item.is-empty .jewel-count { color: var(--text-muted); }

/* ═══════════════════════════════
   VAULT - DUAL LAYOUT
═══════════════════════════════ */
.dual-vault-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.5rem;
}

.vault-panel {
    display: flex;
    flex-direction: column;
    min-width: 360px;
    background: rgba(9,7,12,0.75);
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0,0,0,0.45);
}

.vault-panel.vault-panel-site {
    min-width: 520px;
    border-color: rgba(96,165,250,0.28);
}

.vault-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background:
        radial-gradient(ellipse 60% 140% at 0% 0%, rgba(184,134,11,0.16) 0%, transparent 70%),
        linear-gradient(135deg, rgba(24,18,28,0.95) 0%, rgba(14,11,18,0.95) 100%);
    border-bottom: 1px solid var(--border-dim);
}

.vault-panel-site .vault-panel-header {
    background:
        radial-gradient(ellipse 60% 140% at 0% 0%, rgba(96,165,250,0.14) 0%, transparent 70%),
        linear-gradient(135deg, rgba(24,18,28,0.95) 0%, rgba(14,11,18,0.95) 100%);
}

.vault-icon {
    flex: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 800;
}

.vault-icon.game {
    background: rgba(184,134,11,0.16);
    color: var(--gold-bright);
    border: 1px solid rgba(224,178,62,0.45);
}

.vault-icon.site {
    background: rgba(96,165,250,0.15);
    color: #60a5fa;
    border: 1px solid rgba(96,165,250,0.45);
}

.vault-panel-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-bright);
}

.vault-grid-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 8px;
    padding: 8px;
    background: rgba(5,4,8,0.85);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
}

.vault-money-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(24,18,28,0.95) 0%, rgba(14,11,18,0.95) 100%);
    border-top: 1px solid var(--border-dim);
}

.vault-zen-label {
    font-family: var(--font-display);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.vault-zen-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(184,134,11,0.16);
    border: 1px solid rgba(224,178,62,0.45);
    border-radius: 50%;
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 800;
}

.vault-zen-value {
    margin-left: auto;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gold-bright);
}

/* Transfer Buttons Column */
.vault-transfer-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
}

.vault-action-btn {
    position: relative;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(9,7,12,0.9);
    border: 1px solid var(--border-dim);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.45);
    overflow: visible;
    transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.vault-action-btn i {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vault-action-btn::before { display: none !important; }
.vault-action-btn:hover { transform: scale(1.08); }

.vault-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vault-action-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background: rgba(9,7,12,0.9);
}

.vault-action-btn.btn-refresh { border-color: rgba(96,165,250,0.45); color: #60a5fa; }

.vault-action-btn.btn-refresh:hover {
    background: rgba(96,165,250,0.12);
    border-color: #60a5fa;
    box-shadow: 0 0 18px rgba(96,165,250,0.25);
}

.vault-action-btn.btn-sell-center { border-color: rgba(248,113,113,0.45); color: #f87171; }

.vault-action-btn.btn-sell-center:hover {
    background: rgba(248,113,113,0.12);
    border-color: #f87171;
    box-shadow: 0 0 18px rgba(248,113,113,0.25);
}

.vault-action-btn.btn-transfer-right,
.vault-action-btn.btn-transfer-left { border-color: rgba(34,197,94,0.45); color: #22c55e; }

.vault-action-btn.btn-transfer-right:hover,
.vault-action-btn.btn-transfer-left:hover {
    background: rgba(34,197,94,0.12);
    border-color: #22c55e;
    box-shadow: 0 0 18px rgba(34,197,94,0.25);
}

/* The main action of the marketplace vaults: list the selected item. */
.vault-action-btn.btn-create-listing {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--red-bright), var(--red-blood));
    border-color: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 6px 20px var(--red-glow);
}

.vault-action-btn.btn-create-listing:hover { box-shadow: 0 8px 26px var(--red-glow-lg); }

.vault-action-btn.btn-create-listing:disabled,
.vault-action-btn.btn-create-listing:disabled:hover {
    background: linear-gradient(135deg, var(--red-bright), var(--red-blood));
}

.vault-money {
    margin-left: auto;
    font-family: var(--font-body);
    font-size: 0.52rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0;
}

/* ═══════════════════════════════
   ITEM ACTIONS (selected item)
═══════════════════════════════ */
.item-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.8rem 1.1rem;
    background: rgba(184,134,11,0.07);
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    animation: fadeSlideIn 0.25s cubic-bezier(0.22,1,0.36,1);
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.selected-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.selected-item-label {
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.selected-item-name {
    padding: 3px 12px;
    background: rgba(184,134,11,0.12);
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-buttons {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.btn-action {
    width: auto;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--border-dim);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-action::before { display: none; }
.btn-action:hover { transform: translateY(-1px); }

.btn-sell {
    border-color: rgba(184,134,11,0.35);
    color: var(--gold);
}

.btn-sell:hover {
    background: rgba(184,134,11,0.1);
    border-color: var(--gold);
    color: var(--gold-bright);
    box-shadow: 0 0 15px rgba(184,134,11,0.15);
}

.btn-transfer {
    border-color: rgba(96,165,250,0.35);
    color: #60a5fa;
}

.btn-transfer:hover {
    background: rgba(96,165,250,0.1);
    border-color: #60a5fa;
    color: #93bbfd;
    box-shadow: 0 0 15px rgba(96,165,250,0.15);
}

/* ═══════════════════════════════
   ITEM GRID (from OpenMU)
═══════════════════════════════ */
.mu-item-storage {
    position: relative;
    background-image: url('/images/inventory_back.png');
    background-size: 12.5%;
    width: calc(40px * 8);
}

.mu-item-storage.storage-rows8 {
    height: calc(40px * 8);
}

.mu-item-storage.storage-rows4 {
    height: calc(40px * 4);
}

.mu-item-storage.storage-rows15 {
    height: calc(40px * 15);
}

/* Site Vault: 16x22 grid with smaller cells */
.mu-item-storage.site-vault-grid {
    --boxSize: 29px;
    width: calc(29px * 16);
    height: calc(29px * 22);
    background-image: none;
    background-color: rgba(15,12,19,0.6);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.04);
}

.site-vault-grid .site-vault-cell {
    position: absolute;
    width: 29px;
    height: 29px;
    background: rgba(34,26,39,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    box-sizing: border-box;
}

.site-vault-grid .mu-item {
    --boxSize: 29px;
}

.site-vault-grid .mu-item::before {
    border-radius: 3px;
}

/* The picture is centred on the item's cells and clipped to them (account.js scales it to fit). */
.mu-item {
    position: absolute;
    --boxSize: 40px;
    cursor: pointer;
    z-index: 1;
    overflow: hidden;
}

/* Cell highlight (::before covers the exact grid cell) */
.mu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: calc(var(--boxSize) * var(--item-w, 1));
    height: calc(var(--boxSize) * var(--item-h, 1));
    border: 2px solid transparent;
    border-radius: 2px;
    pointer-events: none;
    transition: border-color 0.15s, box-shadow 0.2s;
    z-index: 20;
}

.mu-item:hover::before {
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 0 6px rgba(255,255,255,0.06);
}

.mu-item.selected::before {
    border-color: var(--gold-bright);
    box-shadow:
        0 0 8px rgba(212,165,32,0.7),
        0 0 20px rgba(212,165,32,0.3),
        inset 0 0 10px rgba(212,165,32,0.12);
    animation: cellPulse 1.5s ease-in-out infinite;
}

@keyframes cellPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(212,165,32,0.7),  0 0 20px rgba(212,165,32,0.3),  inset 0 0 10px rgba(212,165,32,0.12); }
    50%      { box-shadow: 0 0 12px rgba(212,165,32,0.9), 0 0 30px rgba(212,165,32,0.45), inset 0 0 14px rgba(212,165,32,0.2); }
}

.mu-item img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Item Tooltip */
.mu-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: rgba(8,6,10, 0.96);
    border: 1px solid rgba(184, 134, 11, 0.5);
    border-radius: 4px;
    padding: 10px 14px;
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 1px rgba(184, 134, 11, 0.3);
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.5;
    display: none;
}

.mu-tooltip .tt-name {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.mu-tooltip .tt-name.excellent { color: #c084fc; }
.mu-tooltip .tt-name.ancient { color: #f59e0b; }
.mu-tooltip .tt-name.normal { color: #e5e7eb; }

.mu-tooltip .tt-score {
    font-size: 11px;
    margin-bottom: 6px;
}

.mu-tooltip .tt-score .label { color: var(--text-muted); }
.mu-tooltip .tt-score .val { color: var(--gold-bright); font-weight: 600; }

.mu-tooltip .tt-sep {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 5px 0;
}

.mu-tooltip .tt-stat {
    font-size: 11px;
    color: var(--text-muted);
}

.mu-tooltip .tt-stat .val { color: var(--text-bright); }

.mu-tooltip .tt-def {
    font-size: 12px;
    color: #60a5fa;
    font-weight: 600;
}

.mu-tooltip .tt-dur {
    font-size: 11px;
    color: var(--text-muted);
}

.mu-tooltip .tt-req {
    font-size: 11px;
    color: var(--text-muted);
}

.mu-tooltip .tt-req .val { color: #f87171; font-weight: 500; }

.mu-tooltip .tt-class {
    font-size: 11px;
    color: var(--gold);
    font-style: italic;
}

.mu-tooltip .tt-options-title {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-bright);
    margin-top: 4px;
}

.mu-tooltip .tt-opt {
    font-size: 11px;
}

.mu-tooltip .tt-opt.normal-opt { color: #9ca3af; }
.mu-tooltip .tt-opt.uncommon-opt { color: #34d399; }
.mu-tooltip .tt-opt.epic-opt { color: #c084fc; }
.mu-tooltip .tt-opt.excellent-opt { color: #facc15; }

.mu-tooltip .tt-socket {
    font-size: 11px;
    color: var(--text-muted);
}

.mu-tooltip .tt-socket .filled { color: #34d399; }
.mu-tooltip .tt-socket .empty { color: #555; }

.mu-tooltip .tt-harmony {
    font-size: 11px;
    color: #f59e0b;
}

.mu-item .item-amount-label {
    position: absolute;
    bottom: -1px;
    right: 0;
    font-size: 9px;
    font-family: var(--font-body);
    color: #fff;
    text-shadow: 0 0 2px #000, 0 0 4px #000;
    pointer-events: none;
    z-index: 5;
}

.mu-item .indicator {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
}

.mu-item .indicator.exc {
    top: 2px;
    right: 2px;
    background: #22c55e;
    box-shadow: 0 0 4px rgba(34,197,94,0.8);
}

.mu-item .indicator.anc {
    top: 2px;
    right: 9px;
    background: #3b82f6;
    box-shadow: 0 0 4px rgba(59,130,246,0.8);
}

.mu-item .indicator.socket {
    width: 4px;
    height: 4px;
}

.mu-item .indicator.socket.s1 { bottom: 4px; left: 2px; }
.mu-item .indicator.socket.s2 { bottom: 4px; left: 8px; }
.mu-item .indicator.socket.s3 { bottom: 4px; left: 14px; }
.mu-item .indicator.socket.s4 { bottom: 4px; left: 20px; }
.mu-item .indicator.socket.s5 { bottom: 4px; left: 26px; }

.mu-item .indicator.socket.equipped { background: #22c55e; box-shadow: 0 0 3px rgba(34,197,94,0.6); }
.mu-item .indicator.socket.unequipped { background: #555; }

/* Column/Row positioning */
.mu-item.c_0 { left: calc(var(--boxSize) * 0); }
.mu-item.c_1 { left: calc(var(--boxSize) * 1); }
.mu-item.c_2 { left: calc(var(--boxSize) * 2); }
.mu-item.c_3 { left: calc(var(--boxSize) * 3); }
.mu-item.c_4 { left: calc(var(--boxSize) * 4); }
.mu-item.c_5 { left: calc(var(--boxSize) * 5); }
.mu-item.c_6 { left: calc(var(--boxSize) * 6); }
.mu-item.c_7 { left: calc(var(--boxSize) * 7); }
.mu-item.c_8 { left: calc(var(--boxSize) * 8); }
.mu-item.c_9 { left: calc(var(--boxSize) * 9); }
.mu-item.c_10 { left: calc(var(--boxSize) * 10); }
.mu-item.c_11 { left: calc(var(--boxSize) * 11); }
.mu-item.c_12 { left: calc(var(--boxSize) * 12); }
.mu-item.c_13 { left: calc(var(--boxSize) * 13); }
.mu-item.c_14 { left: calc(var(--boxSize) * 14); }
.mu-item.c_15 { left: calc(var(--boxSize) * 15); }

.mu-item.r_0 { top: calc(var(--boxSize) * 0); }
.mu-item.r_1 { top: calc(var(--boxSize) * 1); }
.mu-item.r_2 { top: calc(var(--boxSize) * 2); }
.mu-item.r_3 { top: calc(var(--boxSize) * 3); }
.mu-item.r_4 { top: calc(var(--boxSize) * 4); }
.mu-item.r_5 { top: calc(var(--boxSize) * 5); }
.mu-item.r_6 { top: calc(var(--boxSize) * 6); }
.mu-item.r_7 { top: calc(var(--boxSize) * 7); }
.mu-item.r_8 { top: calc(var(--boxSize) * 8); }
.mu-item.r_9 { top: calc(var(--boxSize) * 9); }
.mu-item.r_10 { top: calc(var(--boxSize) * 10); }
.mu-item.r_11 { top: calc(var(--boxSize) * 11); }
.mu-item.r_12 { top: calc(var(--boxSize) * 12); }
.mu-item.r_13 { top: calc(var(--boxSize) * 13); }
.mu-item.r_14 { top: calc(var(--boxSize) * 14); }
.mu-item.r_15 { top: calc(var(--boxSize) * 15); }
.mu-item.r_16 { top: calc(var(--boxSize) * 16); }
.mu-item.r_17 { top: calc(var(--boxSize) * 17); }
.mu-item.r_18 { top: calc(var(--boxSize) * 18); }
.mu-item.r_19 { top: calc(var(--boxSize) * 19); }
.mu-item.r_20 { top: calc(var(--boxSize) * 20); }
.mu-item.r_21 { top: calc(var(--boxSize) * 21); }

/* Width/Height */
.mu-item.w_1 { --item-w: 1; width: var(--boxSize); }
.mu-item.w_2 { --item-w: 2; width: calc(var(--boxSize) * 2); }
.mu-item.w_3 { --item-w: 3; width: calc(var(--boxSize) * 3); }
.mu-item.w_4 { --item-w: 4; width: calc(var(--boxSize) * 4); }
.mu-item.h_1 { --item-h: 1; height: var(--boxSize); }
.mu-item.h_2 { --item-h: 2; height: calc(var(--boxSize) * 2); }
.mu-item.h_3 { --item-h: 3; height: calc(var(--boxSize) * 3); }
.mu-item.h_4 { --item-h: 4; height: calc(var(--boxSize) * 4); }

/* ═══════════════════════════════
   EQUIPMENT SLOTS (from OpenMU EquippedItems.razor.css)
   325px × 323px paper doll background
═══════════════════════════════ */
.equipped-container {
    --boxSize: 42px;
    position: relative;
    background-image: url('/images/equipment_back.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 325px;
    height: 323px;
    flex-shrink: 0;
}

.equipped-container > div {
    position: absolute;
}

.slot-left {
    width: calc(var(--boxSize) * 2);
    height: calc(var(--boxSize) * 4);
    left: 0px;
    top: 96px;
}

.slot-left .w_1 {
    left: calc(var(--boxSize) * 0.5);
}

.slot-right {
    width: calc(var(--boxSize) * 2);
    height: calc(var(--boxSize) * 4);
    left: 241px;
    top: 96px;
}

.slot-right .w_1 {
    left: calc(var(--boxSize) * 0.5);
}

.slot-helm {
    width: calc(var(--boxSize) * 2);
    height: calc(var(--boxSize) * 2);
    left: 121px;
    top: 2px;
}

.slot-armor {
    width: calc(var(--boxSize) * 2);
    height: calc(var(--boxSize) * 3);
    left: 121px;
    top: 96px;
}

.slot-pants {
    width: calc(var(--boxSize) * 2);
    height: calc(var(--boxSize) * 2);
    left: 121px;
    top: 231px;
}

.slot-gloves {
    width: calc(var(--boxSize) * 2);
    height: calc(var(--boxSize) * 2);
    left: 0px;
    top: 231px;
}

.slot-boots {
    width: calc(var(--boxSize) * 2);
    height: calc(var(--boxSize) * 2);
    left: 241px;
    top: 231px;
}

.slot-wings {
    width: calc(var(--boxSize) * 3);
    height: calc(var(--boxSize) * 2);
    left: 208px;
    top: 2px;
}

.slot-wings .h_3 {
    top: calc(var(--boxSize) * -0.5);
}

.slot-wings .w_4,
.slot-wings .w_5 {
    width: calc(var(--boxSize) * 3);
}

.slot-pet {
    width: calc(var(--boxSize) * 1);
    height: calc(var(--boxSize) * 1);
    left: 0px;
    top: 2px;
}

.slot-pet .w_1 {
    left: calc(var(--boxSize) * 0.5);
}

.slot-pet .h_1 {
    top: calc(var(--boxSize) * 0.5);
}

.slot-pendant {
    width: calc(var(--boxSize) * 1);
    height: calc(var(--boxSize) * 1);
    left: 82px;
    top: 96px;
}

.slot-ring1 {
    width: calc(var(--boxSize) * 1);
    height: calc(var(--boxSize) * 1);
    left: 82px;
    top: 231px;
}

.slot-ring2 {
    width: calc(var(--boxSize) * 1);
    height: calc(var(--boxSize) * 1);
    left: 203px;
    top: 231px;
}

/* ═══════════════════════════════
   CHARACTERS (Collapsible)
═══════════════════════════════ */
.characters-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.char-card {
    background:
        radial-gradient(ellipse 40% 140% at 0% 50%, rgba(187,24,24,0.14) 0%, transparent 70%),
        rgba(9,7,12,0.75);
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.char-card:hover {
    border-color: rgba(224,178,62,0.5);
    box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}

.char-card.expanded {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px rgba(184,134,11,0.15), 0 18px 40px rgba(0,0,0,0.5);
}

.char-card-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
}

.char-card-header .char-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.char-class-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(120,84,20,0.5), rgba(40,26,8,0.9));
    border: 1px solid rgba(242,193,78,0.45);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255,230,160,0.15);
    color: #f2c14e;
    font-size: 1.2rem;
}

.char-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.char-header-info .char-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-class-label {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold-bright);
}

.char-card-header .char-level-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    padding: 0 0.5rem;
}

.char-level {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-bright);
}

.char-level-label {
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.char-card-header .expand-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dim);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.3s, color 0.2s, border-color 0.2s;
}

.char-card-header:hover .expand-icon { border-color: var(--border-gold); color: var(--gold-bright); }

.char-card.expanded .char-card-header .expand-icon {
    transform: rotate(180deg);
    border-color: var(--gold);
    color: var(--gold-bright);
}

/* Collapsible body */
.char-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22,1,0.36,1);
}

.char-card.expanded .char-card-body { max-height: 2000px; }

.char-card-body-inner {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border-dim);
}

/* Char details row */
.char-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 1rem 0;
}

.char-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dim);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.74rem;
}

.char-stat .label { color: var(--text-muted); }
.char-stat .value { color: var(--text-bright); font-weight: 600; }

a.char-stat.char-profile-link {
    margin-left: auto;
    gap: 6px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    border-color: var(--gold-bright);
    color: #1a1207;
    font-weight: 700;
    text-decoration: none;
    transition: filter 0.2s;
}

a.char-stat.char-profile-link:hover { filter: brightness(1.1); }

/* Char inventory */
.char-inventory-section { margin-top: 0.75rem; }

.char-extras { margin-top: 1rem; }

.char-skins {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 330px;
}

/* A skin picture has a lot of empty border around the piece, so it is drawn larger than its
   tile and the tile clips it. */
.char-skin-tile {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(187,24,24,0.25) 0%, rgba(7,5,10,0.9) 75%);
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    overflow: hidden;
    cursor: help;
    transition: border-color 0.2s;
}

.char-skin-tile:hover { border-color: var(--gold); }

.char-skin-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.6);
}

.char-inv-label {
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.char-equipped-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

.char-equipped-grid .equipped-container,
.char-equipped-grid .mu-item-storage {
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.45);
}

.char-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.char-loading .spinner-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-width: 2px;
    margin-bottom: 0.5rem;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.empty-state i { font-size: 2rem; color: var(--border-red); }

/* ═══════════════════════════════════════
   PAYMENTS (PIX / MERCADO PAGO)
═══════════════════════════════════════ */
.payment-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.25rem;
}

.payment-card {
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.2rem;
    background: rgba(9,7,12,0.7);
    border: 1px solid var(--border-gold);
    border-radius: 14px;
}

.payment-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-bright);
}

.payment-card-head i {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(50,188,173,0.12);
    border: 1px solid rgba(50,188,173,0.4);
    border-radius: 9px;
    color: #32bcad;
}

.payment-intro,
.payment-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.payment-note {
    display: flex;
    gap: 0.5rem;
    font-size: 0.76rem;
}

.payment-note::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--gold);
}

.payment-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.payment-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 160px;
}

.payment-field-grow { flex: 1; min-width: 200px; }

.payment-field label {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.payment-field input,
.payment-field select {
    padding: 0.65rem 0.85rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    box-shadow: none;
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.payment-field input:focus,
.payment-field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,134,11,0.15);
}

.payment-current {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
    padding: 0.55rem 0.85rem;
    background: rgba(34,197,94,0.07);
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.payment-current i { color: var(--online); }
.payment-current strong { color: var(--text-bright); font-family: monospace; overflow-wrap: anywhere; }

.payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

/* The site styles every <button> as a full-width form button; these are pills. */
.btn-payment {
    width: auto;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 9px 18px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    border: 1px solid var(--gold-bright);
    border-radius: 999px;
    color: #1a1207;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(184,134,11,0.25);
    transition: filter 0.2s, box-shadow 0.2s;
}

.btn-payment::before { content: none; }

.btn-payment:hover {
    color: #1a1207;
    border-color: var(--gold-bright);
    filter: brightness(1.1);
    box-shadow: 0 8px 22px rgba(184,134,11,0.35);
}

.btn-payment-danger,
.btn-payment-danger:hover {
    background: transparent;
    border-color: var(--border-red);
    color: var(--red-bright);
    box-shadow: none;
}

.btn-payment-danger:hover { background: var(--red-dim); filter: none; }

.payment-divider { display: none; }

.payment-connection {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.9rem;
}

.payment-connection.connected { border-color: rgba(34,197,94,0.4); }

.payment-connection-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.payment-connection .payment-card-head { margin-bottom: 0.2rem; }
.payment-connection .payment-card-head i { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.4); color: #60a5fa; }

.payment-connection-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-bright);
}

.payment-connection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dim);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.74rem;
}

.payment-connection-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
}

.payment-connection.connected .payment-connection-status {
    border-color: rgba(34,197,94,0.35);
    color: var(--online);
}

.payment-connection.connected .payment-connection-status::before {
    background: var(--online);
    box-shadow: 0 0 8px rgba(34,197,94,0.8);
}

.payment-connection .btn-payment { align-self: flex-start; }

.payment-message {
    grid-column: 1 / -1;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.payment-message.success { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.06); color: var(--online); }
.payment-message.error { border-color: var(--border-red); background: rgba(197,34,34,0.08); color: var(--red-bright); }

/* ═══════════════════════════════
   NARROW SCREENS
═══════════════════════════════ */
@media (max-width: 1000px) {
    .dual-vault-container {
        flex-direction: column;
        align-items: center;
    }

    .vault-transfer-buttons {
        flex-direction: row;
        padding: 8px 0;
    }

    .payment-panel { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .account-header {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1.3rem 1.2rem;
    }

    .account-avatar { width: 64px; height: 64px; font-size: 1.5rem; }
    .account-name { font-size: 1.6rem; }

    .account-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }

    .account-action { flex: 1; }
    .tabs-bar { justify-content: flex-start; }
    .tab-btn { padding: 0.55rem 0.8rem; font-size: 0.72rem; }
    .section { padding: 1.1rem; border-radius: 14px; }
    .section-title { font-size: 1rem; }
    .coins-grid { grid-template-columns: 1fr; }
    .coin-action { position: absolute; top: 10px; right: 10px; padding: 4px 10px; }
    .jewel-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .char-card-header { grid-template-columns: 1fr auto auto; gap: 0.6rem; padding: 0.9rem 1rem; }
    .char-level { font-size: 1.25rem; }
    .char-equipped-grid { flex-direction: column; }
    .mu-item-storage { transform: scale(0.8); transform-origin: top left; }
    .item-actions { flex-direction: column; align-items: stretch; border-radius: 14px; }
    .action-buttons { justify-content: stretch; }
    .action-buttons .btn-action { flex: 1; justify-content: center; }

    .vault-panel {
        width: 100%;
        max-width: 400px;
        min-width: unset;
    }

    .vault-panel.vault-panel-site {
        min-width: unset;
        max-width: 540px;
    }

    .site-vault-grid {
        transform: scale(0.75);
        transform-origin: top left;
    }

    a.char-stat.char-profile-link { margin-left: 0; }
}
