.market-screen,
.trade-screen {
  min-height: calc(100vh - var(--header-height));
  padding: 28px clamp(22px, 4vw, 72px) 70px;
  color: #e7e5df;
}

.market-shell,
.trade-shell {
  max-width: 1540px;
  margin: 0 auto;
}

.market-header,
.trade-header {
  min-height: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.market-header h1,
.trade-header h1 {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.07em;
}

.market-header p,
.trade-header p {
  margin: 3px 0 0;
  color: rgba(231, 229, 223, 0.42);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.market-search {
  width: 280px;
  height: 37px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 19, 18, 0.66);
}

.market-search img {
  width: 14px;
  opacity: 0.58;
}

.market-search input,
.trade-search-row input,
.trade-money input,
.trade-message,
.market-price-input input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #e9e7e1;
  background: transparent;
  font: 12px var(--font-ui);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.market-card {
  min-height: 286px;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(34, 35, 33, 0.88);
  transition: border-color 100ms ease, transform 100ms ease;
}

.market-card:hover {
  border-color: rgba(168, 205, 216, 0.28);
}

.market-item-open {
  min-width: 0;
  display: grid;
  grid-template-rows: 166px auto;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.market-item-open:hover .market-item-image,
.market-item-open:focus-visible .market-item-image {
  filter: brightness(1.055);
}

.market-item-open:focus-visible {
  outline: 1px solid rgba(176, 214, 225, 0.55);
  outline-offset: -1px;
}

.market-item-image {
  width: 100%;
  height: 166px;
  object-fit: contain;
  padding: 12px;
  border-bottom: 3px solid var(--market-rarity);
  background: linear-gradient(#747571, #a2a29e);
}

.market-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
}

.market-item-copy strong,
.market-item-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-item-copy strong {
  font-size: 13px;
}

.market-item-copy span {
  color: rgba(232, 230, 224, 0.63);
  font-size: 11px;
}

.market-item-copy small {
  margin-top: 8px;
  color: rgba(232, 230, 224, 0.35);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.market-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  background: rgba(10, 11, 10, 0.32);
}

.market-price {
  color: #b8d9c0;
  font-size: 16px;
}

.market-action,
.trade-primary,
.trade-secondary,
.market-cancel {
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  color: #f3f5ee;
  background: #658d35;
  font: 700 10px var(--font-ui);
  letter-spacing: 0.07em;
}

.market-cancel,
.trade-secondary {
  background: #393a37;
}

.market-empty,
.trade-empty {
  padding: 62px 20px;
  color: rgba(232, 230, 224, 0.46);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.market-sell-shade {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: grid;
  place-items: center;
  background: rgba(12, 13, 12, 0.72);
  backdrop-filter: blur(5px);
}

.market-sell-panel {
  width: min(460px, calc(100vw - 40px));
  padding: 24px;
  border-top: 2px solid #84bdce;
  background: #232421;
}

.market-sell-panel h2 {
  margin: 5px 0 20px;
  font-size: 18px;
}

.market-price-input {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.market-price-input span,
.trade-money span {
  display: block;
  color: rgba(234, 232, 226, 0.43);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.market-price-input input {
  height: 28px;
  margin-top: 3px;
  font-size: 18px;
}

.market-sell-panel p {
  color: rgba(234, 232, 226, 0.45);
  font-size: 9px;
}

.market-sell-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.trade-tabs {
  display: flex;
  gap: 4px;
}

.trade-tab {
  height: 34px;
  padding: 0 18px;
  border: 0;
  color: rgba(235, 233, 227, 0.5);
  background: rgba(255, 255, 255, 0.04);
  font: 11px var(--font-ui);
}

.trade-tab.is-selected {
  color: #dff1f6;
  background: rgba(96, 156, 176, 0.23);
  box-shadow: inset 0 -2px #82bed2;
}

.trade-player-search {
  margin-top: 18px;
  padding: 16px;
  background: rgba(28, 29, 27, 0.82);
}

.trade-player-search h2,
.trade-item-column h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.trade-search-row {
  display: flex;
  gap: 7px;
}

.trade-search-row input,
.trade-message {
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.trade-player-results {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.trade-friend-shortcuts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.trade-friend-shortcuts > span {
  margin-right: 3px;
  color: rgba(228, 226, 221, 0.38);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.trade-friend-shortcut {
  min-height: 28px;
  padding: 0 10px;
  background: rgba(91, 143, 159, 0.17);
  color: rgba(229, 237, 238, 0.78);
  font-size: 9px;
}

.trade-player-result {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 0;
  color: #e4e2dd;
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}

.trade-player-result span {
  color: rgba(228, 226, 221, 0.42);
  font-size: 9px;
}

.trade-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.trade-item-column {
  min-height: 360px;
  padding: 12px;
  background: rgba(28, 29, 27, 0.82);
}

.trade-item-column > header {
  display: flex;
  justify-content: space-between;
}

.trade-item-column > header span {
  color: rgba(230, 228, 222, 0.4);
  font-size: 9px;
}

.trade-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 5px;
  max-height: 430px;
  overflow: auto;
}

.trade-item {
  min-height: 116px;
  display: grid;
  grid-template-rows: 88px auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eeeae4;
  background: rgba(255, 255, 255, 0.04);
}

.trade-item.is-selected {
  border-color: #b7d9e4;
  box-shadow: inset 0 0 0 1px #b7d9e4;
}

.trade-item img {
  width: 100%;
  height: 88px;
  object-fit: contain;
  padding: 5px;
  border-bottom: 2px solid var(--trade-rarity);
}

.trade-item span {
  padding: 5px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-terms {
  display: grid;
  grid-template-columns: 180px 180px 1fr auto;
  gap: 7px;
  margin-top: 8px;
  padding: 12px;
  background: rgba(28, 29, 27, 0.82);
}

.trade-money {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.trade-money input {
  height: 23px;
}

.trade-offer-list {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.trade-offer-card {
  padding: 14px 16px;
  background: rgba(28, 29, 27, 0.82);
}

.trade-offer-card > header,
.trade-offer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trade-status {
  color: #a9c7cf;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.trade-offer-summary {
  display: flex;
  gap: 18px;
  margin: 10px 0;
  color: rgba(230, 228, 222, 0.53);
  font-size: 10px;
}

.trade-offer-summary p {
  margin: 0;
}

.trade-offer-actions {
  justify-content: flex-end;
  gap: 6px;
}

@media (max-width: 980px) {
  .trade-columns { grid-template-columns: 1fr; }
  .trade-terms { grid-template-columns: 1fr 1fr; }
  .market-header, .trade-header { align-items: stretch; flex-direction: column; }
  .market-search { width: 100%; }
}

/* Player identity and cleaner market/trade layout */
.market-seller {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 11px 9px;
  padding: 8px 1px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: inherit;
  background: transparent;
  text-align: left;
}
.market-seller:hover .market-seller-copy strong { color: #b9dce8; }
.market-seller-avatar,
.trade-avatar,
.trade-friend-avatar,
.trade-result-avatar,
.trade-target-avatar,
.trade-column-avatar,
.trade-offer-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  background: linear-gradient(145deg, #526067, #242825);
}
.market-seller-avatar.is-online,
.trade-avatar.is-online,
.trade-friend-avatar.is-online,
.trade-result-avatar.is-online,
.trade-target-avatar.is-online,
.trade-column-avatar.is-online,
.trade-offer-avatar.is-online {
  box-shadow: 0 0 0 2px #63b85f;
}
.market-seller-avatar.is-offline,
.trade-avatar.is-offline,
.trade-friend-avatar.is-offline,
.trade-result-avatar.is-offline,
.trade-target-avatar.is-offline,
.trade-column-avatar.is-offline,
.trade-offer-avatar.is-offline {
  box-shadow: 0 0 0 2px #70736f;
}
.market-seller-avatar { width: 28px; height: 28px; }
.market-seller-avatar img,
.trade-avatar img,
.trade-friend-avatar img,
.trade-result-avatar img,
.trade-target-avatar img,
.trade-column-avatar img,
.trade-offer-avatar img {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.market-avatar-fallback,
.trade-avatar-fallback {
  position: relative;
  z-index: 1;
  font-size: 12px;
}
.market-seller-copy { min-width: 0; display: grid; gap: 1px; }
.market-seller-copy strong { overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.market-seller-copy small { margin: 0; color: rgba(232, 230, 224, 0.34); font-size: 7px; letter-spacing: 0.05em; }

.trade-player-search { padding: 14px; border: 1px solid rgba(255, 255, 255, 0.065); }
.trade-friend-shortcuts { gap: 6px; }
.trade-friend-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 3px 9px 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(91, 143, 159, 0.12);
}
.trade-friend-avatar { width: 28px; height: 28px; }
.trade-friend-shortcut > span:last-child { font-size: 9px; }

.trade-player-result {
  min-height: 57px;
  gap: 8px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.055);
}
.trade-player-choose {
  min-width: 0;
  min-height: 55px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: #e4e2dd;
  background: transparent;
  text-align: left;
}
.trade-player-choose:hover { background: rgba(91, 143, 159, 0.1); }
.trade-result-avatar { width: 40px; height: 40px; }
.trade-player-copy { min-width: 0; display: grid; gap: 3px; }
.trade-player-copy > strong { font-size: 12px; }
.trade-player-details { display: flex; align-items: center; gap: 9px; }
.trade-player-details small { color: rgba(228, 226, 221, 0.4); font-size: 8px; }
.trade-view-profile { align-self: stretch; padding: 0 13px; color: rgba(231, 235, 232, 0.48); background: rgba(255, 255, 255, 0.025); font-size: 8px; letter-spacing: 0.08em; }
.trade-view-profile:hover { color: #c3e1e8; background: rgba(81, 130, 146, 0.16); }

.trade-rank { min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: rgba(231, 229, 223, 0.55); }
.trade-rank img { width: 58px; height: 25px; object-fit: contain; }
.trade-rank > span { font-size: 8px; letter-spacing: 0.05em; }
.trade-rank.is-compact img { width: 42px; height: 18px; }
.trade-rank.is-compact > span { max-width: 180px; overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }

.trade-target-bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 8px 10px;
  border: 1px solid rgba(125, 185, 202, 0.16);
  background: rgba(28, 29, 27, 0.82);
}
.trade-target-identity { min-width: 0; display: flex; align-items: center; gap: 11px; color: #eceae4; background: transparent; text-align: left; }
.trade-target-avatar { width: 46px; height: 46px; }
.trade-target-copy { min-width: 0; display: grid; gap: 2px; }
.trade-target-copy > strong { font-size: 14px; }

.trade-item-column { border: 1px solid rgba(255, 255, 255, 0.055); }
.trade-column-header { min-height: 48px; align-items: center; margin-bottom: 8px; }
.trade-column-identity { min-width: 0; display: flex; align-items: center; gap: 8px; }
.trade-column-avatar { width: 35px; height: 35px; }
.trade-column-identity > span:last-child { min-width: 0; display: grid; gap: 2px; }
.trade-column-identity h2 { margin: 0; }
.trade-column-identity small { color: rgba(230, 228, 222, 0.34); font-size: 7px; letter-spacing: 0.06em; }
.trade-selected-count { color: #a6cbd5 !important; }

.trade-offer-card { border: 1px solid rgba(255, 255, 255, 0.06); }
.trade-offer-person { min-width: 0; display: flex; align-items: center; gap: 9px; color: #eceae4; background: transparent; text-align: left; }
.trade-offer-person > span:last-child { min-width: 0; display: grid; gap: 2px; }
.trade-offer-person strong { font-size: 12px; }
.trade-offer-person small { color: rgba(230, 228, 222, 0.37); font-size: 7px; letter-spacing: 0.06em; }
.trade-offer-avatar { width: 38px; height: 38px; }
.trade-offer-summary { flex-wrap: wrap; }

@media (max-width: 720px) {
  .trade-target-bar { align-items: stretch; flex-direction: column; }
  .trade-player-details { align-items: flex-start; flex-direction: column; gap: 2px; }
  .trade-view-profile { min-width: 68px; }
}


.market-own-section {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(22, 23, 22, 0.6);
}

.market-own-header {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px 0 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.market-own-header h2 {
  margin: 0;
  color: rgba(238, 237, 231, 0.72);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.market-own-header span {
  color: rgba(238, 237, 231, 0.34);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.market-own-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.market-own-card {
  flex: 0 0 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.market-own-inspect {
  min-width: 0;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.market-own-inspect:hover {
  background: rgba(158, 192, 203, 0.045);
}

.market-own-inspect img {
  width: 66px;
  height: 48px;
  object-fit: contain;
}

.market-own-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.market-own-copy strong,
.market-own-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-own-copy strong {
  color: rgba(240, 239, 233, 0.82);
  font-size: 10px;
}

.market-own-copy small {
  color: rgba(240, 239, 233, 0.4);
  font-size: 8px;
}

.market-own-cancel {
  min-width: 58px;
  padding: 0 8px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(238, 237, 231, 0.52);
  background: rgba(0, 0, 0, 0.12);
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.market-own-cancel:hover {
  color: rgba(248, 247, 241, 0.9);
  background: rgba(106, 55, 49, 0.22);
}

.market-confirm-shade {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  background: rgba(7, 8, 8, 0.68);
  backdrop-filter: blur(2px);
}

.market-confirm-panel {
  width: min(440px, calc(100vw - 44px));
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(27, 29, 27, 0.99);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
}

.market-confirm-panel h2 {
  margin: 0 0 13px;
  color: rgba(245, 244, 238, 0.9);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.market-confirm-item {
  margin: 0;
  color: rgba(241, 240, 234, 0.62);
  font-size: 11px;
}

.market-confirm-price {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.market-confirm-price span {
  color: rgba(241, 240, 234, 0.38);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.market-confirm-price strong {
  color: #dce9ce;
  font-size: 18px;
  font-weight: 600;
}

.market-confirm-note {
  margin: 12px 0 0;
  color: rgba(241, 240, 234, 0.36);
  font-size: 8px;
  line-height: 12px;
  letter-spacing: 0.06em;
}

.market-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 16px;
}

/* 202608250012 trade offer item previews */
.trade-offer-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 0 20px 16px;
}
.trade-offer-side {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(255, 255, 255, 0.018);
}
.trade-offer-side-header {
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: rgba(239, 239, 233, 0.56);
  font-size: 8px;
  letter-spacing: 0.06em;
}
.trade-offer-side-header small { color: rgba(239, 239, 233, 0.3); font-size: 7px; }
.trade-offer-items {
  min-height: 113px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px;
  scroll-behavior: smooth;
}
.trade-offer-item {
  position: relative;
  width: 118px;
  min-width: 118px;
  height: 96px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-bottom: 3px solid var(--trade-rarity, #4b69ff);
  color: rgba(245, 244, 238, 0.84);
  background: linear-gradient(145deg, rgba(74, 76, 73, 0.58), rgba(43, 45, 43, 0.58));
  cursor: pointer;
  text-align: left;
}
.trade-offer-item:hover { border-color: rgba(255, 255, 255, 0.18); border-bottom-color: var(--trade-rarity, #4b69ff); }
.trade-offer-item img { width: 100%; height: 69px; object-fit: contain; display: block; }
.trade-offer-item-copy {
  position: absolute;
  right: 5px; bottom: 3px; left: 5px;
  display: grid;
  min-width: 0;
}
.trade-offer-item-copy strong,
.trade-offer-item-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-offer-item-copy strong { font-size: 8px; }
.trade-offer-item-copy small { color: rgba(245, 244, 238, 0.45); font-size: 7px; }
.trade-offer-no-items {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 96px;
  color: rgba(240, 239, 233, 0.27);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.trade-offer-cash {
  padding: 8px 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #b8d59c;
  font-size: 8px;
}
.trade-offer-message {
  margin: 0 20px 14px;
  padding: 9px 10px;
  border-left: 2px solid rgba(142, 185, 198, 0.35);
  color: rgba(239, 238, 232, 0.52);
  background: rgba(255, 255, 255, 0.018);
  font-size: 9px;
}
@media (max-width: 850px) {
  .trade-offer-details { grid-template-columns: 1fr; }
}

/* Performance containment for long lists. No visual properties are changed. */
.market-card,
.trade-item,
.trade-offer-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 170px;
}

/* 202608260025 market history and marketplace overlay stacking */
.market-sell-shade { z-index: 5200; }
.market-confirm-shade { z-index: 5400; }

.market-sell-panel {
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  overflow: auto;
}

.market-sell-history-section {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(10, 11, 10, 0.16);
}

.market-sell-history-header {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.market-sell-history-header strong {
  color: rgba(244, 243, 237, 0.72);
  font-size: 9px;
  letter-spacing: 0.07em;
}

.market-sell-history-header span {
  color: rgba(238, 237, 229, 0.34);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.market-sell-history-content { min-height: 178px; }

.market-history-shade {
  position: fixed;
  inset: 0;
  z-index: 5300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 8, 8, 0.72);
  backdrop-filter: blur(4px);
}

.market-history-panel {
  width: min(820px, calc(100vw - 48px));
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(31, 32, 30, 0.99);
}

.market-history-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 11, 10, 0.18);
}

.market-history-header > div { min-width: 0; }

.market-history-header span {
  display: block;
  margin-bottom: 3px;
  color: rgba(238, 237, 229, 0.38);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.market-history-header h2 {
  overflow: hidden;
  margin: 0;
  color: rgba(245, 244, 238, 0.9);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-history-close {
  min-height: 31px;
  padding: 0 12px;
  color: rgba(242, 241, 234, 0.62);
  background: rgba(255, 255, 255, 0.04);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.market-history-close:hover { color: #f4f3ed; background: rgba(255, 255, 255, 0.075); }
.market-history-content { padding: 14px; }

.market-history-chart { width: 100%; }
.market-history-viewport {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: rgba(13, 14, 13, 0.32);
}

.market-history-chart.is-compact .market-history-viewport { min-height: 210px; }
.market-history-svg { display: block; width: 100%; height: auto; }
.market-history-gridline { stroke: rgba(255, 255, 255, 0.065); stroke-width: 1; vector-effect: non-scaling-stroke; }
.market-history-axis-label { fill: rgba(238, 237, 229, 0.38); font: 9px var(--font-ui); }
.market-history-line { fill: none; stroke: #73b7d6; stroke-width: 2; vector-effect: non-scaling-stroke; }
.market-history-point { fill: #b9e1f1; stroke: rgba(18, 19, 18, 0.9); stroke-width: 2; cursor: pointer; vector-effect: non-scaling-stroke; }
.market-history-point:hover,
.market-history-point:focus,
.market-history-point.is-selected { fill: #f1f0ea; stroke: #73b7d6; outline: none; }

.market-history-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 108px;
  padding: 7px 9px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 21, 20, 0.98);
}

.market-history-tooltip strong,
.market-history-tooltip span { display: block; }
.market-history-tooltip strong { color: #dce9ce; font-size: 12px; font-weight: 600; }
.market-history-tooltip span { margin-top: 2px; color: rgba(238, 237, 229, 0.46); font-size: 8px; letter-spacing: 0.05em; }

.market-history-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  padding-top: 7px;
  color: rgba(238, 237, 229, 0.34);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.market-history-range span:nth-child(2) { text-align: center; }
.market-history-range span:last-child { text-align: right; }
.market-history-loading,
.market-history-empty {
  min-height: 210px;
  display: grid;
  place-items: center;
  color: rgba(238, 237, 229, 0.34);
  font-size: 9px;
  letter-spacing: 0.09em;
}
