/* =====================
   CURRENCY CHIP
   ===================== */

.store-currency-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.85rem;
    color: #ffbf00;
    font-weight: bold;
    white-space: nowrap;
    padding: 4px 14px;
    border-radius: 20px;
    border: 2px solid rgba(255, 191, 0, 0.35);
    background: #1e2022;
    height: 30px;
    box-sizing: border-box;
    margin: 0 6px;
}

.store-currency-chip i {
    font-size: 0.85rem;
}

/* =====================
   FILTER DROPDOWNS
   ===================== */

.store-filters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-select {
    padding: 4px 28px 4px 10px;
    border-radius: 20px;
    border: 2px solid rgba(255, 191, 0, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    height: 30px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,191,0,0.6)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.store-select:hover,
.store-select:focus {
    border-color: rgba(255, 191, 0, 0.5);
    box-shadow: 0 0 8px rgba(255, 191, 0, 0.15);
}

.store-select option {
    background: #1a1a1a;
    color: #f0ece6;
}

.store-mobile-filters {
    display: flex;
    gap: 6px;
}

.store-mobile-filters .store-select {
    flex: 1;
    min-width: 0;
}

/* =====================
   REDEEM BUTTON
   ===================== */

.store-redeem-btn {
    padding: 4px 18px;
    border-radius: 20px;
    border: 2px solid rgba(255, 191, 0, 0.45);
    background: #1e2022;
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    height: 30px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

.store-redeem-btn:hover {
    border-color: rgba(255, 191, 0, 0.75);
    background: #252a2d;
}

/* =====================
   SKIN GRID
   ===================== */

#skinsSection,
#chestsSection {
    width: 100%;
}

.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    align-items: start;
    gap: 16px;
    max-width: 1300px;
    margin: 16px auto 0;
    padding: 0 16px 40px;
}

.skin-grid-empty-wrap {
    display: block;
    max-width: 1300px;
    margin: 16px auto 0;
    padding: 0 16px 40px;
}

.skin-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 60px 20px;
    line-height: 2.2;
}

.skin-grid-empty i {
    font-size: 2rem;
    color: rgba(255, 191, 0, 0.3);
}

/* =====================
   STORE SHELL (sidebar + content, mirrors Stats & Strats)
   ===================== */

.store-shell {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    text-align: left;
}

.store-sidebar {
    position: sticky;
    top: 152px; /* below fixed site header + action bar, with a small gap */
    flex: 0 0 230px;
    /* max-height (not a fixed height) so the panel hugs its content and only
       scrolls when the viewport is genuinely too short */
    max-height: calc(100vh - 168px); /* top offset 152 + bottom margin 16 */
    overflow-y: auto;
    background: rgba(8, 8, 8, 0.82);
    border: 1px solid rgba(255, 191, 0, 0.12);
    border-radius: 14px;
    margin: 16px 0 16px 16px;
    padding: 12px 10px 18px;
    box-sizing: border-box;
    scrollbar-width: thin;
}

/* Sidebar wallet: treasure balance + redeem code, sits above search/sort/nav */
.store-wallet {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 2px 2px 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 191, 0, 0.1);
}

.store-wallet-balance {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 191, 0, 0.22);
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.09), rgba(255, 191, 0, 0.02));
}

.store-wallet-label {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(240, 236, 230, 0.42);
}

.store-wallet-amount {
    align-self: flex-start;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 12px rgba(255, 191, 0, 0.18);
}

/* Redeem button reshaped to a full-width sidebar action */
.store-wallet .store-redeem-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: auto;
    padding: 10px 12px;
    border-radius: 9px;
    letter-spacing: 1.5px;
}

.store-side-search {
    position: relative;
    margin: 2px 2px 8px;
}

.store-side-search input[type="search"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 32px 9px 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 191, 0, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: #f0ece6;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.8rem;
    outline: none;
    height: auto;
    transition: border-color 0.2s;
}

.store-side-search input[type="search"]:focus {
    border-color: rgba(255, 191, 0, 0.5);
}

.store-side-search i {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 191, 0, 0.5);
    font-size: 0.75rem;
    pointer-events: none;
}

.store-side-select {
    display: block;
    width: calc(100% - 4px);
    box-sizing: border-box;
    margin: 0 2px 6px;
    border-radius: 9px;
    height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* main.css sets a global `nav { display:flex; justify-content:center }` —
   override so the groups stack vertically. */
.store-nav {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    text-align: left;
}

.store-nav-group {
    margin-bottom: 6px;
}

.store-nav-group-label {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.58rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(240, 236, 230, 0.32);
    padding: 14px 12px 6px;
}

.store-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    height: auto; /* override global button height */
    background: transparent;
    border: none;
    border-radius: 9px;
    padding: 10px 12px;
    color: rgba(240, 236, 230, 0.55);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
}

.store-nav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 191, 0, 0.45);
    transition: color 0.2s;
    flex-shrink: 0;
}

.store-nav-item span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-nav-item:hover {
    color: rgba(240, 236, 230, 0.9);
    background: rgba(255, 255, 255, 0.04);
}

.store-nav-item.active {
    background: rgba(255, 191, 0, 0.13);
    color: #ffbf00;
}

.store-nav-item.active i {
    color: #ffbf00;
}

/* Content column */
.store-content {
    flex: 1;
    min-width: 0;
}

/* =====================
   TILE STATUS BADGES
   ===================== */

.tile-status-badge {
    position: absolute;
    top: 9px;
    left: 8px;
    z-index: 3;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 999px;
    pointer-events: none;
}

.tile-equipped-badge {
    background: #ffbf00;
    color: #0e0e0e;
    box-shadow: 0 0 10px rgba(255, 191, 0, 0.45);
}

.tile-owned-badge {
    background: rgba(8, 8, 8, 0.8);
    color: rgba(240, 236, 230, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tile-soldout-badge {
    background: rgba(20, 6, 6, 0.85);
    color: #ff6b6b;
    border: 1px solid rgba(255, 68, 68, 0.5);
}

/* Limited-edition remaining-stock line (unowned tiles) */
.skin-tile-stock {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #e0a64b;
    margin-top: 2px;
}

.skin-tile-stock.low {
    color: #ff8a4b;
}

.skin-tile-stock.sold-out {
    color: #ff6b6b;
}

.skin-buy-btn.sold-out,
.skin-buy-btn:disabled {
    background: rgba(60, 60, 60, 0.5);
    color: rgba(240, 236, 230, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

.tile-count-badge {
    position: absolute;
    top: 9px;
    right: 8px;
    z-index: 3;
    background: rgba(8, 8, 8, 0.85);
    color: #ffbf00;
    border: 1px solid rgba(255, 191, 0, 0.45);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 999px;
    pointer-events: none;
}

.pack-count-badge {
    position: absolute;
    top: 9px;
    left: 8px;
    z-index: 3;
    background: #ffbf00;
    color: #0e0e0e;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 9px;
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(255, 191, 0, 0.4);
    pointer-events: none;
}

/* =====================
   SKIN TILE
   ===================== */

.skin-tile {
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.skin-tile:hover { transform: translateY(-4px); }

.skin-tile.rarity-COMMON:hover   { box-shadow: 0 8px 28px rgba(158,158,158,0.20); border-color: rgba(158,158,158,0.25); }
.skin-tile.rarity-UNCOMMON:hover { box-shadow: 0 8px 28px rgba(76,175,80,0.25);   border-color: rgba(76,175,80,0.3); }
.skin-tile.rarity-RARE:hover     { box-shadow: 0 8px 28px rgba(33,150,243,0.28);  border-color: rgba(33,150,243,0.3); }
.skin-tile.rarity-EPIC:hover     { box-shadow: 0 8px 28px rgba(171,71,188,0.28);  border-color: rgba(171,71,188,0.3); }
.skin-tile.rarity-ANCIENT:hover  { box-shadow: 0 8px 32px rgba(255,152,0,0.32);   border-color: rgba(255,152,0,0.35); }

.skin-tile.is-active {
    border-color: rgba(255, 191, 0, 0.45);
    box-shadow: 0 0 16px rgba(255, 191, 0, 0.1);
}

/* Rarity accent bar at top */
.skin-tile-rarity-bar {
    height: 3px;
    width: 100%;
    flex-shrink: 0;
}
.rarity-bar-COMMON   { background: #9e9e9e; }
.rarity-bar-UNCOMMON { background: #4caf50; }
.rarity-bar-RARE     { background: #2196f3; }
.rarity-bar-EPIC     { background: linear-gradient(90deg, #7b1fa2, #ce93d8); }
.rarity-bar-ANCIENT  { background: linear-gradient(90deg, #e65100, #ffbf00); }

/* Wrapper locks the image area to a consistent aspect ratio per skin type.
   aspect-ratio on the div (not the img) avoids affecting flex/grid min-content. */
.skin-tile-image-wrap {
    width: 100%;
    overflow: hidden;
    background: #0f0f0f;
    transition: transform 0.35s ease;
}
.skin-section-grid.grid-wide .skin-tile-image-wrap    { aspect-ratio: 16 / 9; }
.skin-section-grid.grid-portrait .skin-tile-image-wrap { aspect-ratio: 5 / 7; }
.skin-section-grid.grid-square .skin-tile-image-wrap  { aspect-ratio: 1; }
.skin-section-grid.grid-pack .skin-tile-image-wrap    { aspect-ratio: 4 / 5; }

/* contain shows the entire skin — cover cropped art whose ratio didn't match
   the box, hiding most of the image. The soft radial glow behind the art
   makes any letterboxed space read as a lit display well, not dead space. */
.skin-tile-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.skin-tile-image--contain {
    padding: 8px;
    box-sizing: border-box;
}

.skin-tile-image-wrap {
    background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(255, 191, 0, 0.07), transparent 75%), #0f0f0f;
}

.skin-tile:hover .skin-tile-image-wrap { transform: scale(1.04); }

/* Info below image */
.skin-tile-info {
    padding: 9px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: #0f0f0f;
}

/* A long name takes the whole row and the rarity badge drops under it */
.skin-tile-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px 6px;
}

/* Long names wrap to two lines before clipping; the full name is the tooltip and the preview */
.skin-tile-name {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 12px;
    color: #fff;
    font-weight: bold;
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
}

.skin-tile-name-row .skin-tile-rarity { margin-top: 1px; }

/* The art opens the skin preview */
.skin-tile-image-wrap[data-preview] { cursor: zoom-in; }

.skin-tile-rarity {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.skin-tile-price {
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: bold;
}

/* =====================
   TYPE SECTION HEADERS (ALL view grouping)
   ===================== */

.skin-grid-container {
    max-width: 1300px;
    margin: 16px auto 0;
    padding: 0 0 40px;
}

.skin-type-section {
    margin-bottom: 32px;
}

.skin-type-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 12px;
}

.skin-type-header-label {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    color: rgba(255, 191, 0, 0.85);
    white-space: nowrap;
}

.skin-type-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 191, 0, 0.2), transparent);
}

.skin-type-header-count {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.5px;
}

/* Section grids — different column widths per skin type */
.skin-section-grid {
    display: grid;
    align-items: start;
    gap: 16px;
    padding: 0 16px;
}

.skin-section-grid.grid-wide {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.skin-section-grid.grid-portrait {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.skin-section-grid.grid-square {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.skin-section-grid.grid-pack {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ── Skin tiles cut to each type's real art shape (skins.html TYPE_SHAPE) ──
   The box matches the art, so the image fills it edge to edge: no letterboxing. */
.skin-section-grid.shape-avatar { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.skin-section-grid.shape-tall   { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.skin-section-grid.shape-space  { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.skin-section-grid.shape-card   { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.skin-section-grid.shape-loop   { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }

.shape-avatar .skin-tile-image-wrap, .skins-hero-equipped-art.shape-avatar { aspect-ratio: 500 / 276; }
.shape-tall   .skin-tile-image-wrap, .skins-hero-equipped-art.shape-tall   { aspect-ratio: 9 / 16; }
.shape-space  .skin-tile-image-wrap, .skins-hero-equipped-art.shape-space  { aspect-ratio: 2 / 3; }
.shape-card   .skin-tile-image-wrap, .skins-hero-equipped-art.shape-card   { aspect-ratio: 5 / 7; }
.shape-loop   .skin-tile-image-wrap, .skins-hero-equipped-art.shape-loop   { aspect-ratio: 500 / 188; }

.skin-section-grid[class*="shape-"] .skin-tile-image { object-fit: cover; }
/* Avatar plates carry their own notched gold frame with transparent corners: show it whole */
.skin-section-grid.shape-avatar .skin-tile-image-wrap { background: #0b0907; }
.skin-section-grid.shape-avatar .skin-tile-image { object-fit: contain; }

/* Rarity light pooling under the art, and a slow sheen across Epic + Ancient pieces */
.skin-tile .skin-tile-image-wrap { position: relative; }
.skin-tile .skin-tile-image-wrap::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; pointer-events: none;
    background: linear-gradient(to top, var(--tile-glow, rgba(255, 255, 255, 0.05)), transparent);
    opacity: 0.55; transition: opacity 0.25s;
}
.skin-tile:hover .skin-tile-image-wrap::after { opacity: 1; }
.skin-tile.rarity-COMMON   { --tile-glow: rgba(158, 158, 158, 0.18); }
.skin-tile.rarity-UNCOMMON { --tile-glow: rgba(76, 175, 80, 0.24); }
.skin-tile.rarity-RARE     { --tile-glow: rgba(33, 150, 243, 0.28); }
.skin-tile.rarity-EPIC     { --tile-glow: rgba(171, 71, 188, 0.32); }
.skin-tile.rarity-ANCIENT  { --tile-glow: rgba(255, 152, 0, 0.36); }
.skin-tile.rarity-EPIC .skin-tile-image-wrap::before,
.skin-tile.rarity-ANCIENT .skin-tile-image-wrap::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: 1; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    transform: skewX(-18deg);
    animation: skin-sheen 5.5s ease-in-out infinite;
}
.skin-tile.rarity-ANCIENT .skin-tile-image-wrap::before { animation-duration: 3.8s; background: linear-gradient(100deg, transparent, rgba(255, 210, 120, 0.24), transparent); }
@keyframes skin-sheen { 0%, 62% { left: -60%; } 100% { left: 130%; } }
.skin-tile.rarity-ANCIENT { border-color: rgba(255, 152, 0, 0.3); }

/* Tiles cascade in on each render (--d set per tile in renderSkinGrid) */
.skin-section-grid .skin-tile { animation: skin-tile-in 0.42s cubic-bezier(.2, .8, .3, 1) both; animation-delay: var(--d, 0ms); }
@keyframes skin-tile-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ── Category header band ── */
.skins-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 24px;
    max-width: 1300px; margin: 0 16px 26px; padding: 22px 26px; box-sizing: border-box; border-radius: 18px;
    border: 1px solid rgba(255, 191, 0, 0.22);
    background:
        radial-gradient(ellipse 60% 140% at 0% 0%, rgba(255, 170, 40, 0.20), transparent 65%),
        radial-gradient(ellipse 50% 120% at 100% 100%, rgba(120, 60, 200, 0.16), transparent 70%),
        linear-gradient(160deg, rgba(26, 18, 8, 0.92), rgba(10, 8, 6, 0.92));
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.skins-hero-glow {
    position: absolute; inset: -60%; pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 72%, rgba(255, 200, 90, 0.10) 82%, transparent 92%);
    animation: skins-hero-spin 14s linear infinite;
}
@keyframes skins-hero-spin { to { transform: rotate(360deg); } }
.skins-hero-text { position: relative; flex: 1; min-width: 0; }
.skins-hero-title {
    margin: 0 0 10px; font-family: 'DragonSlayer', serif; font-size: 2.2rem; line-height: 1; letter-spacing: 3px;
    color: #ffd45e; text-shadow: 0 0 22px rgba(255, 150, 30, 0.45);
}
.skins-hero-progress { height: 8px; max-width: 420px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.07); }
.skins-hero-progress span {
    display: block; height: 100%; border-radius: inherit;
    background: linear-gradient(90deg, #ff8a00, #ffd45e); box-shadow: 0 0 12px rgba(255, 170, 40, 0.6);
    transition: width 0.6s ease;
}
.skins-hero-count { margin-top: 8px; font-family: 'HwyGothic', Arial, sans-serif; font-size: 0.78rem; letter-spacing: 1px; color: rgba(240, 236, 230, 0.6); }
.skins-hero-count b { color: #ffd45e; }
/* My Skins: bulk duplicate trade-in (hidden when there are no extra copies) */
.skins-tradeall-btn {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 14px; height: auto;
    border: 1px solid rgba(255, 191, 0, 0.4); border-radius: 999px; background: rgba(255, 191, 0, 0.10);
    color: #ffd45e; font-family: 'HwyGothic', Arial, sans-serif; font-size: 0.75rem; font-weight: bold; letter-spacing: 1px;
    cursor: pointer; transition: background 0.18s, border-color 0.18s;
}
.skins-tradeall-btn:hover { background: rgba(255, 191, 0, 0.2); border-color: rgba(255, 191, 0, 0.7); }
.skins-tradeall-btn .skins-tradeall-count { color: rgba(240, 236, 230, 0.7); }
.skins-tradeall-btn .gem-pill { font-size: 0.75rem; }
.skins-hero-equipped { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.skins-hero-equipped-label { font-family: 'HwyGothic', Arial, sans-serif; font-size: 0.58rem; letter-spacing: 3px; color: rgba(255, 191, 0, 0.75); }
.skins-hero-equipped-art {
    height: 120px; border-radius: 10px; overflow: hidden; background: #0b0907;
    box-shadow: 0 0 0 1px rgba(255, 191, 0, 0.45), 0 0 24px rgba(255, 160, 30, 0.35);
}
.skins-hero-equipped-art.shape-loop { height: 64px; }
.skins-hero-equipped-art img { width: 100%; height: 100%; max-height: none; object-fit: cover; display: block; }
.skins-hero-equipped-art.shape-avatar img { object-fit: contain; }
.skins-hero-equipped-art.is-empty {
    display: flex; align-items: center; justify-content: center; color: rgba(255, 191, 0, 0.45); font-size: 1.4rem;
    box-shadow: 0 0 0 1px rgba(255, 191, 0, 0.25); border: 1px dashed rgba(255, 191, 0, 0.3); box-sizing: border-box;
}
.skins-hero-equipped-name { max-width: 220px; font-family: 'HwyGothic', Arial, sans-serif; font-size: 0.7rem; color: rgba(240, 236, 230, 0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (prefers-reduced-motion: reduce) {
    .skins-hero-glow, .skin-tile .skin-tile-image-wrap::before { animation: none; }
    .skin-section-grid .skin-tile { animation: none; }
}

/* =====================
   RARITY COLORS
   ===================== */

.rarity-COMMON   { background: #9e9e9e; }
.rarity-UNCOMMON { background: #4caf50; }
.rarity-RARE     { background: #2196f3; }
.rarity-EPIC     { background: #ab47bc; }
.rarity-ANCIENT  { background: #ff9800; }

.price-original {
    text-decoration: line-through;
    opacity: 0.5;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
}

.price-sale { color: #ffbf00; }

/* =====================
   SALE TAG
   ===================== */

.sale-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e53935;
    color: #fff;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* =====================
   STATUS BADGES
   ===================== */

.owned-badge, .active-badge {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 10px;
    width: fit-content;
    line-height: 1;
}

.owned-badge {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.active-badge {
    background: rgba(255, 191, 0, 0.12);
    color: #ffbf00;
    border: 1px solid rgba(255, 191, 0, 0.3);
}

/* =====================
   ACTION BUTTONS
   ===================== */

.skin-buy-btn {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    background: #ffbf00;
    color: #0e0e0e;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    height: auto;
    line-height: 1;
}

.skin-buy-btn:hover {
    background: #ffd54f;
    box-shadow: 0 2px 16px rgba(255, 191, 0, 0.4);
}

/* /skins?card={id}: "Skins for X" filter chip above the grid */
.card-filter-chip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1300px;
    margin: 16px auto 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 191, 0, 0.3);
    background: rgba(255, 191, 0, 0.07);
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: bold;
    letter-spacing: 0.8px;
    box-sizing: border-box;
}

.card-filter-clear {
    margin-left: auto;
    height: auto;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 8, 8, 0.6);
    color: rgba(240, 236, 230, 0.8);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 1px;
    cursor: pointer;
}

.card-filter-clear:hover {
    color: #fff;
    border-color: rgba(255, 191, 0, 0.6);
}

/* Not sold for treasure: badges saying how to get the skin, in place of price + BUY */
.skin-tile-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.skin-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.8px;
    line-height: 1;
    height: auto;
    white-space: nowrap;
}

.skin-source-badge.source-packs {
    background: rgba(255, 191, 0, 0.1);
    color: #ffbf00;
    border: 1px solid rgba(255, 191, 0, 0.45);
}

/* Pack-only skins: SHOP PACKS link in the BUY button's slot, styled as its outlined sibling */
.skin-packs-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: auto;
    padding: 8px 10px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 191, 0, 0.55);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.16), rgba(255, 140, 0, 0.06));
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, color 0.18s;
}

.skin-packs-link span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.skin-packs-link-arrow {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.18s, opacity 0.18s;
}

.skin-packs-link:hover,
.skin-packs-link:focus-visible {
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.3), rgba(255, 140, 0, 0.12));
    border-color: #ffbf00;
    color: #ffd54f;
    box-shadow: 0 2px 16px rgba(255, 191, 0, 0.3);
    outline: none;
}

.skin-packs-link:hover .skin-packs-link-arrow,
.skin-packs-link:focus-visible .skin-packs-link-arrow {
    transform: translateX(3px);
    opacity: 1;
}

/* Let the info panel fill the tile so the link lines up with BUY buttons in the same row */
.skin-tile-info:has(> .skin-packs-link) {
    flex: 1;
}

/* The missions badge row already pushes itself down; keep the link right under it */
.skin-tile-sources + .skin-packs-link {
    margin-top: 0;
}

.skin-source-badge.source-missions {
    background: rgba(120, 200, 255, 0.1);
    color: #8fd3ff;
    border: 1px solid rgba(120, 200, 255, 0.45);
}

.skin-activate-btn {
    width: 100%;
    padding: 8px 0;
    border: 1px solid rgba(255, 191, 0, 0.3);
    border-radius: 8px;
    background: transparent;
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    height: auto;
    line-height: 1;
}

.skin-activate-btn:hover {
    background: rgba(255, 191, 0, 0.1);
    border-color: rgba(255, 191, 0, 0.6);
}

.skin-tradein-btn {
    width: 100%;
    padding: 6px 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: transparent;
    color: rgba(240, 236, 230, 0.7);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    height: auto;
    line-height: 1;
}

.skin-tradein-btn i { margin-right: 5px; }

.skin-tradein-btn:hover {
    background: rgba(255, 191, 0, 0.08);
    border-color: rgba(255, 191, 0, 0.4);
    color: #ffbf00;
}

.skin-deactivate-btn {
    width: 100%;
    padding: 8px 0;
    border: 1px solid rgba(255, 191, 0, 0.3);
    border-radius: 8px;
    background: rgba(255, 191, 0, 0.12);
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    height: auto;
    line-height: 1;
}

.skin-deactivate-btn:hover {
    background: rgba(229, 57, 53, 0.15);
    border-color: rgba(229, 57, 53, 0.5);
    color: #e53935;
}

/* =====================
   PURCHASE MODAL
   ===================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #1a1a1a;
    border: 1px solid rgba(255, 191, 0, 0.2);
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Whole image, never cropped: packs are tall, avatars/loops are wide */
.modal-skin-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(220px, 32vh);
    object-fit: contain;
    border-radius: 10px;
}

.modal-skin-name {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 18px;
    color: #fff;
    font-weight: bold;
}

.modal-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 1.1rem;
    color: #ffbf00;
    font-weight: bold;
}

.modal-error {
    color: #e53935;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    min-height: 18px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.modal-confirm-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    background: #ffbf00;
    color: #0e0e0e;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background 0.18s;
    height: auto;
}

.modal-confirm-btn:hover { background: #ffd54f; }

.modal-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-cancel-btn {
    flex: 1;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background 0.18s;
    height: auto;
}

.modal-cancel-btn:hover { background: rgba(255, 255, 255, 0.06); }

/* =====================
   LOAD MORE BUTTON
   ===================== */

.load-more-wrap {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 10px 0 20px;
}

.load-more-btn {
    padding: 10px 32px;
    border: 2px solid rgba(255, 191, 0, 0.3);
    border-radius: 10px;
    background: transparent;
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
    height: auto;
}

.load-more-btn:hover {
    background: rgba(255, 191, 0, 0.08);
    border-color: rgba(255, 191, 0, 0.5);
    box-shadow: 0 2px 12px rgba(255, 191, 0, 0.15);
}

/* =====================
   LOADING STATE
   ===================== */

.store-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 16px;
    padding: 80px 20px;
}

/* =====================
   MOBILE FILTER BAR
   ===================== */

.store-filter-mobile {
    display: none;
}

/* =====================
   MOBILE STYLES
   ===================== */

@media only screen and (max-width: 1024px), only screen and (hover: none) {

    /* Shell stacks; the sidebar becomes a block at the top: search + sort
       side by side, then the nav as a wrapping row of chips (no drawer,
       no side-scroll — same treatment as Stats & Strats). */
    .store-shell {
        flex-direction: column;
    }

    .store-sidebar {
        position: static;
        flex: none;
        width: auto;
        height: auto;
        max-height: none;
        overflow: visible;
        margin: 10px 10px 0;
        padding: 8px;
        border-radius: 12px;
    }

    .store-wallet {
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
        margin: 0 0 8px;
        padding-bottom: 0;
        border-bottom: none;
    }

    .store-wallet-balance {
        flex: 1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 9px 14px;
    }

    .store-wallet-amount {
        font-size: 1.05rem;
    }

    .store-wallet .store-redeem-btn {
        width: auto;
        flex: 0 0 auto;
        padding: 10px 18px;
    }

    .store-side-search {
        margin: 0 0 6px;
    }

    .store-side-select {
        width: 100%;
        margin: 0 0 6px;
    }

    .store-nav {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .store-nav-group {
        display: contents;
    }

    .store-nav-group-label {
        display: none;
    }

    .store-nav-item {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 7px 12px;
        gap: 6px;
        font-size: 0.62rem;
        border: 1px solid rgba(255, 191, 0, 0.14);
        border-radius: 999px;
    }

    .store-nav-item.active {
        border-color: rgba(255, 191, 0, 0.55);
    }

    .store-nav-item i {
        width: auto;
    }

}

@media only screen and (max-width: 767px), only screen and (hover: none) {

    /* Mobile skin grids — bottom padding clears the fixed action bar */
    .skin-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px 14px 100px;
    }

    .skin-grid-container {
        padding-bottom: 100px;
    }

    .skin-section-grid {
        padding: 0 14px;
        gap: 10px;
    }

    .skin-section-grid.grid-wide {
        grid-template-columns: 1fr;
    }

    .skin-section-grid.grid-portrait {
        grid-template-columns: repeat(3, 1fr);
    }

    .skin-section-grid.grid-square {
        grid-template-columns: repeat(2, 1fr);
    }

    .skin-section-grid.grid-pack {
        grid-template-columns: repeat(2, 1fr);
    }

    .skin-section-grid.shape-avatar { grid-template-columns: repeat(2, 1fr); }
    .skin-section-grid.shape-tall,
    .skin-section-grid.shape-space,
    .skin-section-grid.shape-card   { grid-template-columns: repeat(3, 1fr); }
    .skin-section-grid.shape-loop   { grid-template-columns: 1fr; }

    .skins-hero { margin: 0 14px 18px; padding: 16px; gap: 14px; }
    .skins-hero-title { font-size: 1.5rem; }
    .skins-hero-equipped-art { height: 84px; }
    .skins-hero-equipped-art.shape-loop { height: 44px; }
    .skins-hero-equipped-name { max-width: 120px; }

    .skin-type-header {
        padding: 0 14px;
    }

    .store-cats {
        padding: 4px 10px 0;
    }

    .store-cat {
        padding: 6px 10px;
        font-size: 0.6rem;
        gap: 5px;
    }

    .modal-card {
        padding: 22px 20px;
    }
}

/* Redeem result "VIEW IN ORDERS" link, styled like the secondary modal button */
.redeem-orders-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
}

/* ── Real-money equivalents (only where region rules require them) ──
   Deliberately muted and secondary: the treasure amount stays THE price. */
.price-equivalent {
    margin-left: 4px;
    font-weight: normal;
    font-size: 11px;
    color: rgba(240, 236, 230, 0.55);
    white-space: nowrap;
}
.skin-tile-price { flex-wrap: wrap; }
.modal-value {
    min-height: 0;
    margin: 2px 0 8px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 12px;
    color: rgba(240, 236, 230, 0.55);
}
.modal-value:empty { display: none; }
.store-currency-note {
    margin: 8px 0 0;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(240, 236, 230, 0.55);
}

/* ── Pack odds (buy + open dialogs) ── */
.pack-odds {
    width: 100%;
    margin: 4px 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 191, 0, 0.2);
    border-radius: 8px;
    background: rgba(8, 8, 8, 0.4);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 12px;
    color: rgba(240, 236, 230, 0.8);
    text-align: left;
    box-sizing: border-box;
}
.pack-odds:empty { display: none; }
.pack-odds-title {
    color: #ffbf00;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}
.pack-odds-line { margin: 2px 0; }
.pack-odds-table {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0 6px;
}
.pack-odds-table td {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pack-odds-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.pack-odds-note {
    font-size: 10.5px;
    line-height: 1.4;
    color: rgba(240, 236, 230, 0.5);
}
/* Packs off (region rule / parental controls): owned packs stay visible with a trade-in. */
.packs-off-note {
    grid-column: 1 / -1;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 191, 0, 0.25);
    border-radius: 8px;
    background: rgba(255, 191, 0, 0.06);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(240, 236, 230, 0.8);
}