/* Player market (#/market) */
.pm-head p { margin: 4px 0 0; max-width: 640px; }
.pm-head .btn { flex: none; }

/* requirements (guests / new accounts) */
.pm-req { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px;
  border-color: rgba(228, 174, 57, .35); background: linear-gradient(180deg, rgba(228, 174, 57, .07), transparent), var(--panel); }
.pm-req > div { flex: 1 1 260px; min-width: 0; }
.pm-req p { margin: 4px 0 0; font-size: 13.5px; }
.pm-req-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pm-req-list li span[aria-hidden] { display: inline-block; width: 18px; color: var(--red); font-weight: 800; }
.pm-req-list li.ok { color: var(--muted); }
.pm-req-list li.ok span[aria-hidden] { color: var(--green); }
.pm-req-why { font-size: 12.5px !important; }
.modal .pm-req { margin: 14px 0 0; }

.pm-tabs { margin: 0 0 14px; max-width: 520px; }
.pm-bar .pm-q { flex: 1 1 220px; max-width: 320px; }
.pm-bar .pm-num { width: 90px; }
.pm-total { font-size: 13px; }
.pm-types { margin-bottom: 16px; }

/* listing cards */
.pm-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.pm-grid .item-bottom { flex-direction: column; align-items: stretch; gap: 6px; }
.pm-grid .item-bottom .btn { margin-left: 0; width: 100%; }
.pm-price-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pm-price-row .price { font-size: 15px; }
.pm-value { font-size: 11.5px; color: var(--muted); }
.pm-cmp { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.pm-cmp.good { background: rgba(52, 211, 153, .14); color: var(--green); }
.pm-cmp.bad { background: rgba(255, 92, 92, .14); color: var(--red); }
.pm-cmp.even { background: var(--panel3); color: var(--muted); }
.pm-seller { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; margin-top: 2px; }
.pm-seller .avatar { width: 20px; height: 20px; font-size: 10px; }
.pm-seller span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-own { left: 8px; right: auto; opacity: 1; position: absolute; top: 8px; z-index: 3; }
.pm-small { font-size: 12.5px; }

/* my listings */
.pm-stats { margin-bottom: 16px; }

/* history */
.pm-hist { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.pm-hist-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.pm-hist-row:first-child { border-top: 0; }
.pm-hist-row img { width: 64px; height: 48px; object-fit: contain; flex: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); border-bottom: 2px solid var(--c); }
.pm-hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-hist-main b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-hist-main .muted { font-size: 12.5px; }
.pm-hist-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; text-align: right; }
.pm-hist-amt small { font-size: 11px; }
.pm-hist-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pm-hist-kind.sold { color: var(--green); }
.pm-hist-kind.bought { color: #8ea2ff; }
.pm-net { color: var(--green); }

/* buy confirmation + sell dialog */
.pm-confirm { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.pm-confirm img { width: 96px; height: 72px; object-fit: contain; flex: none; }
.pm-confirm b { font-weight: 600; }
.pm-sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 14px; }
.pm-sum dt { color: var(--muted); }
.pm-sum dd { margin: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; text-align: right; }
.pm-fee { color: var(--red); font-variant-numeric: tabular-nums; }
.pm-pick-search { width: 100%; margin: 10px 0; }
.pm-pick-wrap { max-height: min(56vh, 560px); overflow-y: auto; padding: 2px; }
.pm-pick-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.pm-pick-grid .item-skin { font-size: 12.5px; }
.pm-sell { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; margin-top: 12px; align-items: start; }
.pm-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.pm-sell-form .input { width: 100%; }
.pm-quick { margin-top: 8px; gap: 6px; }
.pm-quick .chip { height: 28px; padding: 0 10px; font-size: 12.5px; }
.pm-sell-form .pm-small { margin: 12px 0 0; }
.pm-sell-actions { margin-top: 6px; }

@media (max-width: 640px) {
  .pm-head .btn { width: 100%; }
  .pm-tabs { max-width: none; }
  .pm-bar .pm-q { flex-basis: 100%; max-width: none; }
  .pm-bar .pm-num { flex: 1 1 70px; width: auto; }
  .pm-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .pm-sell { grid-template-columns: 1fr; }
  .pm-sell-item { max-width: 180px; margin: 0 auto; width: 100%; }
  .pm-hist-row { padding: 10px; gap: 10px; }
  .pm-hist-row img { width: 48px; height: 36px; }
}

/* inventory cards: "List" (player market) next to "Sell" */
.item-bottom:has(.inv-actions) { flex-wrap: wrap; }
.inv-actions { display: flex; gap: 4px; margin-left: auto; }
.inv-actions .btn { margin-left: 0; padding: 0 9px; }
