/* =========================================================================
 * market.css — the Blastforce market, one design system
 * -------------------------------------------------------------------------
 * Apple HIG on a warm dark ground, the same language as stats.html:
 *   · the system face for text, Blastron for headings and figures;
 *   · fills, not outlines; state said by colour and weight, never by a glow;
 *   · 44px touch targets, an 8px rhythm, 16px gutters on a phone.
 * Two materials, one layout: liquid glass (html.bf-glass-gpu — bf-glass.js
 * draws the panes and the background) and the plain one (lite mode, no GPU),
 * where this file paints every surface itself.
 * Shared chrome — sidebar, top bar capsule, account island, bottom nav — is
 * styled by its own files; only placement and the page accent live here.
 * ========================================================================= */

:root {
    /* The accent is the brand orange taken down a step in saturation, so it
       reads warm on a dark ground instead of glaring. */
    --accent: #f07c26;
    --accent-hi: #ff9549;          /* accent as text on dark */
    --accent-ink: #1f0e02;         /* text on an accent fill */
    --accent-fill: rgba(240, 124, 38, 0.15);
    --accent-fill-2: rgba(240, 124, 38, 0.24);
    --accent-glow: rgba(240, 124, 38, 0.32);
    --accent-secondary: #f07c26;

    --success: #30d158;
    --danger: #ff453a;
    --warning: #ffd60a;

    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.62);
    --label-3: rgba(235, 235, 245, 0.34);
    --text-main: var(--label);
    --text-muted: var(--label-2);
    --sep: rgba(255, 255, 255, 0.08);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.18);
    --fill-3: rgba(118, 118, 128, 0.12);

    /* Surfaces of the plain material: warm, a little see-through, so the
       ambient light stays in them. */
    --surface: rgba(34, 28, 24, 0.66);
    --surface-hi: rgba(48, 40, 34, 0.72);
    --surface-line: rgba(255, 255, 255, 0.07);
    --ground: #0c0907;

    --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
    --font-brand: 'Blastron', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
    --apple-ease: var(--ease);
    --apple-spring: var(--spring);

    --r-card: 16px;
    --r-ctl: 12px;
    --sidebar-w: 300px;
    --gut: 24px;
    --nav-pad: 32px;
    --glass-border: var(--surface-line);

    --ios-spinner-svg: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='white'%3E%3Crect x='11' y='1.5' width='2' height='6.5' rx='1' opacity='1'/%3E%3Crect x='11' y='1.5' width='2' height='6.5' rx='1' transform='rotate(45 12 12)' opacity='0.87'/%3E%3Crect x='11' y='1.5' width='2' height='6.5' rx='1' transform='rotate(90 12 12)' opacity='0.74'/%3E%3Crect x='11' y='1.5' width='2' height='6.5' rx='1' transform='rotate(135 12 12)' opacity='0.61'/%3E%3Crect x='11' y='1.5' width='2' height='6.5' rx='1' transform='rotate(180 12 12)' opacity='0.48'/%3E%3Crect x='11' y='1.5' width='2' height='6.5' rx='1' transform='rotate(225 12 12)' opacity='0.35'/%3E%3Crect x='11' y='1.5' width='2' height='6.5' rx='1' transform='rotate(270 12 12)' opacity='0.25'/%3E%3Crect x='11' y='1.5' width='2' height='6.5' rx='1' transform='rotate(315 12 12)' opacity='0.15'/%3E%3C/g%3E%3C/svg%3E");
}
@media (max-width: 1000px) { :root { --gut: 16px; } }
@media (max-width: 640px) {
    :root { --nav-pad: calc(92px + env(safe-area-inset-bottom, 0px)); }
}

/* ── base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { background-color: var(--ground); }
html, body {
    height: 100%; height: 100dvh; width: 100%; overflow: hidden; display: flex;
    background-color: transparent; color: var(--label);
    font: 400 15px/1.4 var(--font-text);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 8px; }
.mk-i { width: 20px; height: 20px; flex-shrink: 0; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.text-accent { color: var(--accent-hi); } .text-success { color: var(--success); } .text-danger { color: var(--danger); }
.text-warn { color: var(--warning); } .text-muted { color: var(--label-2); }
.brand-font { font-family: var(--font-brand); font-weight: 700; }

/* ── the ground ──────────────────────────────────────────────────────────
   One fixed layer: the warm base, two lights and the ribbed ridge along the
   bottom (drawn once into a canvas by market-ambient.js). On the renderer the
   shader draws the same scene, so this layer steps aside. */
.ambient-bg-system { position: fixed; inset: 0; z-index: -10; pointer-events: none; overflow: hidden; background: var(--ground); }
.ambient-bg-system canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
html.bf-glass-pending .ambient-bg-system { display: none; }

/* ── frame ────────────────────────────────────────────────────────────── */
#sidebar-container { flex-shrink: 0; z-index: 10000; }
.market-layout { display: flex; flex: 1 1 auto; height: 100%; width: 100%; min-width: 0; overflow: hidden; position: relative; }
.main-content { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; overflow: hidden; position: relative; }
.content-scroll {
    flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; display: flex; flex-direction: column;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: var(--nav-pad);
}
/* Every scroller scrolls on the compositor. On a 1× screen Chrome does not do
   that by itself for a scroller with a see-through background, so each scroll
   frame repainted the whole list — every item image with its drop-shadow blur
   again — and that, not the glass, was most of the GPU on a scrolling market.
   Text is unchanged: it already sits on a see-through layer over the glass. */
.content-scroll, .filter-sidebar, .modal-body, .exch-content, .inv-grid, .sell-body { will-change: scroll-position; }

/* ── top bar ──────────────────────────────────────────────────────────── */
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.top-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.mk-title { font: 700 20px/1.1 var(--font-brand); letter-spacing: 0.2px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mob-menu-toggle { display: none; width: 40px; height: 40px; border-radius: 20px; place-items: center; color: var(--label); flex-shrink: 0; }
.mob-menu-toggle .mk-i { width: 22px; height: 22px; }
@media (max-width: 1000px) { .mob-menu-toggle { display: inline-grid; } }
#mk-back { display: none; }
body.mk-detail #mk-back { display: inline-flex; }
body.mk-detail .mob-menu-toggle { display: none; }
.top-bar .bf-back {
    --bf-back-accent: #f07c26; --bf-back-accent-rgb: 240, 124, 38;
    font: 600 15px/1 var(--font-text); letter-spacing: 0; text-transform: none; color: var(--accent-hi);
    padding: 9px 14px 9px 10px; gap: 4px; border-radius: 999px; background: var(--fill-2); border: 0;
}
.top-bar .bf-back .bf-back-ic { width: 20px; height: 20px; }
@media (min-width: 1001px) {
    body.mk-detail .top-bar .mk-title { display: none; }
    .top-bar .bf-back:hover { background: var(--fill); color: #fff; box-shadow: none; transform: none; }
}
.top-bar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mk-tb-btn {
    position: relative; height: 38px; padding: 0 14px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background: var(--fill-2); color: var(--label); font: 600 14px/1 var(--font-text); white-space: nowrap;
    transition: background 0.2s var(--ease), transform 0.12s var(--ease);
}
.mk-tb-btn .mk-i { width: 18px; height: 18px; }
.mk-tb-btn:hover { background: var(--fill); }
.mk-tb-btn:active { transform: scale(0.96); }
.mk-tb-btn.is-primary { background: var(--accent); color: var(--accent-ink); }
.mk-tb-btn.is-primary:hover { background: #f58b3a; }
.mk-tb-btn.icon { width: 38px; padding: 0; }
@media (max-width: 1600px) {
    .mk-tb-btn:not(.is-primary) .lbl { display: none; }
    .mk-tb-btn:not(.is-primary) { width: 38px; padding: 0; }
}
@media (max-width: 640px) { .top-bar-right { display: none; } }
/* 1280–1365 px, filters docked: Sell is an icon like the rest, or the bar runs into the filters. */
@media (min-width: 1280px) and (max-width: 1365px) {
    .mk-tb-btn.is-primary .lbl { display: none; }
    .mk-tb-btn.is-primary { width: 38px; padding: 0; }
}
/* Currency of the line under B prices (market-currency.js): a pill like the buttons beside it. */
.mk-cur {
    height: 38px; padding: 0 32px 0 14px; border-radius: 999px; border: 0; outline: 0; cursor: pointer;
    background: var(--fill-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(235,235,245,0.6)' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
    color: var(--label); font: 600 14px/1 var(--font-text); -webkit-appearance: none; appearance: none;
}
.mk-cur:hover { background-color: var(--fill); }
.mk-cur:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-cur option { background: #1c1c1e; color: #fff; }
/* Phones: the top bar keeps only the currency (the rest is in the tab bar). */
@media (max-width: 640px) {
    .top-bar-right { display: flex; }
    .top-bar-right > :not(.mk-cur) { display: none; }
    .mk-cur { height: 34px; padding: 0 28px 0 12px; font-size: 13px; background-position: right 10px center; }
}
.cart-badge {
    position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--accent); color: var(--accent-ink); font: 700 11px/18px var(--font-text); text-align: center;
}
html .bf-acc { --bf-acc-accent: #f07c26; --bf-acc-accent-soft: rgba(240, 124, 38, 0.15); --bf-acc-accent-line: rgba(240, 124, 38, 0.30); }
/* On the item page the left of the bar holds only the back button, and it
   must keep its width: shrunk, "‹ Market" ran under the History button. */
#mk-back { flex-shrink: 0; }
body.mk-detail .top-bar-left { min-width: max-content; }
@media (max-width: 1000px) { body.mk-detail .top-bar-left { min-width: 0; } }

/* A sheet covers the bar on a phone and floats over it on a desktop: either
   way the island is not part of what is in front of you. */
body:has(.modal-overlay.visible) .bf-acc,
body:has(#filter-sidebar.open) .bf-acc,
body:has(.cs2-modal.active) .bf-acc { visibility: hidden; }

/* ── search, categories, toolbar ─────────────────────────────────────── */
.market-tools { display: flex; flex-direction: column; gap: 12px; padding: 18px var(--gut) 4px; flex-shrink: 0; position: relative; z-index: 20; }
.mk-searchrow { display: flex; gap: 10px; align-items: center; }
.search-box {
    position: relative; flex: 1 1 auto; min-width: 0; max-width: 520px; height: 44px;
    display: flex; align-items: center; gap: 8px; padding: 0 14px;
    border-radius: var(--r-ctl); background: var(--fill-2); color: var(--label-2);
    transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.search-box:focus-within { background: var(--fill); box-shadow: 0 0 0 3px var(--accent-fill); }
.search-box .mk-i { width: 19px; height: 19px; }
.search-box input {
    flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--label);
    font: 400 16px/1 var(--font-text); -webkit-appearance: none; appearance: none;
}
.search-box input::placeholder { color: var(--label-3); }
.search-box input::-webkit-search-cancel-button { display: none; }
.mk-filter-btn {
    position: relative; flex-shrink: 0; height: 44px; padding: 0 16px; border-radius: var(--r-ctl);
    display: inline-flex; align-items: center; gap: 8px; background: var(--fill-2); color: var(--label);
    font: 600 15px/1 var(--font-text); transition: background 0.2s var(--ease);
}
.mk-filter-btn:hover { background: var(--fill); }
.mk-filter-btn.on { color: var(--accent-hi); }
.mk-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 700 12px/20px var(--font-text); text-align: center; }
@media (min-width: 1280px) { .mk-filter-btn { display: none; } }
@media (max-width: 640px) { .mk-filter-btn { width: 44px; padding: 0; justify-content: center; } .mk-filter-btn .lbl { display: none; } .mk-filter-btn .mk-count { position: absolute; top: -5px; right: -5px; } }

/* Category chips: the filter's first question, one tap away. */
.mk-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); scroll-padding: 0 var(--gut); }
.mk-chips::-webkit-scrollbar { display: none; }
.mk-chip {
    flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--fill-3); color: var(--label);
    font: 500 14px/34px var(--font-text); white-space: nowrap; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.mk-chip:hover { background: var(--fill-2); }
.mk-chip.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
/* Quick filters (market-filter-controls.js QUICK) and price presets: the same chip. */
.qf-btn, .pp-btn {
    flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--fill-3); color: var(--label);
    font: 500 14px/34px var(--font-text); white-space: nowrap; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.qf-btn:hover, .pp-btn:hover { background: var(--fill-2); }
.qf-btn.active, .pp-btn.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.qf-btn:focus-visible, .pp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.price-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-btn { height: 30px; line-height: 30px; padding: 0 12px; font-size: 13px; }
/* Weapons: a group's models under its tick (market-filter-controls.js) */
.wpn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px 30px; }
.mk-row-input { padding: 8px 10px; }
.mk-row-input + .cyber-cb { box-shadow: inset 0 0.5px 0 var(--sep); }
@media (min-width: 1025px) { .mk-chips { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; } }

.tools-right { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.market-stats { font: 500 14px/1 var(--font-text); color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk-toolbar-r { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wishlist-toggle {
    height: 34px; padding: 0 12px; border-radius: 17px; display: inline-flex; align-items: center; gap: 6px;
    background: var(--fill-3); color: var(--label); font: 500 14px/1 var(--font-text); white-space: nowrap;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.wishlist-toggle:hover { background: var(--fill-2); }
.wishlist-toggle .mk-i { width: 17px; height: 17px; }
#wishlist-toggle .mk-i { color: #ff6b7a; }
#wishlist-toggle.active { background: rgba(255, 69, 88, 0.18); color: #ff8a96; }
#wishlist-toggle.active .mk-i { fill: currentColor; }
.wl-count { font-variant-numeric: tabular-nums; color: var(--label-2); }
#wishlist-toggle.active .wl-count { color: inherit; }
.price-sort-toggle .mk-i .up, .price-sort-toggle .mk-i .dn { opacity: 0.45; transition: opacity 0.2s; }
.price-sort-toggle.active { background: var(--accent-fill); color: var(--accent-hi); }
.price-sort-toggle[data-dir="asc"] .mk-i .up, .price-sort-toggle[data-dir="desc"] .mk-i .dn { opacity: 1; }
.sort-group { position: relative; display: flex; align-items: center; min-width: 0; }
.sort-select {
    height: 34px; max-width: 190px; padding: 0 30px 0 12px; border-radius: 17px; border: 0; outline: 0;
    background: var(--fill-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(235,235,245,0.6)' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
    color: var(--label); font: 500 14px/1 var(--font-text); cursor: pointer; -webkit-appearance: none; appearance: none;
    text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.sort-select:hover { background-color: var(--fill-2); }
.sort-select option { background: #1c1c1e; color: #fff; }
.sort-label { display: none; }
@media (max-width: 640px) {
    .market-tools { padding-top: 12px; gap: 10px; }
    #wl-label, .price-sort-toggle > span { display: none; }
    .wishlist-toggle { padding: 0 10px; }
    .sort-select { max-width: 150px; }
}
@media (max-width: 360px) { .sort-select { max-width: 118px; } .market-stats { font-size: 13px; } }

/* Search suggestions (market-skins.js) */
.mkt-suggest {
    position: absolute; top: calc(100% + 6px); left: 0; width: max(100%, 360px); max-width: calc(100vw - 32px);
    max-height: min(440px, 60vh); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 14px; z-index: 50;
    background: rgba(30, 27, 25, 0.98); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}
.mkt-suggest[hidden] { display: none; }
.mkt-sg-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 10px; min-height: 52px; border-radius: 10px; color: var(--label); text-align: left; }
.mkt-sg-row:hover, .mkt-sg-row.active { background: rgba(255, 255, 255, 0.07); }
.mkt-sg-img { flex: none; width: 56px; height: 42px; display: flex; align-items: center; justify-content: center; }
.mkt-sg-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mkt-sg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mkt-sg-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-sg-wpn { color: var(--label-2); font-weight: 500; }
.mkt-sg-rar { font-size: 12px; font-weight: 500; color: var(--label-2); }
.mkt-sg-price { flex: none; font: 600 14px/1 var(--font-text); font-variant-numeric: tabular-nums; }

/* ── the grid ─────────────────────────────────────────────────────────── */
.market-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px;
    padding: 14px var(--gut) 20px; align-content: start;
}
@media (max-width: 640px) { .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 10px; } }
.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 80px 20px; color: var(--label-2); font: 500 16px/1.4 var(--font-text); text-align: center; }
.empty-state .mk-i { width: 40px; height: 40px; color: var(--label-3); stroke-width: 1.5; }

.skin-card {
    position: relative; display: flex; flex-direction: column; min-width: 0; cursor: pointer;
    border-radius: var(--r-card); background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--surface-line);
    transition: transform 0.4s var(--spring), background-color 0.2s var(--ease);
    contain: layout style; -webkit-tap-highlight-color: transparent;
}
.skin-card:hover { background-color: var(--surface-hi); }
.skin-card:active { transform: scale(0.975); transition-duration: 0.12s; }
.skin-img-wrap {
    position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
    padding: 18px 12px 14px; border-radius: var(--r-card) var(--r-card) 0 0; overflow: hidden;
}
/* The grade's colour sits behind the weapon as light, not as a line. */
.skin-img-wrap::before {
    content: ''; position: absolute; left: 50%; top: 60%; width: 92%; height: 64%; transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, var(--rc, rgba(255, 255, 255, 0.2)), transparent);
    opacity: 0.14; pointer-events: none;
}
.skin-img-wrap img {
    position: relative; z-index: 1; max-width: 100%; max-height: 100%; object-fit: contain; display: block;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}
.sk-top { position: absolute; top: 10px; left: 12px; right: 44px; z-index: 2; display: flex; align-items: baseline; gap: 6px; font: 600 12px/1 var(--font-text); white-space: nowrap; overflow: hidden; }
.sk-wear { letter-spacing: 0.2px; }
.sk-float { color: var(--label-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.card-like-btn {
    position: absolute; top: 4px; right: 4px; z-index: 3; width: 36px; height: 36px; border-radius: 18px;
    display: grid; place-items: center; color: var(--label-3); transition: color 0.2s var(--ease), transform 0.3s var(--spring);
}
.card-like-btn .mk-i { width: 18px; height: 18px; }
.card-like-btn:hover { color: #ff8a96; }
.card-like-btn.liked { color: #ff5468; }
.card-like-btn.liked .mk-i { fill: currentColor; }
.card-like-btn:active { transform: scale(0.85); }
.stickers-row { position: absolute; left: 8px; right: 8px; bottom: 6px; z-index: 2; display: flex; justify-content: center; gap: 2px; pointer-events: none; }
.srow-item { display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 30px; flex: 1; }
.srow-item img { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)); }
.srow-wear { width: 18px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.srow-wear-fill { height: 100%; background: var(--label-2); }
.skin-info { padding: 2px 12px 0; min-width: 0; }
.sk-weapon { font: 500 12px/1.3 var(--font-text); color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skin-name { font: 600 14px/1.3 var(--font-text); color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sk-meta { display: flex; align-items: center; gap: 8px; min-height: 16px; margin-top: 4px; font: 500 12px/1 var(--font-text); color: var(--label-2); white-space: nowrap; overflow: hidden; }
.sk-meta:empty { display: none; }
.sk-meta .mk-i { width: 13px; height: 13px; stroke-width: 2; }
.sk-meta span { display: inline-flex; align-items: center; gap: 3px; }
.sk-feat { color: var(--accent-hi); }
.sk-feat svg { width: 11px; height: 11px; }
.skin-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 10px 12px; margin-top: auto; }
.sk-price { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.skin-price { font: 700 16px/1 var(--font-brand); color: var(--label); white-space: nowrap; font-variant-numeric: tabular-nums; }
.skin-usd { font: 500 12px/1 var(--font-text); color: var(--label-2); white-space: nowrap; }
.btn-cart {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center;
    background: var(--accent-fill); color: var(--accent-hi); transition: background 0.2s var(--ease), transform 0.3s var(--spring);
}
.btn-cart .mk-i { width: 18px; height: 18px; }
.btn-cart:hover { background: var(--accent-fill-2); }
.btn-cart:active { transform: scale(0.88); }
.btn-cart.added { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 640px) {
    .skin-img-wrap { padding: 20px 10px 12px; }
    .sk-top { left: 10px; top: 9px; font-size: 11px; }
    .skin-info { padding: 0 10px; }
    .skin-name { font-size: 14px; }
    .skin-footer { padding: 6px 6px 8px 10px; }
    .skin-price { font-size: 15px; }
    .btn-cart { width: 34px; height: 34px; }
}
@media (hover: none) { .skin-card:hover { background-color: var(--surface); } }

/* pages */
.pagination-wrap { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 4px var(--gut) 28px; flex-wrap: wrap; flex-shrink: 0; }
.pagination-wrap:empty { display: none; }
.page-btn {
    min-width: 40px; height: 40px; padding: 0 6px; border-radius: 20px; display: grid; place-items: center;
    background: var(--fill-3); color: var(--label); font: 600 15px/1 var(--font-text); font-variant-numeric: tabular-nums;
    transition: background 0.2s var(--ease);
}
.page-btn .mk-i { width: 18px; height: 18px; }
.page-btn:hover:not(:disabled) { background: var(--fill-2); }
.page-btn.active { background: var(--accent); color: var(--accent-ink); }
.page-btn:disabled { opacity: 0.35; cursor: default; }
.page-gap { color: var(--label-3); padding: 0 2px; }

/* ── filters ──────────────────────────────────────────────────────────── */
.filter-sidebar {
    flex: 0 0 var(--sidebar-w); width: var(--sidebar-w); display: flex; flex-direction: column; overflow-y: auto; z-index: 10;
    margin: 16px 16px 16px 0; border-radius: 22px; background: rgba(24, 20, 17, 0.72);
    box-shadow: inset 0 0 0 1px var(--surface-line); -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    transition: flex-basis 0.35s var(--ease), opacity 0.25s var(--ease), margin 0.35s var(--ease);
}
.filter-sidebar.collapsed { flex-basis: 0; width: 0; margin-left: 0; margin-right: 0; opacity: 0; overflow: hidden; box-shadow: none; }
.filter-sidebar-inner { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 18px; }
.filter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.filter-head h2 { font: 700 20px/1 var(--font-brand); margin: 0; }
.mk-close {
    width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--fill); color: var(--label-2); transition: background 0.2s var(--ease);
}
.mk-close .mk-i { width: 16px; height: 16px; stroke-width: 2.4; }
.mk-close:hover { background: rgba(118, 118, 128, 0.34); color: #fff; }
.filter-head .mk-close { display: none; }
.mk-filters-done { display: none; }
@media (max-width: 1279px) { .filter-head .mk-close { display: grid; } }

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -6px; }
.af-list { display: contents; }
.af-chip {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; padding: 0 10px;
    border-radius: 16px; background: var(--fill-2); color: var(--label); font: 500 13px/1.2 var(--font-text);
}
.af-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-chip i { font-size: 11px; color: var(--label-2); }
.af-chip:hover { background: var(--fill); }
.af-reset { min-height: 32px; padding: 0 8px; color: var(--accent-hi); font: 600 14px/1 var(--font-text); }

/* A block is an iOS section: a small title above a rounded group. */
.acc-block { display: flex; flex-direction: column; gap: 8px; }
.acc-header {
    display: flex; align-items: center; justify-content: space-between; padding: 0 4px; cursor: pointer; user-select: none;
    font: 600 13px/1.2 var(--font-text); color: var(--label-2); text-transform: none; letter-spacing: 0;
}
.acc-header .mk-i, .acc-header i { width: 14px; height: 14px; font-size: 12px; transition: transform 0.3s var(--ease); }
.acc-header:not(.open) .mk-i, .acc-header:not(.open) i { transform: rotate(-90deg); }
.acc-body { display: none; }
.acc-body.open { display: block; }
.acc-inner { display: flex; flex-direction: column; border-radius: 14px; background: var(--fill-3); overflow: hidden; }
.acc-inner.plain { background: none; overflow: visible; gap: 10px; }

/* rows with a check, as in iOS Settings */
.category-cb, .exterior-item, .grade-chip, .cyber-cb {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 44px 0 14px;
    cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; color: var(--label);
    font: 400 15px/1.25 var(--font-text); background: none; border: 0; border-radius: 0; box-shadow: none; transform: none;
}
.category-cb + .category-cb, .exterior-item + .exterior-item, .grade-chip + .grade-chip,
.cat-context > .category-cb + .category-cb { box-shadow: inset 0 0.5px 0 var(--sep); }
.category-cb:hover, .exterior-item:hover, .grade-chip:hover { background: rgba(255, 255, 255, 0.035); }
.category-cb input, .exterior-item input, .grade-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cb-box, .grade-dot { display: none !important; }
.category-cb::after, .exterior-item::after, .grade-chip::after {
    content: ''; position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
    background: var(--accent-hi); opacity: 0; transform: scale(0.6); transition: opacity 0.2s var(--ease), transform 0.3s var(--spring);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.category-cb:has(input:checked)::after, .exterior-item:has(input:checked)::after, .grade-chip:has(input:checked)::after { opacity: 1; transform: none; }
/* Colour filter: swatches; the ticked one wears a ring. */
.color-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 2px; }
.color-dot { position: relative; cursor: pointer; }
.color-dot input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.color-dot .cat-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.color-dot .dot { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); transition: box-shadow .15s; }
.color-dot:hover .dot { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), 0 0 0 3px rgba(255,255,255,0.08); }
.color-dot:has(input:checked) .dot { box-shadow: 0 0 0 2px #121214, 0 0 0 4px #fff; }
.color-dot:has(input:focus-visible) .dot { outline: 2px solid var(--accent); outline-offset: 4px; }
.category-cb:has(input:focus-visible), .exterior-item:has(input:focus-visible), .grade-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.cat-icon { width: 20px; text-align: center; color: var(--label-2); font-size: 15px; flex-shrink: 0; }
.category-cb:has(input:checked) .cat-icon { color: var(--accent-hi); }
.cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.grade-grid { display: flex; flex-direction: column; }
.grade-chip span { color: var(--rc, var(--label)); }
.exterior-list { display: flex; flex-direction: column; }
.exterior-circle { width: 28px; font: 700 12px/1 var(--font-text); color: var(--wc, var(--label-2)); flex-shrink: 0; }
.ext-fn { --wc: #4fc26e; } .ext-mw { --wc: #9ccc65; } .ext-ft { --wc: #e5bd3c; } .ext-ww { --wc: #f09443; } .ext-bs { --wc: #ef5f55; }
.exterior-label { flex: 1; }
.cat-context { display: flex; flex-direction: column; padding: 4px 0 6px; box-shadow: inset 0 0.5px 0 var(--sep); }
.cat-context > .category-cb { min-height: 40px; padding-left: 26px; font-size: 14px; }
.filter-subtitle { padding: 10px 14px 4px; color: var(--label-2); font: 600 12px/1.3 var(--font-text); }
.filter-hint { padding: 6px 14px 4px; color: var(--label-3); font: 400 12px/1.4 var(--font-text); }
.container-options { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
#filter-container-search { margin: 4px 14px 6px; width: auto; }

/* switches */
.cyber-cb { padding-right: 14px; justify-content: space-between; flex-direction: row-reverse; }
.cyber-cb + .cyber-cb { box-shadow: inset 0 0.5px 0 var(--sep); }
.cyber-cb input[type=checkbox] {
    -webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0; width: 51px; height: 31px; border-radius: 16px;
    background: rgba(120, 120, 128, 0.32); cursor: pointer; transition: background 0.25s var(--ease);
}
.cyber-cb input[type=checkbox]::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06); transition: transform 0.3s var(--spring);
}
.cyber-cb input[type=checkbox]:checked { background: var(--accent); }
.cyber-cb input[type=checkbox]:checked::after { transform: translateX(20px); }

/* text fields */
.f-input {
    width: 100%; height: 40px; padding: 0 12px; border: 0; outline: 0; border-radius: 10px;
    background: var(--fill-2); color: var(--label); font: 400 15px/1 var(--font-text); -webkit-appearance: none; appearance: none;
}
.f-input::placeholder { color: var(--label-3); }
.f-input:focus { box-shadow: 0 0 0 3px var(--accent-fill); background: var(--fill); }
.price-row, .float-range-inputs { display: flex; gap: 8px; align-items: center; }
.price-row input, .float-range-inputs input { flex: 1; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }
.price-row > span { color: var(--label-3); }
.price-usd-preview { display: flex; justify-content: space-between; padding: 0 4px; color: var(--label-3); font: 500 12px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.dual-slider-wrap { position: relative; width: 100%; height: 28px; margin-top: 2px; }
.slider-bg { position: absolute; top: 12px; left: 0; width: 100%; height: 4px; border-radius: 2px;
    background: linear-gradient(to right, #4fc26e 0 7%, #9ccc65 7% 15%, #e5bd3c 15% 38%, #f09443 38% 45%, #ef5f55 45% 100%); }
.slider-mask-l, .slider-mask-r { position: absolute; top: 12px; height: 4px; background: rgba(12, 9, 7, 0.82); z-index: 1; }
.slider-mask-l { left: 0; width: var(--sl-left, 0%); border-radius: 2px 0 0 2px; }
.slider-mask-r { right: 0; width: var(--sl-right, 0%); border-radius: 0 2px 2px 0; }
.dual-slider-wrap input[type=range] { position: absolute; inset: 0; width: 100%; height: 28px; -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; z-index: 2; margin: 0; outline: 0; }
.dual-slider-wrap input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); cursor: pointer; }
.dual-slider-wrap input[type=range]::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }

/* weapon / item pickers (in place, never floating) */
.cyber-select { position: relative; width: 100%; user-select: none; }
.cyber-select-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 14px;
    cursor: pointer; color: var(--label); font: 400 15px/1 var(--font-text); background: none; border: 0; box-shadow: none;
}
.cyber-select-trigger .mk-i, .cyber-select-trigger > i { width: 16px; height: 16px; color: var(--label-3); transition: transform 0.25s var(--ease); }
.cyber-select.open .cyber-select-trigger .mk-i, .item-pick.open .cyber-select-trigger .mk-i { transform: rotate(180deg); }
.cyber-sel-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.cyber-sel-img { width: 40px; height: 24px; object-fit: contain; flex-shrink: 0; display: none; }
.cyber-sel-img.show { display: block; }
.cyber-sel-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cyber-select-opts { display: none; }
.cyber-select.open .cyber-select-opts, .item-pick.open .item-pick-opts { display: block; }
#weapon-custom-select .cyber-select-opts, .item-pick-opts { margin: 0 8px 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.22); overflow: hidden; }
#weapon-custom-select .wpn-list, .item-pick-list { max-height: min(56vh, 480px); overflow-y: auto; overscroll-behavior: contain; }
.cyber-optgroup { position: sticky; top: 0; z-index: 2; padding: 8px 12px 6px; background: rgb(26, 22, 19); color: var(--label-2); font: 600 12px/1 var(--font-text); }
.cyber-opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; cursor: pointer; color: var(--label); font: 400 14px/1.2 var(--font-text); }
.cyber-opt:hover { background: rgba(255, 255, 255, 0.05); }
.cyber-opt img { width: 42px; height: 28px; object-fit: contain; flex-shrink: 0; }
.cyber-opt-icon { width: 42px; height: 28px; display: grid; place-items: center; color: var(--accent-hi); flex-shrink: 0; }
.cyber-opt[hidden], .cyber-optgroup-container[hidden] { display: none; }
.item-pick { margin-top: 0; }
.item-pick-search { display: block; width: calc(100% - 16px); height: 36px; margin: 8px; padding: 0 12px; border: 0; outline: 0; border-radius: 9px; background: var(--fill-2); color: var(--label); font: 400 15px var(--font-text); }
.item-pick-list .cyber-opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-pick-price { flex: none; margin-left: 8px; font-style: normal; font-size: 13px; font-weight: 600; color: var(--label-2); font-variant-numeric: tabular-nums; }
.mob-overlay { position: fixed; inset: 0; z-index: 190; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); }
.mob-overlay.active { opacity: 1; pointer-events: auto; }

/* Under 1280 px the filters are a sheet: docked beside the side menu they left
   the top bar too little room (its account island ran over them, 26.11). */
@media (max-width: 1279px) {
    .filter-sidebar {
        position: fixed; top: 0; right: 0; bottom: 0; margin: 0; z-index: 200; width: min(380px, 92vw); flex: none;
        border-radius: 22px 0 0 22px; background: rgba(22, 18, 15, 0.97); box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
        transform: translateX(105%); transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1); opacity: 1;
    }
    .filter-sidebar.collapsed { width: min(380px, 92vw); opacity: 1; }
    .filter-sidebar.open { transform: none; }
    .filter-sidebar-inner { padding-top: max(16px, env(safe-area-inset-top)); }
}
@media (max-width: 640px) {
    .filter-sidebar { width: 100%; border-radius: 0; z-index: 8000; box-shadow: none; background: var(--ground) !important; }
    /* The sheet is the whole screen: what is under it is not drawn at all,
       so nothing (text, glass panes) can show through. */
    body:has(#filter-sidebar.open) .main-content { visibility: hidden; transition: visibility 0s 0.42s; }
    .filter-sidebar-inner { padding: max(12px, env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom, 0px)); }
    .mk-filters-done {
        display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 3;
        height: 50px; align-items: center; justify-content: center; border-radius: 25px;
        background: var(--accent); color: var(--accent-ink); font: 600 17px/1 var(--font-text);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); opacity: 0; pointer-events: none; transform: translateY(20px);
        transition: opacity 0.25s var(--ease), transform 0.4s var(--spring);
    }
    .filter-sidebar.open .mk-filters-done { opacity: 1; pointer-events: auto; transform: none; }
}

/* ── item page ────────────────────────────────────────────────────────── */
#detail-view { display: none; width: 100%; max-width: 1320px; margin: 0 auto; padding: 18px var(--gut) 24px; animation: mkFade 0.35s var(--ease) both; }
@keyframes mkFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.det-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 1100px) { .det-layout { gap: 18px; } }
@media (max-width: 760px) { .det-layout { grid-template-columns: minmax(0, 1fr); } }
.det-media { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 760px) { .det-media { position: static; } }
.det-img-box { position: relative; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); overflow: hidden; }
.det-img-box::before {
    content: ''; position: absolute; inset: 10% 8% 0; pointer-events: none;
    background: radial-gradient(closest-side, var(--rc, rgba(255, 255, 255, 0.18)), transparent); opacity: 0.18;
}
.det-zoom-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.det-zoom-wrap > img { position: relative; z-index: 1; width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.6)); transition: transform 0.45s var(--ease), opacity 0.35s var(--ease); }
.det-zoom-wrap.has-snap > img { width: 100%; height: 100%; }
.det-zoom-wrap.zoomed { cursor: zoom-out; }
.det-zoom-wrap.zoomed > img { transform: scale(1.6); }
#det-skin-canvas { display: none; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; cursor: grab; touch-action: none; }
#det-skin-canvas:active { cursor: grabbing; }
.det-zoom-wrap.has-3d { cursor: default; }
.det-zoom-wrap.has-3d #det-skin-canvas { display: block; }
.det-zoom-wrap.has-3d > img, .det-zoom-wrap.has-3d .stk-on-gun, .det-zoom-wrap.has-snap .stk-on-gun { display: none !important; }
.det-zoom-wrap.is-loading > img { opacity: 0.35; }
.det-view-seg {
    position: absolute; top: 12px; left: 12px; z-index: 6; display: flex; gap: 2px; padding: 2px; border-radius: 10px;
    background: rgba(28, 24, 22, 0.78); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}
.det-view-seg button { min-width: 44px; height: 30px; padding: 0 10px; border-radius: 8px; color: var(--label-2); font: 600 13px/1 var(--font-text); transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.det-view-seg button.active { background: rgba(255, 255, 255, 0.16); color: var(--label); }
.det-3d-expand {
    position: absolute; right: 12px; bottom: 12px; z-index: 6; width: 38px; height: 38px; border-radius: 19px;
    display: none; place-items: center; background: rgba(28, 24, 22, 0.78); color: var(--label);
}
.det-3d-expand .mk-i { width: 18px; height: 18px; }
.det-zoom-wrap.has-3d ~ .det-3d-expand, .det-img-box.is-3d .det-3d-expand { display: grid; }
.det-3d-status { position: absolute; right: 14px; top: 16px; z-index: 6; display: flex; align-items: center; gap: 8px; color: var(--label-2); font: 500 13px/1 var(--font-text); pointer-events: none; }
.det-3d-status .ios-spin { width: 16px; height: 16px; }
.det-3d-hint { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 5; text-align: center; color: var(--label-3); font: 500 12px/1 var(--font-text); pointer-events: none; transition: opacity 0.4s; }
.det-img-box:not(.is-3d) .det-3d-hint { opacity: 0; }

/* stickers drawn on the 2D picture, until the 3D shot replaces it */
.stk-on-gun { position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.stk-on-gun img { width: 42px; height: 42px; object-fit: contain; transform: perspective(300px) rotateY(-12deg) rotateX(4deg); opacity: 0.95; transition: transform 0.25s var(--ease); }
.stk-on-gun:hover img { transform: scale(1.2); }
@media (min-width: 900px) { .stk-on-gun img { width: 56px; height: 56px; } }
.stk-on-gun .stk-wear-lbl { display: none; }
.stk-on-gun.worn-low img { opacity: 0.82; } .stk-on-gun.worn-mid img { opacity: 0.62; } .stk-on-gun.worn-high img { opacity: 0.38; }

.det-stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.det-stickers:empty { display: none; }
.det-sticker-slot {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; min-width: 0;
    border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); cursor: pointer; transition: background 0.2s;
}
.det-sticker-slot:hover, .det-sticker-slot.highlighted { background: var(--surface-hi); }
.det-sticker-slot .slot-img { width: 46px; height: 46px; object-fit: contain; }
.slot-wear-badge { position: absolute; top: 6px; left: 8px; color: var(--label-3); font: 600 11px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.slot-sticker-name { max-width: 100%; color: var(--label-2); font: 500 11px/1.25 var(--font-text); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-mkt-price { font: 600 12px/1 var(--font-text); color: var(--label); font-variant-numeric: tabular-nums; }
.slot-mkt-price.no-price { color: var(--label-3); font-weight: 500; }
.slot-steam-hint { display: none; }
@media (max-width: 640px) {
    .det-stickers { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); }
    .det-stickers::-webkit-scrollbar { display: none; }
    .det-sticker-slot { flex: 0 0 82px; }
}

.det-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.det-head { display: flex; flex-direction: column; gap: 6px; }
#det-rarity { color: var(--rc, var(--label-2)); font: 600 13px/1.2 var(--font-text); }
.det-title-row { display: flex; align-items: flex-start; gap: 6px; }
#det-title { flex: 1; min-width: 0; margin: 0; font: 700 26px/1.15 var(--font-brand); overflow-wrap: anywhere; }
.det-like-btn, .det-share-btn { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; flex-shrink: 0; background: var(--fill-3); color: var(--label-2); transition: color 0.2s, background 0.2s, transform 0.3s var(--spring); }
.det-like-btn .mk-i, .det-share-btn .mk-i { width: 19px; height: 19px; }
.det-like-btn:hover, .det-share-btn:hover { background: var(--fill-2); color: var(--label); }
.det-like-btn.liked { color: #ff5468; }
.det-like-btn.liked .mk-i { fill: currentColor; }
.det-like-btn.pop { animation: heartPop 0.45s ease; }
.det-share-btn.copied { color: var(--success); }
@keyframes heartPop { 0% { transform: scale(1); } 30% { transform: scale(1.3); } 60% { transform: scale(0.95); } 100% { transform: scale(1); } }
@media (max-width: 640px) { #det-title { font-size: 22px; } }

.det-picker { display: flex; flex-direction: column; gap: 10px; }
.det-modes { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill-2); }
.det-mode, .det-wear { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--label); transition: background 0.2s var(--ease); }
.det-mode { min-height: 44px; padding: 6px; border-radius: 8px; }
.det-mode.active { background: rgba(255, 255, 255, 0.16); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.det-wears { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 8px; }
.det-wear { min-height: 54px; padding: 8px 4px; border-radius: 12px; background: var(--fill-3); }
.det-wear:hover:not(.active), .det-mode:hover:not(.active) { background: var(--fill-2); }
.det-wear.active { background: var(--accent-fill-2); }
.det-wear.active .det-pick-label { color: var(--accent-hi); }
.det-pick-label { font: 600 14px/1 var(--font-text); white-space: nowrap; }
.det-pick-price { font: 500 12px/1 var(--font-text); color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.det-pick-price.none { color: var(--label-3); }

/* grouped rows: steam price, float, facts */
.mk-group { border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); overflow: hidden; }
.mk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 16px; font: 400 15px/1.3 var(--font-text); }
.mk-row + .mk-row { box-shadow: inset 0 0.5px 0 var(--sep); }
.mk-row > :first-child { color: var(--label-2); flex-shrink: 0; }
.mk-row > :last-child { color: var(--label); font-weight: 500; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.det-steam { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); font-size: 15px; }
.det-steam > span:first-child { color: var(--label-2); }
.det-steam-val { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-variant-numeric: tabular-nums; }
.det-steam-save { color: var(--success); font-weight: 600; }
.det-steam-save:empty { display: none; }

.float-bar-box { padding: 14px 16px 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); }
.float-bar-info { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 14px; font: 400 14px/1.2 var(--font-text); color: var(--label-2); }
.float-bar-info b { color: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; }
.float-track { position: relative; height: 6px; border-radius: 3px;
    background: linear-gradient(to right, #4fc26e 0 7%, #9ccc65 7% 15%, #e5bd3c 15% 38%, #f09443 38% 45%, #ef5f55 45% 100%); }
.float-marker { position: absolute; top: -5px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 2px rgba(12, 9, 7, 0.75); transition: left 0.6s var(--spring); display: none; }
.float-marker::after { display: none; }

.det-price-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.det-price-stats:empty { display: none; }
.price-stat-card { padding: 12px 12px 13px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); min-width: 0; }
.price-stat-label { color: var(--label-2); font: 500 12px/1.2 var(--font-text); margin-bottom: 6px; }
.price-stat-val { font: 700 16px/1 var(--font-brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.price-stat-card.low .price-stat-val { color: var(--success); }
.det-skin-info:empty { display: none; }

.mk-section-title { display: flex; align-items: center; justify-content: space-between; margin: 10px 4px 0; font: 700 18px/1.2 var(--font-brand); }
.mk-section-title small { font: 500 14px/1 var(--font-text); color: var(--label-2); }
.mk-listings { display: flex; flex-direction: column; gap: 8px; }
.mk-listing {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center;
    padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line);
}
.mk-listing.row-flash { animation: rowFlash 2.2s var(--ease); }
@keyframes rowFlash { 0%, 100% { background: var(--surface); } 15%, 55% { background: var(--accent-fill-2); } }
.ml-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ml-wear { font: 600 15px/1.2 var(--font-text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ml-lock { display: inline-flex; align-items: center; gap: 3px; color: var(--warning); font: 500 12px/1 var(--font-text); }
.ml-lock .mk-i { width: 13px; height: 13px; stroke-width: 2; }
.ml-sub { color: var(--label-2); font: 400 13px/1.3 var(--font-text); font-variant-numeric: tabular-nums; }
.ml-sub b { color: var(--label); font-weight: 500; }
.ml-stk { display: flex; gap: 3px; }
.ml-stk img { width: 24px; height: 24px; object-fit: contain; }
.ml-price { text-align: right; }
.ml-price .p { font: 700 18px/1 var(--font-brand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ml-price .u { margin-top: 4px; color: var(--label-2); font: 500 12px/1 var(--font-text); }
.ml-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.ml-actions .sp { flex: 1; }
.det-no-listings { padding: 28px 16px; border-radius: 14px; background: var(--surface); color: var(--label-2); text-align: center; font-size: 15px; }

/* buttons, one family */
.row-act, .mk-btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-width: 38px;
    padding: 0 16px; border-radius: 19px; border: 0; white-space: nowrap; text-decoration: none; cursor: pointer;
    background: var(--fill-2); color: var(--label); font: 600 14px/1 var(--font-text);
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease), opacity 0.2s;
}
.row-act .mk-i, .mk-btn .mk-i { width: 17px; height: 17px; }
.row-act svg, .mk-btn svg { display: block; }
.row-act:hover, .mk-btn:hover { background: var(--fill); }
.row-act:active, .mk-btn:active { transform: scale(0.96); }
.row-act:disabled, .mk-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.row-act.icon, .mk-btn.icon { width: 38px; padding: 0; }
.row-act.tint, .mk-btn.tint { background: var(--accent-fill); color: var(--accent-hi); }
.row-act.tint:hover, .mk-btn.tint:hover { background: var(--accent-fill-2); }
.row-act.danger, .mk-btn.danger { background: rgba(255, 69, 58, 0.14); color: #ff6961; }
.row-act.danger:hover, .mk-btn.danger:hover { background: rgba(255, 69, 58, 0.22); }
.row-act.buy, .mk-btn.primary { background: var(--accent); color: var(--accent-ink); padding: 0 22px; }
.row-act.buy:hover, .mk-btn.primary:hover { background: #f58b3a; }
/* A GG.SKIN unit already in the cart: its Buy turns into a tinted "In cart" that opens the cart. */
.row-act.buy.in-cart { background: var(--accent-fill); color: var(--accent-hi); }
.row-act.buy.in-cart:hover { background: var(--accent-fill-2); }
.mk-btn.ok { background: var(--success); color: #032610; }
.mk-btn.ok:hover { background: #4ade72; }
.mk-btn.big { height: 50px; border-radius: 25px; font-size: 17px; padding: 0 24px; }
.mk-btn.wide { width: 100%; }
.mk-btn.plain { background: none; padding: 0 6px; }
.mk-btn.plain.danger { color: #ff6961; }
.row-act.chip { background: none; color: var(--accent-hi); cursor: default; padding: 0 4px; }
.btn-copylink.copied { color: var(--success); }

/* ── sheets (cart, sell, trades, history) ─────────────────────────────── */
.modal-overlay {
    position: fixed; top: 0; right: 0; bottom: 0; left: var(--sb-w, 0px); z-index: 2000;
    display: none; align-items: center; justify-content: center; padding: 24px;
    background: rgba(0, 0, 0, 0.5);
}
.modal-overlay.visible { display: flex; animation: mkOverlay 0.25s ease; }
@keyframes mkOverlay { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    position: relative; display: flex; flex-direction: column; width: 720px; max-width: 100%; max-height: min(88vh, 900px);
    border-radius: 24px; overflow: hidden; background: rgba(26, 22, 19, 0.96);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: mkSheetIn 0.42s var(--spring) both;
}
@keyframes mkSheetIn { from { transform: translateY(18px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-box.bf-glass-over { position: relative; }
#sell-modal .modal-box { width: 1040px; height: min(80vh, 820px); }
#trades-modal .modal-box, #history-modal .modal-box { width: 860px; height: min(84vh, 900px); }
#cart-modal .modal-box { width: 640px; }
.modal-head { position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px 10px 24px; }
.modal-head h2 { flex: 1; min-width: 0; margin: 0; font: 700 20px/1.2 var(--font-brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--label); }
.mh-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.mh-actions:empty { display: none; }
.mk-text-btn { height: 36px; padding: 0 10px; border-radius: 18px; color: var(--accent-hi); font: 500 15px/1 var(--font-text); display: inline-flex; align-items: center; gap: 6px; }
.mk-text-btn .mk-i { width: 17px; height: 17px; }
.mk-text-btn:hover { background: var(--fill-3); }
.mk-text-btn.danger { color: #ff6961; }
.mk-text-btn:disabled { opacity: 0.4; }
.modal-close {
    order: 9; flex-shrink: 0; width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center;
    background: var(--fill); color: var(--label-2); transition: background 0.2s var(--ease);
}
.modal-close .ic-x { width: 15px; height: 15px; stroke-width: 2.6; }
.modal-close .bf-back-ic, .modal-close .mc-label { display: none; }
.modal-close:hover { background: rgba(118, 118, 128, 0.34); color: #fff; }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 24px 24px; }
.modal-foot { flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 14px 24px 20px; box-shadow: inset 0 0.5px 0 var(--sep); }
.mk-seg-wrap { flex-shrink: 0; padding: 0 24px 12px; }
.exch-tabs { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill-2); }
.exch-tab {
    flex: 1; min-height: 34px; padding: 0 10px; border-radius: 8px; color: var(--label); font: 500 14px/1 var(--font-text);
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.2s var(--ease);
}
.exch-tab.active { background: rgba(255, 255, 255, 0.17); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.exch-tab .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 700 11px/18px var(--font-text); }
.exch-ind { display: none !important; }
.exch-content { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 24px 24px; }

/* sections and cards inside a sheet */
.mk-sec { display: flex; align-items: center; gap: 10px; margin: 14px 4px 10px; font: 700 17px/1.2 var(--font-brand); }
.mk-sec:first-child { margin-top: 4px; }
.mk-sec .ico { width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; flex-shrink: 0; }
.mk-sec .ico .mk-i { width: 18px; height: 18px; }
.mk-sec .ico.send { background: var(--accent-fill); color: var(--accent-hi); }
.mk-sec .ico.recv { background: rgba(48, 209, 88, 0.15); color: #4cd773; }
.mk-sec small { margin-left: auto; color: var(--label-2); font: 500 14px/1 var(--font-text); }
.trades-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .trades-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.trades-col { min-width: 0; }
.mk-list { display: flex; flex-direction: column; gap: 10px; }
.mk-card { padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); min-width: 0; }
.tc-top { display: flex; gap: 12px; align-items: flex-start; }
.tc-img { width: 64px; height: 48px; flex-shrink: 0; display: grid; place-items: center; }
.tc-img img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.tc-main { flex: 1; min-width: 0; }
.tc-name { font: 600 15px/1.25 var(--font-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-sub { margin-top: 3px; color: var(--label-2); font: 400 13px/1.3 var(--font-text); }
.tc-amt { flex-shrink: 0; text-align: right; font: 700 16px/1.1 var(--font-brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc-amt small { display: block; margin-top: 4px; color: var(--label-2); font: 500 12px/1 var(--font-text); }
.tc-status { display: flex; align-items: center; gap: 6px; margin-top: 10px; font: 600 14px/1.3 var(--font-text); }
.tc-status .mk-i { width: 17px; height: 17px; }
.st-wait { color: var(--accent-hi); } .st-ok { color: #4cd773; } .st-bad { color: #ff6961; } .st-info { color: var(--label-2); }
.tc-note { margin-top: 6px; color: var(--label-2); font: 400 13px/1.4 var(--font-text); }
.tc-fact { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--fill-3); font: 400 14px/1.2 var(--font-text); }
.tc-fact span:first-child { color: var(--label-2); }
.tc-fact b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tc-actions .mk-btn { flex: 1 1 auto; }
.tc-actions .mk-btn.plain { flex: 0 0 auto; }
.mk-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; color: var(--label-2); text-align: center; font: 400 15px/1.4 var(--font-text); }
.mk-empty .mk-i { width: 34px; height: 34px; color: var(--label-3); stroke-width: 1.5; }
.mk-empty b { color: var(--label); font-weight: 600; font-size: 16px; }
.mk-empty.small { padding: 22px 16px; }

/* history */
.tx-day { margin: 16px 4px 8px; color: var(--label-2); font: 600 13px/1 var(--font-text); }
.tx-day:first-child { margin-top: 4px; }
.tx-group { border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); overflow: hidden; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.tx-row + .tx-row { box-shadow: inset 52px 0.5px 0 -52px transparent, inset 0 0.5px 0 var(--sep); }
.tx-ic { width: 32px; height: 32px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center; background: var(--fill-3); color: var(--label-2); }
.tx-ic .mk-i { width: 18px; height: 18px; }
.tx-ic.in { background: rgba(48, 209, 88, 0.14); color: #4cd773; }
.tx-ic.out { background: var(--accent-fill); color: var(--accent-hi); }
.tx-main { flex: 1; min-width: 0; }
.tx-item { font: 600 15px/1.25 var(--font-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-type { margin-top: 2px; color: var(--label-2); font: 400 13px/1.3 var(--font-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-type .act { color: var(--accent-hi); }
.tx-note { margin-top: 2px; color: var(--label-3); font: 400 12px/1.35 var(--font-text); }
.tx-amt { flex-shrink: 0; text-align: right; font: 700 15px/1 var(--font-brand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx-amt small { display: block; margin-top: 5px; color: var(--label-3); font: 500 12px/1 var(--font-text); }

/* cart */
.cart-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 12px; }
.cart-row + .cart-row { box-shadow: inset 0 0.5px 0 var(--sep); }
.cart-row .tc-img { width: 60px; height: 45px; }
.cart-total { flex: 1; min-width: 0; }
.cart-total .l { color: var(--label-2); font: 500 13px/1 var(--font-text); }
.cart-total .v { margin-top: 6px; font: 700 24px/1 var(--font-brand); font-variant-numeric: tabular-nums; }
.cart-total .u { margin-top: 4px; color: var(--label-2); font: 500 13px/1 var(--font-text); }

/* sell */
.sell-modal-split { display: flex; flex: 1; min-height: 0; }
.sell-modal-left { flex: 1.25; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.sell-modal-right { flex: 1; min-width: 340px; display: flex; flex-direction: column; overflow: hidden; position: relative; box-shadow: inset 0.5px 0 0 var(--sep); }
.sell-bar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 24px 10px; color: var(--label-2); font: 500 13px/1 var(--font-text); }
.inv-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: max-content; gap: 10px; overflow-y: auto; padding: 2px 24px 24px; align-content: start; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.inv-card {
    position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; padding: 10px 10px 10px; cursor: pointer;
    border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); transition: background 0.2s var(--ease), transform 0.3s var(--spring);
}
.inv-card:hover { background: var(--surface-hi); }
.inv-card:active { transform: scale(0.97); }
.inv-card.selected { background: var(--accent-fill); box-shadow: inset 0 0 0 2px var(--accent); }
.inv-card.is-off { opacity: 0.42; cursor: not-allowed; }
.inv-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)); }
.inv-card-wear { color: var(--label-2); font: 500 11px/1.2 var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-card-name { font: 600 13px/1.25 var(--font-text); color: var(--label); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.5em; }
.inv-flag { position: absolute; top: 8px; left: 10px; font: 600 11px/1 var(--font-text); color: var(--label-2); }
.inv-flag.listed { color: var(--accent-hi); }
.inv-seed { position: absolute; top: 8px; right: 10px; color: var(--label-3); font: 500 11px/1 var(--font-text); }
.inv-stk { position: absolute; left: 6px; right: 6px; top: 46%; display: flex; justify-content: center; gap: 1px; pointer-events: none; }
.inv-stk img { width: 18px; height: 18px; aspect-ratio: auto; filter: none; }
.sell-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; color: var(--label-2); text-align: center; font: 400 15px/1.4 var(--font-text); }
.sell-empty .mk-i { width: 36px; height: 36px; color: var(--label-3); stroke-width: 1.5; }
#sell-selected-state { flex-direction: column; height: 100%; min-height: 0; }
.sell-preview { position: relative; flex: 0 0 auto; height: 210px; display: flex; align-items: center; justify-content: center; padding: 16px 24px 8px; }
.sell-preview img { max-width: 88%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6)); }
#sell-preview-addons { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; gap: 6px; }
.addon-item { position: relative; display: inline-block; cursor: pointer; }
.addon-item img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6)); }
.addon-tooltip {
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; opacity: 0; pointer-events: none;
    white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: rgba(36, 31, 27, 0.98); color: var(--label);
    font: 500 12px/1.35 var(--font-text); text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); transition: opacity 0.2s;
}
.addon-tooltip span { color: var(--label-2); }
.addon-item:hover .addon-tooltip { opacity: 1; }
.sell-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 24px 20px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#sell-preview-wear { color: var(--label-2); font: 500 13px/1.2 var(--font-text); display: flex; align-items: center; gap: 10px; }
#sell-preview-wear .seed { color: var(--label-3); }
#sell-preview-name { font: 700 20px/1.2 var(--font-brand); margin-top: -8px; }
.sell-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sell-input input::placeholder { font-family: var(--font-text); font-weight: 500; color: var(--label-3); }
.sell-field label { display: block; margin: 0 4px 6px; color: var(--label-2); font: 500 13px/1 var(--font-text); }
.sell-input { position: relative; display: flex; align-items: center; height: 52px; border-radius: 14px; background: var(--fill-2); transition: box-shadow 0.2s var(--ease); }
.sell-input:focus-within { box-shadow: 0 0 0 3px var(--accent-fill); }
.sell-input input { flex: 1; min-width: 0; height: 100%; padding: 0 34px 0 14px; border: 0; outline: 0; background: none; color: var(--label); font: 700 20px/1 var(--font-brand); text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.sell-input input::-webkit-outer-spin-button, .sell-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sell-input span { position: absolute; right: 14px; color: var(--label-2); font: 600 15px/1 var(--font-text); }
.sell-input.recv input { color: #4cd773; }
.sell-facts { border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); overflow: hidden; }
.sell-fact { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; font-size: 15px; }
.sell-fact + .sell-fact { box-shadow: inset 0 0.5px 0 var(--sep); }
.sell-fact > span:first-child { color: var(--label-2); }
.sell-fact > span:last-child { color: var(--label); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.sell-fact > span.is-link { color: var(--accent-hi); cursor: pointer; }
.sell-facts-note { margin: -6px 16px 0; font-size: 12px; color: var(--label-3); }
.sell-float { padding: 12px 16px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); }
.sell-float .float-bar-info { margin-bottom: 12px; }
.sell-float-error { padding: 12px 16px; border-radius: 14px; background: rgba(255, 69, 58, 0.1); color: #ff6961; font: 500 14px/1.4 var(--font-text); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sell-blocked { font-family: var(--font-text); }
.sell-blocked-title { font-size: 15px; font-weight: 600; color: #ff6961; }
.sell-blocked-reason { margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--label-2); }
.sell-foot { flex-shrink: 0; padding: 12px 24px 20px; box-shadow: inset 0 0.5px 0 var(--sep); }
.mobile-back-btn { display: none !important; }

/* legacy exchange offers */
.coming-soon { padding: 48px 16px 32px; text-align: center; }
.cs-title { font: 700 18px/1.3 var(--font-brand); }
.cs-badge { margin-top: 8px; color: var(--label-2); font: 400 15px/1.3 var(--font-text); }
.cs-legacy-title { margin: 8px 4px 10px; color: var(--label-2); font: 600 13px/1 var(--font-text); }
.offer-card { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.offer-head { display: flex; justify-content: space-between; color: var(--label-2); font: 500 13px/1 var(--font-text); }
.offer-body { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.offer-block { min-width: 0; text-align: center; }
.offer-block-title { color: var(--label-2); font: 500 12px/1 var(--font-text); margin-bottom: 8px; }
.offer-items-col { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.offer-item-mini { width: 64px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--fill-3); }
.offer-item-mini img { max-width: 90%; max-height: 90%; object-fit: contain; }
.vs-badge { color: var(--label-3); }
.offer-actions { display: flex; gap: 8px; }
.offer-actions .mk-btn { flex: 1; }

/* ── dialogs: alert, prompt ───────────────────────────────────────────── */
#cyber-modal { z-index: 8100; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, 0.5); }
#cyber-modal .modal-box {
    width: 340px; max-width: calc(100vw - 48px); height: auto; max-height: calc(100dvh - 48px); overflow-y: auto;
    padding: 22px 20px 16px; text-align: center; border-radius: 22px;
    background: rgba(30, 26, 23, 0.98); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: mkSheetIn 0.35s var(--spring) both;
}
#cyber-modal-title { margin: 0 0 8px; font: 700 18px/1.3 var(--font-brand); color: var(--label); text-transform: none; }
#cyber-modal-message { margin: 0 0 18px; color: var(--label-2); font: 400 15px/1.45 var(--font-text); }
#cyber-modal-message strong, #cyber-modal-message b { color: var(--label); font-weight: 600; }
#cyber-modal-input { margin: -6px 0 16px; height: 44px; text-align: left; }
.dlg-actions { display: flex; gap: 8px; }
.dlg-actions .mk-btn { flex: 1; height: 46px; border-radius: 23px; font-size: 16px; }

/* sticker price */
#sticker-price-modal { position: fixed; top: 0; right: 0; bottom: 0; left: var(--sb-w, 0px); z-index: 9000; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.55); }
#sticker-price-modal.visible { display: flex; animation: mkOverlay 0.2s ease; }
.sticker-modal-box { position: relative; width: 320px; max-width: calc(100vw - 48px); padding: 26px 20px 18px; border-radius: 22px; text-align: center; background: rgba(28, 24, 21, 0.98); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08); animation: mkSheetIn 0.35s var(--spring) both; }
.sticker-modal-img { width: 110px; height: 110px; object-fit: contain; margin-bottom: 12px; }
.sticker-modal-name { font: 600 16px/1.3 var(--font-text); }
.sticker-modal-sub { margin-top: 4px; color: var(--label-2); font-size: 13px; }
.sticker-modal-price-row { margin: 16px 0 18px; }
.sticker-price-label { color: var(--label-2); font: 500 12px/1 var(--font-text); }
.sticker-price-val { display: block; margin-top: 6px; font: 700 22px/1 var(--font-brand); }
.sticker-price-val.loading, .sticker-price-val.error { font: 500 14px/1 var(--font-text); color: var(--label-2); }
.sticker-modal-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; background: var(--fill); color: var(--label-2); }
.sticker-modal-close .mk-i { width: 14px; height: 14px; stroke-width: 2.6; }

/* fullscreen 3D */
.cs2-modal { position: fixed; inset: 0; z-index: 9500; display: none; align-items: center; justify-content: center; background: rgba(8, 6, 5, 0.92); }
.cs2-modal.active { display: flex; animation: mkOverlay 0.25s ease; }
.cs2-modal-box { position: relative; width: min(94vw, 1280px); height: min(86vh, 820px); border-radius: 24px; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, rgba(240, 124, 38, 0.08), transparent 70%), #120e0b; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.cs2-modal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.cs2-modal-canvas:active { cursor: grabbing; }
.cs2-modal-title { position: absolute; top: 20px; left: 22px; right: 70px; z-index: 2; font: 700 17px/1.25 var(--font-brand); pointer-events: none; }
.cs2-modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; background: var(--fill); color: var(--label); }
.cs2-modal-close .mk-i { width: 16px; height: 16px; stroke-width: 2.4; }
.cs2-modal-hint { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2; text-align: center; color: var(--label-3); font: 500 13px/1 var(--font-text); pointer-events: none; }
@media (max-width: 640px) { .cs2-modal-box { width: 100vw; height: 100dvh; border-radius: 0; } .cs2-modal-title { top: max(22px, env(safe-area-inset-top)); } .cs2-modal-close { top: max(14px, env(safe-area-inset-top)); } }

.full-image-modal { display: none; position: fixed; inset: 0; z-index: 10000; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.92); cursor: zoom-out; }
.full-image-modal img { max-width: 94%; max-height: 92%; object-fit: contain; }

/* ── toasts ───────────────────────────────────────────────────────────── */
#toast-container { position: fixed; top: 20px; right: 24px; z-index: 9900; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 12px 16px; border-radius: 16px;
    background: rgba(36, 31, 27, 0.97); color: var(--label); font: 500 14px/1.35 var(--font-text);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    animation: toastIn 0.42s var(--spring) both; transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.toast i { flex-shrink: 0; font-size: 16px; }
.toast.success i { color: #4cd773; } .toast.error i { color: #ff6961; } .toast.info i { color: var(--accent-hi); } .toast.warning i { color: var(--warning); }
@keyframes toastIn { from { transform: translateY(-14px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
    /* Above the bottom bar, never over a sheet's back button. */
    #toast-container { top: auto; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); left: 16px; right: 16px; align-items: center; z-index: 9900; }
    .toast { max-width: 100%; }
    @keyframes toastIn { from { transform: translateY(14px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ── spinner ──────────────────────────────────────────────────────────── */
.ios-spin, .fa-spinner.fa-spin, .fa-circle-notch.fa-spin {
    display: inline-block !important; width: 1.15em !important; height: 1.15em !important; vertical-align: -0.15em;
    background-color: currentColor; background-image: none !important;
    -webkit-mask: var(--ios-spinner-svg) center / contain no-repeat; mask: var(--ios-spinner-svg) center / contain no-repeat;
    animation: ios-spin 1s steps(8, end) infinite !important;
}
.fa-spinner.fa-spin::before, .fa-circle-notch.fa-spin::before { content: '' !important; display: none !important; }
@keyframes ios-spin { to { transform: rotate(360deg); } }
.mk-loading { display: flex; justify-content: center; padding: 48px 0; color: var(--label-2); font-size: 22px; }

/* ── phone ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* The bottom bar stays over the sheets so you can move between them. */
    .mobile-bottom-nav { --bf-mn-accent-rgb: 240, 124, 38; --bf-mn-z: 7000; }
    .mob-nav-btn .cart-badge { top: 5px; right: 50%; margin-right: -24px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }

    /* A sheet is a screen: no frame, the ground behind it is the page's own. */
    .modal-overlay { left: 0; padding: 0; background: none; align-items: stretch; z-index: 6000; }
    body:has(.modal-overlay.visible:not(#cyber-modal)) .market-layout { visibility: hidden; }
    .modal-box, #sell-modal .modal-box, #trades-modal .modal-box, #history-modal .modal-box, #cart-modal .modal-box {
        width: 100%; height: 100%; max-height: none; border-radius: 0; background: none; box-shadow: none;
        animation: mkPush 0.4s cubic-bezier(0.32, 0.72, 0, 1) both;
    }
    @keyframes mkPush { from { transform: translateX(24%); opacity: 0; } to { transform: none; opacity: 1; } }
    .modal-head { min-height: 56px; padding: max(8px, env(safe-area-inset-top)) 12px 6px; gap: 10px; }
    .modal-head h2 { text-align: center; font-size: 18px; }
    .modal-head .modal-close { order: -1; }
    .modal-head::after { content: ''; width: 40px; flex-shrink: 0; order: 10; }
    /* Title centred between the back button and the action (or a spacer). */
    .modal-head:has(.mh-actions:not(:empty)) .modal-close { margin-right: auto; }
    .modal-head:has(.mh-actions:not(:empty))::after { display: none; }
    .modal-head .mh-actions { min-width: 40px; justify-content: flex-end; }
    .modal-head .mh-actions .mk-text-btn { padding: 0 6px; }
    .modal-close {
        width: 40px; height: 40px; border-radius: 20px; background: rgba(255, 255, 255, 0.07); color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    }
    .modal-close .ic-x, .modal-close > i { display: none; }
    .modal-close .bf-back-ic { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    html.bf-glass-gpu .modal-close.bf-glass { background: transparent; box-shadow: none; }
    html.bf-glass-pending:not(.bf-glass-gpu) .modal-close { background: transparent; }
    .modal-body, .exch-content { padding: 4px 16px calc(var(--nav-pad) + 8px); }
    .mk-seg-wrap { padding: 0 16px 10px; }
    .modal-foot { padding: 12px 16px calc(var(--nav-pad) - 10px); flex-wrap: wrap; }
    #cart-modal .modal-foot .mk-btn { flex: 1 1 100%; }
    .sell-bar { padding: 0 16px 8px; }

    /* Sell: two screens that slide, the inventory and the chosen item. */
    .sell-modal-split { width: 200%; transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1); }
    .sell-modal-left, .sell-modal-right { flex: 0 0 50%; width: 50%; min-width: 0; box-shadow: none; }
    .sell-modal-split.item-selected { transform: translateX(-50%); }
    .inv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 2px 16px var(--nav-pad); }
    .inv-card { padding: 8px 8px 9px; border-radius: 13px; }
    .inv-card-name { font-size: 12px; }
    .sell-preview { height: 170px; padding: 10px 16px 4px; }
    .sell-body { padding: 6px 16px 12px; }
    .sell-foot { padding: 10px 16px calc(var(--nav-pad) - 6px); }
    #sell-selected-state .sell-back { display: inline-flex; }

    #detail-view { padding: 10px var(--gut) 20px; }
    .det-img-box { border-radius: 20px; }
    .det-price-stats { gap: 6px; }
    .price-stat-card { padding: 10px; }
    .price-stat-val { font-size: 14px; }
    .mk-listing { padding: 12px; }
    .ml-actions .row-act.buy { padding: 0 20px; }
}
.sell-back { display: none; }
@media (max-width: 360px) {
    .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .market-grid { gap: 8px; }
    .skin-footer { padding-left: 8px; }
}

/* iOS zooms into a field whose text is under 16px. */
@media (hover: none) and (pointer: coarse) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
    .sell-input input { font-size: 20px !important; }
}

/* ══ liquid glass ═══════════════════════════════════════════════════════
   bf-glass.js draws the panes registered in market.html (cards, search,
   filter column, sheets). Its stylesheet strips their fill; what is left
   here is what sits INSIDE a pane: lighter fills, no frosted second layer. */
html.bf-glass-pending .mk-group, html.bf-glass-pending .det-steam, html.bf-glass-pending .float-bar-box,
html.bf-glass-pending .price-stat-card, html.bf-glass-pending .mk-listing, html.bf-glass-pending .det-sticker-slot,
html.bf-glass-pending .mk-card, html.bf-glass-pending .tx-group, html.bf-glass-pending .inv-card,
html.bf-glass-pending .sell-facts, html.bf-glass-pending .sell-float, html.bf-glass-pending .det-no-listings {
    background: rgba(255, 255, 255, 0.055); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}
html.bf-glass-pending .inv-card.selected { background: var(--accent-fill); box-shadow: inset 0 0 0 2px var(--accent); }
/* A glass pane loses its own fill (bf-glass.css), so a selected state is a
   layer inside it, under the content. */
html.bf-glass-gpu .det-wear.bf-glass::before,
html.bf-glass-gpu .inv-card.bf-glass::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: transparent; transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
html.bf-glass-gpu .det-wear.bf-glass.active::before { background: var(--accent-fill-2); }
html.bf-glass-gpu .det-wear.bf-glass:hover:not(.active)::before { background: rgba(255, 255, 255, 0.05); }
html.bf-glass-gpu .inv-card.bf-glass.selected::before { background: var(--accent-fill); box-shadow: inset 0 0 0 2px var(--accent); }
html.bf-glass-gpu .det-wear.bf-glass, html.bf-glass-gpu .inv-card.bf-glass { position: relative; }
html.bf-glass-pending .skin-card:hover, html.bf-glass-pending .skin-card { background-color: transparent; }
html.bf-glass-pending .det-img-box { background: rgba(255, 255, 255, 0.04); }
@media (min-width: 641px) {
    html.bf-glass-gpu .modal-overlay { background: rgba(0, 0, 0, 0.6); }
}
html.bf-glass-gpu .filter-sidebar.bf-glass { box-shadow: none; }
@media (max-width: 1279px) { html.bf-glass-pending .filter-sidebar { background: rgba(20, 16, 13, 0.97) !important; } }

/* ══ lite ════════════════════════════════════════════════════════════════
   No blur anywhere: surfaces that cover the page become opaque. */
/* bf-perf paints body solid in lite; here the ground is a static canvas that
   costs nothing, so it stays visible. */
html.bf-lite:root, html.bf-lite:root body { background-color: transparent !important; }
html.bf-lite:root { background-color: var(--ground) !important; }
html.bf-lite body .modal-box { background: #1a1612 !important; }
@media (max-width: 640px) {
    html.bf-lite body .modal-box:not(#cyber-modal .modal-box) { background: none !important; }
    html.bf-lite body .modal-overlay:not(#cyber-modal) { background: none !important; }
}
html.bf-lite .filter-sidebar { background: #16120f !important; }
html.bf-lite .skin-card, html.bf-lite .mk-card, html.bf-lite .mk-listing, html.bf-lite .inv-card, html.bf-lite .tx-group,
html.bf-lite .mk-group, html.bf-lite .det-steam, html.bf-lite .float-bar-box, html.bf-lite .price-stat-card,
html.bf-lite .det-img-box, html.bf-lite .det-sticker-slot, html.bf-lite .sell-facts, html.bf-lite .sell-float { background-color: rgba(36, 30, 26, 0.86); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* The page's name never gives way to the buttons beside it. */
@media (min-width: 1001px) { .mk-title { flex-shrink: 0; } }
/* Narrow desktops: the bar has no room for the name next to its buttons, and
   the sidebar already marks the market as the current page. */
@media (min-width: 1001px) and (max-width: 1400px) { .top-bar .mk-title { display: none; } }

/* The search row and its suggestions sit above the quick filters (phones: the chips drew over the list). */
.mk-searchrow { position: relative; z-index: 60; }
.mkt-suggest { z-index: 1000; background: rgb(30, 27, 25); }

/* Weapons: the groups under «Weapons & Gloves», indented, a square tick on the left (market-filter-controls.js) */
.wpn-groups .category-cb { min-height: 40px; padding-left: 58px; font-size: 14px; }
.wpn-groups .category-cb::before {
    content: ''; position: absolute; left: 28px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 5px;
    box-shadow: inset 0 0 0 1.5px var(--label-3); transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.wpn-groups .category-cb:has(input:checked)::before { background: var(--accent); box-shadow: none; }
.wpn-groups .category-cb::after { right: auto; left: 30px; width: 14px; height: 14px; margin-top: -7px; background: var(--accent-ink, #000); }
.wpn-groups .wpn-chips { margin-left: 58px; }
