/* ══════════════════════════════════════════════════════════════════════════
   TitanMC Marketplace — editorial exchange pass v2
   Route-owned overrides for Survival only. Prison keeps the shared mh1 skin.
   No grain, no rotating sigil, no perspective floor and no horizon line.
   ══════════════════════════════════════════════════════════════════════════ */

body #marketplace::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

body #marketplace .mh-hero:not([data-market-theme]) {
  --mh-1: #f1ede4;
  --mh-2: #c8a968;
  --mh-3: #98733a;
  --mh-4: #5f4726;
  --mh-rgb: 200, 169, 104;
  --mh-ink: #05060a;
  --mh-ink-2: #090b11;
  --mh-tx-0: #f4f1ea;
  --mh-tx-1: #e9e5dc;
  --mh-tx-2: #aaa69d;
  --mh-tx-3: #77746d;
  --mh-tx-4: #4f4d48;
  --mh2-cool: #9ab5c2;
  --mh2-line: rgba(232, 226, 214, .13);
  --mh2-line-hot: rgba(214, 188, 132, .44);
  background:
    radial-gradient(ellipse 50% 32% at 50% -2%, rgba(225, 217, 199, .105), transparent 72%),
    radial-gradient(ellipse 42% 44% at 2% 44%, rgba(50, 87, 112, .095), transparent 72%),
    radial-gradient(ellipse 38% 38% at 98% 72%, rgba(111, 77, 38, .07), transparent 76%),
    linear-gradient(180deg, #090a0f 0%, #05060a 48%, #030407 100%) !important;
}

/* Removed from markup; these guards also neutralize stale cached HTML. */
.mh-hero:not([data-market-theme]) :is(.mh-sigil, .mh-floor, .mh-horizon) {
  display: none !important;
  animation: none !important;
}

.mh-hero:not([data-market-theme]) .mh-atmos::before,
.mh-hero:not([data-market-theme]) .mh-atmos::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mh-hero:not([data-market-theme]) .mh-atmos::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .018), transparent 18% 82%, rgba(255, 255, 255, .014)),
    radial-gradient(ellipse 24% 36% at 50% 31%, rgba(255, 255, 255, .055), transparent 72%);
}

.mh-hero:not([data-market-theme]) .mh-atmos::after {
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .58));
}

.mh-hero:not([data-market-theme]) .mh-cool {
  background:
    radial-gradient(ellipse 32% 46% at -2% 20%, rgba(58, 101, 130, .12), transparent 70%),
    radial-gradient(ellipse 38% 52% at 102% 84%, rgba(45, 75, 98, .08), transparent 72%);
}

.mh-hero:not([data-market-theme]) .mh-dome {
  opacity: .64;
  background:
    radial-gradient(ellipse 15% 21% at 50% 48%, rgba(243, 238, 226, .1), transparent 62%),
    radial-gradient(ellipse 38% 38% at 50% 52%, rgba(188, 166, 125, .055), transparent 68%);
  transform: none !important;
  will-change: auto;
}

.mh-hero:not([data-market-theme]) .mh-vault i {
  background: linear-gradient(90deg, rgba(0, 0, 0, .94), rgba(0, 0, 0, .46) 46%, transparent);
  filter: blur(2px);
}

.mh-hero:not([data-market-theme]) .mh-vault,
.mh-hero:not([data-market-theme]) .mh-beams {
  transform: none !important;
  will-change: auto;
}

.mh-hero:not([data-market-theme]) .mh-beams {
  opacity: .25;
  mix-blend-mode: screen;
}

.mh-hero:not([data-market-theme]) .mh-beams i {
  background: linear-gradient(180deg, rgba(231, 226, 213, .22), rgba(177, 147, 91, .035) 42%, transparent 76%);
  filter: blur(14px);
  animation: none !important;
}

.mh-hero:not([data-market-theme]) .mh-embers {
  display: none !important;
}

.mh-hero:not([data-market-theme]) .mh-fade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .88), transparent 13% 87%, rgba(0, 0, 0, .88)),
    linear-gradient(180deg, rgba(0, 0, 0, .38), transparent 18% 72%, rgba(0, 0, 0, .72)),
    radial-gradient(ellipse 100% 96% at 50% 40%, transparent 48%, rgba(0, 0, 0, .48));
}

/* ── Masthead: restrained metal, not a gold UI kit. ───────────────────── */

.mh-hero:not([data-market-theme]) .mh-masthead {
  border-bottom-color: var(--mh2-line);
}

.mh-hero:not([data-market-theme]) .mh-mark b {
  color: #d5bb84;
}

.mh-hero:not([data-market-theme]) .mh-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(205, 180, 128, .28), rgba(255, 255, 255, .055) 52%, transparent);
}

/* ── Kinetic editorial wordmark. MARKET is solid stone; PLACE is traced. ─ */

body #marketplace .mh-hero:not([data-market-theme]) .mh-title {
  display: grid !important;
  place-items: center;
  width: fit-content;
  max-width: 100%;
  perspective: 900px;
  overflow: visible;
  color: var(--mh-tx-0) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  filter: none !important;
  text-shadow: none !important;
  animation: none !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-title::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, .82);
  transform: translate3d(3px, 6px, -1px);
  opacity: .86;
  pointer-events: none;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-title::after {
  content: none !important;
  animation: none !important;
}

.mh2-wordmark,
.mh2-market,
.mh2-place {
  display: inline-flex;
  align-items: baseline;
}

.mh2-wordmark {
  position: relative;
  transform: translate3d(calc(var(--mh-px) * 3px), calc(var(--mh-py) * 2px), 0);
  transform-style: preserve-3d;
  transition: none;
  will-change: transform;
}

.mh2-market {
  color: #eeece7;
  -webkit-text-fill-color: #eeece7;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .22),
    0 5px 0 rgba(21, 22, 25, .92),
    0 18px 48px rgba(0, 0, 0, .68);
}

.mh2-place {
  position: relative;
  color: rgba(235, 230, 219, .035);
  -webkit-text-fill-color: rgba(235, 230, 219, .035);
  -webkit-text-stroke: 1.25px rgba(229, 222, 208, .74);
  text-shadow: 0 14px 42px rgba(0, 0, 0, .58);
}

.mh2-place::after {
  content: attr(data-word);
  position: absolute;
  inset: 0;
  color: #e9e5dc;
  -webkit-text-fill-color: #e9e5dc;
  -webkit-text-stroke: 0 transparent;
  clip-path: inset(0 100% 0 0);
  opacity: .88;
  pointer-events: none;
  animation: mh2PlaceTrace 2.4s cubic-bezier(.22, 1, .36, 1) 1.15s 1 both;
}

.mh2-letter {
  display: inline-block;
  transform-origin: 50% 100%;
  backface-visibility: hidden;
  animation: mh2GlyphIn 980ms cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(90ms + var(--mh2-i) * 48ms);
}

@keyframes mh2GlyphIn {
  0% {
    opacity: 0;
    transform: translate3d(0, .62em, 0) rotateX(-62deg) scaleY(.78);
  }
  62% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateX(0) scaleY(1);
  }
}

@keyframes mh2PlaceTrace {
  0%        { clip-path: inset(0 100% 0 0); opacity: 0; }
  32%, 62%  { clip-path: inset(0 0 0 0); opacity: .9; }
  100%      { clip-path: inset(0 0 0 100%); opacity: 0; }
}

.mh-hero:not([data-market-theme]) .mh-deck {
  color: #d8d5cf !important;
  font-weight: 500 !important;
  letter-spacing: .018em;
}

.mh-hero:not([data-market-theme]) .mh-deck b {
  color: #f1eee7;
  font-weight: 700;
}

.mh-hero:not([data-market-theme]) .mh-deck b::after {
  height: 1px;
  background: linear-gradient(90deg, #a57d42, #dac89f 58%, transparent);
  animation: mh2UnderlineIn 920ms cubic-bezier(.16, 1, .3, 1) 1.05s 1 both;
}

@keyframes mh2UnderlineIn {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: .9; }
}

.mh-hero:not([data-market-theme]) .mh-body {
  color: #9c9992 !important;
}

/* ── Exchange terminal search. ─────────────────────────────────────────── */

.mh-hero:not([data-market-theme]) .mh-console {
  position: relative;
  width: min(100%, 790px);
}

.mh2-console-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 2px 8px;
  font: 600 8.5px/1 var(--f-mono, monospace);
  letter-spacing: .19em;
  text-transform: uppercase;
  color: #66635d;
}

.mh2-console-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mh2-console-meta i {
  width: 5px;
  height: 5px;
  border: 1px solid #b89455;
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(184, 148, 85, .32);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search {
  min-height: 76px !important;
  height: 76px !important;
  padding: 0 8px 0 70px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .025), transparent 34%),
    #090b11 !important;
  border: 1px solid rgba(228, 222, 210, .17) !important;
  border-radius: 7px !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .04),
    inset 0 -1px rgba(0, 0, 0, .8),
    0 22px 58px rgba(0, 0, 0, .52) !important;
  transition: border-color .28s ease, box-shadow .28s ease !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #b48b4d 20%, #e4d8bc 50%, #b48b4d 80%, transparent);
  transform: scaleX(.08);
  opacity: 0;
  transition: transform .46s cubic-bezier(.16, 1, .3, 1), opacity .22s ease;
  pointer-events: none;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search:focus-within {
  border-color: rgba(215, 196, 156, .42) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .055),
    0 22px 58px rgba(0, 0, 0, .56),
    0 0 0 3px rgba(185, 148, 83, .055) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search:focus-within::before {
  transform: scaleX(1);
  opacity: .86;
}

.mh-hero:not([data-market-theme]) .mh-search-icon {
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 58px;
  height: 100%;
  margin: 0;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.mh-hero:not([data-market-theme]) .mh-search-icon i {
  color: #c8aa70;
  font-size: 15px;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search input {
  font-family: var(--f-mono, "JetBrains Mono", monospace) !important;
  font-size: clamp(13px, .92vw, 15px) !important;
  letter-spacing: .025em !important;
  color: #e8e4dc !important;
  transition: color .18s ease !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search input::placeholder {
  color: #615f5a !important;
}

.mh-hero:not([data-market-theme]) .mh-tools {
  gap: 0;
  margin-right: 9px;
  padding-left: 7px;
  border-left: 1px solid rgba(255, 255, 255, .075);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tool {
  width: 38px;
  height: 44px;
  color: #66645e !important;
  border-radius: 4px !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tool:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-tool:focus-visible {
  color: #d9c49b !important;
  background: rgba(255, 255, 255, .035) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-submit {
  height: 60px;
  min-width: 190px;
  padding: 0 20px !important;
  color: #121318 !important;
  background: #e9e5dc !important;
  border: 1px solid rgba(255, 255, 255, .68) !important;
  border-radius: 4px !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .82),
    inset 0 -2px rgba(78, 66, 43, .22),
    0 10px 24px rgba(0, 0, 0, .34) !important;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), background-color .2s ease,
              box-shadow .25s ease !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-submit::before {
  content: none !important;
  animation: none !important;
}

.mh-hero:not([data-market-theme]) .mh-submit kbd {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 1px;
  font: 600 12px/1 var(--f-mono, monospace);
  color: #76613d;
  background: rgba(28, 28, 31, .065);
  border: 1px solid rgba(28, 28, 31, .16);
  border-radius: 3px;
  box-shadow: none;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-submit:hover {
  background: #f4f1ea !important;
  filter: none;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .9),
    inset 0 -2px rgba(78, 66, 43, .2),
    0 16px 34px rgba(0, 0, 0, .46),
    0 0 0 1px rgba(202, 170, 108, .28) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-submit:active {
  transform: translateY(0);
}

/* Search shortcuts are indexed controls, not generic pills. */
.mh-hero:not([data-market-theme]) .mh-chips {
  justify-content: flex-start;
  gap: 0 !important;
  margin-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, .065) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .045) !important;
}

.mh-hero:not([data-market-theme]) .mh-chips-label {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 14px 0 2px;
  color: #5f5c56;
  border-right: 1px solid rgba(255, 255, 255, .07);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip {
  gap: 8px;
  height: 39px;
  padding: 0 13px !important;
  font: 500 11.5px/1 var(--f-body, "Inter", sans-serif) !important;
  color: #9b9891 !important;
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, .065) !important;
  border-radius: 0 !important;
}

.mh-hero:not([data-market-theme]) .mh-chip > span {
  font: 600 8px/1 var(--f-mono, monospace);
  letter-spacing: .08em;
  color: #71634b;
  transition: color .18s ease;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip:focus-visible {
  color: #ede8de !important;
  background: rgba(255, 255, 255, .035) !important;
  border-color: rgba(255, 255, 255, .09) !important;
}

.mh-hero:not([data-market-theme]) .mh-chip:hover > span,
.mh-hero:not([data-market-theme]) .mh-chip:focus-visible > span {
  color: #c6a86f;
}

/* ── CTA: compact data controls instead of glossy gold buttons. ───────── */

.mh-hero:not([data-market-theme]) .mh-cta {
  gap: 8px;
  margin-top: clamp(20px, 2vw, 27px);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn {
  gap: 13px;
  min-height: 58px;
  padding: 0 17px !important;
  text-align: left;
  color: #d4d0c8 !important;
  background: rgba(9, 11, 16, .8) !important;
  border: 1px solid rgba(255, 255, 255, .115) !important;
  border-radius: 6px !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .028), 0 14px 34px rgba(0, 0, 0, .34) !important;
  filter: none !important;
  animation: none !important;
  background-image: none !important;
  background-size: auto !important;
}

.mh2-btn-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  font: 700 8.5px/1 var(--f-mono, monospace);
  letter-spacing: .06em;
  color: #c3a46b;
  border: 1px solid rgba(197, 165, 106, .3);
  border-radius: 3px;
}

.mh2-btn-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mh2-btn-copy small {
  font: 500 7.5px/1 var(--f-mono, monospace);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #64615b;
}

.mh2-btn-copy strong {
  font: 650 11.5px/1 var(--f-head, "Rajdhani", sans-serif);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #dedad2;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn > i {
  margin-left: 8px;
  color: #8d7853;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-btn:focus-visible {
  color: #f0ece4 !important;
  background: rgba(17, 19, 25, .94) !important;
  border-color: rgba(205, 176, 119, .42) !important;
  transform: translateY(-2px);
  box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 18px 38px rgba(0, 0, 0, .48) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn:active {
  transform: translateY(0) scale(.98);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-ghost::before,
body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-ghost::after {
  content: none !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid.is-copied {
  border-color: rgba(79, 197, 122, .5) !important;
  background: rgba(34, 80, 54, .26) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid.is-copy-error {
  border-color: rgba(255, 85, 102, .5) !important;
  background: rgba(88, 28, 37, .28) !important;
}

/* ── Market board: numbered, chamfered inventory cells. ───────────────── */

.mh-hero:not([data-market-theme]) .mh-board {
  padding-top: clamp(22px, 1.9vw, 28px);
}

.mh-hero:not([data-market-theme]) .mh-board-grid {
  counter-reset: mh2-tile;
  gap: clamp(8px, .78vw, 12px);
}

.mh-hero:not([data-market-theme]) .mh-board-grid > li {
  position: relative;
  min-width: 0;
  counter-increment: mh2-tile;
}

.mh-hero:not([data-market-theme]) .mh-board-grid > li::before {
  content: "0" counter(mh2-tile);
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 13px;
  font: 600 8px/1 var(--f-mono, monospace);
  letter-spacing: .08em;
  color: #5f5c55;
  pointer-events: none;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tile {
  min-height: 188px;
  gap: 8px;
  padding: 24px 10px 15px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .034), transparent 42%),
    rgba(7, 9, 14, .72) !important;
  border: 1px solid rgba(255, 255, 255, .085) !important;
  border-radius: 7px !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tile::before {
  height: 45%;
  background: radial-gradient(ellipse 52% 90% at 50% 100%, rgba(var(--rar), .12), transparent 76%);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tile::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 1px;
  background: rgb(var(--rar));
  transform: scaleX(.16);
  opacity: .45;
  transition: transform .36s cubic-bezier(.16, 1, .3, 1), opacity .22s ease;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tile:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-tile:focus-visible {
  border-color: rgba(var(--rar), .36) !important;
  transform: translateY(-4px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .05), transparent 44%),
    rgba(9, 11, 17, .94) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .42), 0 0 24px rgba(var(--rar), .075) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tile:hover::after,
body #marketplace .mh-hero:not([data-market-theme]) .mh-tile:focus-visible::after {
  transform: scaleX(1);
  opacity: .8;
}

.mh-hero:not([data-market-theme]) .mh-tile-art::before {
  inset: -6%;
  background: radial-gradient(circle, rgba(var(--rar), .18), rgba(var(--rar), .025) 48%, transparent 70%);
}

.mh-hero:not([data-market-theme]) .mh-tile-art img {
  filter:
    drop-shadow(0 6px 9px rgba(0, 0, 0, .78))
    drop-shadow(0 0 10px rgba(var(--rar), .25))
    brightness(1.04) saturate(1.02);
}

.mh-hero:not([data-market-theme]) .mh-tile-name {
  color: #dedad2;
  font-weight: 650;
}

.mh-hero:not([data-market-theme]) .mh-tile-cat {
  color: #5f5b53;
}

.mh-hero:not([data-market-theme]) .mh-tile-rarity {
  padding: 3px 8px;
  color: rgb(var(--rar));
  background: rgba(var(--rar), .055);
  border-color: rgba(var(--rar), .22);
  border-radius: 3px;
}

/* Pause every v2-owned loop and release compositor hints offscreen. */
.mh-hero:not([data-market-theme]):is(.mh-offscreen, .mh-paused) .mh2-place::after,
.mh-hero:not([data-market-theme]):is(.mh-offscreen, .mh-paused) .mh2-letter {
  animation-play-state: paused !important;
}

.mh-hero:not([data-market-theme]):is(.mh-offscreen, .mh-paused) :is(.mh2-wordmark, .mh-dome, .mh-vault, .mh-beams) {
  will-change: auto !important;
}

/* ── Responsive refinement. ────────────────────────────────────────────── */

@media (max-width: 760px) {
  body #marketplace .mh-hero:not([data-market-theme]) .mh-title {
    font-size: clamp(35px, 10.4vw, 58px) !important;
    letter-spacing: -.015em !important;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-search {
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible;
  }

  .mh-hero:not([data-market-theme]) .mh-search-icon {
    top: 0;
    left: 0;
    width: 54px;
    height: 60px;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-search input {
    height: 60px !important;
    padding: 0 96px 0 68px !important;
  }

  .mh-hero:not([data-market-theme]) .mh-tools {
    top: 30px;
    right: 7px;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-submit {
    width: calc(100% - 12px);
    height: 52px;
    min-width: 0;
    margin: 0 6px 6px !important;
  }

  .mh-hero:not([data-market-theme]) .mh-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .mh-hero:not([data-market-theme]) .mh-chips::-webkit-scrollbar {
    display: none;
  }

  .mh-hero:not([data-market-theme]) .mh-chips-label {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 12px 0 0;
    border-right: 1px solid rgba(255, 255, 255, .07);
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip {
    justify-content: flex-start;
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    height: 44px;
    padding-inline: 13px !important;
  }

  .mh-hero:not([data-market-theme]) .mh-cta {
    width: 100%;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}

@media (max-width: 460px) {
  .mh-hero:not([data-market-theme]) .mh-mark {
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .mh-hero:not([data-market-theme]) .mh-mark b {
    flex: none;
    font-size: 11px;
    letter-spacing: .26em;
  }

  .mh-hero:not([data-market-theme]) .mh-mark em {
    min-width: 0;
    font-size: 9px;
    letter-spacing: .035em;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-title {
    font-size: clamp(31px, 10vw, 42px) !important;
  }

  .mh2-place {
    -webkit-text-stroke-width: .85px;
  }

  .mh2-console-meta {
    font-size: 7.5px;
    letter-spacing: .13em;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-btn {
    flex-basis: 100%;
    width: 100%;
  }

  .mh2-btn-copy {
    flex: 1 1 auto;
  }

  .mh-hero:not([data-market-theme]) .mh-board-grid > li::before {
    top: 10px;
    left: 10px;
  }
}

@media (min-width: 2400px) {
  /* 4K keeps the authored entrance/hover states, but avoids continuously
     repainting giant filtered layers. */
  .mh-hero:not([data-market-theme]) .mh-beams i,
  .mh-hero:not([data-market-theme]) .mh2-place::after {
    animation: none !important;
  }

  .mh-hero:not([data-market-theme]) .mh2-place::after {
    clip-path: inset(0 0 0 56%);
    opacity: .34;
  }

  .mh-hero:not([data-market-theme]) .mh2-wordmark {
    will-change: auto;
  }
}

@media (hover: none) {
  .mh-hero:not([data-market-theme]) .mh2-wordmark {
    transform: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Warm forge refinement — one calm marketplace control, not a terminal UI.
   Decorative indexes, nested badges and hard dividers are visually removed.
   ════════════════════════════════════════════════════════════════════════ */

body #marketplace .mh-hero:not([data-market-theme]) {
  --mh-1: #f7df9b;
  --mh-2: #f5c26b;
  --mh-3: #d4a017;
  --mh-4: #8c6215;
  --mh-rgb: 212, 160, 23;
  --mh2-forge: #e1aa43;
  --mh2-forge-light: #f5c26b;
  --mh2-forge-border: rgba(245, 194, 107, .19);
  background:
    radial-gradient(ellipse 46% 28% at 50% -3%, rgba(245, 194, 107, .075), transparent 72%),
    radial-gradient(ellipse 34% 42% at 3% 44%, rgba(49, 76, 96, .09), transparent 74%),
    radial-gradient(ellipse 34% 38% at 97% 74%, rgba(212, 160, 23, .045), transparent 76%),
    linear-gradient(180deg, #0a090d 0%, #07070a 48%, #040406 100%) !important;
}

.mh-hero:not([data-market-theme]) .mh2-market {
  color: #f2ead9;
  -webkit-text-fill-color: #f2ead9;
}

.mh-hero:not([data-market-theme]) .mh2-place {
  color: rgba(212, 160, 23, .045);
  -webkit-text-fill-color: rgba(212, 160, 23, .045);
  -webkit-text-stroke-color: rgba(230, 181, 76, .76);
  text-shadow: 0 14px 42px rgba(0, 0, 0, .58), 0 0 34px rgba(212, 160, 23, .055);
}

.mh-hero:not([data-market-theme]) .mh2-place::after {
  color: #f5cf75;
  -webkit-text-fill-color: #f5cf75;
}

.mh-hero:not([data-market-theme]) .mh-deck {
  color: #e7decb !important;
}

.mh-hero:not([data-market-theme]) .mh-body {
  color: #a69d8d !important;
}

.mh-hero:not([data-market-theme]) .mh2-console-meta {
  display: none !important;
}

.mh-hero:not([data-market-theme]) .mh-console {
  width: min(100%, 790px);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search {
  min-height: 72px !important;
  height: 72px !important;
  padding: 7px 8px 7px 58px !important;
  background:
    radial-gradient(circle at 16% 0, rgba(245, 194, 107, .055), transparent 34%),
    linear-gradient(180deg, rgba(24, 21, 20, .98), rgba(12, 11, 14, .99)) !important;
  border: 1px solid var(--mh2-forge-border) !important;
  border-radius: 18px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 164, .05),
    0 18px 44px rgba(0, 0, 0, .4) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search::before {
  content: none !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search:focus-within {
  border-color: rgba(245, 194, 107, .46) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 164, .065),
    0 0 0 4px rgba(212, 160, 23, .075),
    0 20px 48px rgba(0, 0, 0, .44) !important;
}

.mh-hero:not([data-market-theme]) .mh-search-icon {
  width: 52px;
  border-right: 0;
}

.mh-hero:not([data-market-theme]) .mh-search-icon i {
  color: var(--mh2-forge);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search input {
  font-family: var(--f-body, "Inter", sans-serif) !important;
  letter-spacing: 0 !important;
  color: #f0e8da !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-search input::placeholder {
  color: #786f62 !important;
}

.mh-hero:not([data-market-theme]) .mh-tools {
  gap: 3px;
  margin-right: 7px;
  padding-left: 0;
  border-left: 0;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tool {
  width: 38px;
  height: 38px;
  color: #81786a !important;
  border-radius: 50% !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tool:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-tool:focus-visible {
  color: var(--mh2-forge-light) !important;
  background: rgba(245, 194, 107, .085) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-submit {
  height: 56px;
  min-width: 178px;
  padding: 0 21px !important;
  color: #171007 !important;
  background: var(--mh2-forge) !important;
  border: 1px solid #efc46a !important;
  border-radius: 13px !important;
  box-shadow:
    inset 0 1px rgba(255, 244, 211, .26),
    0 9px 24px rgba(184, 134, 11, .18) !important;
}

.mh-hero:not([data-market-theme]) .mh-submit kbd {
  display: none !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-submit:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-submit:focus-visible {
  color: #130d05 !important;
  background: #edb84f !important;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px rgba(255, 244, 211, .3),
    0 12px 28px rgba(184, 134, 11, .24) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-submit:active {
  transform: scale(.985);
}

.mh-hero:not([data-market-theme]) .mh-chips {
  align-items: center;
  gap: 4px !important;
  min-height: 40px;
  margin-top: 9px !important;
  border: 0 !important;
}

.mh-hero:not([data-market-theme]) .mh-chips-label {
  align-self: center;
  min-height: 38px;
  margin: 0;
  padding: 0 7px 0 2px;
  color: #71695d;
  border: 0;
}

.mh-hero:not([data-market-theme]) .mh-chip > span {
  display: none !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip {
  position: relative;
  height: 38px;
  padding: 0 10px !important;
  color: #aaa18f !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 9px !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 5px;
  left: 9px;
  height: 1px;
  background: var(--mh2-forge);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: .8;
  transition: transform .28s cubic-bezier(.16, 1, .3, 1);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip:focus-visible {
  color: #f0d9aa !important;
  background: rgba(245, 194, 107, .035) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip:hover::after,
body #marketplace .mh-hero:not([data-market-theme]) .mh-chips .mh-chip:focus-visible::after {
  transform: scaleX(1);
}

.mh-hero:not([data-market-theme]) .mh-cta {
  width: min(100%, 790px);
  gap: 0;
  margin-top: 17px;
  padding: 5px;
  background: rgba(17, 15, 17, .7);
  border: 1px solid rgba(245, 194, 107, .14);
  border-radius: 15px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
}

.mh-hero:not([data-market-theme]) :is(.mh2-btn-index, .mh2-btn-copy small) {
  display: none !important;
}

.mh-hero:not([data-market-theme]) .mh2-btn-copy {
  display: block;
  flex: 1 1 auto;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn {
  flex: 1 1 50%;
  min-height: 48px;
  padding: 0 17px !important;
  color: #cfc5b3 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-ghost {
  border-left: 1px solid rgba(245, 194, 107, .12) !important;
  border-radius: 0 10px 10px 0 !important;
}

.mh-hero:not([data-market-theme]) .mh2-btn-copy strong {
  color: inherit;
  font-size: 12px;
  letter-spacing: .085em;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid .mh2-btn-copy strong {
  color: #f1c76f;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn > i {
  margin-left: auto;
  color: #d7a84b;
  transition: transform .28s cubic-bezier(.16, 1, .3, 1), color .2s ease;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-btn:focus-visible {
  color: #f2e7d2 !important;
  background: rgba(245, 194, 107, .065) !important;
  border-color: transparent !important;
  transform: none;
  box-shadow: none !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid:hover > i,
body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid:focus-visible > i {
  transform: scale(1.12) rotate(-4deg);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-ghost:hover > i,
body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-ghost:focus-visible > i {
  transform: translateX(4px);
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tile {
  border-radius: 14px !important;
}

.mh-hero:not([data-market-theme]) .mh-tile-rarity {
  border-radius: 6px;
}

@media (max-width: 760px) {
  body #marketplace .mh-hero:not([data-market-theme]) .mh-search {
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border-radius: 16px !important;
  }

  .mh-hero:not([data-market-theme]) .mh-search-icon {
    width: 52px;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-search input {
    padding-left: 56px !important;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-submit {
    width: calc(100% - 12px);
    height: 52px;
    min-width: 0;
    margin: 0 6px 6px !important;
    border-radius: 11px !important;
  }

  .mh-hero:not([data-market-theme]) .mh-chips,
  .mh-hero:not([data-market-theme]) .mh-chips-label {
    min-height: 38px;
  }
}

@media (max-width: 460px) {
  .mh-hero:not([data-market-theme]) .mh-cta {
    gap: 0;
    padding: 5px;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-btn {
    flex-basis: auto;
    width: 100%;
    border-radius: 10px 10px 0 0 !important;
  }

  body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-ghost {
    border-top: 1px solid rgba(245, 194, 107, .12) !important;
    border-left: 0 !important;
    border-radius: 0 0 10px 10px !important;
  }
}

/* Final micro-QA: clear overflow affordance, grouped copy action and a compact
   consent bar that does not consume the mobile marketplace viewport. */
body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid .mh2-btn-copy {
  flex: 0 1 auto;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid > i {
  margin-right: auto;
  margin-left: 10px;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid.is-copied {
  background: rgba(79, 197, 122, .055) !important;
  border-color: transparent !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid.is-copied .mh2-btn-copy strong {
  color: #80d69a;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-btn-solid.is-copy-error {
  background: rgba(255, 85, 102, .05) !important;
  border-color: transparent !important;
}

@media (max-width: 760px) {
  .mh-hero:not([data-market-theme]) .mh-chips {
    padding-right: 26px;
    scroll-padding-inline: 8px 26px;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 23px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 23px), transparent 100%);
  }
}

@media (max-width: 460px) {
  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner.cookie-banner {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 84px 40px !important;
    width: auto !important;
    height: auto !important;
    min-height: 52px !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    text-align: left !important;
    border-radius: 14px !important;
  }

  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner .cookie-text {
    display: flex !important;
    grid-column: auto !important;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    font-size: 0 !important;
    line-height: 1 !important;
    white-space: nowrap;
  }

  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner .cookie-text::before {
    content: "Cookies · ";
    flex: none;
    font: 650 11px/1.1 var(--f-body, "Inter", sans-serif);
    color: #e8dfcf;
  }

  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner .cookie-text i {
    flex: none;
    order: -1;
    margin-right: 5px !important;
    font-size: 13px !important;
  }

  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner .cookie-text a {
    min-width: 0;
    overflow: hidden;
    font: 600 11px/1.1 var(--f-body, "Inter", sans-serif);
    text-overflow: ellipsis;
  }

  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner .cookie-btn {
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 0 7px !important;
    font-size: 0 !important;
    border-radius: 10px !important;
  }

  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner .cookie-btn i {
    margin: 0 4px 0 0;
    font-size: 11px;
  }

  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner .cookie-btn[data-cookie-choice="accept"]::after {
    content: "Akceptuj";
    font: 750 10.5px/1 var(--f-body, "Inter", sans-serif);
  }

  body:has(#marketplace .mh-hero:not([data-market-theme])) #cookieBanner .cookie-btn[data-cookie-choice="decline"] i {
    margin: 0;
    font-size: 12px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Fold palette unification — the hero, item board and market content now
   share one warm obsidian material. Rarity colours stay semantic accents.
   ════════════════════════════════════════════════════════════════════════ */

body #marketplace {
  --bg-0: #08080d;
  --bg-1: #0b090d;
  --bg-2: #110e12;
  --bg-3: #191419;
  --bg-4: #221a1e;
  --glass-border: rgba(245, 194, 107, .16);
  --glass-border-hover: rgba(245, 194, 107, .34);
  --tx-0: #fff7e8;
  --tx-1: #f2eadc;
  --tx-2: #c9bea9;
  --tx-3: #8b8172;
  --tx-dim: #625a4e;
}

body #marketplace::before {
  background:
    radial-gradient(ellipse 1200px 720px at 18% 5%, rgba(212, 160, 23, .075), transparent 58%),
    radial-gradient(ellipse 1050px 760px at 88% 30%, rgba(163, 103, 35, .045), transparent 60%),
    linear-gradient(180deg, #0a080b 0%, #08070a 40%, #08080d 72%, #08080d 100%) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) {
  background:
    radial-gradient(ellipse 46% 28% at 50% -3%, rgba(245, 194, 107, .075), transparent 72%),
    radial-gradient(ellipse 34% 42% at 3% 44%, rgba(116, 84, 47, .055), transparent 74%),
    radial-gradient(ellipse 34% 38% at 97% 74%, rgba(212, 160, 23, .045), transparent 76%),
    linear-gradient(180deg, #0a090d 0%, #08070a 55%, #08080d 100%) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-board-head h2 {
  color: #e1aa43 !important;
}

.mh-hero:not([data-market-theme]) .mh-board-head .mh-rule {
  background: linear-gradient(90deg, rgba(245, 194, 107, .22), rgba(245, 194, 107, .04) 72%, transparent);
}

.mh-hero:not([data-market-theme]) .mh-board-count {
  color: #71695d;
}

.mh-hero:not([data-market-theme]) .mh-board-grid > li::before {
  color: #6f6659;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tile {
  background:
    radial-gradient(ellipse 76% 54% at 50% 0, rgba(245, 194, 107, .035), transparent 72%),
    linear-gradient(180deg, rgba(20, 18, 18, .9), rgba(9, 9, 12, .95)) !important;
  border-color: rgba(245, 194, 107, .12) !important;
  box-shadow: inset 0 1px rgba(255, 224, 164, .03) !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-tile:hover,
body #marketplace .mh-hero:not([data-market-theme]) .mh-tile:focus-visible {
  background:
    radial-gradient(ellipse 78% 58% at 50% 0, rgba(var(--rar), .065), transparent 72%),
    linear-gradient(180deg, rgba(25, 21, 21, .96), rgba(11, 10, 13, .98)) !important;
}

.mh-hero:not([data-market-theme]) .mh-tile-name {
  color: #eee4d2;
}

.mh-hero:not([data-market-theme]) .mh-tile-cat {
  color: #756b5d;
}

.mh-hero:not([data-market-theme]) .mh-ledger {
  background: linear-gradient(180deg, rgba(17, 15, 17, .58), rgba(9, 9, 12, .3));
  border-top-color: rgba(245, 194, 107, .14);
  border-bottom: 1px solid rgba(245, 194, 107, .055);
  box-shadow: inset 0 1px rgba(255, 224, 164, .015);
}

.mh-hero:not([data-market-theme]) .mh-cell + .mh-cell::before {
  background: linear-gradient(180deg, transparent, rgba(245, 194, 107, .085) 30% 70%, transparent);
}

.mh-hero:not([data-market-theme]) .mh-cell dt,
.mh-hero:not([data-market-theme]) .mh-cell-note dd {
  color: #81786a !important;
}

.mh-hero:not([data-market-theme]) .mh-cell dd,
body #marketplace .mh-hero:not([data-market-theme]) .mh-live strong {
  color: #e8dfcf !important;
}

body #marketplace .mh-hero:not([data-market-theme]) .mh-live:not([data-titan-state="online"]) .mh-live-label {
  color: #81786a !important;
  background: rgba(245, 194, 107, .045) !important;
  border-color: rgba(245, 194, 107, .11);
}

/* The rest of the marketplace keeps the same warm-black material instead of
   returning to the old blue-black glass immediately below the hero. */
body #marketplace :is(.glass, .item-card, .auction-card, .collection-card, .seller-card, .event-card, .deal-card, .tool-card, .stat-card) {
  background:
    radial-gradient(ellipse 80% 54% at 50% 0, rgba(245, 194, 107, .028), transparent 72%),
    linear-gradient(180deg, rgba(22, 18, 20, .86), rgba(10, 9, 12, .92)) !important;
}

body #marketplace .filters-bar {
  background: linear-gradient(180deg, rgba(14, 11, 14, .95), rgba(8, 8, 13, .97)) !important;
}

body #marketplace :is(.filter-select, .filter-input) {
  background: rgba(12, 10, 13, .86) !important;
}
