/*
  Темы: html[data-theme="dark|light"].
  Новые цвета — только через токены ниже. Не хардкодить #hex в компонентах.
*/
:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #09090b;
  --canvas-bg: #070707;
  --demon-red: #dc1c1c;
  --demon-red-hot: #ff2a2a;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #a1a1aa;
  --text-bright: #f4f4f5;
  --text-soft: #f4f4f5;
  --text-dim: #a1a1aa;
  --nav-muted: #a1a1aa;
  --banner: #fca5a5;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.1);
  --surface: #111114;
  --surface-2: #141417;
  --surface-3: #1b1b20;
  --surface-glass: rgba(17, 17, 20, 0.94);
  --control-bg: #0c0c0f;
  --control-bg-soft: rgba(0, 0, 0, 0.34);
  --panel-inset: rgba(0, 0, 0, 0.28);
  --hover: rgba(255, 255, 255, 0.03);
  --hover-strong: rgba(255, 255, 255, 0.05);
  --row-stripe: rgba(255, 255, 255, 0.014);
  --row-hover: rgba(255, 255, 255, 0.028);
  --topbar-bg: rgba(9, 9, 11, 0.96);
  --thead-bg: rgba(12, 12, 15, 0.97);
  --pop-bg: #121215;
  --scrollbar-track: #0a0a0a;
  --scrollbar-thumb: #333333;
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
  --accent-soft: rgba(220, 28, 28, 0.14);
  --accent-mid: rgba(220, 28, 28, 0.22);
  --accent-border: rgba(220, 28, 28, 0.45);
  --danger: #ff6875;
  --good: #39e6a0;
  --on-accent: #ffffff;
  --field-opacity: 1;
  --font-display: "Syne", sans-serif;
  --font-body: "Inter", sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --control-h: 2.25rem;
  --ease: 150ms ease;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --page-max: 1400px;
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #f4f4f5;
  --canvas-bg: #ececef;
  --demon-red: #dc1c1c;
  --demon-red-hot: #e11d1d;
  --fg: #09090b;
  --muted: #3f3f46;
  --faint: #52525b;
  --text-bright: #09090b;
  --text-soft: #27272a;
  --text-dim: #52525b;
  --nav-muted: rgba(24, 24, 27, 0.78);
  --banner: #b91c1c;
  --line: rgba(24, 24, 27, 0.08);
  --line-strong: rgba(24, 24, 27, 0.14);
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e4e4e7;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --control-bg: #ffffff;
  --control-bg-soft: rgba(24, 24, 27, 0.04);
  --panel-inset: rgba(24, 24, 27, 0.05);
  --hover: rgba(24, 24, 27, 0.04);
  --hover-strong: rgba(24, 24, 27, 0.07);
  --row-stripe: rgba(24, 24, 27, 0.025);
  --row-hover: rgba(24, 24, 27, 0.045);
  --topbar-bg: rgba(255, 255, 255, 0.88);
  --thead-bg: rgba(255, 255, 255, 0.96);
  --pop-bg: #ffffff;
  --scrollbar-track: #e4e4e7;
  --scrollbar-thumb: #a1a1aa;
  --shadow: 0 18px 40px rgba(24, 24, 27, 0.12);
  --accent-soft: rgba(220, 28, 28, 0.1);
  --accent-mid: rgba(220, 28, 28, 0.16);
  --accent-border: rgba(220, 28, 28, 0.4);
  --danger: #dc2626;
  --good: #15803d;
  --on-accent: #ffffff;
  --field-opacity: 0.55;
}

* { box-sizing: border-box; }

html {
  font-synthesis: none;
}

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--fg);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  background: var(--ink);
  text-rendering: geometricPrecision;
}

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

.demon-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: var(--field-opacity);
}

.top-bar, .page { position: relative; z-index: 1; }

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
}

.top-banner {
  grid-column: 2;
  margin: 0;
  padding: 0.65rem 0;
  color: var(--banner);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.site-nav {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.site-nav-link {
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  color: var(--nav-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease), background var(--ease);
}

.site-nav-link:hover { color: var(--banner); }

.site-nav-link.is-current {
  color: var(--text-bright);
  background: var(--accent-soft);
}

.top-bar-end {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.top-bar-end .site-nav-link { margin-left: 0.15rem; }

.lang-switch,
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-switch {
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-inset);
}

.theme-btn {
  appearance: none;
  height: 1.7rem;
  min-width: 1.7rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  transition: color var(--ease), background var(--ease);
}

.theme-btn:hover {
  color: var(--fg);
}

.theme-btn.is-current,
.theme-btn[aria-pressed="true"] {
  color: var(--text-bright);
  background: var(--accent-soft);
}

.account-page {
  width: min(560px, calc(100% - 32px));
  padding-top: 2.5rem;
}

.account-eyebrow { text-align: center; margin-bottom: 1rem; }
.account-shell { min-height: 18rem; }

.account-status {
  margin: 2rem 0 0;
  text-align: center;
  color: var(--muted);
}

.account-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.4rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(220, 28, 28, 0.16), transparent 55%),
    var(--surface);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

.account-card-guest {
  text-align: center;
  padding: 2.2rem 1.6rem 1.7rem;
}

.account-guest-mark {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(160deg, #3a0a0a, #dc1c1c 70%);
}

.account-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  align-items: center;
}

.account-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 5px rgba(220, 28, 28, 0.1), 0 16px 36px rgba(0, 0, 0, 0.22);
}

.account-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #5c0d0d, #dc1c1c);
  color: var(--on-accent);
  font-family: "Inter", sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
}

.account-kicker {
  margin: 0 0 0.35rem;
  color: var(--banner);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.account-title,
.account-name {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.05;
}

.account-title { font-size: clamp(1.7rem, 5vw, 2.2rem); }
.account-name {
  font-size: clamp(1.55rem, 4.2vw, 2.05rem);
  word-break: break-word;
}

.account-lead {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.account-meta {
  margin: 1.25rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
}

.account-meta-row { display: grid; gap: 0.2rem; }

.account-meta-row dt {
  margin: 0;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-meta-row dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.account-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
}

.account-api {
  margin: 1.25rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.85rem;
}

.account-section-title {
  margin: 0;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.account-api-head {
  display: grid;
  gap: 0.35rem;
}

.account-api-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.account-api-docs {
  width: fit-content;
  color: var(--banner);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.account-api-docs:hover {
  color: var(--demon-red-hot);
  text-decoration: underline;
}

.account-api-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.account-api-field {
  margin: 0;
  min-width: 0;
}

.account-api-form input {
  width: 100%;
  height: 2.45rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--control-bg);
  color: var(--fg);
  font: inherit;
}

.account-api-form input:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.account-api-once {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(220, 28, 28, 0.35);
  border-radius: var(--radius-md);
  background: rgba(220, 28, 28, 0.1);
  color: var(--fg);
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-all;
}

.account-api-error {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(220, 28, 28, 0.35);
  border-radius: var(--radius-md);
  background: rgba(220, 28, 28, 0.08);
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.4;
}

.account-api-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.account-api-empty {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.88rem;
}

.account-api-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--control-bg-soft);
}

.account-api-item-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.account-api-item-name {
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 650;
}

.account-api-revoke {
  flex: 0 0 auto;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.account-btn-primary {
  background: var(--demon-red);
  border-color: transparent;
  color: var(--on-accent);
}

.account-btn-primary:hover { background: var(--demon-red-hot); }

.account-steam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  margin-top: 1.25rem;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #2a475e, #1b2838);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.account-steam-btn:hover {
  filter: brightness(1.08);
  color: #ffffff;
}

.account-secondary-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.account-secondary-link:hover { color: var(--banner); }

@media (max-width: 560px) {
  .account-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .account-actions { flex-direction: column; }
  .account-actions .dir-btn { width: 100%; }

  .account-api-form {
    grid-template-columns: 1fr;
  }

  .account-api-item {
    flex-direction: column;
    align-items: stretch;
  }

  .account-api-revoke { width: 100%; }
}

.lang-btn {
  margin: 0;
  padding: 0.2rem 0.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nav-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--ease);
}

.lang-btn.is-current { color: var(--text-bright); }
.lang-btn:hover { color: var(--banner); }

.lang-sep {
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 600;
}

.page {
  width: min(var(--page-max), calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 72px;
}

.workspace {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    var(--shadow);
  overflow: clip;
}

.hero {
  padding: 1.55rem 0 0.05rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.brand-logo {
  width: clamp(2.75rem, 7vw, 4rem);
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 16px rgba(220, 28, 28, 0.28));
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.1rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 0.92;
}

.brand-demon { color: var(--text-bright); }

.brand-tv {
  color: var(--demon-red-hot);
  margin-left: 0.08em;
}

.panel {
  margin-top: 1.15rem;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 40px rgba(0, 0, 0, 0.32);
}

.compare-panel {
  margin: 0;
  padding: 0.85rem 1rem 0.9rem;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, var(--hover), transparent 40%),
    var(--surface-2);
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

.desk-head,
.compare-top {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  min-width: 0;
}

.desk-head.desk-head-with-game {
  align-items: start;
  margin-bottom: 0.85rem;
}

.desk-head h2,
.compare-top h2,
.panel h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--fg);
}

.panel-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.pager { display: flex; gap: 8px; flex-wrap: wrap; }

.lead, .note, .status, .summary p { color: var(--muted); }

.lead {
  margin: 0;
  max-width: 52rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--faint);
}

.compare-hint {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button, select, input {
  font: inherit;
  color: var(--fg);
}

.dir-btn, .btn {
  height: var(--control-h);
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  transition: border-color var(--ease), color var(--ease), background var(--ease), transform 100ms ease;
}

.dir-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  color: var(--text-soft);
}

.dir-btn:hover:not(:disabled) {
  border-color: rgba(220, 28, 28, 0.55);
  color: var(--text-bright);
  background: var(--accent-soft);
}

.dir-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(220, 28, 28, 0.25);
}

.btn {
  margin-left: auto;
  border: 0;
  background: var(--demon-red);
  color: var(--on-accent);
  box-shadow: none;
}

.btn:hover:not(:disabled) { background: var(--demon-red-hot); }
.btn:active:not(:disabled) { transform: translateY(1px); }

button:disabled { opacity: 0.55; cursor: not-allowed; }

.tool-btn {
  height: 2.15rem;
  padding: 0 0.8rem;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  border-radius: var(--radius-sm);
}

.market-pick,
.compare-route,
.trade-rail {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.market-pick-side,
.route-side,
.trade-leg {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.55rem 0.65rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--control-bg-soft);
}

.route-from,
.trade-leg.route-from {
  border-color: rgba(220, 28, 28, 0.28);
  box-shadow: inset 3px 0 0 var(--demon-red);
  background:
    linear-gradient(105deg, rgba(220, 28, 28, 0.12), transparent 55%),
    var(--control-bg-soft);
}

.route-to,
.trade-leg.route-to {
  border-color: rgba(62, 207, 142, 0.22);
  box-shadow: inset 3px 0 0 rgba(62, 207, 142, 0.75);
  background:
    linear-gradient(105deg, rgba(62, 207, 142, 0.1), transparent 55%),
    var(--control-bg-soft);
}

.route-kicker {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.route-fields .kind-field[hidden] {
  display: none !important;
}

.route-fields:has(.kind-field[hidden]) {
  grid-template-columns: 1fr;
}

.route-mid {
  display: grid;
  place-items: center;
  align-self: center;
  width: 2.75rem;
}

.route-arrow { display: none; }

.market-pick-field { min-width: 0; }
.kind-field select { min-width: 0; }

.swap-btn {
  position: relative;
  z-index: 1;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text-bright);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), transform 150ms ease;
}

.swap-btn:hover {
  border-color: var(--demon-red-hot);
  background: rgba(220, 28, 28, 0.28);
  transform: rotate(180deg);
}

.swap-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(220, 28, 28, 0.3);
}

.tool-row,
.compare-toolbar,
.command-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.search-field {
  flex: 1.4;
  min-width: 0;
}

.search-field input {
  height: 2.35rem;
  border-color: var(--line-strong);
  background: var(--control-bg);
  font-size: 0.92rem;
  font-weight: 500;
}

.search-field input:focus {
  border-color: rgba(220, 28, 28, 0.6);
  background: var(--surface-2);
}

.filter-tools,
.chip-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--muted);
  font-size: 0.75rem;
  flex: 0 1 auto;
}

.filter-tools-label {
  line-height: 1.2;
  display: none;
}

.filter-tools-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.filter-tools-buttons .tool-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  color: var(--text-soft);
}

.filter-tools-buttons .tool-btn:hover:not(:disabled) {
  color: var(--text-bright);
  border-color: var(--accent-border);
  background: rgba(220, 28, 28, 0.12);
}

.filter-tools-buttons .tool-btn.is-current,
.filter-tools-buttons .tool-btn[aria-expanded="true"],
#filters-toggle.is-current,
#fees-toggle.is-current,
#sales-toggle.is-current,
#blacklist-toggle.is-current {
  border-color: rgba(220, 28, 28, 0.55);
  color: var(--text-bright);
  background: rgba(220, 28, 28, 0.2);
  box-shadow: inset 0 0 0 1px rgba(220, 28, 28, 0.15);
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
  padding: 0.75rem 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-inset);
}

.controls[hidden] { display: none; }

.tag-filters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem 0.85rem;
}

.tag-check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.tag-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.tag-check input[type="checkbox"]:hover {
  border-color: rgba(220, 28, 28, 0.5);
}

.tag-check input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--demon-red-hot);
  box-shadow: 0 0 0 2px var(--accent-mid);
}

.tag-check input[type="checkbox"]:checked {
  border-color: rgba(220, 28, 28, 0.9);
  background: var(--demon-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

.tag-check:hover { color: var(--text-bright); }

.filter-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.fees-panel {
  margin-top: 10px;
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem 0 0.15rem;
  border-top: 1px solid var(--line);
}

.fees-panel[hidden] { display: none; }

.fees-actions {
  display: flex;
  justify-content: flex-end;
}

.fees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.6rem;
}

.fee-card {
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.fee-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
}

.fee-fields {
  display: grid;
  gap: 0.4rem;
}

.fee-fields label { font-size: 0.68rem; }
.fee-fields input { height: 2.05rem; }

.sales-panel {
  margin-top: 10px;
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-inset);
}

.sales-panel[hidden] { display: none; }

.seo-h1 {
  margin: 0 0 0.35rem;
  padding: 0 0.15rem;
  color: var(--text-bright, #f2f2f2);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.extra-markets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.55rem;
}

.extra-market-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  min-width: 9rem;
  color: var(--muted, #a8a8a8);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.extra-market-field select {
  min-width: 10rem;
}

.price-kind-hint {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.7rem;
  border-left: 2px solid var(--demon-red-hot);
  color: var(--muted, #a8a8a8);
  font-size: 0.78rem;
  line-height: 1.35;
}

.price-kind-hint[hidden] { display: none; }

.hold-compact {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  margin-top: 0.55rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-inset);
}

.hold-compact[hidden] { display: none; }

.hold-compact-check {
  margin: 0;
  flex: 0 0 auto;
}

.hold-slider {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}

.hold-slider input[type="range"] {
  flex: 1 1 auto;
  min-width: 4.5rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--demon-red-hot);
  cursor: pointer;
}

.hold-days-label {
  flex: 0 0 auto;
  min-width: 2.1rem;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
}

.hold-compact.is-off .hold-slider {
  opacity: 0.45;
  pointer-events: none;
}

body.is-tf2 .trade-rail,
body.is-tf2 .compare-toolbar,
body.is-tf2 .extra-markets,
body.is-tf2 .proto-controls .proto-route,
body.is-tf2 .proto-filters-btn {
  display: none;
}

body.is-tf2 .table-wrap,
body.is-tf2 .scroll-sentinel,
body.is-tf2 .list-loading,
body.is-tf2 .results-meta {
  display: none !important;
}

.tf2-board {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.tf2-board[hidden] { display: none; }

.tf2-board-head {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.tf2-board-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-bright);
}

.tf2-board-empty {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.tf2-price-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.tf2-price-table th,
.tf2-price-table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.tf2-price-table th {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.14);
}

.tf2-price-table td.tf2-num {
  width: 22%;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text-bright);
}

.tf2-price-table td.tf2-num a {
  color: inherit;
  text-decoration: none;
}

.tf2-price-table td.tf2-num a:hover {
  color: var(--demon-red-hot);
}

.tf2-price-table td.is-empty {
  color: var(--muted);
  font-weight: 500;
}

.tf2-price-market {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text-bright);
}

.tf2-price-market img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.tf2-extra {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.sales-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.sales-period {
  height: 2.15rem;
  padding: 0 0.85rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color var(--ease), border-color var(--ease);
}

.sales-period[aria-selected="true"] {
  color: var(--text-bright);
  border-bottom-color: var(--demon-red-hot);
}

.sales-list {
  display: grid;
  gap: 0.25rem;
  max-height: 16rem;
  overflow: auto;
}

.sales-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.35rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--ease);
}

.sales-item:hover { background: var(--hover); }
.sales-item.is-disabled { opacity: 0.45; }
.sales-item .tag-check { margin: 0; }

.sales-item-name {
  color: var(--fg);
  font-size: 0.86rem;
  font-weight: 600;
}

.sales-item-min {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.sales-stepper {
  display: grid;
  grid-template-columns: 1.85rem 3.8rem 1.85rem;
  align-items: center;
  gap: 0.3rem;
}

.sales-item-min input {
  width: 3.8rem;
  height: 1.85rem;
  text-align: center;
}

.sales-step {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-inset);
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.sales-step:hover {
  border-color: rgba(220, 40, 40, 0.55);
  background: rgba(220, 40, 40, 0.14);
  color: var(--text-bright);
}

.sales-step:active { background: rgba(220, 40, 40, 0.28); }

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}

input[type="search"], input[type="number"] {
  width: 100%;
  height: var(--control-h);
  padding: 0 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--fg);
  outline: none;
  transition: border-color var(--ease), background var(--ease);
}

input[type="search"]::placeholder,
input[type="number"]::placeholder {
  color: var(--text-dim);
}

input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1) opacity(0.55);
}

html[data-theme="light"] input[type="search"]::-webkit-search-cancel-button {
  filter: opacity(0.55);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

input:focus {
  border-color: rgba(220, 28, 28, 0.65);
  background: var(--surface-3);
}

.search-field input[type="search"] {
  height: 2.35rem;
  font-size: 0.92rem;
  font-weight: 500;
  background: var(--control-bg);
  border-radius: var(--radius-md);
}

.choice {
  position: relative;
  width: 100%;
}

.choice-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.choice-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: var(--control-h);
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--control-bg);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.trade-rail .choice-trigger,
.compare-route .choice-trigger {
  height: 2.7rem;
  background: var(--topbar-bg);
  font-size: 13px;
  font-weight: 500;
}

.choice-trigger::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid #8a8a8a;
  border-bottom: 2px solid #8a8a8a;
  transform: rotate(45deg) translate(-1px, -1px);
  flex: 0 0 auto;
}

.choice.is-open .choice-trigger {
  border-color: rgba(220, 28, 28, 0.65);
  background: var(--surface-3);
}

.choice.is-open .choice-trigger::after {
  transform: rotate(225deg) translate(-1px, -1px);
  border-color: var(--banner);
}

.choice-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 15rem;
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--pop-bg);
  box-shadow: var(--shadow);
}

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

.choice-menu,
.sales-pop,
.cross-pop,
.modal-card,
.blacklist-list,
.blacklist-suggest,
.table-wrap {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.choice-menu::-webkit-scrollbar,
.sales-pop::-webkit-scrollbar,
.cross-pop::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.blacklist-list::-webkit-scrollbar,
.blacklist-suggest::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.choice-menu::-webkit-scrollbar-track,
.sales-pop::-webkit-scrollbar-track,
.cross-pop::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track,
.blacklist-list::-webkit-scrollbar-track,
.blacklist-suggest::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.choice-menu::-webkit-scrollbar-thumb,
.sales-pop::-webkit-scrollbar-thumb,
.cross-pop::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb,
.blacklist-list::-webkit-scrollbar-thumb,
.blacklist-suggest::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

.choice-menu::-webkit-scrollbar-thumb:hover,
.sales-pop::-webkit-scrollbar-thumb:hover,
.cross-pop::-webkit-scrollbar-thumb:hover,
.modal-card::-webkit-scrollbar-thumb:hover,
.blacklist-list::-webkit-scrollbar-thumb:hover,
.blacklist-suggest::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #4a4a4a;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.choice-option:hover {
  background: var(--accent-soft);
  color: var(--text-bright);
}

.choice-option.is-current {
  background: var(--accent-mid);
  color: var(--text-bright);
}

.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-top: 1.15rem;
  font-size: 0.9rem;
  color: var(--fg);
  cursor: pointer;
}

.check input {
  appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-2);
  display: grid;
  place-content: center;
  cursor: pointer;
}

.check input::before {
  content: "";
  width: 0.5rem;
  height: 0.32rem;
  border-left: 2px solid var(--text-bright);
  border-bottom: 2px solid var(--text-bright);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.check input:checked {
  border-color: transparent;
  background: var(--demon-red);
}

.check input:checked::before { opacity: 1; }

.check input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1000;
  max-width: min(520px, calc(100vw - 32px));
  margin: 0;
  padding: 11px 16px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: var(--radius-md);
  background: rgba(12, 18, 14, 0.94);
  color: #86efac;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  pointer-events: none;
}

.results-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pager-bar,
.results-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.55rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.22);
}

.results-meta #list-summary {
  flex: 1 1 auto;
  min-width: 0;
}

.min-stock-field {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  margin-left: auto;
  color: var(--muted, #a8a8a8);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.min-stock-field input {
  width: 4.2rem;
  margin: 0;
  padding: 0.28rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-inset, #121212);
  color: var(--fg);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.price-editable {
  cursor: text;
  border-bottom: 0;
  border-radius: 3px;
}

.price-editable:hover,
.price-editable:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(220, 28, 28, 0.45);
}

.price-edit-input {
  width: 5.5rem;
  margin: 0;
  padding: 0.15rem 0.3rem;
  border: 1px solid var(--demon-red-hot);
  border-radius: 4px;
  background: var(--panel-inset, #121212);
  color: var(--fg);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.pager-shown, .pager-note {
  margin: 0;
  padding: 0 4px;
  color: var(--fg);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.pager-shown span {
  margin-right: 8px;
  color: var(--banner);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-btn {
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--hover);
  color: var(--fg);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.page-btn.is-current {
  border-color: transparent;
  background: var(--demon-red);
  color: var(--on-accent);
}

.page-btn:hover:not(:disabled):not(.is-current) {
  border-color: rgba(220, 28, 28, 0.55);
  background: var(--accent-soft);
}

th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--ease);
}

th.sortable:hover {
  color: var(--fg);
}

th.sortable.is-sorted {
  color: var(--banner);
}

th.sortable.is-sorted .th-label::after {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 5px solid currentColor;
}

th.sortable.is-sorted[data-sort-dir="asc"] .th-label::after {
  border-top: 0;
  border-bottom: 5px solid currentColor;
}

.pager-note { padding: 6px 10px; max-width: 720px; }

.table-wrap,
.results-panel {
  margin-top: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  max-height: none;
}

.results-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-synthesis: none;
}

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--hover-strong);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
  vertical-align: top;
}

th.col-num {
  text-align: center;
  padding-bottom: 8px;
}

.th-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-height: 1.15rem;
  line-height: 1.15;
  white-space: nowrap;
}

th.col-num .th-label,
th.col-center .th-label {
  justify-content: center;
}

.col-range {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  min-height: 1.7rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.col-range-sep {
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1;
}

.col-range input {
  width: 3.6rem;
  min-width: 0;
  height: 1.7rem;
  padding: 0 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--control-bg);
  color: var(--fg);
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
  outline: none;
  transition: border-color var(--ease), background var(--ease);
}

.col-range input::placeholder {
  color: var(--text-dim);
  font-weight: 500;
  text-align: center;
}

.col-range input:focus {
  border-color: rgba(220, 28, 28, 0.55);
  background: var(--control-bg);
}

.col-range input:not(:placeholder-shown) {
  border-color: rgba(220, 28, 28, 0.4);
  color: var(--text-bright);
}

.controls-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
  line-height: 1.35;
}

th.col-center {
  text-align: center;
}

.results-table tbody tr {
  transition: background 140ms ease;
}

.results-table tbody tr:hover {
  background: var(--row-hover);
}

.results-table tbody tr:hover td {
  border-bottom-color: var(--line-strong);
}

.results-table tbody tr:nth-child(even):not(:hover) {
  background: var(--row-stripe);
}

.col-text {
  text-align: left;
  width: 40%;
  min-width: 260px;
}

th.col-text {
  vertical-align: middle;
  padding-top: 14px;
  padding-bottom: 14px;
}

th.col-text .th-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  min-height: 1.7rem;
}

.col-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0;
  width: 14%;
}

.col-num .price-value,
.col-num .sub,
.col-num.percent-cell {
  text-align: center;
}

.col-center {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 12%;
}

.percent-cell {
  width: 11%;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.percent-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.2;
  opacity: 1;
  text-shadow: none;
  filter: none;
  transition: border-color 140ms ease, background 140ms ease;
}

.percent-cell.flat {
  color: var(--muted);
  font-weight: 500;
}

.percent-cell.flat .percent-pill {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 500;
}

.percent-cell.pos .percent-pill {
  color: #39e6a0;
  background: rgba(57, 230, 160, 0.09);
  border-color: rgba(57, 230, 160, 0.08);
  opacity: 1;
  text-shadow: none;
  filter: none;
}

.percent-cell.neg .percent-pill {
  color: #ff6875;
  background: rgba(255, 104, 117, 0.09);
  border-color: rgba(255, 104, 117, 0.08);
  opacity: 1;
  text-shadow: none;
  filter: none;
}

.results-table tbody tr:hover .percent-cell.pos .percent-pill {
  background: rgba(57, 230, 160, 0.14);
  border-color: rgba(57, 230, 160, 0.18);
}

.results-table tbody tr:hover .percent-cell.neg .percent-pill {
  background: rgba(255, 104, 117, 0.14);
  border-color: rgba(255, 104, 117, 0.18);
}

html[data-theme="light"] .percent-cell.pos .percent-pill {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.05);
}

html[data-theme="light"] .percent-cell.neg .percent-pill {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.05);
}

html[data-theme="light"] .results-table tbody tr:hover .percent-cell.pos .percent-pill {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(22, 163, 74, 0.18);
}

html[data-theme="light"] .results-table tbody tr:hover .percent-cell.neg .percent-pill {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.16);
}

.item-block {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.item-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}

.item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
}

.item-thumb-wrap {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 7px;
  background: var(--panel-inset);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.item-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: auto;
}

.item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  min-width: 0;
  flex: 1 1 auto;
  cursor: copy;
  letter-spacing: 0;
  color: var(--fg);
}

.cross-markets-btn {
  appearance: none;
  flex: 0 0 auto;
  margin-top: 0.05rem;
  margin-left: auto;
  border: 1px solid rgba(215, 40, 40, 0.4);
  background: transparent;
  color: var(--banner);
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  transition: background var(--ease);
}

.cross-markets-btn:hover,
.cross-markets-btn:focus-visible {
  background: rgba(215, 40, 40, 0.14);
  outline: none;
}

.cross-pop {
  position: fixed;
  z-index: 41;
  box-sizing: border-box;
  width: max-content;
  min-width: 11.5rem;
  max-width: min(16rem, calc(100vw - 24px));
  max-height: min(50vh, 280px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem 0.65rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--pop-bg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  color: var(--fg);
  font-size: 0.8rem;
  -webkit-overflow-scrolling: touch;
}

.cross-pop-title {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cross-pop-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}

.cross-pop-head a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 40, 40, 0.4);
  font-weight: 600;
}

.cross-pop-head a:hover { border-bottom-color: var(--demon-red-hot); }

.cross-pop-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.7rem;
}

.cross-pop-price {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.65rem;
  margin-top: 0;
  min-width: 0;
  width: 100%;
}

.market-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  opacity: 1;
}

.market-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.market-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  border-bottom: none;
  transition: color var(--ease);
}

.market-link:hover {
  color: var(--text-bright);
}

.market-link.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.sales-badge {
  appearance: none;
  border: 1px solid rgba(215, 40, 40, 0.4);
  background: rgba(215, 40, 40, 0.1);
  color: var(--banner);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 0.16rem 0.34rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--ease);
}

.sales-badge:hover,
.sales-badge:focus-visible {
  background: rgba(215, 40, 40, 0.18);
  outline: none;
}

.sales-pop {
  position: fixed;
  z-index: 40;
  min-width: 180px;
  max-width: 260px;
  max-height: min(50vh, 280px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--pop-bg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  color: var(--fg);
  font-size: 0.8rem;
}

.sales-pop-title {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sales-pop-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sales-pop-list li {
  padding: 0.16rem 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-value {
  display: block;
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.25;
}

/* Светлая тема: основной текст почти чёрный (не цвет «как у тёмной») */
html[data-theme="light"] .item-title,
html[data-theme="light"] .price-value,
html[data-theme="light"] .brand-demon,
html[data-theme="light"] .cross-pop-price,
html[data-theme="light"] th.sortable:hover {
  color: #09090b;
}

html[data-theme="light"] .sub,
html[data-theme="light"] .market-link,
html[data-theme="light"] .route-kicker,
html[data-theme="light"] .col-range-sep,
html[data-theme="light"] .percent-cell.flat {
  color: #3f3f46;
}

html[data-theme="light"] .lang-btn:not(.is-current),
html[data-theme="light"] .site-nav-link:not(.is-current) {
  color: rgba(24, 24, 27, 0.78);
}

html[data-theme="light"] .eyebrow,
html[data-theme="light"] .account-eyebrow {
  color: #3f3f46;
}

html[data-theme="light"] .account-steam-btn,
html[data-theme="light"] .account-steam-btn:hover {
  color: #ffffff;
}

html[data-theme="light"] .theme-switch {
  border-color: rgba(24, 24, 27, 0.18);
  background: rgba(24, 24, 27, 0.04);
}

html[data-theme="light"] .admin-online-badge {
  border-color: rgba(185, 28, 28, 0.45);
  background: rgba(220, 28, 28, 0.1);
  color: #18181b;
}

.sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
  white-space: nowrap;
  letter-spacing: 0;
}

.item-meta .sub {
  display: inline;
  margin-top: 0;
  font-size: 11.5px;
  font-weight: 400;
}

.pos {
  color: var(--good);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.neg {
  color: var(--danger);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.percent-cell.pos,
.percent-cell.neg {
  color: inherit;
}

.choice-trigger-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
  background: #0a0a0c;
}

.market-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.choice-trigger .market-icon,
.choice-option .market-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
}

.fee-title .market-icon {
  width: 1.65rem;
  height: 1.65rem;
}

.market-link .market-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 5px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 12px;
  font-size: 0.9rem;
}

.scroll-sentinel {
  height: 1px;
  width: 100%;
}

.list-loading {
  margin: 0.75rem 0 0.35rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.modal-card-wide {
  width: min(720px, 100%);
  max-height: min(88vh, 760px);
  padding: 1.15rem 1.25rem 1.25rem;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.modal-head h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-lead {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.blacklist-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  align-items: start;
}

.blacklist-suggest-wrap {
  position: relative;
  min-width: 0;
}

.blacklist-form input {
  width: 100%;
  min-height: 2.4rem;
  font-size: 0.9rem;
}

.blacklist-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #141417;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.blacklist-suggest[hidden] { display: none; }

.blacklist-suggest-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  background: transparent;
  color: var(--fg);
  text-align: left;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.blacklist-suggest-item:hover,
.blacklist-suggest-item.is-active {
  background: rgba(215, 40, 40, 0.14);
}

.blacklist-list {
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
  max-height: min(48vh, 380px);
  overflow: auto;
}

.blacklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.9rem;
}

.blacklist-empty {
  color: var(--muted);
  font-size: 0.84rem;
}

.blacklist-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--banner);
  font-size: 1.05rem;
  cursor: pointer;
}

.blacklist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--faint);
  line-height: 1.45;
}

.admin-page {
  width: min(720px, calc(100% - 32px));
  padding-bottom: 48px;
}

.admin-user-bar {
  margin-top: 0.5rem;
}

.admin-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.15rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid rgba(220, 28, 28, 0.35);
  border-radius: 999px;
  background: rgba(220, 28, 28, 0.08);
  color: var(--fg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-online-badge[hidden] {
  display: none !important;
}

.admin-online-badge .admin-online-dot {
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
}

.admin-online-badge strong {
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.admin-user-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.desk-head-with-game {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 0.85rem;
}

.desk-head-with-game .desk-head-copy {
  min-width: min(100%, 16rem);
  flex: 1 1 14rem;
  padding-top: 0;
}

.desk-head-with-game .desk-head-copy h2 {
  margin: 0 0 0.2rem;
  line-height: 1.2;
}

.desk-head-with-game .compare-hint {
  margin: 0;
}

.game-rail {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  flex: 0 0 auto;
  padding-top: 0;
}

.game-rail .route-kicker {
  margin: 0;
  line-height: 1.2;
  min-height: 1.2em;
}

.game-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.game-switch-btn {
  appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  width: 3.15rem;
  height: 3.15rem;
  padding: 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.05), transparent 45%),
    var(--control-bg);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color var(--ease),
    background var(--ease),
    transform 140ms ease,
    box-shadow var(--ease),
    filter var(--ease);
}

.game-switch-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(0.25) brightness(0.92);
  transition: filter var(--ease), transform 140ms ease;
  pointer-events: none;
}

.game-switch-btn:hover {
  border-color: rgba(220, 28, 28, 0.45);
  transform: translateY(-1px);
  background:
    linear-gradient(165deg, rgba(220, 28, 28, 0.12), transparent 50%),
    var(--surface-3);
}

.game-switch-btn:hover img {
  filter: none;
  transform: scale(1.04);
}

.game-switch-btn.is-active {
  border-color: rgba(220, 28, 28, 0.75);
  background:
    linear-gradient(165deg, rgba(255, 80, 80, 0.2), rgba(220, 28, 28, 0.08) 55%),
    var(--surface-3);
  box-shadow:
    0 0 0 1px rgba(220, 28, 28, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.game-switch-btn.is-active img {
  filter: none;
}

.game-switch-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(220, 28, 28, 0.4);
}

html[data-theme="light"] .game-switch-btn {
  background:
    linear-gradient(165deg, #fff, #f3f1f1 70%),
    var(--control-bg);
}

html[data-theme="light"] .game-switch-btn.is-active {
  border-color: rgba(180, 24, 24, 0.55);
  background:
    linear-gradient(165deg, #ffe3e3, #ffd0d0 70%);
  box-shadow: 0 0 0 1px rgba(180, 24, 24, 0.12);
}

@media (max-width: 800px) {
  .desk-head-with-game {
    align-items: stretch;
  }

  .game-rail {
    width: 100%;
  }

  .game-switch-btn {
    width: 2.85rem;
    height: 2.85rem;
  }
}

.admin-parser-health-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.admin-parser-health-item {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.55rem;
  align-items: start;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.admin-parser-main {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.admin-parser-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
}

.admin-parser-run-btn {
  flex: 0 0 auto;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}

.admin-parser-health-item .sub {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.admin-parser-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.admin-parser-badge.is-ok {
  color: #0b3d2e;
  background: #39e6a033;
}

.admin-parser-badge.is-error,
.admin-parser-badge.is-stale,
.admin-parser-badge.is-never {
  color: #5c1520;
  background: #ff687533;
}

html[data-theme="dark"] .admin-parser-badge.is-ok {
  color: #9ef5d0;
}

html[data-theme="dark"] .admin-parser-badge.is-error,
html[data-theme="dark"] .admin-parser-badge.is-stale,
html[data-theme="dark"] .admin-parser-badge.is-never {
  color: #ffb3ba;
}

.admin-parser-card {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.admin-parser-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.admin-parser-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.admin-online-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.admin-online-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.admin-online-item .sub {
  grid-column: 2;
}

.admin-online-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
  grid-row: 1 / span 2;
}

.admin-online-dot.is-offline {
  background: var(--text-dim);
  box-shadow: none;
}

.admin-online-dot.is-anomaly {
  background: var(--demon-red-hot);
  box-shadow: 0 0 0 3px rgba(220, 28, 28, 0.2);
}

.admin-online-item.is-offline {
  opacity: 0.72;
}

.admin-online-item.is-anomaly {
  border-color: var(--accent-border);
  background: rgba(220, 28, 28, 0.1);
}

.admin-online-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 800px) {
  .page {
    width: min(100%, calc(100% - 20px));
    padding-bottom: 48px;
  }

  .workspace {
    margin-top: 0.85rem;
  }

  .brand-row {
    flex-wrap: wrap;
    max-width: 100%;
    gap: 0.45rem;
  }

  .brand-logo { width: clamp(2.4rem, 12vw, 3.2rem); }

  .brand {
    font-size: clamp(1.7rem, 9vw, 2.6rem);
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .panel { padding: 0.9rem 0.85rem 0.95rem; }

  .compare-panel {
    padding: 0.65rem 0.7rem 0.7rem;
  }

  .compare-hint {
    display: none;
  }

  .lead {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .market-pick,
  .compare-route,
  .trade-rail {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
  }

  .route-mid {
    width: 100%;
    order: 0;
  }

  .route-arrow { display: none; }

  .route-fields {
    grid-template-columns: 1fr;
  }

  .swap-btn {
    width: 100%;
    min-height: 40px;
    border-radius: var(--radius-md);
  }

  .swap-btn:hover { transform: none; }

  .top-bar {
    grid-template-columns: 1fr auto;
    padding: 0.35rem 0.75rem;
  }

  .top-banner {
    grid-column: 1;
    justify-self: start;
    padding: 0.45rem 0;
    letter-spacing: 0.12em;
    text-align: left;
  }

  .site-nav {
    grid-column: 1;
    gap: 0;
  }

  .site-nav-link {
    padding: 0.3rem 0.4rem;
    font-size: 0.7rem;
  }

  .top-bar-end { grid-column: 2; }

  .tool-row,
  .compare-toolbar,
  .command-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tools-buttons {
    width: 100%;
    justify-content: stretch;
  }

  .tool-row .dir-btn,
  .compare-toolbar .dir-btn,
  .command-bar .dir-btn {
    flex: 1 1 auto;
    min-height: 38px;
  }

  .controls { grid-template-columns: 1fr; }
  .tag-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hold-compact { grid-column: 1 / -1; }
  .fees-grid { grid-template-columns: 1fr 1fr; }

  .pager-bar { gap: 6px; }

  .page-btn, .pager-bar .dir-btn {
    min-height: 38px;
    min-width: 38px;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
  }

  .results-table,
  .results-table thead,
  .results-table tbody,
  .results-table tr,
  .results-table th,
  .results-table td {
    display: block;
    width: 100%;
  }

  .results-table {
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  .results-table thead tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.65rem;
    padding: 0.55rem 0.15rem 0.75rem;
    border-bottom: 1px solid var(--line-strong);
  }

  .results-table thead th.col-text {
    grid-column: 1 / -1;
    padding: 0;
  }

  .results-table thead th.col-num,
  .results-table thead th.col-center {
    padding: 0;
    text-align: left;
  }

  .results-table thead th.col-num .th-label,
  .results-table thead th.col-center .th-label {
    justify-content: flex-start;
  }

  .results-table thead .col-range {
    justify-content: flex-start;
    margin-top: 0.35rem;
  }

  .results-table thead th[hidden] {
    display: none !important;
  }

  .results-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.7rem;
    margin: 0.65rem 0 0;
    padding: 0.85rem 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-2);
  }

  .results-table tbody tr:nth-child(even):not(:hover) {
    background: var(--surface-2);
  }

  .results-table tbody tr:hover {
    background: var(--surface-3);
  }

  .results-table tbody td {
    padding: 0;
    border-bottom: none;
    text-align: left;
    min-width: 0;
  }

  .results-table tbody td.col-text.name {
    grid-column: 1 / -1;
    padding-bottom: 0.15rem;
  }

  .results-table tbody td.col-num,
  .results-table tbody td.col-center,
  .results-table tbody td.percent-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .results-table tbody td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
  }

  .results-table tbody .col-num .price-value,
  .results-table tbody .col-num .sub,
  .results-table tbody .col-num.percent-cell {
    text-align: left;
  }

  .item-block {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .item-body {
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .item-title-row {
    align-items: flex-start;
  }

  .item-title {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.35;
  }

  .item-meta {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.35rem;
  }

  .market-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .price-value { font-size: 15px; }
  .percent-cell { font-size: 15px; }

  .col-range input {
    width: 2.85rem;
    height: 1.55rem;
    font-size: 0.68rem;
  }

  .check { padding-top: 0; }
  .btn { margin-left: 0; }
}

@media (min-width: 1440px) {
  .page {
    width: min(1600px, calc(100% - 64px));
  }

  .col-text { width: 42%; }
}

@media (min-width: 1800px) {
  .page {
    width: min(1760px, calc(100% - 96px));
  }

  .col-text { width: 44%; }
}
