/* Marketplace. A calm three-column shop: filters on the left, the catalog in the middle (an open canvas, no heavy frame) and the community
   avatars on the right (which fold into a slim rail). Prices are plain coloured text, never boxes. Same language as the other pages:
   gradient title, fading rules, soft surfaces, things that lift on hover, the site's blue for everything interactive. */

html:has(.marketplace-page), body:has(.marketplace-page) { overflow: hidden; }
.marketplace-page {
    --mk-tile: rgba(11, 15, 23, .82); --mk-well: rgba(255, 255, 255, .045);
    --mk-text: #eaf0f8; --mk-muted: #a3aec1; --mk-dim: #7f8ca1;
    --mk-accent: #4aa8ff; --mk-accent-soft: rgba(74, 168, 255, .15); --mk-accent-line: rgba(120, 190, 255, .5);
    --mk-green: #4ade9b; --mk-violet: #c4b5fd; --mk-price: #a5d6ff;
    --mk-ease: cubic-bezier(.2, .9, .25, 1);
    display: flex; flex-direction: column; gap: 18px; width: min(1800px, calc(100% - 44px)); height: calc(100dvh - 30px); margin: 14px auto 0; color: var(--mk-text);
}
.marketplace-page svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.marketplace-page button { font-family: inherit; }
.mk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- title + search */
.mk-head { display: grid; flex: none; grid-template-columns: minmax(0, 1fr) minmax(300px, 560px) minmax(0, 1fr); align-items: center; gap: 24px; }
.mk-title h1 { margin: 0; font-size: clamp(30px, 3vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.mk-title h1 span { background: linear-gradient(100deg, #8fd0ff, #4aa8ff 55%, #8f9bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-title p { min-height: 21px; margin: 8px 0 0; color: var(--mk-muted); font-size: 14.5px; transition: opacity .38s ease, transform .38s ease; }
.mk-title p.is-out { opacity: 0; transform: translateY(4px); }
.mk-search { position: relative; display: flex; align-items: center; height: 50px; box-sizing: border-box; padding: 0 14px 0 18px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--mk-well); transition: border-color .2s ease, box-shadow .25s ease, background-color .2s ease; }
.mk-search[hidden] { display: none; }
.mk-search:focus-within { border-color: rgba(96, 175, 255, .7); background: rgba(64, 162, 250, .06); box-shadow: 0 0 0 4px rgba(64, 162, 250, .13); }
.mk-search > svg { flex: none; width: 19px; height: 19px; color: #8d9ab0; }
.mk-search input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0 12px; border: 0; background: transparent; color: #fff; font: 600 15px/1 Inter, sans-serif; outline: none; }
.mk-search input::placeholder { color: var(--mk-dim); font-weight: 500; }
.mk-search input::-webkit-search-cancel-button { display: none; }
.mk-search kbd { flex: none; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255, 255, 255, .04); color: var(--mk-dim); font: 650 11.5px/1 Inter, sans-serif; transition: opacity .2s ease; }
.mk-search:focus-within kbd, .mk-search input:not(:placeholder-shown) ~ kbd { opacity: 0; }

/* ---------------------------------------------------------------- the board */
.mk-board { --av-w: clamp(330px, 24vw, 420px); display: grid; flex: 1 1 0; min-height: 0; grid-template-columns: minmax(0, 1fr) var(--av-w); gap: 22px; transition: grid-template-columns .6s var(--mk-ease); }
.mk-board.av-collapsed { grid-template-columns: minmax(0, 1fr) 64px; }
.market-panel[hidden] { display: none !important; }
.mk-catalog { position: relative; display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.mk-panel { position: relative; display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; padding: 18px 18px 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-1); }
.mk-progress { position: absolute; z-index: 5; top: -10px; left: 0; right: 0; height: 2px; overflow: hidden; border-radius: 2px; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.mk-progress::before { content: ''; position: absolute; top: 0; bottom: 0; width: 38%; background: linear-gradient(90deg, transparent, #4aa8ff, #8f9bff, transparent); animation: mk-sweep 1.15s ease-in-out infinite; }
.is-loading > .mk-progress { opacity: 1; }
@keyframes mk-sweep { from { left: -40%; } to { left: 102%; } }

.mk-sec-head { display: flex; flex: none; align-items: center; gap: 12px; margin: 0 0 16px; min-height: 36px; }
.mk-sec-head[hidden] { display: none; }
.mk-sec-head h2 { order: 0; margin: 0; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.mk-sec-head::after { content: ''; order: 1; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.mk-sec-head > :not(h2) { order: 2; }

/* ---------------------------------------------------------------- buttons */
.mk-btn, .market-secondary, .market-primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; text-decoration: none; transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .25s ease, filter .2s ease; }
.mk-btn:active, .market-secondary:active, .market-primary:active { transform: scale(.97); }
.mk-btn, .market-secondary { min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: rgba(255, 255, 255, .05); color: #c9d0dc; font: 700 13px/1 Inter, sans-serif; }
.mk-btn:hover, .market-secondary:hover { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .09); color: #fff; }
.market-secondary.active, .market-secondary[aria-pressed="true"] { border-color: var(--mk-accent-line); background: var(--mk-accent-soft); color: #fff; }
.market-primary { min-height: 42px; padding: 0 20px; border: 1px solid rgba(120, 190, 255, .45); border-radius: var(--r-md); background: linear-gradient(135deg, #2f7fe0, #3a9bf0); color: #fff; font: 750 13.5px/1 Inter, sans-serif; box-shadow: 0 8px 22px -10px rgba(58, 155, 240, .9); }
.market-primary:hover { background: linear-gradient(135deg, #3b8cef, #4aa8ff); border-color: rgba(160, 210, 255, .6); }
.market-primary:disabled { opacity: .45; cursor: default; }
.market-primary svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- catalog: filters + results */
.mk-shell { display: grid; flex: 1 1 0; min-height: 0; grid-template-columns: 262px minmax(0, 1fr); gap: 26px; }
.mk-shell[hidden] { display: none; }
.mk-side { align-self: start; max-height: 100%; min-width: 0; overflow-y: auto; box-sizing: border-box; padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-1); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; animation: mk-in .6s var(--mk-ease) both; }
.mk-side-in { display: block; }
.mk-side-title { margin: 0 0 6px; color: #fff; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.mk-main { position: relative; display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.market-filters { display: block; }

.mk-acc { border-top: 1px solid var(--line); }
.mk-side-title + .mk-acc { border-top: 0; }
.mk-acc.market-filter { display: block; min-width: 0; flex: none; margin: 0; }
.mk-acc.market-filter[hidden] { display: none; }
.mk-acc-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 0; border: 0; background: none; color: #fff; font: 700 13.5px/1 Inter, sans-serif; cursor: pointer; transition: color .2s ease; }
.mk-acc-head:hover { color: var(--mk-accent); }
.mk-acc-head svg { width: 16px; height: 16px; color: var(--mk-dim); transition: transform .4s var(--mk-ease); }
.mk-acc.is-open .mk-acc-head svg { transform: rotate(180deg); }
.mk-acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--mk-ease); }
.mk-acc.is-open .mk-acc-body { grid-template-rows: 1fr; }
.mk-acc-in { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .3s ease, padding .45s var(--mk-ease); }
.mk-acc.is-open .mk-acc-in { padding-bottom: 14px; opacity: 1; transition-delay: .05s, 0s; }
.mk-acc-in > select { display: none; }

/* price: radios + a range that unfolds */
.mk-radios { display: flex; flex-direction: column; gap: 2px; }
.mk-radio { position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 2px; color: var(--mk-muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: color .2s ease; }
.mk-radio:hover { color: #fff; }
.mk-radio input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mk-radio i { flex: none; width: 17px; height: 17px; box-sizing: border-box; border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 50%; transition: border-color .2s ease, box-shadow .25s ease, background .2s ease; }
.mk-radio:has(input:checked) { color: #fff; }
.mk-radio:has(input:checked) i { border-color: var(--mk-accent); background: var(--mk-accent); box-shadow: inset 0 0 0 3.5px #121821; }
.mk-radio:has(input:focus-visible) i { box-shadow: 0 0 0 3px rgba(74, 168, 255, .3), inset 0 0 0 3.5px #121821; }
.mk-range { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--mk-ease); }
.mk-range.is-open { grid-template-rows: 1fr; }
.mk-range-in { min-height: 0; overflow: hidden; }
.mk-range.is-open .mk-range-in { padding-top: 8px; }
.mk-pricerow { display: flex; align-items: center; gap: 8px; }
.mk-pricerow > i { flex: none; width: 8px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.mk-money { display: block; flex: 1 1 0; min-width: 0; }
.mk-money input { width: 100%; height: 40px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--mk-well); color: #fff; font: 700 14px/1 Inter, sans-serif; outline: none; transition: border-color .2s ease, box-shadow .2s ease; appearance: textfield; -moz-appearance: textfield; }
.mk-money input::-webkit-inner-spin-button, .mk-money input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.mk-money input::placeholder { color: var(--mk-dim); font-weight: 600; }
.mk-money input:focus { border-color: rgba(96, 175, 255, .7); box-shadow: 0 0 0 3px rgba(64, 162, 250, .14); }

/* chips (rarity, period) */
.mk-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mk-chip { height: 34px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; color: #b2bccb; font: 650 12.5px/1 Inter, sans-serif; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease; }
.mk-chip:hover { border-color: rgba(255, 255, 255, .3); color: #fff; }
.mk-chip:active { transform: scale(.95); }
.mk-chip.is-on { border-color: var(--mk-accent-line); background: var(--mk-accent-soft); color: #fff; }

/* category: a plain list, groups fold open */
[data-chips-for="bodyPartFilter"] .mk-chips { flex-direction: column; flex-wrap: nowrap; gap: 1px; }
[data-chips-for="bodyPartFilter"] .mk-chip { display: block; width: 100%; height: 34px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: var(--mk-muted); font-size: 13.5px; font-weight: 600; text-align: left; }
[data-chips-for="bodyPartFilter"] .mk-chip:hover { background: rgba(255, 255, 255, .06); color: #fff; }
[data-chips-for="bodyPartFilter"] .mk-chip.is-on { background: var(--mk-accent-soft); color: #fff; box-shadow: inset 2px 0 0 var(--mk-accent); }
.mk-chip-group { margin-top: 4px; }
.mk-chip-title { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 34px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: var(--mk-muted); font: 650 13.5px/1 Inter, sans-serif; cursor: pointer; transition: background .2s ease, color .2s ease; }
.mk-chip-title:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.mk-chip-title svg { width: 15px; height: 15px; color: var(--mk-dim); transition: transform .35s var(--mk-ease); }
.mk-chip-group.is-open > .mk-chip-title { color: #fff; }
.mk-chip-group.is-open > .mk-chip-title svg { transform: rotate(90deg); }
.mk-chip-group > .mk-chips { display: none; margin: 1px 0 4px 10px; padding-left: 8px; border-left: 1px solid var(--line); }
.mk-chip-group.is-open > .mk-chips { display: flex; animation: mk-fold .35s var(--mk-ease) both; }
@keyframes mk-fold { from { opacity: 0; transform: translateY(-6px); } }

/* sort select inside the filters */
.mk-side .market-sort-filter { display: block; margin: 0; }
.mk-side .market-sort-filter > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mk-side .rdash-select-wrap, .mk-side .rdash-select-trigger { width: 100% !important; min-width: 0; }
.mk-side .rdash-select-trigger { min-height: 42px; border-radius: 11px; background: var(--mk-well); font-weight: 650; }
.mk-reset { width: 100%; height: 40px; margin-top: 8px; border: 1px solid var(--line-strong); border-radius: 11px; background: transparent; color: var(--mk-muted); font: 700 13px/1 Inter, sans-serif; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.mk-reset:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .05); color: #fff; }

/* the heading over the results */
.mk-results-head { display: flex; flex: none; align-items: center; gap: 18px; margin: 4px 0 14px; }
.mk-results-head::before, .mk-results-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong)); }
.mk-results-head::after { background: linear-gradient(270deg, transparent, var(--line-strong)); }
.mk-results-head h2 { max-width: 70%; overflow: hidden; margin: 0; color: #fff; font-size: 20px; font-weight: 750; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.mk-results-head h2.pop { animation: mk-title .5s var(--mk-ease); }
@keyframes mk-title { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }

/* the scrolling results */
.mk-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -10px 0 -10px; padding: 6px 10px 26px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
.mk-top { position: absolute; z-index: 6; right: 10px; bottom: 18px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(16, 22, 33, .92); color: #fff; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .9); cursor: pointer; opacity: 0; transform: translateY(14px) scale(.85); pointer-events: none; transition: opacity .25s ease, transform .4s var(--mk-ease), background .2s ease; }
.mk-top svg { width: 19px; height: 19px; }
.mk-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.mk-top:hover { background: #1c2740; }

/* ---------------------------------------------------------------- tiles: no frame, rounded art, plain text */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--mk-min, 200px), 1fr)); grid-auto-rows: auto; align-items: stretch; gap: 26px 22px; }
.avatar-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.market-item-card { --d: 0ms; position: relative; display: flex; min-width: 0; flex-direction: column; color: inherit; text-decoration: none; animation: mk-in .6s var(--mk-ease) var(--d) both; }
.avatar-card { --d: 0ms; position: relative; display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--mk-tile); color: inherit; animation: mk-in .6s var(--mk-ease) var(--d) both; transition: transform .32s var(--mk-ease), border-color .22s ease, box-shadow .32s ease; }
@keyframes mk-in { from { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(5px); } }
.avatar-card::before { content: ''; position: absolute; z-index: 3; inset: 0; border-radius: inherit; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(120, 190, 255, .16), transparent 62%); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.avatar-card:hover { transform: translateY(-4px); border-color: rgba(96, 175, 255, .5); box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .85); }
.avatar-card:hover::before { opacity: 1; }
.market-item-art { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(110% 80% at 50% 20%, rgba(255, 255, 255, .09), transparent 70%), #0d121b; transition: transform .38s var(--mk-ease), border-color .25s ease, box-shadow .38s ease; }
.market-item-art::before { content: ''; position: absolute; left: 26%; right: 26%; bottom: 11%; height: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); filter: blur(4px); transition: transform .5s var(--mk-ease), opacity .4s ease; }
.market-item-art img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; padding: 14px; box-sizing: border-box; object-fit: contain; -webkit-user-drag: none; transition: transform .55s var(--mk-ease), filter .4s ease; }
.market-item-card:hover .market-item-art { transform: translateY(-5px); border-color: rgba(96, 175, 255, .55); box-shadow: 0 22px 40px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(96, 175, 255, .14); }
.market-item-card:hover .market-item-art img { transform: scale(1.07); filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .5)); }
.market-item-card:hover .market-item-art::before { transform: scale(.82); opacity: .7; }
.item-image-fallback { color: rgba(255, 255, 255, .22); font-size: 38px; font-weight: 800; }
.limited-tag { position: absolute; z-index: 4; top: 10px; left: 10px; padding: 5px 9px; border-radius: 8px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.mk-open { position: absolute; z-index: 4; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(8, 11, 17, .72); backdrop-filter: blur(8px); color: #fff; opacity: 0; transform: translateY(-6px) scale(.88); transition: opacity .25s ease, transform .35s var(--mk-ease); }
.mk-open svg { width: 15px; height: 15px; }
.market-item-card:hover .mk-open { opacity: 1; transform: none; }
.market-item-info { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; padding: 12px 3px 0; }
.market-item-info h3 { display: -webkit-box; min-height: 2.76em; overflow: hidden; margin: 0; color: #f5f7fb; font-size: 14.5px; font-weight: 700; line-height: 1.38; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; transition: color .2s ease; }
.market-item-card:hover .market-item-info h3 { color: #fff; }
.mk-creator { display: block; overflow: hidden; margin: 0; color: var(--mk-dim); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.mk-creator:not(:empty)::before { content: 'by '; opacity: .85; }
.market-item-info .mk-creator { margin-bottom: 8px; }

/* prices: coloured text, no frames. Paid = soft sky blue with the Robux icon, free = green, resale = violet, unavailable = grey. Big amounts: K, M, B. */
.market-item-info .market-price-badge { margin-top: auto; }
.market-price-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; max-width: 100%; color: var(--mk-price); font-size: 15px; font-weight: 800; letter-spacing: -.005em; }
.market-price-badge strong { font-weight: 800; }
.mk-rbx { flex: none; width: 17px; height: 17px; object-fit: contain; }
.mk-rbx-text { color: var(--mk-dim); font-size: 12px; font-weight: 800; }
.market-price-badge .mk-resale { color: var(--mk-violet); font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: .02em; opacity: .85; }
.market-price-badge.is-resale { color: var(--mk-violet); }
.market-price-badge.is-free { color: var(--mk-green); font-size: 14.5px; font-weight: 800; }
.market-price-badge.is-unavailable { color: var(--mk-dim); font-size: 13px; font-weight: 600; }

/* skeleton tiles */
.mk-skel { pointer-events: none; animation: none; }
.mk-skel .market-item-art, .mk-skel i { background: linear-gradient(100deg, rgba(255, 255, 255, .035) 30%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .035) 70%) 0 0 / 220% 100%; animation: mk-shimmer 1.3s ease-in-out infinite; }
.mk-skel .market-item-art::before { display: none; }
.mk-skel i { display: block; height: 12px; border-radius: 6px; }
.mk-skel i:nth-child(1) { width: 86%; height: 14px; } .mk-skel i:nth-child(2) { width: 44%; } .mk-skel i:nth-child(3) { width: 30%; height: 16px; margin-top: 8px; }
@keyframes mk-shimmer { to { background-position: -120% 0; } }

/* ---------------------------------------------------------------- loading, empty, notice */
.market-loading { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px 0; color: var(--mk-muted); font-size: 13.5px; }
.market-loading[hidden] { display: none; }
.market-loading::before { content: ''; width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, .14); border-top-color: var(--mk-accent); border-radius: 50%; animation: mk-spin .8s linear infinite; }
@keyframes mk-spin { to { transform: rotate(360deg); } }
.market-empty { padding: 44px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: rgba(255, 255, 255, .02); color: var(--mk-muted); font-size: 14px; text-align: center; animation: mk-in .5s var(--mk-ease) both; }
.market-empty[hidden] { display: none; }
.market-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: rgba(255, 255, 255, .04); color: #c3cad6; font-size: 13px; animation: mk-in .5s var(--mk-ease) both; }
.market-notice[hidden] { display: none; }
.market-notice .market-secondary { min-height: 34px; }
.market-sentinel { height: 2px; }

/* ---------------------------------------------------------------- app-only lock (browser): the real page, blurred, with one short card */
.mk-lock { position: relative; display: grid; flex: 1 1 0; min-height: 0; place-items: center; overflow: hidden; border-radius: var(--r-lg); }
.mk-lock-ghost { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; filter: blur(4px) saturate(.9); transform: scale(1.01); pointer-events: none; user-select: none; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
.mk-lock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 26px 22px; }
.mk-ghost-card { animation: none; }
.mk-lock-card { position: relative; z-index: 2; width: min(380px, calc(100% - 32px)); padding: 30px 28px 28px; text-align: center; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(12, 16, 24, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 40px 80px -28px rgba(0, 0, 0, .95); animation: mk-in .7s var(--mk-ease) both; }
.mk-lock-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 15px; background: rgba(255, 255, 255, .07); color: #fff; }
.mk-lock-icon svg { width: 24px; height: 24px; }
.mk-lock-card h2 { margin: 0 0 8px; color: #fff; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.mk-lock-card > p { margin: 0 0 20px; color: var(--mk-muted); font-size: 14px; line-height: 1.5; }
.mk-lock-card .market-primary { display: inline-flex; }

/* ---------------------------------------------------------------- community avatars */
.mk-avatars .mk-sec-head h2 { font-size: 17px; }
.mk-avatars .avatar-view-actions { margin-left: auto; }
.mk-avatars .mk-sec-head::after { display: none; }

/* ---------------------------------------------------------------- community avatars */
.mk-collapse { order: 3 !important; display: grid; flex: none; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(255, 255, 255, .05); color: #c9d0dc; cursor: pointer; transition: background .2s ease, color .2s ease, transform .4s var(--mk-ease); }
.mk-collapse svg { width: 16px; height: 16px; }
.mk-collapse:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.mk-av-body { display: flex; min-height: 0; flex: 1 1 0; flex-direction: column; transition: opacity .3s ease .12s; }
.avatar-view-actions { display: flex; align-items: center; gap: 6px; }
.avatar-view-actions .market-secondary { min-height: 34px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; }
.avatar-view-actions .avatar-favorites-filter { display: inline-grid; place-items: center; width: 34px; padding: 0; }
.avatar-view-actions .avatar-favorites-filter img { width: 15px; height: 15px; opacity: .85; }
.avatar-toolbar { display: grid; flex: none; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0 0 14px; }
.avatar-toolbar .market-filter { display: block; min-width: 0; margin: 0; }
.avatar-toolbar .market-search { grid-column: 1 / -1; position: relative; }
.avatar-toolbar .market-primary { min-height: 46px; }
.avatar-columns-filter { display: none !important; }
.mk-av-rail { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 22px 0; border: 0; background: transparent; color: #c9d0dc; font: 700 13.5px/1 Inter, sans-serif; letter-spacing: .02em; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s, background .2s ease, color .2s ease; }
.mk-av-rail svg { width: 18px; height: 18px; }
.mk-av-rail span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.av-collapsed .mk-av-rail { opacity: 1; visibility: visible; transition-delay: .25s, 0s, 0s, 0s; }
.av-collapsed .mk-avatars .mk-sec-head, .av-collapsed .mk-av-body { opacity: 0; pointer-events: none; transition-delay: 0s; }
.mk-avatars .mk-sec-head { transition: opacity .3s ease; }

.avatar-card-open { display: flex; width: 100%; flex: 1; flex-direction: column; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.avatar-card-art { position: relative; display: block; aspect-ratio: 1 / .95; overflow: hidden; background: radial-gradient(110% 80% at 50% 22%, rgba(255, 255, 255, .08), transparent 70%), #0a0e15; }
.avatar-card-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .6s var(--mk-ease); }
.avatar-card:hover .avatar-card-art img { transform: scale(1.06); }
.avatar-card-copy { display: flex; flex-direction: column; gap: 6px; padding: 13px 14px 14px; }
.avatar-card-topline { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 6px; }
.avatar-card-copy strong { overflow: hidden; color: #f3f5f9; font-size: 13.5px; font-weight: 640; text-overflow: ellipsis; white-space: nowrap; }
.avatar-card-price { font-size: 14px; font-weight: 800; }
.avatar-card-price.is-paid { color: #fff; }
.avatar-card-price.is-free { color: var(--mk-green); }
.avatar-card-price.is-unavailable { color: var(--mk-dim); font-size: 12px; font-weight: 600; }
.avatar-favorite-count { display: inline-flex; align-items: center; gap: 6px; color: var(--mk-dim); font-size: 12px; }
.avatar-favorite-count img { width: 12px; height: 12px; opacity: .7; }
.avatar-favorite { position: absolute; z-index: 5; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: rgba(8, 11, 17, .66); backdrop-filter: blur(8px); cursor: pointer; transition: background .2s ease, transform .25s var(--mk-ease); }
.avatar-favorite img { width: 16px; height: 16px; }
.avatar-favorite:hover { background: rgba(8, 11, 17, .92); transform: scale(1.1); }
.avatar-favorite:active { transform: scale(.9); }
.avatar-owner-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px 12px; }
.avatar-privacy-badge { padding: 4px 8px; border-radius: 6px; background: rgba(74, 222, 155, .12); color: var(--mk-green); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.avatar-privacy-badge.is-private { background: rgba(255, 255, 255, .08); color: var(--mk-muted); }
.avatar-delete { padding: 4px 2px; border: 0; background: transparent; color: rgba(252, 165, 165, .75); font-size: 11px; font-weight: 650; cursor: pointer; }
.avatar-delete:hover { color: #fecaca; }
.avatar-owner-mark { color: #7cc4ff; font-size: 9px; font-weight: 850; letter-spacing: .12em; }

/* ---------------------------------------------------------------- dialogs */
.market-dialog { position: fixed; inset: 0; width: min(560px, calc(100% - 28px)); max-height: min(88vh, 900px); margin: auto; padding: 28px; overflow: auto; border: 1px solid var(--line-strong); border-radius: 16px; background: #0e131b; color: var(--mk-text); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .95); opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .25s ease, transform .45s var(--mk-ease), overlay .45s allow-discrete, display .45s allow-discrete; }
.market-dialog[open] { opacity: 1; transform: none; }
@starting-style { .market-dialog[open] { opacity: 0; transform: translateY(16px) scale(.97); } }
.market-dialog::backdrop { background: rgba(4, 6, 10, .7); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s ease, overlay .3s allow-discrete, display .3s allow-discrete; }
.market-dialog[open]::backdrop { opacity: 1; }
@starting-style { .market-dialog[open]::backdrop { opacity: 0; } }
.avatar-detail-dialog { width: min(940px, calc(100% - 28px)); }
.market-dialog h2 { margin: 0; color: #fff; font-size: 24px; font-weight: 780; letter-spacing: -.02em; }
.market-dialog-close-form { position: absolute; z-index: 3; top: 14px; right: 14px; margin: 0; }
.dialog-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .05); color: #cbd5e1; font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.dialog-close:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: rotate(90deg); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dialog-status { min-height: 18px; margin: 10px 0 0; color: #fca5a5; font-size: 13px; }
.publish-dialog-hero { margin: 0 40px 22px 0; }
.publish-dialog-hero p { margin: 8px 0 0; color: var(--mk-muted); font-size: 13.5px; line-height: 1.55; }
.publish-name-field { display: block; margin-bottom: 20px; color: var(--mk-muted); font-size: 12px; font-weight: 700; }
.publish-name-field span { display: block; margin-bottom: 8px; }
.publish-name-field input { width: 100%; height: 46px; box-sizing: border-box; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--mk-well); color: #fff; font: 600 14.5px/1 Inter, sans-serif; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.publish-name-field input:focus { border-color: rgba(96, 175, 255, .7); box-shadow: 0 0 0 3px rgba(64, 162, 250, .14); }
.visibility-choice { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.visibility-choice legend { margin-bottom: 10px; color: var(--mk-muted); font-size: 12px; font-weight: 700; }
.visibility-option { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: rgba(255, 255, 255, .03); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.visibility-option:hover { border-color: rgba(255, 255, 255, .26); }
.visibility-option:has(input:checked) { border-color: var(--mk-accent-line); background: var(--mk-accent-soft); }
.visibility-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.visibility-option-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .07); color: #cbd5e1; font-size: 16px; }
.visibility-option strong, .visibility-option small { display: block; }
.visibility-option strong { color: #fff; font-size: 13.5px; }
.visibility-option small { margin-top: 3px; color: var(--mk-muted); font-size: 12px; }
.visibility-radio { width: 16px; height: 16px; border: 1.5px solid rgba(255, 255, 255, .28); border-radius: 50%; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.visibility-option:has(input:checked) .visibility-radio { border-color: var(--mk-accent); background: var(--mk-accent); box-shadow: inset 0 0 0 3px #0e131b; }
.publish-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.publish-dialog-footer > span { color: var(--mk-dim); font-size: 12px; }
.publish-count { display: inline-grid; place-items: center; min-width: 34px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; font-size: 11px; font-weight: 800; }

.avatar-detail-layout { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr); gap: 18px; }
.avatar-detail-profile, .avatar-detail-items { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(255, 255, 255, .025); }
.avatar-detail-image { position: relative; margin: 12px 12px 0; overflow: hidden; border-radius: var(--r-md); background: radial-gradient(110% 80% at 50% 22%, rgba(255, 255, 255, .08), transparent 70%), #0a0e15; }
.avatar-detail-image img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.avatar-detail-info { padding: 16px; }
.avatar-detail-info h2 { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.2; overflow-wrap: anywhere; }
.avatar-detail-creator { margin: 6px 0 0; color: var(--mk-muted); font-size: 13px; }
.avatar-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.avatar-detail-meta-row { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 10px; }
.avatar-detail-meta-label { color: var(--mk-dim); font-size: 11px; }
.avatar-detail-value { padding: 5px 10px; border-radius: 7px; background: rgba(255, 255, 255, .06); color: #c9d0dc; font-size: 12px; font-weight: 650; }
.avatar-detail-value.is-paid { background: transparent; padding: 0; color: #fff; font-size: 16px; font-weight: 800; }
.avatar-detail-value.is-free { background: transparent; padding: 0; color: var(--mk-green); font-size: 15px; font-weight: 800; }
.avatar-detail-value.is-unavailable { background: transparent; padding: 0; color: var(--mk-dim); }
.avatar-detail-visibility { padding: 5px 10px; border-radius: 7px; background: rgba(74, 222, 155, .12); color: var(--mk-green); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.avatar-detail-visibility.is-private { background: rgba(255, 255, 255, .08); color: var(--mk-muted); }
.avatar-detail-image-actions { display: flex; gap: 8px; padding: 12px 0 0; }
.avatar-detail-image-actions .avatar-favorite { position: static; width: 38px; height: 38px; }
.avatar-detail-delete { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: rgba(248, 113, 113, .1); cursor: pointer; transition: background .2s ease; }
.avatar-detail-delete img { width: 16px; height: 16px; }
.avatar-detail-delete:hover { background: rgba(248, 113, 113, .22); }
.avatar-detail-actions { display: grid; gap: 8px; margin-top: 16px; }
.avatar-detail-items { display: flex; flex-direction: column; padding: 14px; }
.avatar-assets-list { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 8px; overflow: auto; padding-right: 3px; scrollbar-width: thin; }
.avatar-asset-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 54px; padding: 7px 10px 7px 7px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255, 255, 255, .03); color: inherit; text-decoration: none; transition: border-color .2s ease, background .2s ease, transform .25s var(--mk-ease); }
.avatar-asset-row:hover { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .06); transform: translateX(3px); }
.avatar-asset-image { display: grid; width: 46px; height: 46px; overflow: hidden; place-items: center; border-radius: 9px; background: #0a0e15; }
.avatar-asset-image img { width: 100%; height: 100%; object-fit: cover; }
.avatar-asset-row strong, .avatar-asset-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-asset-row strong { color: #f3f5f9; font-size: 12.5px; }
.avatar-asset-row small { margin-top: 3px; color: var(--mk-dim); font-size: 11px; }
.avatar-asset-price { padding: 5px 9px; border-radius: 7px; background: rgba(255, 255, 255, .07); color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; }


/* avatars column: calmer header and toolbar */
.mk-avatars .mk-collapse { margin-left: auto; }
.mk-avatars .avatar-view-actions + .mk-collapse { margin-left: 0; }
.avatar-toolbar .market-search input, .avatar-toolbar #avatarSearch { width: 100%; height: 42px; box-sizing: border-box; padding: 0 14px 0 42px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--mk-well) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d9ab0' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px center / 17px no-repeat; color: #fff; font: 600 14px/1 Inter, sans-serif; outline: none; transition: border-color .2s ease, box-shadow .25s ease; }
.avatar-toolbar #avatarSearch::placeholder { color: var(--mk-dim); font-weight: 500; }
.avatar-toolbar #avatarSearch:focus { border-color: rgba(96, 175, 255, .7); box-shadow: 0 0 0 3px rgba(64, 162, 250, .13); }
.avatar-toolbar .rdash-select-trigger { min-height: 42px; border-radius: 12px; background: var(--mk-well); font-weight: 650; }
.avatar-toolbar .market-primary { min-height: 42px; }
.avatar-toolbar .market-filter > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.avatar-card-price.is-paid { color: var(--mk-price); }

/* ---------------------------------------------------------------- narrower windows */
@media (max-width: 1400px) { .mk-shell { grid-template-columns: 236px minmax(0, 1fr); gap: 20px; } .mk-board { --av-w: 320px; gap: 18px; } }
@media (max-width: 1100px) {
    html:has(.marketplace-page), body:has(.marketplace-page) { overflow: auto; }
    .marketplace-page { width: calc(100% - 28px); height: auto; margin-top: 12px; }
    .mk-head { grid-template-columns: 1fr; gap: 14px; }
    .mk-head-gap { display: none; }
    .mk-board, .mk-board.av-collapsed { display: flex; flex-direction: column; }
    .mk-panel { padding-bottom: 16px; }
    .mk-shell { flex: none; grid-template-columns: minmax(0, 1fr); }
    .mk-lock { min-height: 460px; flex: none; }
    .mk-side { max-height: none; }
    .mk-scroll { flex: none; max-height: 78vh; }
    .mk-av-rail { display: none; }
    .av-collapsed .mk-avatars .mk-sec-head, .av-collapsed .mk-av-body { opacity: 1; pointer-events: auto; }
    .mk-collapse { display: none; }
    .avatar-detail-layout { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .market-item-card, .avatar-card, .market-empty, .market-notice, .mk-lock-card, .mk-side { animation: none; }
    .mk-board, .mk-acc-body, .mk-acc-in, .mk-range, .market-dialog { transition: none; }
    .mk-skel .market-item-art, .mk-skel i, .mk-progress::before { animation: none; }
}
.market-grid { --mk-min: 185px; }

/* ---------------------------------------------------------------- round 2 */
.marketplace-page { --mk-price: #dcc98e; }
/* filter lists: one look for category, rarity and period; the chosen row is a flat tint */
[data-chips-for] .mk-chips { flex-direction: column; flex-wrap: nowrap; gap: 1px; }
[data-chips-for] .mk-chip { display: block; width: 100%; height: 34px; padding: 0 11px; border: 0; border-radius: 0; background: transparent; color: var(--mk-muted); font-size: 13.5px; font-weight: 600; text-align: left; }
[data-chips-for] .mk-chip:hover { background: rgba(255, 255, 255, .06); color: #fff; }
[data-chips-for] .mk-chip.is-on { background: var(--mk-accent-soft); color: #fff; box-shadow: none; }
.mk-chip-title { border-radius: 0; }

/* search: no inner highlight */
.mk-search input, .mk-search input:hover, .mk-search input:focus { background: transparent !important; box-shadow: none !important; border: 0 !important; outline: none !important; border-radius: 0; }

/* tiles: five across, tight text block */
.market-grid { --mk-min: 180px; gap: 22px 16px; }
.avatar-grid { --mk-min: 140px; gap: 20px 12px; }
.mk-lock-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px 16px; }
.mk-shell { grid-template-columns: 240px minmax(0, 1fr); gap: 22px; }
.market-item-info { gap: 1px; padding: 10px 2px 0; }
.market-item-info h3 { display: block; min-height: 0; overflow: hidden; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.market-item-info .mk-creator { margin: 0 0 5px; font-size: 12.5px; line-height: 1.3; }
.market-item-info .market-price-badge { margin-top: 0; }
.market-price-badge { gap: 6px; font-size: 14.5px; line-height: 1.2; }
.mk-rbx { width: auto; height: 15px; }
.market-price-badge.is-resale { color: var(--mk-price); }
.market-price-badge .mk-resale { color: var(--mk-violet); }

/* avatars: same tile language as the items */
.avatar-card { overflow: visible; border: 0; background: none; border-radius: 0; }
.avatar-card::before { display: none; }
.avatar-card:hover { transform: none; border-color: transparent; box-shadow: none; }
.avatar-card-art { aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(110% 80% at 50% 20%, rgba(255, 255, 255, .09), transparent 70%), #0d121b; transition: transform .38s var(--mk-ease), border-color .25s ease, box-shadow .38s ease; }
.avatar-card:hover .avatar-card-art { transform: translateY(-5px); border-color: rgba(96, 175, 255, .55); box-shadow: 0 22px 40px -20px rgba(0, 0, 0, .9); }
.avatar-card-open { overflow: visible; }
.avatar-card-copy { gap: 1px; padding: 10px 2px 0; }
.avatar-card-copy strong { font-size: 14px; font-weight: 700; }
.avatar-price-line { display: block; margin: 1px 0 3px; }
.avatar-card-price { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 800; line-height: 1.2; }
.avatar-card-price.is-paid { color: var(--mk-price); }
.avatar-card-price.is-free { color: var(--mk-green); }
.avatar-favorite { top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 0; background: transparent !important; backdrop-filter: none; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8)); }
.avatar-favorite:hover { background: transparent !important; transform: scale(1.18); }
.avatar-owner-actions { padding: 6px 2px 0; }
.avatar-detail-value.is-paid { color: var(--mk-price); }

/* avatars toolbar: search on top, sort and publish side by side */
.avatar-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.avatar-toolbar .market-search { grid-column: 1 / -1; }
.avatar-toolbar .market-primary { width: 100%; min-height: 42px; padding: 0 14px; }
.avatar-toolbar .market-filter .rdash-select-wrap, .avatar-toolbar .market-filter .rdash-select-trigger { width: 100% !important; min-width: 0; }
@media (max-width: 1500px) { .market-grid { --mk-min: 150px; } }
.avatar-grid { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); }

/* ---------------------------------------------------------------- round 3 */
[data-chips-for] .mk-chip.is-on { background: transparent; color: var(--mk-accent); font-weight: 750; box-shadow: none; }
[data-chips-for] .mk-chip.is-on:hover { background: rgba(255, 255, 255, .06); }
.mk-board { --av-w: clamp(350px, 25vw, 440px); }
@media (max-width: 1400px) { .mk-board { --av-w: 350px; } }
.mk-avatars .mk-sec-head h2 { white-space: nowrap; }
/* likes sit next to the star, top right of the picture */
.avatar-fav-box { position: absolute; z-index: 5; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; }
.avatar-fav-box .avatar-favorite { position: static; }
.avatar-fav-box .avatar-favorite-count { gap: 4px; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.avatar-fav-box .avatar-favorite-count img { width: 13px; height: 13px; opacity: 1; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8)); }
.avatar-card-price { font-size: 13.5px; }
.avatar-card-price .mk-rbx { height: 14px; }
label.mk-search input#itemSearch[type="search"], label.mk-search input#itemSearch[type="search"]:hover, label.mk-search input#itemSearch[type="search"]:focus { background: transparent !important; background-color: transparent !important; box-shadow: none !important; border: 0 !important; outline: 0 !important; }

/* ---------------------------------------------------------------- avatar dialog */
.dialog-close { position: relative; width: 34px; height: 34px; border-radius: 50%; font-size: 0; line-height: 0; }
.dialog-close::before, .dialog-close::after { content: ''; position: absolute; left: 50%; top: 50%; width: 13px; height: 2px; margin: -1px 0 0 -6.5px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.dialog-close::after { transform: rotate(-45deg); }
.dialog-close:hover { transform: rotate(90deg); }
.avatar-detail-dialog { padding: 58px 24px 24px; }
.avatar-detail-dialog .market-dialog-close-form { top: 14px; right: 14px; }
.avatar-detail-profile { display: flex; flex-direction: column; }
.avatar-detail-info { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.avatar-detail-info h2 { font-size: 22px; line-height: 1.2; }
.avatar-detail-creator { margin: 0; color: var(--mk-dim); font-size: 13px; }
.avatar-detail-price { margin: 10px 0 2px; }
.avatar-detail-value { display: inline-flex; align-items: center; gap: 8px; padding: 0; background: none; }
.avatar-detail-value.is-paid { color: var(--mk-price); font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.avatar-detail-value.is-paid .mk-rbx { height: 22px; }
.avatar-detail-value.is-free { color: var(--mk-green); font-size: 22px; font-weight: 800; }
.avatar-detail-value.is-unavailable { color: var(--mk-dim); font-size: 14px; font-weight: 600; }
.avatar-detail-meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; }
.avatar-detail-date { color: var(--mk-dim); font-size: 12.5px; }
.avatar-detail-visibility { padding: 4px 8px; border-radius: 6px; }
.avatar-detail-image-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 14px 0 0; border-top: 1px solid var(--line); }
.avatar-detail-info > .avatar-detail-image-actions { margin-top: auto; }
.avatar-detail-image-actions .avatar-favorite { width: 34px; height: 34px; }
.avatar-detail-favcount { display: inline-flex; align-items: center; gap: 5px; margin-left: -6px; color: #c9d0dc; font-size: 13.5px; font-weight: 700; }
.avatar-detail-favcount img { width: 14px; height: 14px; }
.avatar-detail-delete { width: 34px; height: 34px; margin-left: auto; border-radius: 50%; }
.avatar-asset-row { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; }
.avatar-asset-row strong { font-size: 13.5px; font-weight: 650; }
.avatar-asset-price { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: none; color: var(--mk-dim); font-size: 13.5px; font-weight: 800; }
.avatar-asset-price.is-paid { color: var(--mk-price); }
.avatar-asset-price.is-free { color: var(--mk-green); }
.avatar-asset-price .mk-rbx { height: 14px; }
.avatar-asset-price .mk-resale { color: var(--mk-violet); font-size: 11px; font-style: normal; font-weight: 700; }
/* dialogs live outside the page wrapper: give them the same tokens */
.market-dialog { --mk-tile: rgba(11, 15, 23, .82); --mk-well: rgba(255, 255, 255, .045); --mk-text: #eaf0f8; --mk-muted: #a3aec1; --mk-dim: #7f8ca1; --mk-accent: #4aa8ff; --mk-accent-soft: rgba(74, 168, 255, .15); --mk-accent-line: rgba(120, 190, 255, .5); --mk-green: #4ade9b; --mk-violet: #c4b5fd; --mk-price: #dcc98e; --mk-ease: cubic-bezier(.2, .9, .25, 1); }
.market-dialog svg { fill: none; stroke: currentColor; }
.mk-avatars .mk-sec-head { gap: 8px; }
.mk-avatars .mk-sec-head h2 { font-size: 16px; }
.mk-avatars .avatar-view-actions { gap: 5px; }
.mk-avatars .avatar-view-actions .market-secondary { white-space: nowrap; padding: 0 12px; }
.mk-avatars .avatar-view-actions .avatar-favorites-filter { padding: 0; }
.mk-avatars .mk-sec-head { gap: 6px; }
.mk-avatars .avatar-view-actions .market-secondary { padding: 0 10px; }

/* ---------------------------------------------------------------- round 4 */
/* title like Discover games / Find players */
.mk-head { margin-bottom: 2px; }
.mk-title h1 { color: #fff; font-size: clamp(26px, 2.6vw, 36px); font-weight: 780; letter-spacing: -.03em; line-height: 1.08; }
.mk-title h1 span { background: linear-gradient(100deg, #7cc4ff, #4aa8ff 55%, #8f9bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-title p { margin: 8px 0 0; color: #8d9ab0; font-size: 14.5px; }
.market-filters > .mk-acc:first-child { border-top: 0; }
/* the results are exactly as tall as the filters panel; more items scroll inside */
.mk-shell { flex: 0 1 auto; max-height: 100%; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.mk-side { align-self: stretch; max-height: none; min-height: 0; }
.mk-main { contain: size; }
/* like count centred on the star */
.avatar-fav-box { align-items: center; height: 30px; }
.avatar-fav-box .avatar-favorite-count { display: inline-flex; align-items: center; height: 30px; margin: 0; line-height: 1; }
.avatar-fav-box .avatar-favorite-count > span { display: block; line-height: 1; padding-top: 1px; }
.avatar-fav-box .avatar-favorite { display: grid; place-items: center; height: 30px; padding: 0; }
.avatar-fav-box .avatar-favorite img { display: block; }
.mk-checking { color: var(--mk-dim); font-size: 12.5px; font-weight: 600; animation: mk-blink 1.1s ease-in-out infinite; }
@keyframes mk-blink { 50% { opacity: .45; } }
@media (max-width: 1100px) { .mk-shell { max-height: none; grid-template-rows: auto; } .mk-main { contain: none; } .mk-side { align-self: start; } }

/* ---------------------------------------------------------------- round 5: same page frame as index / games / users */
.marketplace-page { width: 100%; max-width: 1560px; height: 100dvh; margin: 0 auto; padding: 28px clamp(16px, 2.4vw, 40px) 20px; box-sizing: border-box; gap: 0; }
.mk-head { margin-bottom: 20px; }
.mk-board { --av-w: clamp(320px, 22vw, 380px); gap: 22px; }
.mk-shell { grid-template-columns: 232px minmax(0, 1fr); gap: 22px; }
.market-grid { --mk-min: 150px; gap: 22px 14px; }
.mk-lock-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 14px; }
@media (max-width: 1400px) { .mk-board { --av-w: 330px; } .mk-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 18px; } }
@media (max-width: 1100px) { .marketplace-page { width: 100%; height: auto; margin: 0 auto; padding: 16px 14px 40px; } }

/* ================================================================ narrow screens (tablet and phone) */
@media (max-width: 1100px) {
    /* heading on one line, the subtitle under it, the search on its own full-width row (the global header rules had put them side by side) */
    header.mk-head { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; width: auto !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    .mk-title h1 { white-space: nowrap; }
    .mk-title p { display: block; margin: 6px 0 0; }
    .mk-search { width: 100% !important; max-width: none !important; }

    /* the Filters button is shown; the filters open as a card above the items */
    .mk-catalog > .mk-sec-head[hidden] { display: flex !important; margin-bottom: 12px; }
    .mk-shell { display: block; }
    .mk-side { display: none; margin-bottom: 14px; max-height: none; }
    .mk-shell.is-filters-open .mk-side { display: block; }
    .mk-main { display: flex; }
    .mk-scroll { max-height: calc(100dvh - 200px); min-height: 420px; }
}
@media (max-width: 650px) {
    .marketplace-page { padding: 14px 14px 36px; }
    .mk-head { margin-bottom: 14px; }
    .market-grid { --mk-min: 140px; gap: 16px 10px; }
    .mk-scroll { margin: 0 -6px; padding: 4px 6px 20px; }
}
@media (max-width: 1100px) {
    .mk-catalog { display: block; height: auto; max-height: none; min-height: 0; }
    .mk-shell { flex: none; height: auto; max-height: none; }
}
@media (max-width: 1100px) {
    .marketplace-page { display: block; height: auto; min-height: 0; }
    .mk-board, .mk-board.av-collapsed { flex: none; height: auto; min-height: 0; }
    .mk-board > .market-panel { flex: none; height: auto; min-height: 0; }
}

/* phones: two item tiles per row (the shared mobile rules forced one huge tile per row) */
@media (max-width: 650px) {
    body #market-panel-all-items .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px 10px !important; }
    body .avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px 10px !important; }
}
@media (min-width: 651px) and (max-width: 1100px) {
    body #market-panel-all-items .market-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 20px 12px !important; }
}
@media (max-width: 1100px) {
    /* the filter groups stay one under another (the shared mobile rules had put them in a wrapping row) */
    .mk-side .market-filters { display: block !important; }
    .mk-side .market-filters > .mk-acc { width: 100% !important; flex: none; }
}
@media (max-width: 1100px) {
    /* community avatars: the body is as tall as its content (it was squeezed to nothing) */
    .mk-panel { overflow: visible; min-height: 0; padding-bottom: 16px; }
    .mk-av-body { flex: none; min-height: 0; }
    .mk-avatars .mk-scroll { flex: none; }
    .mk-avatars .mk-sec-head { flex-wrap: wrap; }
}
@media (max-width: 650px) {
    .mk-avatars .avatar-toolbar { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .mk-avatars .avatar-toolbar > * { width: 100% !important; min-width: 0 !important; max-width: none !important; }
    .mk-avatars .mk-scroll { max-height: none; min-height: 0; overflow: visible; }
}

/* phones: only the community avatars - no item catalog, no catalog search or heading */
@media (max-width: 650px) {
    #market-panel-all-items, header.mk-head { display: none !important; }
    .marketplace-page { padding-top: 16px; }
}

/* round: no section background behind the avatar catalog and the item filters */
.mk-panel.mk-avatars { padding: 0; border: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; overflow: visible; }
.mk-side { padding: 0 2px 14px 0; border: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
/* phones: no "Community avatars" heading (its buttons stay) */
@media (max-width: 760px) {
    .mk-avatars .mk-sec-head h2 { display: none; }
    .mk-avatars .mk-sec-head { min-height: 0; margin-bottom: 10px; }
    .mk-avatars .avatar-view-actions { margin-left: 0; }
}

/* favourites button: always a 1:1 square; on phones the buttons sit right above the search field */
.avatar-view-actions .avatar-favorites-filter { flex: 0 0 auto; box-sizing: border-box; width: 36px !important; height: 36px; min-width: 36px; min-height: 36px; max-width: 36px; aspect-ratio: 1 / 1; padding: 0 !important; border-radius: 10px; }
@media (max-width: 760px) {
    .mk-avatars .mk-sec-head { margin-bottom: 6px; gap: 6px; flex-wrap: nowrap; }
    .mk-avatars .avatar-view-actions { gap: 6px; }
    .mk-avatars .avatar-toolbar { margin-top: 0; }
}
.avatar-view-actions .market-secondary { min-height: 36px; height: 36px; box-sizing: border-box; }

/* phones: [ My avatars ........ ][ star ] directly above the search, then sort and publish side by side */
.avatar-view-actions .market-secondary { border-radius: 10px; }
@media (max-width: 760px) {
    .mk-avatars .mk-sec-head { min-height: 0; margin: 0 0 8px; padding: 0 !important; }
    .mk-avatars .avatar-view-actions { width: 100%; margin: 0; gap: 8px; }
    .mk-avatars .avatar-view-actions .market-secondary:not(.avatar-favorites-filter) { flex: 1 1 auto; justify-content: center; }
    .mk-avatars .avatar-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 8px !important; margin-bottom: 10px; }
    .mk-avatars .avatar-toolbar .market-search { grid-column: 1 / -1; }
}


/* avatar details: the action row is tidier - favourite button, favourites chip, delete */
.avatar-detail-image-actions { align-items: center; gap: 8px; padding: 12px 0 0; border-top: 0; }
.avatar-detail-image-actions .avatar-favorite { width: 38px; height: 38px; border-radius: 10px; }
.avatar-detail-favcount { display: inline-flex; align-items: center; gap: 7px; height: 38px; margin: 0; padding: 0 14px; border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 10px; background: rgba(255,255,255,.05); color: #eaf0f8; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.avatar-detail-favcount img { width: 15px; height: 15px; opacity: 1; }
.avatar-detail-delete { margin-left: auto; }

/* ================================================================ the window of one avatar: a stage for the avatar, a tidy list of items */
.avatar-detail-dialog { width: min(980px, calc(100% - 28px)); border: 1px solid rgba(255, 255, 255, .12); border-radius: 26px; background: radial-gradient(90% 60% at 20% 0%, rgba(143, 107, 255, .16), transparent 70%), radial-gradient(70% 50% at 100% 100%, rgba(74, 168, 255, .13), transparent 70%), #0b1019; box-shadow: 0 40px 100px -30px #000; }
.avatar-detail-dialog::backdrop { background: rgba(3, 5, 10, .72); backdrop-filter: blur(8px); }
.avatar-detail-layout { grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); gap: 20px; align-items: stretch; }
.avatar-detail-profile, .avatar-detail-items { border: 0; border-radius: 20px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.avatar-detail-image { position: relative; margin: 0; border-radius: 20px 20px 0 0; background: radial-gradient(70% 55% at 50% 38%, rgba(143, 107, 255, .35), rgba(74, 168, 255, .12) 55%, transparent 78%), linear-gradient(180deg, #131a2a, #0a0e17); }
.avatar-detail-image::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 7%; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); filter: blur(3px); pointer-events: none; }
.avatar-detail-image img { position: relative; z-index: 1; aspect-ratio: 1 / 1.08; object-fit: contain; padding: 8px 14px 0; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); }
.avatar-detail-info { gap: 6px; padding: 18px 20px 20px; }
.avatar-detail-info h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.avatar-detail-creator { color: #8fa0bd; font-size: 13.5px; }
.avatar-detail-price { margin: 12px 0 4px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.avatar-detail-price::before { content: "Total price"; display: block; margin-bottom: 4px; color: #7f8ca3; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.avatar-detail-value.is-paid { font-size: 30px; }
.avatar-detail-meta { margin-top: 10px; }
.avatar-detail-visibility { border-radius: 999px; padding: 4px 11px; }
.avatar-detail-items { padding: 18px 16px 16px; }
.avatar-items-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 12px; }
.avatar-items-head h3 { margin: 0; color: #fff; font-size: 16px; font-weight: 780; letter-spacing: -.01em; }
.avatar-items-head span { min-width: 26px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .09); color: #cdd9ee; font-size: 12.5px; font-weight: 800; text-align: center; }
.avatar-assets-list { gap: 8px; padding: 2px 4px 2px 0; }
.avatar-asset-row { grid-template-columns: 54px minmax(0, 1fr) auto; min-height: 66px; gap: 14px; padding: 8px 14px 8px 8px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.avatar-asset-row:hover { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(143, 107, 255, .45); transform: translateX(3px); }
.avatar-asset-image { width: 54px; height: 54px; border-radius: 12px; background: radial-gradient(circle at 50% 35%, #1b2338, #0a0e17); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.avatar-asset-row strong { font-size: 14px; font-weight: 700; }
.avatar-asset-price { font-size: 15px; font-weight: 800; }
@media (max-width: 760px) { .avatar-detail-layout { grid-template-columns: 1fr; } .avatar-detail-image img { aspect-ratio: 1 / .9; } }

/* ---- worn items: a grid of tiles (big picture, name, price as coloured text) instead of a long list of rows */
.avatar-assets-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 12px; padding: 2px 6px 4px 2px; }
.avatar-asset-row { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 9px; min-height: 0; padding: 9px 9px 12px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); text-align: center; overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, background .22s ease; }
.avatar-asset-row:hover { transform: translateY(-4px); background: linear-gradient(180deg, rgba(143, 107, 255, .16), rgba(255, 255, 255, .035)); box-shadow: inset 0 0 0 1px rgba(143, 107, 255, .55), 0 16px 30px -16px rgba(0, 0, 0, .9); }
.avatar-asset-image { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 13px; background: radial-gradient(circle at 50% 38%, #222c47, #0a0e17 75%); }
.avatar-asset-image img { object-fit: contain; padding: 4%; transition: transform .3s ease; }
.avatar-asset-row:hover .avatar-asset-image img { transform: scale(1.07); }
.avatar-asset-row strong { display: -webkit-box; min-height: 2.6em; padding: 0 2px; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.avatar-asset-price { align-self: center; display: inline-flex; align-items: center; justify-content: center; gap: 5px; margin-top: auto; padding: 0; border-radius: 0; background: none; font-size: 14px; font-weight: 800; }
.avatar-asset-price.is-paid { color: #ffd166; }
.avatar-asset-price.is-free { color: #4ade9b; }
.avatar-asset-price.is-unavailable { color: #7f8ca3; font-size: 12px; font-weight: 700; }
.avatar-asset-price .mk-rbx { width: 14px; height: 14px; }
.avatar-asset-price .mk-resale { position: absolute; top: 14px; left: 14px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #ffd166; font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 520px) { .avatar-assets-list { grid-template-columns: repeat(2, 1fr); } }

/* ---- only the list of items scrolls; the items panel is exactly as tall as the info panel next to it */
.avatar-detail-dialog { max-height: calc(100vh - 32px); }
@media (min-width: 761px) {
    .avatar-detail-layout { align-items: stretch; }
    .avatar-detail-items { min-height: 320px; overflow: hidden; contain: size; }
    .avatar-detail-items .avatar-assets-list { flex: 1 1 0; min-height: 0; overflow-y: auto; }
}
@media (max-width: 760px) { .avatar-detail-items .avatar-assets-list { max-height: min(56vh, 480px); overflow-y: auto; } }

/* =====================================================================================================================
   Avatar window v4: clean and compact. A see-through glass window, the avatar in soft light on the left (no boxes),
   the worn items as quiet tiles on the right. No header or counter above the items.
   ===================================================================================================================== */
.avatar-detail-dialog { width: min(940px, calc(100% - 28px)); padding: 18px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 28px; background: radial-gradient(60% 50% at 0% 0%, rgba(123, 140, 255, .14), transparent 62%), radial-gradient(50% 45% at 100% 100%, rgba(154, 108, 242, .1), transparent 65%), rgba(12, 14, 20, .78); backdrop-filter: blur(24px) saturate(1.25); -webkit-backdrop-filter: blur(24px) saturate(1.25); box-shadow: 0 40px 110px -30px rgba(0, 0, 0, .9); }
.avatar-detail-dialog::backdrop { background: rgba(4, 5, 9, .55); backdrop-filter: blur(6px); }
.avatar-detail-dialog .dialog-close { top: 12px; right: 12px; z-index: 5; width: 32px; height: 32px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); color: #9fa9bf; transition: background .15s, color .15s; }
.avatar-detail-dialog .dialog-close:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.avatar-detail-layout { grid-template-columns: minmax(240px, .66fr) minmax(0, 1.34fr); gap: 18px; align-items: stretch; }

/* left: the avatar in soft light, no frame around it */
.avatar-detail-profile { display: flex; flex-direction: column; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
.avatar-detail-image { position: relative; flex: none; margin: 0; padding: 0; border: 0; border-radius: 22px; background: radial-gradient(55% 48% at 50% 46%, rgba(123, 140, 255, .34), rgba(154, 108, 242, .1) 58%, transparent 78%); }
.avatar-detail-image::before { content: ""; position: absolute; left: 50%; bottom: 6px; width: 54%; height: 18px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .13), transparent); }
.avatar-detail-image::after { display: none; }
.avatar-detail-image img { position: relative; z-index: 1; display: block; width: 100%; max-height: 270px; aspect-ratio: 1 / 1; padding: 0; object-fit: contain; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .5)); }
.avatar-detail-info { display: flex; flex: none; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 9px; padding: 8px 4px 0; text-align: center; }
.avatar-detail-info h2 { order: 0; width: 100%; margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
/* creator, date and status share one small line */
.avatar-detail-creator { order: 1; display: inline; margin: 0; padding: 0; border-radius: 0; background: none; color: #8f9ab0; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.avatar-detail-creator::before { display: none; }
.avatar-detail-meta { order: 2; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 9px; margin: 0; }
.avatar-detail-meta > * { color: #8f9ab0; font-size: 12px; font-weight: 600; }
.avatar-detail-meta > *::before { content: "\00b7"; margin-right: 9px; color: #566074; }
.avatar-detail-date { padding: 0; background: none; }
.avatar-detail-visibility, .avatar-detail-visibility.is-private { padding: 0; border-radius: 0; background: none; color: #6fe0a8; font-size: 11px; letter-spacing: .06em; }
.avatar-detail-visibility.is-private { color: #8f9ab0; }
.avatar-detail-price { order: 3; width: 100%; margin: 6px 0 0; padding: 0; border: 0; background: none; box-shadow: none; }
.avatar-detail-price::before { display: block; margin: 0 0 1px; color: #6b768c; font-size: 10px; letter-spacing: .16em; }
.avatar-detail-actions, .avatar-detail-info > .avatar-detail-actions { order: 4; width: 100%; }
.avatar-detail-value { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.avatar-detail-value.is-paid { background: linear-gradient(135deg, #ffe08a, #ffb84d); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 28px; font-weight: 850; letter-spacing: -.02em; }
.avatar-detail-value.is-paid .mk-rbx { width: 22px; height: 22px; }
.avatar-detail-value.is-free { color: #4ade9b; font-size: 22px; }

/* right: no header, no counter, quiet tiles */
.avatar-detail-items { display: flex; flex-direction: column; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.avatar-items-head { display: none; }
.avatar-assets-list { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; padding: 0 6px 0 0; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
.avatar-assets-list::-webkit-scrollbar { width: 6px; }
.avatar-assets-list::-webkit-scrollbar-thumb { border-radius: 6px; background: rgba(255, 255, 255, .14); }
.avatar-asset-row { gap: 7px; padding: 8px 8px 10px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .045); box-shadow: none; }
.avatar-asset-row:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .085); box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .9); }
.avatar-asset-image { border-radius: 12px; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02) 75%); box-shadow: none; }
.avatar-asset-row strong { min-height: 2.5em; color: #eaeef7; font-size: 12px; font-weight: 650; }
.avatar-asset-price { font-size: 13px; }
.avatar-asset-price.is-paid { color: #ffd166; }
.avatar-asset-price.is-free { color: #4ade9b; }
@media (min-width: 761px) { .avatar-detail-items { min-height: 280px; } }
@media (max-width: 760px) { .avatar-detail-dialog { padding: 14px; border-radius: 22px; } .avatar-detail-layout { grid-template-columns: 1fr; gap: 12px; } .avatar-detail-image img { max-height: 230px; } }

/* ---- v4 refinements: close button top-left, tidy info line, one favorite pill */
.avatar-detail-dialog .dialog-close { left: 14px; right: auto; top: 14px; }
.avatar-detail-price::before { display: none !important; content: none; }
.avatar-detail-info { gap: 3px 0; padding-top: 10px; }
.avatar-detail-creator, .avatar-detail-meta { order: 1; }
.avatar-detail-creator { display: inline-block; }
.avatar-detail-meta { display: inline-flex; margin: 0; }
.avatar-detail-creator::after { content: none; }
.avatar-detail-meta > *::before { content: "\00b7"; margin: 0 8px; color: #566074; }
.avatar-detail-meta > .avatar-detail-visibility.is-private { margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: rgba(248, 113, 113, .14); color: #fca5a5; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.avatar-detail-meta > .avatar-detail-visibility.is-private::before { display: none; }
.avatar-detail-price { order: 2; margin-top: 8px; }
.avatar-detail-image-actions { order: 5; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 0 0; }
.avatar-detail-image-actions .avatar-favorite, .avatar-detail-image-actions .avatar-detail-favcount.is-static { position: static; display: inline-flex; align-items: center; gap: 7px; width: auto; height: 34px; margin: 0; padding: 0 14px 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #d3d9e6; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .15s ease, color .15s ease, transform .15s ease; }
.avatar-detail-image-actions .avatar-detail-favcount.is-static { cursor: default; }
.avatar-detail-image-actions .avatar-favorite:hover { background: rgba(255, 209, 102, .16); color: #fff; transform: translateY(-1px); }
.avatar-detail-image-actions .avatar-favorite.is-favorite { background: rgba(255, 209, 102, .18); color: #ffd166; }
.avatar-detail-image-actions .avatar-favorite img, .avatar-detail-image-actions .avatar-detail-favcount.is-static img { width: 16px; height: 16px; }
.avatar-favorite .avatar-detail-favcount { display: inline; height: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; font-size: inherit; font-weight: inherit; }
.avatar-detail-image-actions .avatar-detail-delete { width: 34px; height: 34px; margin: 0; border-radius: 50%; }
.avatar-detail-dialog .market-dialog-close-form { top: 14px; left: 14px; right: auto; }
.avatar-detail-dialog .dialog-close { position: relative; left: auto; right: auto; top: auto; }

/* ---- delete button sits under the close button; item names on one line (sliding when too long) */
.avatar-detail-dialog .avatar-detail-image-actions .avatar-detail-delete, .avatar-detail-dialog .avatar-detail-delete { position: absolute; top: 54px; left: 14px; z-index: 5; display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.avatar-detail-dialog .avatar-detail-delete img { width: 15px; height: 15px; opacity: .8; }
.avatar-detail-dialog .avatar-detail-delete:hover { background: rgba(248, 113, 113, .22); }
.avatar-detail-dialog .avatar-detail-delete:hover img { opacity: 1; }
.avatar-asset-row strong { display: block; min-height: 0; padding: 0 2px; overflow: hidden; white-space: nowrap; text-align: center; text-overflow: clip; -webkit-line-clamp: unset; -webkit-box-orient: initial; line-height: 1.5; }
.avatar-asset-row strong > span { display: inline-block; white-space: nowrap; will-change: transform; }
.avatar-asset-row strong.is-marquee { text-align: left; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.avatar-asset-row strong.is-marquee > span { animation: mk-marquee var(--mq-dur, 6s) ease-in-out .8s infinite alternate; }
@keyframes mk-marquee { 0%, 10% { transform: translateX(0); } 90%, 100% { transform: translateX(calc(-1 * var(--mq-shift, 0px))); } }
@media (prefers-reduced-motion: reduce) { .avatar-asset-row strong.is-marquee > span { animation: none; } }

/* ---- names slide a bit further so the last letters clear the faded edge */
.avatar-asset-row strong.is-marquee > span, .market-item-info h3.is-marquee > span, .avatar-card-copy strong.is-marquee > span { padding: 0 12px; }

/* ---- one tile look for catalog items, published avatars and worn items: a quiet glass tile, the picture on a soft stage, name on one line, price as coloured text */
.market-item-card, .avatar-card { padding: 8px 8px 11px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, .045); box-shadow: none; transition: transform .22s ease, background .22s ease, box-shadow .22s ease; }
.market-item-card:hover, .avatar-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .085); border: 0; box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .9); }
.market-item-art, .avatar-card-art { border: 0; border-radius: 13px; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02) 75%); box-shadow: none; }
.market-item-card:hover .market-item-art, .avatar-card:hover .avatar-card-art { transform: none; border: 0; box-shadow: none; }
.market-item-art::before { opacity: .6; }
.market-item-info, .avatar-card-copy { align-items: center; padding: 10px 2px 0; text-align: center; }
.market-item-info h3, .avatar-card-copy strong { display: block; width: 100%; min-height: 0; overflow: hidden; color: #eef1f8; font-size: 12.5px; font-weight: 650; line-height: 1.5; text-align: center; text-overflow: clip; white-space: nowrap; }
.market-item-info h3.is-marquee, .avatar-card-copy strong.is-marquee { text-align: left; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.market-item-info h3 > span, .avatar-card-copy strong > span { display: inline-block; white-space: nowrap; will-change: transform; }
.market-item-info h3.is-marquee > span, .avatar-card-copy strong.is-marquee > span { animation: mk-marquee var(--mq-dur, 6s) ease-in-out .8s infinite alternate; }
.avatar-card-topline { justify-content: center; width: 100%; }
.market-item-info .mk-creator { margin: 0 0 4px; text-align: center; font-size: 11.5px; }
.market-price-badge { justify-content: center; font-size: 13.5px; }
.market-item-info .market-price-badge { margin-top: 2px; }
.avatar-card-price { justify-content: center; font-size: 13.5px; }
.avatar-card-price.is-paid, .market-price-badge { color: #ffd166; }
.market-price-badge.is-free, .avatar-card-price.is-free { color: #4ade9b; }
.market-price-badge.is-unavailable, .avatar-card-price.is-unavailable { color: #7f8ca3; font-size: 12px; font-weight: 700; }
.market-price-badge.is-resale { color: #c4b5fd; }
@media (prefers-reduced-motion: reduce) { .market-item-info h3.is-marquee > span, .avatar-card-copy strong.is-marquee > span { animation: none; } }

/* ---- phones: the window does not scroll as a whole - a compact head (picture beside the facts) and a list of items that scrolls */
@media (max-width: 760px) {
    .market-dialog.avatar-detail-dialog { width: calc(100% - 16px); height: calc(100vh - 24px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); padding: 12px; overflow: hidden; }
    .market-dialog.avatar-detail-dialog[open] { display: flex; flex-direction: column; }
    .avatar-detail-dialog > div { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
    .avatar-detail-dialog .avatar-detail-layout { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; }
    .avatar-detail-dialog .avatar-detail-profile { display: grid; flex: none; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 4px 10px; padding-top: 38px; }
    .avatar-detail-dialog .avatar-detail-image { padding: 0; }
    .avatar-detail-dialog .avatar-detail-image img { width: 100%; height: 138px; max-height: 138px; aspect-ratio: auto; object-fit: contain; }
    .avatar-detail-dialog .avatar-detail-image::before { height: 12px; bottom: 2px; }
    .avatar-detail-dialog .avatar-detail-info { align-content: center; justify-content: flex-start; gap: 3px 0; padding: 0; text-align: left; }
    .avatar-detail-dialog .avatar-detail-info h2 { display: -webkit-box; overflow: hidden; font-size: 19px; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .avatar-detail-dialog .avatar-detail-meta { justify-content: flex-start; }
    .avatar-detail-dialog .avatar-detail-price { margin-top: 6px; }
    .avatar-detail-dialog .avatar-detail-value.is-paid { font-size: 24px; }
    .avatar-detail-dialog .avatar-detail-image-actions { justify-content: flex-start; padding-top: 8px; }
    .avatar-detail-dialog .avatar-detail-delete { top: 12px; right: 12px; left: auto; }
    .avatar-detail-dialog .market-dialog-close-form { top: 12px; left: 12px; }
    .avatar-detail-dialog .avatar-detail-items { display: flex; flex: 1 1 0; flex-direction: column; height: auto !important; min-height: 0; overflow: hidden; contain: none; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 10px; }
    .avatar-detail-dialog .avatar-detail-items .avatar-assets-list { flex: 1 1 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-height: 0; max-height: none; padding: 0 2px 8px 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .avatar-detail-dialog .avatar-asset-row { padding: 6px 6px 8px; border-radius: 13px; }
    .avatar-detail-dialog .avatar-asset-row strong { font-size: 11.5px; }
    .avatar-detail-dialog .avatar-asset-price { font-size: 12px; }
}
@media (max-width: 340px) { .avatar-detail-dialog .avatar-detail-items .avatar-assets-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* on a phone the date starts its own line, so it needs no dot in front of it */
@media (max-width: 760px) { .avatar-detail-dialog .avatar-detail-creator { width: 100%; } .avatar-detail-dialog .avatar-detail-meta > *:first-child::before { display: none; } }

/* ---------------------------------------------------------------- two tabs, Catalog and Avatars, each across the whole page */
.marketplace-page .mk-head { grid-template-columns: minmax(0, 1fr) minmax(0, 560px) minmax(0, 1fr); }
.mk-tabs { grid-column: 3; justify-self: end; display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(255, 255, 255, .05); }
.mk-title { grid-column: 1; }
.mk-search { grid-column: 2; }
.marketplace-page .mk-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border: 0; border-radius: 10px; background: transparent; color: #a3b1c7; font: 700 14px/1 Inter, sans-serif; cursor: pointer; white-space: nowrap; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.marketplace-page .mk-tab svg { width: 17px; height: 17px; }
.marketplace-page .mk-tab:hover { color: #e6edf7; background: rgba(64, 162, 250, .14); }
.marketplace-page .mk-tab.active, .marketplace-page .mk-tab.active:hover { color: #fff; background: linear-gradient(135deg, #2f7fe0, #3a9bf0); box-shadow: 0 8px 22px -10px rgba(58, 155, 240, .95); }

.marketplace-page .mk-board.mk-tabbed { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 0; transition: none; }
.mk-board.mk-tabbed > .market-panel { grid-area: 1 / 1; min-width: 0; min-height: 0; }
.mk-board.mk-tabbed.is-switching { overflow: hidden; pointer-events: none; }
.mk-to-left { animation: mk-to-left .32s cubic-bezier(.6, 0, .3, 1) both; }
.mk-to-right { animation: mk-to-right .32s cubic-bezier(.6, 0, .3, 1) both; }
.mk-from-right { animation: mk-from-right .32s cubic-bezier(.3, .7, .2, 1) both; }
.mk-from-left { animation: mk-from-left .32s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes mk-to-left { to { transform: translateX(-100%); opacity: .2; } }
@keyframes mk-to-right { to { transform: translateX(100%); opacity: .2; } }
@keyframes mk-from-right { from { transform: translateX(100%); opacity: .2; } }
@keyframes mk-from-left { from { transform: translateX(-100%); opacity: .2; } }

/* the avatars have the whole page now: the tools stand in one row and the tiles are a bit bigger */
.mk-tabbed .mk-avatars .mk-sec-head::after { display: block; }
.mk-tabbed .mk-avatars .mk-sec-head h2 { font-size: 19px; }
.mk-tabbed .mk-avatars .avatar-view-actions { margin-left: 0; }
.mk-tabbed .avatar-grid { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 22px 16px; }
@media (min-width: 900px) {
    .mk-tabbed .avatar-toolbar { grid-template-columns: minmax(0, 1fr) 220px 170px; }
    .mk-tabbed .avatar-toolbar .market-search { grid-column: auto; }
}

/* phones: the catalog is switched off for now - a short note stands in its place */
.mk-phone-off { display: none; }
@media (max-width: 1100px) {
    header.mk-head .mk-tabs { grid-column: 1; justify-self: stretch; display: grid; grid-template-columns: 1fr 1fr; }
    header.mk-head .mk-title, header.mk-head .mk-search { grid-column: 1; }
    header.mk-head .mk-tab { justify-content: center; }
    .marketplace-page .mk-board.mk-tabbed { grid-template-rows: auto; }
    .mk-board.mk-tabbed > .market-panel.mk-catalog[hidden] { display: none !important; }
}
@media (max-width: 650px) {
    header.mk-head { display: grid !important; }
    header.mk-head .mk-title, header.mk-head .mk-search { display: none !important; }
    .mk-head { margin-bottom: 12px !important; }
    #market-panel-all-items:not([hidden]) { display: block !important; }
    #market-panel-all-items > :not(.mk-phone-off) { display: none !important; }
    .mk-phone-off { display: grid; justify-items: center; gap: 10px; margin-top: 8vh; padding: 34px 22px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 20px; background: rgba(14, 20, 31, .85); text-align: center; }
    .mk-phone-off > span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 17px; background: rgba(255, 255, 255, .07); color: #cfe0ff; }
    .mk-phone-off svg { width: 28px; height: 28px; }
    .mk-phone-off h2 { margin: 4px 0 0; color: #fff; font-size: 19px; font-weight: 800; line-height: 1.3; }
    .mk-phone-off p { margin: 0; color: #9aa8c2; font-size: 14px; line-height: 1.55; }
}
@media (prefers-reduced-motion: reduce) { .mk-to-left, .mk-to-right, .mk-from-left, .mk-from-right { animation: none; } }

/* the preview behind the lock: smaller tiles, about twice as many on the screen */
.marketplace-page .mk-lock-ghost { -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 100%); mask-image: linear-gradient(180deg, #000 74%, transparent 100%); }
.marketplace-page .mk-lock-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px 12px; }
.marketplace-page .mk-lock-grid .market-item-info h3 { font-size: 11.5px; }

/* ================================================================ the tiles of the catalog and of the avatars
   A lit stage for the picture, the name in up to two lines, the price in its own label. The light has the colour of what
   it is: gold for limiteds, green for free things, violet for resales, blue for the rest. */
.marketplace-page .market-item-card, .marketplace-page .avatar-card { --tile: 74, 168, 255; position: relative; padding: 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px; background: linear-gradient(180deg, rgb(23 32 50 / 60%), rgb(11 16 26 / 60%)); box-shadow: none; transition: transform .3s cubic-bezier(.2, .9, .25, 1), border-color .25s ease, box-shadow .3s ease; }
.marketplace-page .market-item-card:has(.limited-tag) { --tile: 255, 196, 77; }
.marketplace-page .market-item-card:has(.market-price-badge.is-resale):not(:has(.limited-tag)) { --tile: 167, 139, 250; }
.marketplace-page .market-item-card.has-free-price, .marketplace-page .avatar-card:has(.avatar-card-price.is-free) { --tile: 52, 211, 153; }
.marketplace-page .market-item-card:hover, .marketplace-page .avatar-card:hover { transform: translateY(-5px); border-color: rgba(var(--tile), .6); background: linear-gradient(180deg, rgb(26 37 58 / 78%), rgb(12 18 30 / 78%)); box-shadow: 0 22px 40px -22px rgba(0, 0, 0, .95), 0 12px 34px -20px rgba(var(--tile), .9); }

/* the stage */
.marketplace-page .market-item-art, .marketplace-page .avatar-card-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; isolation: isolate; border: 0; border-radius: 15px; background: radial-gradient(62% 52% at 50% 40%, rgba(var(--tile), .3), rgba(var(--tile), .07) 62%, transparent 78%), linear-gradient(180deg, #141c2e 0%, #0e1422 68%, #121a2b 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); transition: box-shadow .3s ease; }
/* a round pedestal under what is shown, and its shadow */
.marketplace-page .market-item-art::after, .marketplace-page .avatar-card-art::after { content: ''; position: absolute; z-index: -1; left: 16%; right: 16%; bottom: 6%; height: 15%; border: 1px solid rgba(var(--tile), .34); border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--tile), .22), transparent); transition: transform .45s cubic-bezier(.2, .9, .25, 1), opacity .3s ease; opacity: .85; }
.marketplace-page .market-item-art::before { content: ''; position: absolute; z-index: 0; left: 29%; right: 29%; bottom: 10.5%; height: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .62), transparent); filter: blur(3px); opacity: 1; }
.marketplace-page .market-item-art img { position: relative; z-index: 1; width: 100%; height: 100%; box-sizing: border-box; padding: 9% 9% 13%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); transition: transform .45s cubic-bezier(.2, .9, .25, 1), filter .35s ease; }
.marketplace-page .avatar-card-art img { position: relative; z-index: 1; width: 100%; height: 100%; box-sizing: border-box; padding: 5% 4% 7%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); transition: transform .45s cubic-bezier(.2, .9, .25, 1); }
.marketplace-page .market-item-card:hover .market-item-art img { transform: translateY(-4px) scale(1.07); filter: drop-shadow(0 16px 16px rgba(0, 0, 0, .5)); }
.marketplace-page .avatar-card:hover .avatar-card-art img { transform: translateY(-3px) scale(1.06); }
.marketplace-page .market-item-card:hover .market-item-art::after, .marketplace-page .avatar-card:hover .avatar-card-art::after { transform: scale(1.12); opacity: 1; }
.marketplace-page .market-item-card:hover .market-item-art, .marketplace-page .avatar-card:hover .avatar-card-art { box-shadow: inset 0 0 0 1px rgba(var(--tile), .3); }
.marketplace-page .market-item-art > .mk-open { z-index: 3; top: auto; right: 8px; bottom: 8px; width: 34px; height: 34px; border: 0; background: rgb(var(--tile)); color: #07101d; box-shadow: 0 10px 22px -8px rgba(var(--tile), .9); opacity: 0; transform: translateY(8px) scale(.85); transition: opacity .25s ease, transform .3s cubic-bezier(.2, 1.4, .4, 1); }
.marketplace-page .market-item-card:hover .mk-open, .marketplace-page .market-item-card:focus-visible .mk-open { opacity: 1; transform: none; }
.marketplace-page .limited-tag { z-index: 3; top: 8px; left: 8px; padding: 5px 9px 5px 8px; border-radius: 9px; background: linear-gradient(135deg, #ffe08a, #f3a51f); color: #2a1a00; font-size: 9.5px; font-weight: 900; letter-spacing: .1em; box-shadow: 0 8px 18px -8px rgba(243, 165, 31, .9); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* name and price */
.marketplace-page .market-item-info, .marketplace-page .avatar-card-copy { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; gap: 9px; padding: 11px 6px 6px; text-align: left; }
.marketplace-page .market-item-info h3, .marketplace-page .avatar-card-copy strong, .marketplace-page .market-item-info h3.is-marquee, .marketplace-page .avatar-card-copy strong.is-marquee { display: -webkit-box; width: 100%; min-height: 2.7em; overflow: hidden; margin: 0; color: #eef2fa; font-size: 13.5px; font-weight: 700; line-height: 1.35; text-align: left; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; -webkit-mask-image: none; mask-image: none; }
.marketplace-page .market-item-info h3 > span, .marketplace-page .avatar-card-copy strong > span, .marketplace-page .market-item-info h3.is-marquee > span, .marketplace-page .avatar-card-copy strong.is-marquee > span { display: inline; padding: 0; white-space: normal; animation: none; transform: none; }
.marketplace-page .avatar-card-topline { width: 100%; justify-content: flex-start; }
.marketplace-page .avatar-price-line { margin: auto 0 0; }
/* a price is coloured text, without a frame */
.marketplace-page .market-price-badge, .marketplace-page .avatar-card-price { display: inline-flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 6px; max-width: 100%; min-height: 22px; margin: auto 0 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: none; box-shadow: none; color: #ffd979; font-size: 15px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.marketplace-page .avatar-card-price { margin: 0; }
.marketplace-page .market-price-badge.is-free, .marketplace-page .avatar-card-price.is-free { background: none; color: #6ee7b7; }
.marketplace-page .market-price-badge.is-resale { background: none; color: #c9b8ff; }
.marketplace-page .market-price-badge.is-unavailable, .marketplace-page .avatar-card-price.is-unavailable { background: none; color: #8d9ab0; font-size: 12px; font-weight: 700; }
.marketplace-page .market-price-badge .mk-resale { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; }
.marketplace-page .market-price-badge .mk-rbx, .marketplace-page .avatar-card-price .mk-rbx { flex: none; width: auto; height: 14px; }

/* the star of an avatar: a small label on the stage */
.marketplace-page .avatar-fav-box { top: 14px; right: 14px; height: 30px; gap: 5px; padding: 0 9px; box-sizing: border-box; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(9, 13, 22, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.marketplace-page .avatar-fav-box:empty { display: none; }
.marketplace-page .avatar-fav-box .avatar-favorite { width: 18px; height: 28px; filter: none; }
.marketplace-page .avatar-fav-box .avatar-favorite img { width: 15px; height: 15px; }
.marketplace-page .avatar-card .avatar-owner-actions { padding: 2px 6px 6px; }

.marketplace-page .market-grid, .marketplace-page .avatar-grid { gap: 14px; }
.marketplace-page .mk-skel { border-color: rgba(255, 255, 255, .06); }
.marketplace-page .mk-skel .market-item-art::after { display: none; }

/* the same stage, small, for the pieces of one avatar */
.avatar-detail-dialog .avatar-asset-row .avatar-asset-image { background: radial-gradient(62% 54% at 50% 42%, rgba(74, 168, 255, .26), transparent 76%), linear-gradient(180deg, #141c2e, #0e1422); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }

@media (max-width: 760px) {
    .marketplace-page .market-item-card, .marketplace-page .avatar-card { padding: 5px; border-radius: 16px; }
    .marketplace-page .market-item-art, .marketplace-page .avatar-card-art { border-radius: 12px; }
    .marketplace-page .market-item-info, .marketplace-page .avatar-card-copy { gap: 7px; padding: 9px 4px 4px; }
    .marketplace-page .market-item-info h3, .marketplace-page .avatar-card-copy strong, .marketplace-page .market-item-info h3.is-marquee, .marketplace-page .avatar-card-copy strong.is-marquee { font-size: 12.5px; }
    .marketplace-page .market-price-badge, .marketplace-page .avatar-card-price { min-height: 20px; font-size: 13.5px; }
    .marketplace-page .avatar-fav-box { top: 11px; right: 11px; }
}
@media (hover: none) { .marketplace-page .market-item-art > .mk-open { display: none; } }
@media (prefers-reduced-motion: reduce) { .marketplace-page .market-item-card, .marketplace-page .avatar-card, .marketplace-page .market-item-art img, .marketplace-page .avatar-card-art img, .marketplace-page .market-item-art::after, .marketplace-page .avatar-card-art::after, .marketplace-page .market-item-art > .mk-open { transition: none; } }

/* where the prices come from, said once under the total of an avatar */
.avatar-detail-dialog .mk-price-note { order: 20; margin: 12px 0 0; text-align: center; color: #7f8da8; font-size: 11px; line-height: 1.45; }

/* the window with what an avatar wears, on a phone: the figure in its own tile beside the name and the price, the close
   button out of the way in the corner, and item names on two full lines */
@media (max-width: 760px) {
    .avatar-detail-dialog .market-dialog-close-form { top: 10px; right: 10px; left: auto; }
    .avatar-detail-dialog .avatar-detail-profile { grid-template-columns: 112px minmax(0, 1fr); gap: 0 14px; padding: 2px 0 0; }
    .avatar-detail-dialog .avatar-detail-image { align-self: start; overflow: hidden; border-radius: 16px; background: radial-gradient(70% 55% at 50% 42%, rgba(74, 168, 255, .3), transparent 76%), linear-gradient(180deg, #161f33, #0c111d); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
    .avatar-detail-dialog .avatar-detail-image img { height: 134px; max-height: 134px; transform: scale(1.28); }
    .avatar-detail-dialog .avatar-detail-image::before { bottom: 6px; }
    .avatar-detail-dialog .avatar-detail-info h2 { padding-right: 38px; }
    .avatar-detail-dialog .mk-price-note { width: 100%; margin: 7px 0 0; text-align: left; font-size: 10.5px; line-height: 1.4; }
    .avatar-detail-dialog .avatar-detail-delete { top: 10px; right: 50px; left: auto; }
    .avatar-detail-dialog .avatar-detail-items .avatar-assets-list { padding: 0 0 8px; scrollbar-width: none; }
    .avatar-detail-dialog .avatar-detail-items .avatar-assets-list::-webkit-scrollbar { display: none; }
    .avatar-detail-dialog .avatar-asset-row { min-width: 0; }
    .avatar-detail-dialog .avatar-asset-row strong, .avatar-detail-dialog .avatar-asset-row strong.is-marquee { display: -webkit-box; min-height: 2.6em; overflow: hidden; white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; -webkit-mask-image: none; mask-image: none; }
    .avatar-detail-dialog .avatar-asset-row strong > span, .avatar-detail-dialog .avatar-asset-row strong.is-marquee > span { display: inline; padding: 0; white-space: normal; animation: none; transform: none; }
    .avatar-detail-dialog .avatar-asset-price { white-space: nowrap; font-size: 11.5px; }
}
