body {
  display: flex;
  flex-direction: column;
}

body.lot-data-page {
  --market-bg: #020304;
  --market-panel: #080b10;
  --market-panel-2: #0d121a;
  --market-panel-3: #111824;
  --market-line: #263041;
  --market-line-strong: #3b4658;
  --market-text: #f5f7fb;
  --market-muted: #aab4c4;
  --market-faint: #738095;
  --market-gold: #fbbf24;
  --market-gold-2: #ffd45a;
  --market-green: #44e083;
  --market-blue: #7fb0ff;
  --market-red: #f27c61;
  isolation: isolate;
  overflow-x: hidden;
  background: var(--market-bg);
}

main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 20px 0 58px;
  overflow: hidden;
}

main::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 3, 4, .16) 0%, rgba(2, 3, 4, .3) 58%, rgba(0, 0, 0, .62) 100%);
  pointer-events: none;
}

.market-container {
  position: relative;
  z-index: 1;
  max-width: 1020px;
  width: 100%;
}

@keyframes market-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes market-sheen {
  from {
    transform: translateX(-115%) skewX(-18deg);
  }

  to {
    transform: translateX(115%) skewX(-18deg);
  }
}

.market-toolbar {
  display: grid;
  grid-template-columns: auto minmax(280px, 430px);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: market-rise .24s ease both;
}

.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.market-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(58, 67, 84, .78);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(23, 28, 37, .92), rgba(9, 12, 18, .94));
  color: #d3d9e4;
  font-weight: 600;
  font-size: .74rem;
  text-decoration: none;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 1px 0 rgba(0, 0, 0, .48);
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.market-tabs a:hover {
  background:
    linear-gradient(180deg, rgba(30, 36, 48, .96), rgba(12, 16, 23, .96));
  border-color: rgba(96, 110, 136, .82);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.market-tabs a.active {
  border-color: rgba(251, 191, 36, .9);
  background:
    linear-gradient(180deg, rgba(76, 58, 25, .92), rgba(28, 24, 18, .96));
  color: #ffd45a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 223, 135, .14),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 0 1px rgba(251, 191, 36, .12),
    0 5px 14px rgba(0, 0, 0, .28);
}

.market-tabs a.active::after {
  content: "";
  position: absolute;
  inset: -40% 0;
  background: linear-gradient(90deg, transparent, rgba(255, 224, 138, .18), transparent);
  transform: translateX(-115%) skewX(-18deg);
  pointer-events: none;
}

.market-tabs a.active:hover::after {
  animation: market-sheen .62s ease;
}

.market-tabs a:active,
.item-card:active {
  transform: translateY(0) scale(.99);
}

.market-search {
  width: min(100%, 430px);
  position: relative;
  justify-self: end;
  height: 32px;
}

.market-search input {
  display: block;
  height: 32px;
  min-height: 32px;
  width: 100%;
  padding: 0 48px 0 38px;
  border: 1px solid rgba(50, 58, 73, .78);
  border-radius: 5px;
  background: rgba(4, 6, 10, .74);
  color: #fff;
  font-size: .8rem;
  line-height: 32px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .035),
    0 1px 0 rgba(0, 0, 0, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.market-search input:focus {
  border-color: rgba(251, 191, 36, .7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 0 0 2px rgba(251, 191, 36, .1);
}

.market-search .market-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 15px;
  height: 15px;
  fill: #f5f7fb !important;
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, .28));
  transform: translateY(-50%);
  pointer-events: none;
}

.market-search-submit {
  position: absolute;
  right: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 100%;
  border: 0;
  border-left: 1px solid rgba(50, 58, 73, .78);
  border-radius: 0 5px 5px 0;
  background: transparent;
  color: #f5f7fb;
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, .24));
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.market-search-submit svg {
  position: static;
  left: auto;
  top: auto;
  width: 15px;
  height: 15px;
  fill: currentColor !important;
  transform: none;
  pointer-events: none;
}

.market-search-submit:hover {
  background: rgba(251, 191, 36, .08);
  border-color: rgba(251, 191, 36, .75);
  color: var(--market-gold);
}

h1 {
  font-size: clamp(2.05rem, 3.7vw, 3rem);
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: 0;
  color: #fff;
  text-align: left;
}

h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
  letter-spacing: 0;
  text-align: left;
}

h2::before {
  content: "";
  width: 3px;
  height: 1em;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffe08a, rgba(251, 191, 36, .72));
  box-shadow: 0 0 10px rgba(251, 191, 36, .2);
}

.market-hero {
  position: relative;
  display: block;
  margin: 0 auto 14px;
  padding: 18px 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(128, 143, 169, .28);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  text-align: left;
  animation: market-rise .28s ease both;
}

.market-hero::before {
  display: none;
}

.market-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: 144px;
  height: 1px;
  background: linear-gradient(90deg, rgba(251, 191, 36, .78), rgba(251, 191, 36, .28), transparent);
}

.market-hero__copy,
.market-hero__panel {
  position: relative;
  z-index: 1;
}

.market-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.market-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  margin-bottom: 0;
  padding: 0 8px;
  border: 1px solid rgba(251, 191, 36, .55);
  border-radius: 5px;
  background: rgba(251, 191, 36, .1);
  color: #ffd166;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.market-refresh-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: #aeb8c8;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}

#market-refresh-info {
  color: #d6deea;
}

.market-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--market-green);
  box-shadow: 0 0 0 3px rgba(68, 224, 131, .16);
}

.market-hero p {
  margin: 0;
  color: #d6dde9;
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0 20px;
}

.stat-card {
  --stat-accent: var(--market-gold);
  --stat-border: rgba(180, 142, 65, .42);
  --lot-texture-base: rgba(8, 11, 16, .76);
  position: relative;
  overflow: hidden;
  min-height: 96px;
  padding: 14px 12px 12px;
  border: 1px solid var(--stat-border);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(12, 17, 25, .9), rgba(6, 9, 14, .76)),
    var(--lot-texture-base);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .025),
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 8px 22px rgba(0, 0, 0, .16);
  animation: market-rise .28s ease both;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.stat-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -28px;
  bottom: -32px;
  width: 130px;
  height: 86px;
  background: radial-gradient(ellipse, rgba(251, 191, 36, .13), transparent 66%);
  pointer-events: none;
}

.stat-card--green::after {
  background: radial-gradient(ellipse, rgba(68, 224, 131, .12), transparent 64%);
}

.stat-card--blue::after {
  background: radial-gradient(ellipse, rgba(127, 176, 255, .12), transparent 64%);
}

.stat-card:hover {
  --lot-texture-base: rgba(14, 20, 31, .78);
  border-color: color-mix(in srgb, var(--stat-accent) 58%, rgba(126, 143, 170, .34));
  transform: translateY(-2px);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--stat-accent), rgba(255, 255, 255, .12), transparent);
  opacity: .82;
}

.stat-card--green {
  --stat-accent: var(--market-green);
  --stat-border: rgba(75, 162, 108, .45);
}

.stat-card--blue {
  --stat-accent: var(--market-blue);
  --stat-border: rgba(120, 154, 205, .46);
}

.stat-card--gold {
  --stat-accent: var(--market-gold);
  --stat-border: rgba(185, 147, 61, .46);
}

.stat-card__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stat-card__body {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 92px);
}

.stat-card__icon {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 22px;
  border: 0;
  color: rgba(251, 191, 36, .55);
  background: transparent;
  font-family: Georgia, serif;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 8px rgba(251, 191, 36, .26);
}

.stat-card--green .stat-card__icon {
  color: rgba(68, 224, 131, .58);
  text-shadow: 0 0 8px rgba(68, 224, 131, .24);
}

.stat-card--blue .stat-card__icon {
  color: rgba(127, 176, 255, .58);
  text-shadow: 0 0 8px rgba(127, 176, 255, .24);
}

.stat-card__icon::before {
  content: "R";
}

.stat-card__icon::after {
  display: none;
}

.stat-card .label {
  font-size: .6rem;
  color: #b4bdca;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
  font-weight: 600;
}

.stat-card .value {
  font-size: 1.72rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
  line-height: 1;
}

.stat-card .value.gold {
  color: var(--market-gold);
}

.stat-card .value.green {
  color: var(--market-green);
}

.stat-card__sub {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: #9aa5b5;
  font-size: .64rem;
}

.stat-card__delta {
  min-height: 12px;
  margin-top: 4px;
  font-size: 0;
  line-height: 1;
}

.stat-card__delta-value {
  display: inline-flex;
  align-items: center;
  color: var(--market-green);
  font-size: .62rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card__delta-value--down {
  color: var(--market-red);
}

.stat-card__delta-value--flat {
  color: #9aa5b5;
}

.market-sparkline {
  fill: none;
  stroke: currentColor;
  opacity: .92;
}

.market-sparkline__area {
  fill: currentColor;
  opacity: .16;
  stroke: none;
}

.market-sparkline__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.item-card:hover .market-sparkline__line,
.stat-card:hover .market-sparkline__line {
  stroke-dasharray: 130;
  animation: spark-draw .7s ease both;
}

@keyframes spark-draw {
  from {
    stroke-dashoffset: 130;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.stat-card__spark-slot {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 13px;
  width: 84px;
  height: 34px;
  font-size: 0;
  line-height: 0;
  pointer-events: none;
}

.stat-card__spark {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--market-gold);
  opacity: .9;
}

.stat-card--green .stat-card__spark {
  color: var(--market-green);
}

.stat-card--blue .stat-card__spark {
  color: var(--market-blue);
}

.market-section {
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: market-rise .28s ease both;
}

.market-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 8px;
  padding: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
}

.market-section__note {
  display: block;
  color: #94a1b4;
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.market-results-note {
  margin: 0 0 12px;
  color: #aeb8c8;
  font-size: .85rem;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.item-card {
  --item-accent: #d9b75c;
  --item-accent-rgb: 217, 183, 92;
  --lot-texture-base: rgba(8, 11, 16, .72);
  --market-card-texture: var(--lot-map-texture-image, url("https://legendsoftaria.com/background.webp"));
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 9px;
  cursor: pointer;
  border: 1px solid rgba(125, 143, 170, .32);
  border-radius: 6px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13, 18, 26, .92), rgba(6, 9, 14, .96)),
    var(--market-card-texture),
    var(--lot-texture-base);
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: auto, cover, auto;
  background-blend-mode: normal, multiply, normal;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .025),
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 7px 18px rgba(0, 0, 0, .13);
  animation: market-rise .28s ease both;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.item-card--green {
  --item-accent: #44e083;
  --item-accent-rgb: 68, 224, 131;
  --lot-texture-base: rgba(8, 11, 16, .64);
  border-color: rgba(76, 155, 103, .46);
}

.item-card--copper {
  --item-accent: #d08a4a;
  --item-accent-rgb: 208, 138, 74;
  --lot-texture-base: rgba(8, 11, 16, .64);
  border-color: rgba(160, 115, 73, .44);
}

.item-card--blue {
  --item-accent: #7fb0ff;
  --item-accent-rgb: 127, 176, 255;
  --lot-texture-base: rgba(8, 11, 16, .64);
  border-color: rgba(112, 140, 177, .44);
}

.item-card--red {
  --item-accent: #e07c62;
  --item-accent-rgb: 224, 124, 98;
  --lot-texture-base: rgba(8, 11, 16, .64);
  border-color: rgba(158, 92, 78, .44);
}

.item-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--item-accent-rgb), .16), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), transparent 48%);
  opacity: .55;
  transition: opacity .18s ease, background .18s ease;
  pointer-events: none;
}

.item-card::after {
  content: ">";
  margin-left: auto;
  color: #77869b;
  font-weight: 600;
  opacity: .55;
  transform: translateX(-2px);
  transition: opacity .18s ease, transform .18s ease, color .18s ease;
}

.item-card:hover {
  --lot-texture-base: #121a27;
  border-color: rgba(var(--item-accent-rgb), .66);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .035),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 0 0 1px rgba(var(--item-accent-rgb), .08),
    0 10px 22px rgba(0, 0, 0, .18);
}

.item-card:hover::before {
  opacity: 1;
}

.item-card:hover::after {
  opacity: 1;
  transform: translateX(0);
  color: var(--market-gold);
}

.item-card img,
.item-card .info,
.item-card::after,
.item-icon-frame {
  position: relative;
  z-index: 1;
}

.item-icon-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(var(--item-accent-rgb), .28);
  border-radius: 8px;
  background: rgba(18, 25, 36, .92);
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.item-card img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  flex-shrink: 0;
  border-radius: 6px;
  background: transparent;
  padding: 2px;
  transition: transform .18s ease;
}

.item-card:hover img {
  transform: scale(1.08);
}

.item-card .info {
  flex: 1;
  min-width: 0;
}

.item-card .name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-size: .88rem;
}

.item-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  color: #c7cfda;
  font-size: .76rem;
}

.item-card .meta span {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d4dbe6;
  white-space: nowrap;
}

.item-card .price {
  color: var(--market-gold);
  font-weight: 600;
}

.market-ticker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--market-line);
  border-radius: 0;
  background: rgba(3, 5, 8, .72);
  color: #c4ccda;
  font-size: .85rem;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: none;
}

.recent-trades {
  --lot-texture-base: rgba(8, 11, 16, .72);
}

.recent-trades__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f5f7fb;
  font-weight: 600;
  text-decoration: none;
}

.recent-trades__item:hover {
  color: var(--market-gold);
  text-decoration: none;
}

.recent-trades__icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
}

.recent-trades__icon img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.recent-trades__value {
  color: var(--market-gold);
}

.recent-trades__value small {
  color: var(--market-faint);
  font-size: .68rem;
  font-weight: 600;
}

.market-ticker strong {
  color: var(--market-gold);
  font-weight: 600;
}

.market-ticker__label {
  color: #fff;
  font-weight: 600;
}

.market-ticker__track {
  display: flex;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-ticker__up {
  color: var(--market-green);
}

.market-ticker__flat {
  color: #aeb8c8;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  margin: 0;
  padding: 20px 16px;
  border: 1px dashed #344056;
  border-radius: 8px;
  background: #05070b;
  color: #aeb8c8;
  text-align: center;
}

.empty-state.market-empty {
  min-height: 112px;
  border-style: solid;
  background: linear-gradient(135deg, rgba(5, 7, 11, .98), rgba(12, 18, 28, .88));
}

.market-section--compact-empty .empty-state.market-empty {
  flex-direction: row;
  justify-content: flex-start;
  min-height: 0;
  padding: 10px 12px;
  border-color: rgba(126, 143, 170, .26);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(251, 191, 36, .07), transparent 38%),
    rgba(5, 8, 13, .42);
  color: #aeb8c8;
  text-align: left;
}

.market-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #344056;
  border-radius: 8px;
  background: #0d131d;
  color: var(--market-gold);
  font-weight: 600;
}

.market-section--compact-empty .market-empty__icon {
  width: 24px;
  height: 24px;
  border-color: rgba(251, 191, 36, .32);
  border-radius: 6px;
  background: rgba(13, 19, 29, .72);
  font-size: .75rem;
}

.market-empty strong {
  color: #fff;
  font-weight: 600;
}

.market-section--compact-empty .market-empty strong {
  color: #dfe6f1;
  font-size: .86rem;
}

.empty-state p {
  margin: 0;
  color: #c9d0dc;
}

.market-section--compact-empty .empty-state p {
  color: #8f9aab;
  font-size: .82rem;
}

.empty-state h1 {
  margin: 0;
  text-align: center;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  fill: #aeb8c8;
  margin-bottom: 12px;
}

.market-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 26px;
  border: 1px solid #2d3748;
  border-radius: 8px;
  background: #0b1018;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .34);
  animation: market-rise .28s ease both;
}

.market-page-head p {
  max-width: 620px;
  margin: 0;
  color: #d6dbe6;
}

.market-panel {
  min-width: 0;
  animation: market-rise .28s ease both;
}

.market-container > h2 {
  margin: 30px 0 12px;
}

.market-panel h2,
.chart-container h2 {
  margin: 0 0 12px;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.item-header img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  padding: 4px;
}

.item-header .title {
  flex: 1;
}

.chart-container {
  position: relative;
  padding: 20px;
  margin: 20px 0;
  background: #080c13;
  border: 1px solid var(--market-line);
  border-radius: 8px;
  border-color: var(--market-line);
  overflow: hidden;
  animation: market-rise .28s ease both;
}

.chart-frame {
  position: relative;
  height: 300px;
  min-height: 300px;
  overflow: hidden;
}

.chart-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.chart-container canvas[hidden] {
  display: none !important;
}

.chart-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 20px;
  border: 1px dashed #344056;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(5, 7, 11, .96), rgba(12, 18, 28, .88));
  color: #c9d0dc;
  text-align: center;
  pointer-events: none;
}

.chart-empty-state[hidden] {
  display: none !important;
}

.chart-empty-state strong {
  color: #fff;
  font-weight: 600;
}

.chart-empty-state p {
  max-width: 320px;
  margin: 0;
  color: #aeb8c8;
  font-size: .85rem;
}

.timeframe-btns {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.shop-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 26px;
  border: 1px solid #2d3748;
  border-radius: 8px;
  background: #0b1018;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .34);
  flex-wrap: wrap;
  animation: market-rise .28s ease both;
}

.shop-header .title {
  flex: 1;
}

.shop-header h1 {
  margin: 0 0 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .08);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  color: var(--lot-text-muted);
  font-weight: 600;
}

.item-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px;
  background: #0b1018;
  border: 1px solid #2d3748;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .34);
}

.item-hero img {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  padding: 6px;
  flex-shrink: 0;
}

.item-hero-info {
  flex: 1;
  min-width: 0;
}

.item-hero-prices {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.item-hero-price {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.item-hero-price-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--lot-text-faint);
  font-weight: 600;
}

.item-hero-price-value {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0;
}

.item-hero-price-value.gold {
  color: var(--market-gold);
}

.item-hero-price-value.green {
  color: var(--market-green);
}

.item-hero-price-sub {
  font-size: .75rem;
  color: var(--lot-text-faint);
}

.item-stats-panel {
  background: #080c13;
  border: 1px solid var(--market-line);
  border-radius: 8px;
  margin-bottom: 4px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
}

.market-data-list {
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid var(--market-line);
  border-radius: 8px;
  background: #080c13;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
}

.market-data-list__header {
  display: none;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: #0d131d;
  color: #9ca8ba;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.market-data-row {
  min-width: 0;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background-color .16s ease;
}

.market-data-row:last-child {
  border-bottom: 0;
}

.market-data-row:hover {
  background: rgba(255, 255, 255, .03);
}

.market-data-cell,
.market-data-metric {
  min-width: 0;
}

.market-data-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #f5f7fb;
  font-weight: 600;
  text-decoration: none;
}

.market-data-item > span:last-child,
.market-data-cell--shop a,
.market-data-metric strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.market-data-item:hover {
  color: var(--market-gold);
  text-decoration: none;
}

.market-data-cell--shop {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.market-data-cell--shop a {
  font-weight: 600;
}

.market-data-cell--shop small {
  color: var(--market-faint);
  font-size: .72rem;
}

.market-data-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  color: #dce3ee;
  font-size: .84rem;
}

.market-data-metric strong {
  color: #edf1f7;
  font-weight: 600;
}

.market-data-label {
  color: var(--market-faint);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.market-data-value--gold {
  color: var(--market-gold) !important;
  white-space: nowrap;
}

.market-data-cell--time {
  color: var(--market-muted);
  white-space: nowrap;
}

.market-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas:
    "item value"
    "item time";
  align-items: center;
  gap: 2px 14px;
}

.market-activity-row .market-data-cell--item {
  grid-area: item;
}

.market-activity-row .recent-trades__value {
  grid-area: value;
}

.market-activity-row .market-data-cell--time {
  grid-area: time;
}

.market-activity-row .market-data-metric {
  align-items: flex-end;
  text-align: right;
}

.market-data-list--periods {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.market-period-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding-block: 12px;
}

.market-period-row .period-label {
  padding-top: 16px;
  color: var(--market-muted);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.market-period-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 72px), 1fr));
  gap: 12px;
  min-width: 0;
}

.market-listing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas:
    "shop price"
    "shop stock";
  align-items: center;
  gap: 3px 14px;
}

.market-listing-row .market-data-cell--shop {
  grid-area: shop;
}

.market-listing-row .market-data-cell--price {
  grid-area: price;
}

.market-listing-row .market-data-cell--stock {
  grid-area: stock;
}

.market-listing-row .market-data-metric {
  align-items: flex-end;
  text-align: right;
}

.market-trade-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) max-content max-content;
  align-items: center;
  gap: 10px;
}

.market-trade-row .market-data-cell--quantity,
.market-trade-row .market-data-cell--time {
  align-items: flex-end;
  text-align: right;
}

.market-sale-row {
  display: grid;
  gap: 10px;
}

.market-sale-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 88px), 1fr));
  gap: 10px;
  min-width: 0;
}

.market-sale-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
}

.market-sale-icon img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

@container (min-width: 340px) {
  .market-listing-row {
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    grid-template-areas: "shop price stock";
  }
}

@container (min-width: 520px) {
  .market-data-list__header.market-activity-grid,
  .market-activity-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(130px, .45fr) minmax(90px, .32fr);
    align-items: center;
    gap: 14px;
  }

  .market-data-list__header.market-activity-grid {
    padding-inline: 14px;
  }

  .market-activity-row {
    grid-template-areas: "item value time";
  }

  .market-activity-row .market-data-metric {
    align-items: flex-start;
    text-align: left;
  }

  .market-activity-row .market-data-label {
    display: none;
  }
}

@container (min-width: 740px) {
  .market-sale-row {
    grid-template-columns: minmax(237px, .85fr) minmax(380px, 2fr);
    align-items: center;
    gap: 14px;
  }

  .market-sale-metrics {
    grid-template-columns: minmax(125px, 1.35fr) minmax(82px, 1fr) minmax(44px, .55fr) minmax(80px, 1fr);
  }
}

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

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

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

  .market-hero__panel {
    max-width: none;
  }
}

@media (max-width: 768px) {
  main {
    padding-top: 18px;
  }

  .market-toolbar,
  .market-page-head {
    grid-template-columns: 1fr;
    align-items: stretch;
    flex-direction: column;
  }

  .market-tabs {
    width: 100%;
  }

  .market-search {
    width: 100%;
  }

  .market-tabs a {
    flex: 0 0 auto;
    justify-content: center;
  }

  .market-hero,
  .market-page-head,
  .shop-header,
  .item-hero {
    padding: 20px;
  }

  .market-section__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .item-grid {
    grid-template-columns: 1fr;
  }

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

  .market-ticker {
    align-items: center;
    flex-direction: column;
    white-space: normal;
  }

  .market-ticker__track {
    flex-wrap: wrap;
    justify-content: center;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .item-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .item-hero-prices {
    justify-content: center;
  }
}
