@font-face {
  font-family: "Onest";
  src: url("assets/fonts/onest-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0b0f;
  --panel: #12141b;
  --panel-soft: #161923;
  --panel-raised: #1b1f2b;
  --border: #242938;
  --border-soft: #1d2130;
  --text: #e7e9ef;
  --muted: #9aa1b3;
  --dim: #788196;
  --blue: #4da3ff;
  --green: #33d17a;
  --red: #ff5468;
  --purple: #7c5cff;
  --pink: #ff5db1;
  --sidebar-width: 220px;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --sans: "Onest", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--blue);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sidebar-backdrop {
  position: fixed;
  z-index: 19;
  inset: 0;
  background: rgba(5, 6, 9, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.mono {
  font-family: var(--mono);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  min-height: 100vh;
  flex-direction: column;
  padding: 20px 0;
  border-right: 1px solid var(--border-soft);
  background: rgba(18, 20, 27, 0.6);
  transition: transform 220ms ease;
}

.sidebar-close {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px 24px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.45px;
  white-space: nowrap;
}

.nav-groups {
  display: flex;
  flex-direction: column;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.nav-link {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.nav-link:active {
  transform: scale(0.985);
}

.nav-link.active {
  color: var(--blue);
  background: rgba(77, 163, 255, 0.12);
}

.nav-separator {
  position: relative;
  height: 33px;
  margin: 0 24px;
}

.nav-separator::after {
  position: absolute;
  top: 16px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--border-soft);
  content: "";
}

.sidebar-bottom {
  margin-top: auto;
}

.mobile-preferences {
  display: none;
}

.collapse-button {
  position: absolute;
  top: 447.5px;
  right: -12px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-raised);
  cursor: pointer;
  transition: transform 220ms ease, background 160ms ease;
}

.collapse-button:hover {
  background: #242938;
}

.sidebar.collapsed {
  width: 76px;
}

.sidebar.collapsed .brand,
.sidebar.collapsed .nav-link {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.sidebar.collapsed .brand span,
.sidebar.collapsed .nav-link span {
  display: none;
}

.sidebar.collapsed .nav-separator {
  margin-inline: 18px;
}

.sidebar.collapsed .collapse-button img {
  transform: rotate(180deg);
}

.app-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  transition: none;
}

.sidebar.collapsed + .app-shell {
  margin-left: 76px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  width: 100%;
  height: 64px;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(18, 20, 27, 0.4);
  backdrop-filter: blur(16px);
}

.search-box {
  display: flex;
  min-width: 0;
  width: min(50%, 576px);
  height: 40px;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  margin-left: min(2.3vw, 28px);
  padding: 0 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--dim);
  cursor: text;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
  border-color: rgba(77, 163, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}

.search-box input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.search-box input::placeholder {
  color: var(--dim);
  opacity: 1;
}

.search-box kbd {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-raised);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button,
.select-button,
.login-button,
.text-link,
.view-all {
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button::after,
.select-button::after,
.text-link::after,
.view-all::after {
  position: absolute;
  inset: -7px;
  content: "";
}

.icon-button {
  padding: 0;
}

.select-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: var(--muted);
  line-height: 20px;
}

.currency-picker {
  position: relative;
}

.currency-fixed:disabled {
  cursor: default;
  opacity: 1;
}

.currency-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 12px);
  right: -8px;
  width: 174px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #171a23;
  box-shadow: none;
}

.currency-menu[hidden] {
  display: none;
}

.currency-menu button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.currency-menu button:hover,
.currency-menu button[aria-checked="true"] {
  background: rgba(77, 163, 255, 0.12);
  color: var(--text);
}

.currency-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.currency-menu button span {
  width: 18px;
  color: var(--blue);
  font-family: var(--mono);
  text-align: center;
}

.currency-menu small {
  display: block;
  padding: 7px 10px 3px;
  color: var(--dim);
  font-size: 12px;
}

.login-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--blue);
  color: var(--bg);
  font-weight: 600;
  line-height: 20px;
  transition: filter 160ms ease, transform 160ms ease;
}

.login-button:hover,
.steam-button:hover {
  filter: brightness(1.08);
}

.login-button:active,
.steam-button:active {
  transform: translateY(1px);
}

.mobile-menu {
  display: none;
}

.main-content {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding: 24px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}

.category-card {
  position: relative;
  display: flex;
  height: 86px;
  align-items: center;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(144deg, var(--cat-bg), #141016);
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
  transition: border-color 160ms ease, transform 160ms ease, filter 160ms ease;
}

.category-card:hover,
.category-card.active {
  border-color: color-mix(in srgb, var(--cat-glow) 52%, var(--border));
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.category-card span {
  position: relative;
  z-index: 1;
  display: block;
}

.category-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16.5px;
  letter-spacing: 0.55px;
}

.category-name {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.category-glow {
  position: absolute;
  right: -1px;
  bottom: 3px;
  width: 66px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--cat-glow), transparent 68%);
  opacity: 0.85;
  filter: blur(1px);
}

.market-layout {
  display: grid;
  grid-template-columns: minmax(0, 897fr) minmax(320px, 360fr);
  gap: 24px;
  margin-top: 24px;
}

.storefront {
  min-width: 0;
}

.section-heading {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
}

.section-heading h2,
.live-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: -0.2px;
}

.view-all {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: var(--muted);
  line-height: 20px;
  transition: color 160ms ease;
}

.view-all:hover {
  color: var(--text);
}

.view-all:disabled {
  cursor: wait;
  opacity: 0.55;
}

.catalog-state {
  min-height: 18px;
  margin-top: 7px;
  color: var(--dim);
  font-size: 11px;
  line-height: 16px;
}

.catalog-state:empty {
  display: none;
}

.catalog-state--loading {
  color: var(--muted);
}

.catalog-state--success {
  color: #70809a;
}

.catalog-state--warning {
  color: #d2a94f;
}

.catalog-state--error {
  color: var(--red);
}

.market-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

.filter-field,
.price-filter {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  border: 0;
  margin: 0;
  padding: 0;
}

.filter-field > span,
.price-filter legend {
  padding: 0;
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-field--sort {
  min-width: 165px;
  flex: 1 1 170px;
}

.filter-field select,
.price-filter input {
  height: 38px;
  border: 1px solid #282e3d;
  border-radius: 8px;
  outline: 0;
  background: #11141c;
  color: var(--text);
  font: inherit;
}

.filter-field select {
  width: 100%;
  padding: 0 34px 0 11px;
  cursor: pointer;
}

.price-filter {
  display: grid;
  grid-template-columns: minmax(78px, 1fr) auto minmax(78px, 1fr);
  align-items: center;
  flex: 1 1 180px;
}

.price-filter legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
}

.price-filter input {
  width: 100%;
  padding: 0 10px;
  appearance: textfield;
}

.price-filter input::-webkit-inner-spin-button,
.price-filter input::-webkit-outer-spin-button {
  appearance: none;
}

.price-filter i {
  color: var(--dim);
  font-style: normal;
}

.filter-field select:focus-visible,
.price-filter input:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.12);
}

.filter-check {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 1px solid #282e3d;
  border-radius: 8px;
  background: #11141c;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.filter-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}

.filter-apply,
.filter-reset {
  height: 38px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.filter-apply {
  border: 1px solid color-mix(in srgb, var(--blue) 82%, white);
  background: var(--blue);
  color: #07101d;
  cursor: pointer;
}

.filter-reset {
  border: 1px solid #282e3d;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter-apply:hover,
.filter-reset:hover {
  filter: brightness(1.1);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.product-card {
  position: relative;
  display: flex;
  height: 210px;
  min-width: 0;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  z-index: 1;
  border-color: #35405a;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.23);
  transform: translateY(-3px);
}

.product-card:focus-visible {
  z-index: 1;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.12);
}

.product-card--skeleton {
  cursor: progress;
  pointer-events: none;
}

.product-card--skeleton .skin-visual,
.product-card--skeleton > span {
  overflow: hidden;
  background: linear-gradient(100deg, #151821 30%, #202532 50%, #151821 70%);
  background-size: 220% 100%;
  animation: catalog-skeleton 1.35s ease-in-out infinite;
  animation-delay: var(--skeleton-delay, 0ms);
}

.product-card--skeleton .skin-visual::before,
.product-card--skeleton .skin-visual::after {
  display: none;
}

.product-card--skeleton > span {
  width: 72%;
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
}

.product-card--skeleton > span:nth-of-type(2) {
  width: 88%;
  margin-top: 8px;
}

.product-card--skeleton > span:nth-of-type(3) {
  width: 45%;
  height: 14px;
  margin-top: 9px;
}

@keyframes catalog-skeleton {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.skin-visual {
  position: relative;
  height: 108px;
  overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(circle at 26% 20%, color-mix(in srgb, var(--glow-a, var(--skin-a)) 70%, transparent), transparent 54%),
    radial-gradient(circle at 82% 92%, color-mix(in srgb, var(--glow-b, var(--skin-c)) 70%, transparent), transparent 52%),
    #10121a;
}

.skin-visual::before {
  position: absolute;
  top: 31px;
  right: 16px;
  left: 16px;
  height: 45px;
  border-radius: 3px;
  background: linear-gradient(139deg, var(--skin-a), var(--skin-b) 46%, var(--skin-c));
  content: "";
  opacity: 0.9;
}

.skin-visual::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 6px;
  border-radius: 999px;
  background: var(--rarity);
  z-index: 3;
  content: "";
}

.skin-image {
  position: absolute;
  z-index: 1;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.38));
}

.skin-visual.has-image::before {
  opacity: 0.12;
}

.skin-count,
.skin-sale {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16.5px;
}

.skin-discount {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(54, 211, 153, 0.92);
  color: #07110d;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.skin-count {
  right: 12px;
  background: rgba(10, 11, 15, 0.7);
  color: var(--muted);
}

.skin-sale {
  top: 8px;
  left: 12px;
  background: var(--green);
  color: var(--bg);
  font-weight: 700;
}

.skin-meta {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.skin-meta span {
  color: var(--muted);
  font-weight: 400;
}

.skin-name {
  height: 20px;
  overflow: hidden;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-price {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.product-card[hidden] {
  display: none;
}

.no-results {
  grid-column: 1 / -1;
  display: none;
  min-height: 210px;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.no-results.visible {
  display: grid;
}

.no-results p {
  margin: 0 0 12px;
}

.catalog-error {
  border-color: rgba(255, 84, 104, 0.28);
}

.reset-filters {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--text);
  cursor: pointer;
}

.bottom-promo {
  height: 180px;
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.bottom-promo .promo-copy {
  position: absolute;
  top: 15px;
  right: 16px;
  width: 260px;
}

.trust-footer {
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(18, 20, 27, 0.56);
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.trust-points span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.trust-footer p {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 17px;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  padding: 11px 14px;
  border: 1px solid #35405a;
  border-radius: 10px;
  background: #171b25;
  color: var(--text);
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

html.modal-open,
html.modal-open body {
  overflow: hidden;
}

.login-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  text-align: center;
  box-shadow: none;
}

.login-dialog::backdrop {
  background: rgba(5, 6, 9, 0.76);
  backdrop-filter: blur(6px);
}

.login-dialog > img {
  margin: 0 auto;
}

.login-dialog h2 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.login-dialog p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 21px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 14px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  cursor: pointer;
}

.dialog-close::after {
  position: absolute;
  inset: -6px;
  content: "";
}

.steam-button {
  width: 100%;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: var(--bg);
  font-weight: 700;
  cursor: pointer;
}

.steam-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.product-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
}

.product-dialog[open] {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(380px, 1.18fr);
  gap: 24px;
}

.product-dialog::backdrop {
  background: rgba(5, 6, 9, 0.78);
  backdrop-filter: blur(7px);
}

.product-dialog > .dialog-close {
  z-index: 2;
}

.product-dialog-visual {
  height: 292px;
  border-radius: 12px;
}

.product-dialog-visual .skin-image {
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
}

.product-dialog-visual::before {
  top: 104px;
  right: 26px;
  left: 26px;
  height: 82px;
}

.product-dialog-visual::after {
  width: 54px;
  height: 7px;
}

.product-dialog-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px 24px 16px 0;
}

.product-dialog-copy h2 {
  margin: 8px 0 6px;
  font-size: 26px;
  line-height: 32px;
}

.product-dialog-copy > p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.product-dialog-copy .product-dialog-details {
  min-height: 16px;
  margin-top: 8px;
  color: #7d879b;
  font-family: var(--font);
  line-height: 17px;
}

.product-dialog-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 10px 12px;
  border: 1px solid rgba(77, 163, 255, 0.2);
  border-radius: 8px;
  background: rgba(77, 163, 255, 0.07);
  color: var(--muted);
  font-size: 12px;
}

.product-stats,
.price-history-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.product-stats > div,
.price-history-metrics > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #252b39;
  border-radius: 8px;
  background: #11141c;
}

.product-stats span,
.price-history-metrics span {
  overflow: hidden;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.product-stats strong,
.price-history-metrics strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 650;
}

.price-history {
  margin-top: 14px;
}

.price-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-history-head h3 {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}

.price-history-head span {
  color: var(--dim);
  font-size: 12px;
}

.price-history-chart {
  display: grid;
  height: 126px;
  place-items: center;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid #252b39;
  border-radius: 9px;
  background:
    linear-gradient(rgba(61, 72, 96, 0.13) 1px, transparent 1px) 0 0 / 100% 33.33%,
    #0f1219;
}

.price-history-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.history-empty {
  padding: 16px;
  color: var(--dim);
  font-size: 13px;
  text-align: center;
}

.history-loading {
  width: 58%;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  animation: history-loading 1s ease-in-out infinite alternate;
}

@keyframes history-loading {
  from { opacity: 0.3; transform: scaleX(0.45); }
  to { opacity: 1; transform: scaleX(1); }
}

.price-history-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.price-history-metrics > div {
  padding: 7px 8px;
}

.product-dialog-price {
  margin: 20px 0 12px;
  font-size: 28px;
  line-height: 34px;
}

.product-dialog-copy > small {
  margin-top: 10px;
  color: var(--dim);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

@media (max-width: 1280px) {
  .hero-grid {
    grid-template-columns: 2fr 1.2fr 1fr;
  }

  .instant-card {
    display: none;
  }

  .category-strip {
    overflow-x: auto;
    grid-template-columns: repeat(6, minmax(176px, 1fr));
    padding-bottom: 4px;
  }

  .market-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .live-row {
    grid-template-columns: 32px 36px 14px minmax(0, 1fr) 72px;
  }

  .live-time {
    display: none;
  }
}

@media (max-width: 1180px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  html.menu-open-root,
  html.menu-open-root body,
  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    width: min(300px, calc(100vw - 48px));
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background: #11131a;
    box-shadow: 18px 0 55px rgba(0, 0, 0, 0.4);
    transform: translateX(-110%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 26px;
    cursor: pointer;
  }

  .collapse-button {
    display: none;
  }

  .mobile-preferences {
    display: grid;
    gap: 12px;
    margin: 0 0 10px;
    padding: 14px 12px;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
  }

  .mobile-preferences > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-preferences > div > span {
    color: var(--muted);
    font-size: 12px;
  }

  .preference-options {
    display: flex;
    gap: 4px;
  }

  .preference-options button {
    min-width: 38px;
    min-height: 32px;
    padding: 5px 7px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--panel);
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
  }

  .preference-options button[aria-pressed="true"] {
    border-color: rgba(77, 163, 255, 0.5);
    background: rgba(77, 163, 255, 0.12);
    color: var(--blue);
  }

  .app-shell,
  .sidebar.collapsed + .app-shell {
    margin-left: 0;
  }

  .mobile-menu {
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .mobile-menu span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--muted);
  }

  .nav-link {
    min-height: 44px;
  }

  .search-box {
    width: min(55%, 576px);
    margin-left: 0;
  }

  .market-layout {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .live-panel {
    min-height: auto;
  }

  .support-fab {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar {
    height: 60px;
    padding: 0 14px;
  }

  .search-box {
    width: auto;
    min-width: 0;
    flex: 1;
  }

    .search-box kbd,
    .icon-button,
    .select-button,
    .currency-picker {
      display: none;
    }

  .login-button {
    min-height: 44px;
    padding: 8px 11px;
  }

  .login-button img {
    display: none;
  }

  .main-content {
    padding: 16px 14px 28px;
  }

  .hero-grid {
    height: auto;
    grid-template-columns: 1fr;
  }

  .trade-promo,
  .compare-card,
  .marketcap-card {
    height: 168px;
  }

  .trade-promo .promo-copy {
    width: 70%;
  }

  .trade-promo h1,
  .bottom-promo h2 {
    font-size: 26px;
  }

  .marketcap-card,
  .instant-card {
    display: none;
  }

  .recent-label {
    flex-basis: 118px;
    padding-inline: 12px;
    font-size: 11px;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .live-row {
    grid-template-columns: 32px 36px 14px minmax(0, 1fr) 74px;
  }

  .bottom-promo {
    height: 160px;
  }

  .trust-points {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-dialog[open] {
    max-height: calc(100dvh - 24px);
    grid-template-columns: 1fr;
    gap: 14px;
    overflow-y: auto;
  }

  .product-dialog-visual {
    height: 190px;
  }

  .product-dialog-visual::before {
    top: 68px;
    height: 58px;
  }

  .product-dialog-copy {
    padding: 0 4px 4px;
  }

  .product-dialog-copy h2 {
    font-size: 22px;
    line-height: 28px;
  }

  .product-dialog-note {
    margin-top: 14px;
  }

  .product-dialog-price {
    margin: 14px 0 10px;
    font-size: 24px;
  }

  .price-history-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .category-strip {
    grid-template-columns: repeat(6, minmax(156px, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-toolbar {
    align-items: stretch;
  }

  .filter-field--sort,
  .price-filter,
  .filter-check {
    flex-basis: 100%;
  }

  .filter-apply,
  .filter-reset {
    flex: 1 1 120px;
  }
}

@media (max-width: 430px) {
  .product-grid {
    gap: 10px;
  }

  .product-card {
    height: 204px;
    padding: 10px;
  }

  .skin-visual {
    height: 104px;
  }

  .skin-count {
    top: 10px;
    right: 10px;
  }

  .skin-sale {
    left: 10px;
  }

  .live-header {
    align-items: flex-start;
    gap: 12px;
  }

  .live-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Trade Side marketplace refinement */
:root {
  --bg: #0b0d12;
  --panel: #12151c;
  --panel-soft: #161a23;
  --panel-raised: #1b202b;
  --border: #29303e;
  --border-soft: #202632;
  --text: #eef1f6;
  --muted: #a6adbb;
  --dim: #858fa2;
  --blue: #5c9cf5;
  --sidebar-width: 204px;
}

::selection {
  background: rgba(92, 156, 245, 0.34);
  color: var(--text);
}

* {
  scrollbar-color: #394256 #0b0d12;
  scrollbar-width: thin;
}

input,
select {
  caret-color: var(--blue);
}

.sidebar {
  padding-top: 16px;
  background: #0e1117;
}

.brand {
  height: 56px;
  padding: 0 20px 20px;
  letter-spacing: -0.02em;
}

.nav-groups {
  margin-top: 8px;
}

.nav-link {
  border-radius: 9px;
}

.sidebar-note {
  margin: 0 24px 6px;
  color: var(--dim);
  font-size: 11px;
  line-height: 16px;
}

.sidebar.collapsed .sidebar-note {
  display: none;
}

.collapse-button {
  top: 296px;
}

.topbar {
  padding-inline: max(24px, calc((100vw - var(--sidebar-width) - 1600px) / 2 + 24px));
  background: rgba(14, 17, 23, 0.9);
  backdrop-filter: blur(12px);
}

.sidebar.collapsed + .app-shell .topbar {
  padding-inline: max(24px, calc((100vw - 76px - 1600px) / 2 + 24px));
}

.search-box {
  width: min(calc(100% - 420px), 820px);
  margin-left: 0;
  background: #11151d;
}

.login-button {
  max-width: 220px;
  white-space: nowrap;
}

.login-button.is-signed-in {
  padding: 6px 11px 6px 7px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
}

.login-avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
}

.login-avatar[hidden],
.profile-avatar[hidden] {
  display: none;
}

.login-button.is-signed-in #loginLabel {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-content {
  padding-top: 0;
}

.market-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 168px;
  margin-top: 20px;
  padding: 28px 32px;
  overflow: hidden;
  border: 1px solid #27303d;
  border-radius: 12px;
  background: #080c12;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
}

.market-intro::before {
  position: absolute;
  z-index: 0;
  inset: -6px;
  background: url("assets/images/hero-surface-v2.jpg") center 54% / cover no-repeat;
  content: "";
  filter: blur(2px) saturate(.78) brightness(.74);
  transform: scale(1.025);
}

.market-intro::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(5 8 12 / 92%) 0%, rgb(5 8 12 / 76%) 32%, rgb(7 10 15 / 30%) 68%, rgb(5 8 12 / 72%) 100%),
    linear-gradient(180deg, rgb(139 183 241 / 5%), transparent 38%, rgb(0 0 0 / 26%));
  content: "";
  pointer-events: none;
}

.market-intro-copy {
  position: relative;
  z-index: 3;
  align-self: center;
  max-width: 480px;
}

.market-intro-copy h1 {
  margin: 0;
  color: #f4f7fb;
  font-size: clamp(36px, 3.2vw, 52px);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.035em;
  text-shadow: 0 8px 24px rgb(0 0 0 / 44%);
}

.market-intro-copy p {
  margin: 12px 0 0;
  color: #b6c4d8;
  font-size: 15px;
  font-weight: 550;
  line-height: 22px;
  letter-spacing: .005em;
}

.market-intro-art {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.market-intro-item {
  position: absolute;
  object-fit: contain;
  opacity: .72;
  filter: blur(.35px) saturate(.8) brightness(.76) contrast(1.08) drop-shadow(0 18px 24px rgb(0 0 0 / 48%));
}

.market-intro-item--knife {
  top: -66px;
  left: 1%;
  width: 292px;
  transform: rotate(-7deg);
}

.market-intro-item--rifle {
  top: -100px;
  left: 31%;
  width: 430px;
  opacity: .78;
}

.market-intro-item--gloves {
  top: -56px;
  right: 3%;
  width: 270px;
  transform: rotate(3deg);
}

.market-ticker {
  display: flex;
  height: 48px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: #0f1218;
}

.ticker-label {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 126px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-right: 1px solid var(--border);
  background: #0f1218;
  color: #aeb7c7;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ticker-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.ticker-window {
  position: relative;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  height: 46px;
  animation: trades-ticker 42s linear infinite;
  will-change: transform;
}

.market-ticker.is-locked .ticker-track {
  opacity: .38;
  filter: blur(5px) saturate(.7);
}

.ticker-lock {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 18px;
  background: linear-gradient(90deg, rgb(15 18 24 / 45%), rgb(15 18 24 / 82%) 36%, rgb(15 18 24 / 82%) 64%, rgb(15 18 24 / 45%));
  text-align: center;
  pointer-events: none;
}

.ticker-lock strong {
  color: #eef3fa;
  font-size: 13px;
  font-weight: 700;
}

.market-ticker:not(.is-locked) .ticker-lock {
  display: none;
}

.ticker-sequence {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 28px;
  padding: 0 28px 0 0;
}

.ticker-item {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.ticker-user,
.ticker-time {
  color: var(--dim);
}

.ticker-action {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(51, 209, 122, .12);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.ticker-name {
  max-width: 230px;
  overflow: hidden;
  color: #dbe0e9;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.ticker-price {
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.ticker-time,
.ticker-placeholder {
  font-size: 11px;
}

.mini-skin {
  position: relative;
  display: block;
  width: 42px;
  height: 30px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 5px;
  background: #151923;
}

.mini-skin::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--glow-a), var(--glow-b));
  content: "";
}

.mini-skin-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes trades-ticker {
  to { transform: translate3d(-50%, 0, 0); }
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #0d1117;
}

.category-card {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 88px;
  padding: 0 12px;
  overflow: hidden;
  border-color: rgb(255 255 255 / 7%);
  border-radius: 9px;
  background: rgb(9 12 18 / 58%);
  color: #cbd3df;
  text-align: left;
  isolation: isolate;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 220ms ease,
    color 180ms ease,
    transform 220ms cubic-bezier(.16, 1, .3, 1);
}

.category-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgb(8 11 17 / 92%) 0%, rgb(8 11 17 / 62%) 46%, rgb(8 11 17 / 20%) 100%);
  content: "";
}

.category-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 84% 50%, rgb(92 156 245 / 34%), transparent 56%);
  content: "";
  opacity: 0;
  transform: translateX(16%);
  transition: opacity 220ms ease, transform 320ms cubic-bezier(.16, 1, .3, 1);
}

.category-product {
  position: absolute;
  z-index: -2;
  top: 50%;
  right: -8px;
  width: 78%;
  height: 92%;
  object-fit: contain;
  opacity: .58;
  filter: saturate(.72) brightness(.72) contrast(1.05);
  transform: translate3d(5px, -50%, 0) scale(.98);
  transition: opacity 180ms ease, filter 180ms ease, transform 320ms cubic-bezier(.16, 1, .3, 1);
}

.category-card[data-category="agent"] .category-product {
  top: 55%;
  right: -5px;
  width: 66%;
  height: 122%;
  object-position: center bottom;
  opacity: .7;
  transform: translate3d(0, -50%, 0) scale(.94);
}

.category-card:hover,
.category-card[aria-pressed="true"] {
  border-color: rgb(138 185 251 / 46%);
  background: rgb(14 20 30 / 70%);
  color: #f0f4fa;
  box-shadow: 0 14px 28px rgb(0 0 0 / 34%), inset 0 1px 0 rgb(255 255 255 / 11%);
  transform: translateY(-2px);
}

.category-card[aria-pressed="true"] {
  border-color: rgba(92, 156, 245, 0.58);
  color: #8ab9fb;
  box-shadow: 0 12px 24px rgb(0 0 0 / 30%), inset 0 1px 0 rgb(255 255 255 / 13%);
  animation: category-select 420ms cubic-bezier(.16, 1, .3, 1);
}

.category-card:hover::after,
.category-card:focus-visible::after,
.category-card[aria-pressed="true"]::after {
  opacity: .82;
  transform: translateX(0);
}

.category-card:hover .category-product,
.category-card:focus-visible .category-product,
.category-card[aria-pressed="true"] .category-product {
  opacity: .84;
  filter: saturate(.98) brightness(.9) contrast(1.05) drop-shadow(0 9px 15px rgb(55 128 224 / 28%));
  transform: translate3d(-3px, -52%, 0) scale(1.07);
}

.category-card[data-category="agent"]:hover .category-product,
.category-card[data-category="agent"]:focus-visible .category-product,
.category-card[data-category="agent"][aria-pressed="true"] .category-product {
  opacity: .88;
  transform: translate3d(-3px, -51%, 0) scale(1.02);
}

.category-card:focus-visible {
  border-color: #8ab9fb;
  outline: 2px solid rgb(92 156 245 / 42%);
  outline-offset: 2px;
  box-shadow: 0 14px 28px rgb(0 0 0 / 34%), inset 0 1px 0 rgb(255 255 255 / 11%);
  transform: translateY(-2px);
}

.category-card:active {
  transform: translateY(0) scale(.99);
}

.category-name {
  position: relative;
  z-index: 1;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

@keyframes category-select {
  from {
    box-shadow: 0 5px 12px rgb(0 0 0 / 14%), inset 0 0 0 rgb(255 255 255 / 0%);
  }
  55% {
    box-shadow: 0 17px 34px rgb(0 0 0 / 42%), inset 0 1px 0 rgb(255 255 255 / 20%);
  }
  to {
    box-shadow: 0 12px 24px rgb(0 0 0 / 30%), inset 0 1px 0 rgb(255 255 255 / 13%);
  }
}

.market-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  margin-top: 24px;
}

.live-panel {
  position: sticky;
  top: 82px;
  isolation: isolate;
  align-self: start;
  max-height: calc(100vh - 102px);
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #10131a;
}

.live-content {
  transition: opacity 180ms ease, filter 220ms ease;
}

.live-panel.is-locked .live-content {
  opacity: .34;
  filter: blur(5px) saturate(.65);
  user-select: none;
}

.live-lock {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: linear-gradient(180deg, rgb(16 19 26 / 34%), rgb(16 19 26 / 82%) 44%, rgb(16 19 26 / 42%));
  color: #f0f4fa;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.live-panel:not(.is-locked) .live-lock {
  display: none;
}

.live-header,
.live-title {
  display: flex;
  align-items: center;
}

.live-header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.live-title {
  gap: 8px;
}

.live-header h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 84, 104, .12);
  color: #ff7383;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6474;
}

.view-all.compact {
  flex: 0 0 auto;
  font-size: 12px;
}

.live-list {
  max-height: calc(100vh - 160px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.live-row {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 34px 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 3px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .035);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease;
}

.live-row:hover,
.live-row.is-new {
  background: rgba(92, 156, 245, .055);
}

.avatar {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--avatar-a), var(--avatar-b));
  color: #fff;
  font-size: 9px;
  font-style: normal;
}

.avatar i {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border: 2px solid #10131a;
  border-radius: 50%;
  background: var(--green);
}

.live-copy {
  min-width: 0;
}

.live-copy strong,
.live-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-copy strong {
  font-size: 12px;
}

.live-copy small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 11px;
}

.live-copy small i {
  color: var(--green);
  font-style: normal;
  font-weight: 700;
}

.live-price {
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.live-time {
  display: none;
}

.live-empty {
  padding: 44px 12px;
  color: var(--dim);
  text-align: center;
}

.section-heading {
  height: 34px;
}

.section-heading h2 {
  font-size: 22px;
  line-height: 30px;
  letter-spacing: -0.025em;
}

.market-toolbar {
  margin-top: 12px;
  gap: 12px;
  padding: 14px;
  border-color: #313a4b;
  border-radius: 10px;
  background: linear-gradient(180deg, #151a23, #11151c);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
}

.filter-field,
.price-filter {
  gap: 7px;
}

.filter-field > span,
.price-filter legend {
  color: #aab4c5;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .035em;
}

.filter-field select,
.price-filter input,
.filter-check {
  height: 42px;
  border-color: #3a4558;
  background: #171c25;
  color: #e6ebf3;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.filter-field select:hover,
.price-filter input:hover,
.filter-check:hover {
  border-color: #52617a;
  background: #1a202b;
}

.price-filter input::placeholder {
  color: #8d98aa;
  opacity: 1;
}

.filter-check {
  min-height: 42px;
  padding-inline: 12px;
  color: #d0d7e2;
  font-size: 13px;
}

.filter-check input {
  width: 16px;
  height: 16px;
}

.filter-apply,
.filter-reset {
  height: 42px;
  padding-inline: 14px;
  font-size: 13px;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.filter-apply {
  border-color: #77affb;
  background: #64a2f7;
  color: #07101d;
}

.filter-reset {
  border-color: #3a4558;
  background: #171c25;
  color: #c2cbd9;
}

.filter-reset:hover {
  border-color: #52617a;
  background: #1c2330;
  color: #eef2f8;
}

.filter-apply:active,
.filter-reset:active {
  transform: translateY(1px);
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}

.product-card {
  height: 216px;
  padding: 10px;
  border-radius: 10px;
  box-shadow: none;
}

.product-card:hover {
  border-color: #3a465b;
  box-shadow: 0 10px 24px rgba(2, 5, 10, 0.26);
  transform: translateY(-1px);
}

.skin-visual {
  height: 114px;
}

.skin-meta {
  margin-top: 10px;
  color: #c3cad6;
  font-size: 11px;
}

.skin-name {
  font-size: 13px;
}

.skin-price {
  margin-top: auto;
  font-size: 15px;
}

.catalog-state {
  min-height: 20px;
  margin-top: 9px;
  font-size: 12px;
}

.catalog-state--success {
  color: var(--dim);
}

.trust-footer {
  margin-top: 30px;
  border-radius: 10px;
  background: #0f1218;
}

.auth-privacy {
  display: block;
  margin-top: 13px;
  color: var(--dim);
  font-size: 11px;
  line-height: 17px;
}

.product-context {
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.profile-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #10131a;
  color: var(--text);
  text-align: left;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.profile-shell {
  max-height: min(760px, calc(100dvh - 32px));
  overflow-y: auto;
  border-radius: 15px;
  scrollbar-color: #394156 transparent;
  scrollbar-width: thin;
}

.profile-dialog::backdrop {
  background: rgba(3, 5, 9, 0.82);
  backdrop-filter: blur(7px);
}

.profile-dialog > .dialog-close {
  z-index: 2;
  top: 14px;
  right: 16px;
}

.profile-dialog [hidden] {
  display: none !important;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 56px 26px 28px;
  border-bottom: 1px solid var(--border-soft);
  background: #131720;
}

.profile-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.profile-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.profile-avatar,
.profile-avatar-fallback {
  width: 76px;
  height: 76px;
  border-radius: 14px;
}

.profile-avatar {
  object-fit: cover;
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  border: 1px solid #2d3b50;
  background: #1b2432;
  color: #9bc7ff;
  font-weight: 800;
}

.profile-online {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border: 3px solid #131720;
  border-radius: 50%;
  background: var(--green);
}

.profile-identity-copy {
  min-width: 0;
}

.profile-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-dialog h2,
.profile-dialog h3,
.profile-dialog h4 {
  margin: 0;
}

.profile-dialog h2 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.profile-connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9aa5b8;
  font-size: 11px;
  font-weight: 600;
}

.profile-connection i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.profile-name {
  max-width: 420px;
  margin: 5px 0 0;
  overflow: hidden;
  font-size: 24px;
  font-weight: 760;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-steam-id {
  margin: 4px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
}

.profile-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.profile-action-link,
.profile-refresh,
.profile-orders-state button,
.profile-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.profile-action-link {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 12px;
}

.profile-action-link:hover,
.profile-refresh:hover,
.profile-orders-state button:hover,
.profile-logout:hover {
  border-color: #3a4357;
  background: #1a1e28;
  color: var(--text);
}

.profile-action-link--admin {
  border-color: rgba(77, 163, 255, 0.36);
  color: #8fc5ff;
}

.profile-orders {
  padding: 24px 28px 0;
}

.profile-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.profile-section-head h3 {
  font-size: 17px;
  line-height: 24px;
}

.profile-section-head p {
  margin: 3px 0 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 18px;
}

.profile-refresh {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 11px;
}

.profile-refresh:disabled,
.profile-logout:disabled {
  cursor: wait;
  opacity: 0.65;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 4px;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.profile-summary > div {
  padding: 0 18px;
  border-inline-start: 1px solid var(--border-soft);
}

.profile-summary > div:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.profile-summary dt {
  color: var(--dim);
  font-size: 11px;
}

.profile-summary dd {
  margin: 3px 0 0;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
}

.profile-orders-list {
  max-height: 344px;
  min-height: 190px;
  margin-top: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #394156 transparent;
  scrollbar-width: thin;
}

.profile-order {
  display: grid;
  min-width: 0;
  grid-template-columns: 56px minmax(0, 1fr) auto minmax(142px, auto);
  align-items: center;
  gap: 14px;
  padding: 14px 8px 14px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: background-color 160ms ease;
}

.profile-order:hover {
  background: rgba(255, 255, 255, 0.018);
}

.profile-order-visual {
  position: relative;
  display: grid;
  width: 56px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #252b38;
  border-radius: 10px;
  background: #151a23;
}

.profile-order-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.profile-order-fallback {
  opacity: 0.46;
}

.profile-order-main {
  min-width: 0;
}

.profile-order-main h4 {
  overflow: hidden;
  font-size: 13px;
  font-weight: 680;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-order-main p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-order-price {
  font-size: 12px;
  white-space: nowrap;
}

.profile-order-state {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
}

.profile-order-state time {
  overflow: hidden;
  max-width: 150px;
  color: var(--dim);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-order-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #202530;
  color: #aeb5c3;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-order-badge.is-success {
  background: rgba(51, 209, 122, 0.1);
  color: #5fe096;
}

.profile-order-badge.is-progress {
  background: rgba(77, 163, 255, 0.12);
  color: #8bc3ff;
}

.profile-order-badge.is-warning,
.profile-order-badge.is-pending {
  background: rgba(240, 201, 77, 0.11);
  color: #f0cf6c;
}

.profile-order-badge.is-danger {
  background: rgba(255, 84, 104, 0.1);
  color: #ff7d8c;
}

.profile-orders-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  padding: 28px;
  color: var(--dim);
  text-align: center;
}

.profile-orders-state > img {
  margin-bottom: 10px;
  opacity: 0.56;
}

.profile-orders-state strong {
  color: var(--text);
  font-size: 14px;
}

.profile-orders-state p {
  max-width: 390px;
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 18px;
}

.profile-orders-state button {
  min-height: 34px;
  margin-top: 14px;
  padding: 6px 12px;
  font-size: 11px;
}

.profile-order-skeleton {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 14px;
  padding: 14px 8px 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.profile-order-skeleton i,
.profile-order-skeleton span,
.profile-order-skeleton b {
  display: block;
  border-radius: 8px;
  background: #1b202a;
}

.profile-order-skeleton i {
  width: 56px;
  height: 46px;
}

.profile-order-skeleton span {
  width: min(280px, 78%);
  height: 14px;
}

.profile-order-skeleton b {
  width: 92px;
  height: 22px;
}

.profile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 28px;
  border-top: 1px solid var(--border-soft);
  background: #0e1117;
}

.profile-footer p {
  margin: 0;
  color: var(--dim);
  font-size: 11px;
}

.profile-logout {
  min-height: 34px;
  padding: 6px 12px;
  color: #b5bbc7;
  font-size: 11px;
}

@media (max-width: 680px) {
  .profile-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 13px;
  }

  .profile-shell {
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }

  .profile-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 24px 46px 20px 20px;
  }

  .profile-avatar,
  .profile-avatar-fallback {
    width: 62px;
    height: 62px;
  }

  .profile-name {
    max-width: calc(100vw - 138px);
    font-size: 20px;
    line-height: 26px;
  }

  .profile-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .profile-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .profile-action-link {
    flex: 1 1 auto;
  }

  .profile-orders {
    padding: 20px 20px 0;
  }

  .profile-orders-list {
    max-height: calc(100dvh - 390px);
    min-height: 176px;
  }

  .profile-order {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 0;
  }

  .profile-order-visual {
    width: 48px;
    height: 42px;
  }

  .profile-order-price {
    align-self: start;
    grid-column: 2;
    margin-top: -3px;
  }

  .profile-order-state {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .profile-order-state time {
    display: none;
  }

  .profile-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px 20px 18px;
  }

  .profile-logout {
    min-height: 40px;
  }
}

@media (max-width: 1180px) {
  .market-layout {
    grid-template-columns: 1fr;
  }

  .live-panel {
    position: relative;
    max-height: none;
  }

  .live-list {
    display: grid;
    max-height: 440px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
}

@media (max-width: 820px) {
  .market-intro {
    min-height: 144px;
    margin-top: 16px;
    padding: 24px;
  }

  .market-intro-copy {
    max-width: 320px;
  }

  .market-intro-copy h1 {
    font-size: 38px;
  }

  .market-intro-item--knife {
    left: -7%;
  }

  .market-intro-item--rifle {
    left: 24%;
  }

  .market-intro-item--gloves {
    right: -7%;
  }

  .login-button {
    max-width: 176px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .market-ticker {
    margin-right: -14px;
    border-radius: 8px 0 0 8px;
  }

  .ticker-label {
    flex-basis: 92px;
    padding-inline: 10px;
  }

  .login-button {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  .login-button #loginLabel {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-list {
    grid-template-columns: 1fr;
  }

  .live-panel {
    padding: 13px;
  }
}

@media (max-width: 540px) {
  .market-intro {
    min-height: 130px;
    padding: 20px;
  }

  .market-intro-copy {
    max-width: 230px;
  }

  .market-intro-copy h1 {
    font-size: 32px;
  }

  .market-intro-copy p {
    max-width: 22ch;
    margin-top: 9px;
    font-size: 13px;
    line-height: 18px;
  }

  .market-intro-item--knife {
    top: -88px;
    left: -26%;
    width: 270px;
  }

  .market-intro-item--rifle {
    top: -104px;
    left: 12%;
    width: 360px;
  }

  .market-intro-item--gloves {
    display: none;
  }

  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-right: 0;
    padding: 5px;
  }

  .category-card {
    height: 78px;
  }

}

@media (max-width: 390px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .product-card {
    height: 204px;
    padding: 8px;
  }

  .skin-visual {
    height: 104px;
  }
}

/* Checkout */
.checkout-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #10141d;
  color: var(--text);
  box-shadow: none;
}

.checkout-dialog::backdrop {
  background: rgb(3 5 9 / 78%);
  backdrop-filter: blur(6px);
}

.checkout-dialog > .dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.checkout-head {
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--border);
}

.checkout-head h2 {
  margin: 7px 42px 9px 0;
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -.035em;
}

.checkout-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.checkout-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  padding: 24px 30px 30px;
}

.checkout-form label {
  display: grid;
  gap: 8px;
  color: #b8c1d1;
  font-size: 12px;
  font-weight: 600;
}

.checkout-form input,
.checkout-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  outline: none;
  background: #0b0e14;
  color: var(--text);
}

.checkout-form input:focus,
.checkout-form select:focus {
  border-color: #537cff;
  box-shadow: 0 0 0 3px rgb(83 124 255 / 15%);
}

.checkout-trade-field,
.checkout-total,
.checkout-status,
.checkout-form > .steam-button {
  grid-column: 1 / -1;
}

.checkout-form label small {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.checkout-total strong {
  color: var(--text);
  font-size: 22px;
}

.checkout-status {
  min-height: 20px;
  margin: -4px 0 0;
  color: #f2bd5b;
  font-size: 12px;
  line-height: 1.45;
}

.checkout-form > .steam-button {
  width: 100%;
  min-height: 46px;
}

.checkout-form > .steam-button:disabled,
.product-dialog-copy > .steam-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 620px) {
  .checkout-head {
    padding: 24px 20px 18px;
  }

  .checkout-form {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .checkout-trade-field,
  .checkout-total,
  .checkout-status,
  .checkout-form > .steam-button {
    grid-column: 1;
  }
}
