/* Qblox Studio Marketplace (the owner's mockup, 2026-11-26): dark panels, purple light, gem prices. */
:root {
  --bg: #0b0814; --panel: #130e1f; --panel2: #1a1429; --line: #2c2245; --line2: #3b2d63;
  --text: #f4f4ff; --muted: #a59dc4; --purple: #8a2be2; --violet: #b026ff; --pink: #ff008c; --amber: #ffba00;
  --rad: 14px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(1200px 500px at 70% -10%, #2a1150 0%, transparent 60%), var(--bg); color: var(--text);
  font: 15px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.gem { display: inline-block; width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ff6bd5'/%3E%3Cstop offset='.5' stop-color='%23b026ff'/%3E%3Cstop offset='1' stop-color='%236a14d9'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M6 3h12l4 6-10 13L2 9z' fill='url(%23g)'/%3E%3Cpath d='M2 9h20M8 3l4 6 4-6M12 9v13M6.5 9 12 22l5.5-13' fill='none' stroke='%23ffd6f5' stroke-opacity='.75' stroke-width='1.1'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- header ---------- */
.mk-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; height: 76px; padding: 0 28px;
  background: rgba(11, 8, 20, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.mk-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.mk-brand img { height: 46px; width: auto; filter: drop-shadow(0 0 8px #b026ff55); }
.mk-brand i { width: 1.5px; height: 40px; background: #ffffff55; }
.mk-brand span { font: 800 21px/0.86 Inter, sans-serif; letter-spacing: -.03em; color: #fff; }
.mk-nav { display: flex; align-items: center; gap: 6px; }
.mk-nav a, .mk-nav button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 0; background: none;
  font-weight: 700; font-size: 16px; text-decoration: none; color: #e9e4ff; }
.mk-nav svg { width: 12px; height: 12px; }
.mk-nav a:hover, .mk-nav button:hover { background: #ffffff10; }
.mk-nav .on { background: linear-gradient(180deg, #a14cff, #7a22e6); box-shadow: 0 0 0 1px #c58cff66 inset, 0 6px 22px #8a2be255; color: #fff; }
.mk-search { flex: 1; max-width: 360px; margin-left: auto; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px;
  border: 1px solid var(--line2); border-radius: 12px; background: #0f0b1a; color: var(--muted); }
.mk-search svg { width: 20px; height: 20px; flex: none; }
.mk-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.mk-gems { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: #150f24; font-size: 18px; }
.mk-gems .gem { width: 24px; height: 24px; }
.mk-gems b { min-width: 40px; }
.mk-gems button { width: 36px; height: 36px; border: 0; border-radius: 9px; background: linear-gradient(180deg, #a14cff, #7a22e6); font-size: 24px; line-height: 1; font-weight: 700; }
.mk-avatar { width: 50px; height: 50px; padding: 0; border-radius: 50%; border: 2px solid var(--violet); overflow: hidden; background: #241a3a; box-shadow: 0 0 16px #b026ff55; }
.mk-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- layout ---------- */
.mk-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr) 360px; gap: 22px; max-width: 1720px; margin: 0 auto; padding: 22px 28px 10px; align-items: start; }
.mk-side, .mk-detail { position: sticky; top: 98px; border: 1px solid var(--line); border-radius: var(--rad); background: linear-gradient(180deg, #160f25, #110c1c); }
.mk-side { padding: 20px 16px; }
.mk-side h2 { margin: 0 0 12px 6px; font-size: 18px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.mk-side h3 { margin: 4px 0 12px 6px; font-size: 15px; font-weight: 800; text-transform: uppercase; }
.mk-side h3 small { font-weight: 600; color: var(--muted); }
.mk-side hr { border: 0; border-top: 1px solid var(--line); margin: 18px 4px; }
.mk-cats, .mk-rarity { list-style: none; margin: 0; padding: 0; }
.mk-cats button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none; font-weight: 600; font-size: 15px; color: #e3ddff; text-align: left; }
.mk-cats button svg { width: 22px; height: 22px; flex: none; color: #cfc6f0; }
.mk-cats button:hover { background: #ffffff0b; }
.mk-cats button.on { border-color: #b26bff; background: linear-gradient(90deg, #8a2be255, #8a2be222); color: #fff; box-shadow: 0 0 18px #8a2be244; }
.mk-cats button .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.mk-range { position: relative; height: 26px; margin: 6px 8px; }
.mk-range input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 2; }
.mk-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--violet); pointer-events: auto; cursor: pointer; box-shadow: 0 0 10px #b026ff99; }
.mk-range input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--violet); pointer-events: auto; cursor: pointer; }
.mk-range .track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 4px; background: #2d2347; }
.mk-range #fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, var(--violet), var(--purple)); }
.mk-prices { display: flex; align-items: center; gap: 8px; margin: 10px 4px 0; color: var(--muted); }
.mk-prices label { flex: 1; display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line2); border-radius: 9px; background: #0f0b1a; }
.mk-prices input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 600 14px Inter, sans-serif; -moz-appearance: textfield; }
.mk-prices input::-webkit-outer-spin-button, .mk-prices input::-webkit-inner-spin-button { -webkit-appearance: none; }
.mk-rarity label { display: flex; align-items: center; gap: 12px; padding: 7px 8px; font-weight: 600; cursor: pointer; }
.mk-rarity input { width: 22px; height: 22px; margin: 0; accent-color: var(--violet); }

/* ---------- hero ---------- */
.mk-hero { position: relative; min-height: 270px; border-radius: var(--rad); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(90deg, #0d0918 0%, #0d0918d9 34%, #0d091800 62%), url("/assets/market/banner.webp") right center/cover no-repeat, #120d1c; }
.mk-hero-text { position: relative; padding: 30px 36px; max-width: 470px; }
.mk-hero .q { position: absolute; left: 34px; top: 30px; width: 58px; height: auto; filter: drop-shadow(0 0 12px #b026ff88); }
.mk-hero .kick { margin: 0 0 6px 84px; font-size: 13px; letter-spacing: .42em; text-transform: uppercase; color: #ece7ff; line-height: 1.5; }
.mk-hero .kick b { color: #c98bff; }
.mk-hero h1 { margin: 22px 0 6px; font: 400 62px/0.95 "Russo One", Inter, sans-serif; font-style: italic; letter-spacing: -.01em; text-transform: uppercase;
  text-shadow: 0 4px 0 #3a1170, 0 0 26px #b026ff66; }
.mk-hero .sub { margin: 14px 0 0; font-size: 13px; letter-spacing: .34em; text-transform: uppercase; color: #ddd6ff; }

/* ---------- bar, grid ---------- */
.mk-bar { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; }
.mk-tabs { display: flex; gap: 10px; }
.mk-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border: 1px solid var(--line2); border-radius: 11px; background: #150f24; font-weight: 700; font-size: 16px; color: #e5dfff; }
.mk-tabs button svg { width: 18px; height: 18px; }
.mk-tabs button.on { border-color: #c27dff; background: linear-gradient(180deg, #8a2be266, #8a2be22a); color: #fff; box-shadow: 0 0 18px #8a2be255; }
.mk-filters { display: none; padding: 10px 16px; border: 1px solid var(--line2); border-radius: 11px; background: #150f24; font-weight: 700; }
.mk-sort { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; height: 44px; border: 1px solid var(--line2); border-radius: 11px; background: #150f24; color: var(--muted); font-weight: 600; }
.mk-sort select { border: 0; outline: 0; background: none; color: var(--text); font: 700 15px Inter, sans-serif; padding: 8px; }
.mk-sort select option { background: #150f24; }
.mk-title { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 24px; font-weight: 800; }
.mk-title::before { content: ""; width: 5px; height: 26px; border-radius: 3px; background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.mk-card { position: relative; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; background: #150f24; text-align: left;
  transition: transform .15s, border-color .15s, box-shadow .15s; }
.mk-card:hover { transform: translateY(-2px); border-color: #a45cff; box-shadow: 0 10px 28px #8a2be233; }
.mk-card.sel { border-color: #c27dff; box-shadow: 0 0 0 1px #c27dff, 0 0 24px #b026ff55; }
.mk-card .art { aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 45%, #3a1f66 0%, #150f24 70%); }
.mk-card .art img { width: 100%; height: 100%; object-fit: cover; }
.mk-card .art.none { display: grid; place-items: center; font: 400 40px "Russo One", sans-serif; color: #c98bff; }
.mk-card .meta { padding: 10px 12px 12px; }
.mk-card .nm { min-height: 2.6em; font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.mk-card .pr { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-weight: 800; font-size: 19px; }
.mk-card .pr .gem { width: 20px; height: 20px; }
.mk-card .own { color: #7dffb0; font-size: 15px; }
.badge { position: absolute; top: 10px; z-index: 1; padding: 3px 9px; border-radius: 6px; font: 800 11.5px/1.4 Inter, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.badge.new { left: 10px; background: linear-gradient(180deg, #9c42ff, #6c1bdc); color: #fff; }
.badge.exclusive { right: 10px; background: linear-gradient(180deg, #ffd23d, #ffaa00); color: #2b1600; font-style: italic; }
.mk-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line2); border-radius: 12px; }
.mk-note { margin: 22px 2px 10px; color: var(--muted); font-size: 13px; }

/* ---------- detail ---------- */
.mk-detail { padding: 14px; }
.mk-detail .big { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line2);
  background: radial-gradient(circle at 50% 70%, #6a20c455 0%, transparent 60%), radial-gradient(circle at 50% 40%, #2c1650, #140e22); }
.mk-detail .big img { width: 100%; height: 100%; object-fit: cover; }
.mk-detail .big::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 6%; height: 10%; border-radius: 50%; border: 2px solid #c27dffaa; box-shadow: 0 0 22px #b026ff; pointer-events: none; opacity: .7; }
.mk-detail h2 { margin: 16px 2px 8px; font-size: 24px; font-weight: 800; line-height: 1.15; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 2px 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line2); border-radius: 7px; font-size: 13px; font-weight: 600; color: #e1dbff; }
.chip.r-epic { background: #8a2be233; border-color: #8a2be2; }
.chip.r-exclusive { background: #ffba0026; border-color: #ffba00; color: #ffe2a0; }
.chip.r-rare { background: #2b7bff22; border-color: #4b8dff; }
.mk-detail p { margin: 0 2px 16px; color: #d6d0f0; }
.mk-detail .acts { display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line2); background: #150f24; font-weight: 800; font-size: 16px; text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.buy { flex: 1; flex-direction: column; gap: 0; border: 0; background: linear-gradient(180deg, #a14cff, #7a22e6); box-shadow: 0 8px 26px #8a2be266, 0 0 0 1px #d19bff66 inset; font-size: 17px; line-height: 1.2; }
.btn.buy small { display: flex; align-items: center; gap: 6px; font-size: 20px; }
.btn.buy small .gem { width: 20px; height: 20px; }
.btn.buy[disabled] { background: #2a2045; box-shadow: none; color: #9fe9bd; cursor: default; }
.mk-detail .hint { margin: 12px 2px 0; font-size: 13px; color: var(--muted); }
.mk-detail .x { display: none; }

/* ---------- sheets, toast ---------- */
.mk-sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(5, 3, 12, .78); }
.mk-sheet-in { width: min(440px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 22px; border-radius: 16px; border: 1px solid var(--line2); background: #140e22; box-shadow: 0 30px 80px #000c; }
.mk-sheet-in h3 { margin: 0 0 6px; font-size: 22px; }
.mk-sheet-in p { margin: 0 0 14px; color: #d6d0f0; }
.mk-sheet-in .row { display: flex; gap: 10px; margin-top: 14px; }
.mk-sheet-in .row .btn { flex: 1; }
.mk-sheet-in .packs { display: grid; gap: 10px; }
.mk-sheet-in .pack { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; background: #1a1430; }
.mk-sheet-in .pack b { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 18px; }
.mk-sheet-in .pack .btn { min-height: 42px; }
.mk-sheet-in img.prev { width: 100%; border-radius: 12px; }
.mk-toast { position: fixed; left: 50%; bottom: 28px; z-index: 70; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: #241a3a; border: 1px solid #b26bff; font-weight: 700; box-shadow: 0 12px 30px #0009; }
.mk-foot { max-width: 1720px; margin: 10px auto 0; padding: 18px 28px 30px; color: var(--muted); font-size: 13px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1279px) {
  .mk-wrap { grid-template-columns: 220px minmax(0, 1fr); }
  .mk-detail { position: fixed; z-index: 50; top: auto; right: 0; bottom: 0; left: 0; max-height: 86vh; overflow: auto; border-radius: 18px 18px 0 0; transform: translateY(105%); transition: transform .22s; box-shadow: 0 -20px 60px #000b; }
  .mk-detail.open { transform: none; }
  .mk-detail .x { display: block; position: absolute; right: 14px; top: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: #140e22cc; font-size: 22px; }
  .mk-detail .big { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 1060px) { .mk-search { display: none; } }
@media (max-width: 860px) {
  .mk-top { gap: 10px; height: auto; min-height: 64px; padding: 10px 16px; flex-wrap: wrap; }
  .mk-brand img { height: 34px; }
  .mk-brand { gap: 10px; }
  .mk-brand i { height: 30px; }
  .mk-brand span { font-size: 16px; }
  .mk-nav .my { display: none; }
  .mk-nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .mk-nav a, .mk-nav button { padding: 7px 12px; font-size: 14.5px; white-space: nowrap; }
  .mk-gems { margin-left: auto; height: 40px; font-size: 16px; }
  .mk-avatar { width: 42px; height: 42px; }
  .mk-wrap { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 6px; gap: 14px; }
  .mk-side { position: fixed; z-index: 55; inset: 0 auto 0 0; width: min(300px, 86vw); border-radius: 0 16px 16px 0; overflow: auto; transform: translateX(-105%); transition: transform .22s; }
  .mk-side.open { transform: none; box-shadow: 20px 0 60px #000b; }
  .mk-filters { display: inline-block; }
  .mk-hero { min-height: 210px; background: linear-gradient(90deg, #0d0918 0%, #0d0918cc 45%, #0d091800 80%), url("/assets/market/banner.webp") 72% center/cover no-repeat; }
  .mk-hero-text { padding: 22px 20px; }
  .mk-hero .q { left: 20px; top: 22px; width: 42px; }
  .mk-hero .kick { margin-left: 58px; font-size: 10.5px; letter-spacing: .3em; }
  .mk-hero h1 { font-size: 40px; margin-top: 18px; }
  .mk-hero .sub { font-size: 10px; letter-spacing: .22em; }
  .mk-bar { flex-wrap: wrap; }
  .mk-tabs { width: 100%; }
  .mk-tabs button { flex: 1; justify-content: center; padding: 10px 8px; font-size: 14.5px; }
  .mk-sort { margin-left: auto; height: 42px; }
  .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mk-title { font-size: 20px; }
}

/* inside the phone apps the page runs under the status bar: keep the header below it */
.mk-top { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
@media (max-width: 760px) { .mk-top { padding-top: calc(10px + env(safe-area-inset-top, 0px)); } }
