.market-panel.client-open {
  width: min(760px, calc(100vw - 74px));
  height: min(650px, calc(100dvh - 16px));
}

.market-panel.client-open .market-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  overflow: auto;
}

.market-panel.client-open .market-row {
  grid-template-columns: 42px minmax(115px, 1fr) auto;
  min-height: 86px;
  padding: 9px;
  border-radius: 5px;
}

.market-purchase-actions,
.market-sale-actions {
  display: grid !important;
  grid-template-columns: auto minmax(42px, 54px) auto;
  gap: 4px !important;
}

.market-purchase-actions .market-confirm,
.market-sale-actions .market-confirm {
  grid-column: 1 / -1;
  min-height: 30px;
  color: #ffe17a;
}

.market-quantity {
  width: 100%;
  min-width: 0;
  height: 29px;
  border: 1px solid #626b6f;
  border-radius: 3px;
  background: #151a1d;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.market-quantity-field {
  display: grid;
  grid-template-rows: 9px 29px;
  gap: 2px;
  min-width: 54px;
  color: #9da8ad;
  font-size: 7px;
  font-weight: 900;
  text-align: center;
}

.market-quantity-field > small {
  font-size: 7px;
  line-height: 9px;
}

.market-quantity-step {
  align-self: end;
  width: 28px !important;
  min-width: 28px !important;
  height: 29px !important;
  min-height: 29px !important;
  padding: 0 !important;
  line-height: 27px !important;
  font-size: 13px !important;
}

.npc-sell-tools {
  grid-template-columns: repeat(2, minmax(130px, 1fr));
}

@media (max-width: 700px) {
  .market-panel.client-open { width: calc(100vw - 12px); }
  .market-panel.client-open .market-list { grid-template-columns: 1fr; }
  .npc-sell-tools { grid-template-columns: 1fr; }
}
