@import url("/_assets/b88d45443fa2dbfe501f/ui/pokemon-filter-ranges.css");

.drawer.market-drawer {
  width: min(calc(1220px + var(--ui-nav-rail-size)), 100%);
}
.icon-market {
  --ui-icon: url("/_assets/b88d45443fa2dbfe501f/icons/market.svg");
}
#nav-market {
  position: relative;
}
.market-drawer .drawer-panel {
  container: market / inline-size;
}
.drawer.market-drawer .drawer-head {
  align-items: center;
  padding-bottom: var(--ui-space-2);
}
.drawer.market-drawer .drawer-head > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
}
.drawer.market-drawer .drawer-head h2 {
  order: -1;
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}
.drawer.market-drawer .drawer-head small {
  letter-spacing: 0.08em;
}
.market {
  color: var(--ui-color-text);
  font-family: var(--ui-font-body);
  font-size: 13px;
}
.market [hidden] {
  display: none !important;
}
.market button,
.market input,
.market select {
  font-family: var(--ui-font-body);
}
.market-tabs,
.market-categories,
.market-view-switch,
.market-lot-action,
.market-lot.selected,
.market-inventory-item.selected {
  --ui-color-accent: var(--ui-color-primary);
  --ui-color-accent-strong: var(--ui-color-primary-hover);
}
.market .market-lot-action {
  background: var(--ui-color-action);
  color: var(--ui-color-on-primary);
}
.market-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ui-space-3);
  padding-block: var(--ui-space-2);
}
.market-header > p {
  margin: 0;
  color: var(--ui-color-text-muted);
  font-size: 12px;
}
.market-refresh {
  display: flex;
  align-items: center;
  gap: var(--ui-space-2);
}
.market .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.market .icon-search {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E");
}
.market .icon-refresh {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20 11a8 8 0 0 0-14-5L3 9m0-6v6h6M4 13a8 8 0 0 0 14 5l3-3m0 6v-6h-6'/%3E%3C/svg%3E");
}
.market .icon-grid {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z'/%3E%3C/svg%3E");
}
.market .icon-list {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h1M3 12h1M3 18h1'/%3E%3C/svg%3E");
}
.market-wallet {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ui-space-3);
  margin-left: auto;
  min-width: 0;
}
.market-wallet > div {
  display: flex;
  align-items: center;
  gap: var(--ui-space-1);
  min-width: 0;
}
.market-wallet > div > span {
  color: var(--ui-color-text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.market-wallet .market-money {
  margin: 0;
}
.market-wallet .market-money strong {
  font-size: 17px;
  color: var(--ui-color-accent-strong);
}
.market-wallet .market-money > span {
  display: none;
}
.market-money {
  display: inline-flex;
  align-items: center;
  gap: var(--ui-space-1);
  flex-wrap: wrap;
  line-height: 1.35;
}
.market-money img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  image-rendering: pixelated;
}
.market-money strong {
  font-size: 15px;
  color: var(--ui-color-accent-strong);
  font-variant-numeric: tabular-nums;
}
.market-money > span {
  color: var(--ui-color-text-muted);
  font-size: 10px;
}
.market-money .icon-diamond {
  color: var(--ui-color-text);
}
.market-tabs {
  display: flex;
  margin: 0;
  gap: var(--ui-space-1);
  border-bottom: 1px solid var(--ui-color-border);
}
.market-tabs button {
  position: relative;
  min-height: 34px;
  padding: var(--ui-space-1) var(--ui-space-3);
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  background: var(--ui-color-surface-raised);
  color: var(--ui-color-text-muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.market-tabs button[aria-selected="true"] {
  color: var(--ui-color-accent-strong);
  border-color: var(--ui-color-border-subtle);
  border-bottom-color: var(--ui-color-accent-strong);
  background: var(--ui-color-surface);
}
.market-tabs button:hover,
.market-categories button:hover {
  color: var(--ui-color-text);
  background: var(--ui-color-surface-control);
}
.market-tabs [data-market-own-count] {
  margin-left: var(--ui-space-1);
  color: var(--ui-color-text-muted);
  font-size: 10px;
}
.market-tabs
  [data-market-tab="history"]:has(.ui-notification-badge:not([hidden])) {
  padding-inline-end: 30px;
}
.market-status {
  margin: var(--ui-space-3) 0;
  padding: var(--ui-space-2) var(--ui-space-3);
  border: 1px solid var(--ui-color-border-subtle);
}
.market-status[data-tone="success"] {
  color: var(--ui-color-success);
}
.market-workspace {
  display: grid;
  align-items: start;
  grid-template-columns: 132px minmax(0, 1fr) 260px;
  gap: var(--ui-space-4);
  margin-top: var(--ui-space-3);
}
.market-categories {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-2);
  padding-right: var(--ui-space-3);
  border-right: 1px solid var(--ui-color-border-subtle);
}
.market-categories button {
  display: flex;
  align-items: center;
  gap: var(--ui-space-1);
  min-height: 48px;
  padding: var(--ui-space-2) var(--ui-space-3);
  text-align: left;
  color: var(--ui-color-text-muted);
  background: var(--ui-color-background);
  border: 1px solid var(--ui-color-border-subtle);
  border-radius: var(--ui-radius);
  font-size: 12px;
  font-weight: 700;
}
.market-categories button[aria-pressed="true"] {
  color: var(--ui-color-accent-strong);
  border-color: var(--ui-color-accent);
  background: var(--ui-color-surface-raised);
}
.market-category-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  object-fit: contain;
  image-rendering: pixelated;
}
.market-category-icon--open-ball {
  /* Native effect734/phase1: alpha bounds20×20 at36,14 inside64×96. */
  object-fit: none;
  object-position: -30px -8px;
}
.market-results {
  min-width: 0;
}
.market-toolbar {
  display: flex;
  align-items: stretch;
  gap: var(--ui-space-2);
  margin-bottom: var(--ui-space-2);
}
.market-search {
  display: flex;
  flex: 1;
  min-width: 110px;
  align-items: center;
  gap: var(--ui-space-2);
  border: 1px solid var(--ui-color-border-subtle);
  background: var(--ui-color-background);
  padding: 0 var(--ui-space-3);
}
.market-search .ui-icon {
  color: var(--ui-color-text-muted);
  width: 15px;
}
.market-search input {
  min-width: 0;
  width: 100%;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--ui-color-text);
  font-size: 13px;
  padding: 0;
  box-shadow: none;
}
.market-search input::placeholder {
  color: var(--ui-color-text-muted);
}
.market-sort select,
.market-field select {
  height: 40px;
  max-width: 100%;
  border: 1px solid var(--ui-color-border-subtle);
  padding: 0 var(--ui-space-2);
  background: var(--ui-color-surface-raised);
  color: var(--ui-color-text);
  font-size: 12px;
}
.market-view-switch {
  display: flex;
  align-items: stretch;
}
.market-view-switch button {
  display: grid;
  place-items: center;
  width: 35px;
  border: 1px solid var(--ui-color-border-subtle);
  background: var(--ui-color-background);
  color: var(--ui-color-text-muted);
}
.market-view-switch button + button {
  border-left: 0;
}
.market-view-switch button[aria-pressed="true"] {
  background: var(--ui-color-accent);
  color: var(--ui-color-on-accent);
}
.market-result-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--ui-space-2);
  margin-bottom: var(--ui-space-2);
}
.market .ui-section__title {
  margin: 0;
  font-size: 11px;
  color: var(--ui-color-accent);
  letter-spacing: 0.07em;
}
.market-result-heading > span {
  color: var(--ui-color-text-muted);
  font-size: 10px;
  white-space: nowrap;
}
.market-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ui-space-2);
  align-items: start;
  align-content: start;
}
.market[data-tab="auctions"] .market-list {
  display: block;
}
.market[data-tab="auctions"] .market-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}
.market[data-tab="auctions"][data-auction-view="history"] .market-workspace {
  grid-template-columns: minmax(0, 1fr);
}
.market[data-tab="auctions"][data-auction-view="history"] .market-detail {
  display: none;
}
.market[data-tab="auctions"][data-auction-view="history"] .market-toolbar,
.market[data-tab="auctions"][data-auction-view="history"] [data-market-pokemon-filters] {
  display: none;
}
.market[data-tab="auctions"] .market-auction-compact-identity {
  margin: var(--ui-space-2) 0;
}
.market-auction-compact-identity .market-art {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}
.market-auction-compact-identity .market-art img.market-pokemon-art {
  width: 40px;
  height: 40px;
}
.market-auction-form {
  display: grid;
  gap: var(--ui-space-2);
  margin-top: var(--ui-space-2);
}
.market-auction-field-grid,
.market-auction-amounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ui-space-2);
}
.market-auction-duration {
  grid-column: 1 / -1;
}
.market-auction-form .market-field,
.market-auction-form .market-total {
  margin: 0;
}
.market-auction-amounts .market-total {
  padding: var(--ui-space-2);
}
.market-auction-amounts .market-total > span {
  min-height: 24px;
  font-size: 10px;
  line-height: 1.2;
}
.market-auction-amounts .market-money {
  flex-wrap: wrap;
  gap: 4px;
}
.market-auction-amounts .market-money > strong {
  font-size: 19px;
}
.market-auction-context {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px var(--ui-space-2);
  color: var(--ui-color-text-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.market-auction-clock {
  margin: var(--ui-space-2) 0;
  color: var(--ui-color-accent-strong);
  font-weight: 700;
  font-size: 12px;
}
.market-auction-prices,
.market-auction-deadlines {
  margin: 0;
}
.market-auction-deadlines dd {
  font-size: 12px;
  font-weight: 700;
}
.market-auction-commitment {
  margin: 0;
  color: var(--ui-color-text-muted);
  font-size: 12px;
  line-height: 1.35;
}
.market-auction-disclosure {
  margin: var(--ui-space-2) 0;
  border: 1px solid var(--ui-color-border-subtle);
  background: var(--ui-color-background);
}
.market-auction-disclosure > summary {
  padding: var(--ui-space-2);
  color: var(--ui-color-accent-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.market-auction-disclosure > p,
.market-auction-disclosure > .market-pokemon-genetics,
.market-auction-disclosure > [data-market-auction-extra-dates] {
  margin: var(--ui-space-2);
  font-size: 12px;
  line-height: 1.45;
}
.market-auction-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: var(--ui-space-2) 0;
  background: var(--ui-color-background);
}
.market-auction-actions .market-detail-action,
.market-auction-actions .market-confirmation {
  margin: 0;
}
.market-auction-actions .market-confirmation {
  margin-bottom: var(--ui-space-2);
}
.market-auction-actions .market-detail-action {
  min-height: 44px;
}
.market-auction-actions .market-confirmation p {
  margin: 0 0 var(--ui-space-2);
}
.market[data-tab="auctions"] .auction-history-row {
  grid-template-columns: 110px minmax(0, 1fr) minmax(220px, 1.4fr) auto;
}
.market[data-tab="auctions"] .auction-history-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--ui-space-2);
}
.auction-history-value > small {
  display: block;
  margin-bottom: 4px;
}
.auction-history-value .market-money {
  flex-wrap: wrap;
  justify-content: flex-start;
}
.auction-history-reason {
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}
.market-auction-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  margin-bottom: var(--ui-space-3);
}
.market-auction-tabs .ui-button {
  min-height: 36px;
  max-width: 100%;
  white-space: normal;
}
.market-auction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ui-space-2);
}
.market-auction-grid[data-view="lines"] {
  grid-template-columns: minmax(0, 1fr);
}
.market[data-tab="auctions"] .market-detail-meta dd,
.market[data-tab="auctions"] .market-detail-meta dt {
  overflow-wrap: anywhere;
}
@container market (max-width: 690px) {
  .market[data-tab="auctions"] .market-workspace { display: flex; flex-direction: column; }
  .market-auction-grid { grid-template-columns: minmax(0, 1fr); }
  .market-auction-tabs .ui-button { min-height: 44px; }
  .market[data-tab="auctions"] .market-detail {
    position: static;
    align-self: stretch;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--ui-color-border-subtle);
    padding: var(--ui-space-4) 0 0;
  }
  .market[data-tab="auctions"] .auction-history-row {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .market[data-tab="auctions"] .auction-history-values {
    grid-column: 1 / -1;
  }
  .market[data-tab="auctions"] .auction-history-row > time {
    grid-column: 1 / -1;
  }
}
.market-list.market-species-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}
.market-species-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--ui-space-1);
  min-width: 0;
  min-height: 152px;
  padding: var(--ui-space-3) var(--ui-space-2);
  text-align: center;
  color: var(--ui-color-text);
  background: var(--ui-color-surface-raised);
  border: 1px solid var(--ui-color-border-subtle);
}
.market-species-card:hover,
.market-species-card:focus-visible {
  border-color: var(--ui-color-primary);
  background: var(--ui-color-surface-control);
}
.market-species-card--all {
  border-color: var(--ui-color-primary);
}
.market-species-card .market-art {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.market-species-card > strong {
  font: 700 18px/1.1 var(--ui-font-display);
  overflow-wrap: anywhere;
}
.market-species-card > small,
.market-species-help,
.market-species-price > span {
  color: var(--ui-color-text-muted);
  font-size: 11px;
}
.market-species-price {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  width: 100%;
}
.market-species-price .market-money {
  justify-content: center;
  gap: 3px;
}
.market-species-price .market-money strong {
  font-size: 13px;
}
.market-species-price .market-money img {
  width: 16px;
  height: 16px;
}
.market-species-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-3);
  margin-bottom: var(--ui-space-3);
  padding: var(--ui-space-3);
  border: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface-raised);
}
.market-species-navigation > strong {
  font: 700 20px/1.15 var(--ui-font-display);
}
.market-species-navigation [data-market-species-back] {
  min-height: 44px;
  max-width: 100%;
  padding: 10px var(--ui-space-4);
  font-size: 14px;
  flex-shrink: 0;
  white-space: normal;
}
.market-lot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ui-space-2);
  padding: var(--ui-space-2);
  min-width: 0;
  text-align: left;
  background: var(--ui-color-surface-raised);
  border-color: var(--ui-color-border-subtle);
}
.market-lot:hover {
  border-color: var(--ui-color-accent);
}
.market-lot.selected,
.market-inventory-item.selected {
  border-color: var(--ui-color-accent-strong);
  background: var(--ui-color-surface-control);
}
.market-lot-main {
  display: flex;
  align-items: center;
  gap: var(--ui-space-2);
  min-width: 0;
}
.market-art {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  background: var(--ui-color-background);
  border: 1px solid var(--ui-color-border-subtle);
}
.market-art img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
}
.market-art img.market-pokemon-art {
  width: 52px;
  height: 52px;
}
.market-art .ui-icon {
  width: 27px;
  height: 27px;
  color: var(--ui-color-accent);
}
.market-lot-identity {
  display: flex;
  flex-direction: column;
  align-items: start;
  min-width: 0;
  gap: 2px;
}
.market-lot-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px var(--ui-space-1);
}
.market-lot-name > strong {
  font-size: 14px;
  line-height: 1.15;
  color: var(--ui-color-text);
  overflow-wrap: anywhere;
}
.market-lot-identity > small {
  font-size: 10px;
  line-height: 1.35;
  color: var(--ui-color-text-muted);
}
.market-lot .market-art {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}
.market-lot .market-art img {
  width: 36px;
  height: 36px;
}
.market-lot .market-art img.market-pokemon-art {
  width: 42px;
  height: 42px;
}
.market .ui-chip {
  font-size: 9px;
  padding: 1px 5px;
  border-color: var(--ui-color-border-subtle);
}
.market-lot-owner {
  color: var(--ui-color-text-muted);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.market-lot-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--ui-space-1);
  min-width: 116px;
  max-width: 160px;
}
.market-lot-bottom .market-money {
  min-width: 0;
  gap: 3px;
  justify-content: flex-end;
  max-width: 160px;
}
.market-lot-bottom .market-money > span {
  line-height: 1.2;
}
.market-lot-bottom .market-money strong {
  min-width: 0;
  white-space: nowrap;
}
.market-lot-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  color: var(--ui-color-on-accent);
  background: var(--ui-color-accent);
  font-size: 11px;
  font-weight: 700;
}
.market-list[data-view="lines"] {
  grid-template-columns: 1fr;
}
.market-list[data-view="lines"] .market-lot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 125px;
  gap: 4px var(--ui-space-3);
  align-items: center;
}
.market-list[data-view="lines"] .market-lot-main {
  grid-row: auto;
}
.market-list[data-view="lines"] .market-art {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}
.market-list[data-view="lines"] .market-art img {
  width: 36px;
  height: 36px;
}
.market-list[data-view="lines"] .market-lot-name > .ui-chip {
  display: none;
}
.market-list[data-view="lines"] .market-lot-bottom {
  grid-column: 2;
  border: 0;
  padding: 0;
}
.market-list[data-view="lines"] .market-lot-action {
  display: none;
}
.market-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-3);
  margin: var(--ui-space-4) 0;
}
.market-pagination span {
  font-size: 11px;
  color: var(--ui-color-text-muted);
}
.market-pagination strong {
  color: var(--ui-color-text);
}
.market-pagination button {
  width: 32px;
  min-height: 30px;
  padding: 0;
}
.market-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-3);
  min-height: 245px;
  padding: var(--ui-space-5);
  color: var(--ui-color-text-muted);
  text-align: center;
  border: 1px dashed var(--ui-color-border-subtle);
}
.market-empty > .ui-icon {
  width: 34px;
  height: 34px;
  color: var(--ui-color-accent);
}
.market-empty > strong {
  color: var(--ui-color-text);
  font-weight: 600;
  font-size: 15px;
}
.market-empty p {
  margin: 0;
  line-height: 1.5;
  font-size: 12px;
  max-width: 290px;
}
.market-detail {
  position: sticky;
  top: calc(var(--drawer-head-height, 0px) + var(--ui-space-4));
  align-self: start;
  min-width: 0;
  max-height: calc(
    100dvh - 2 * var(--ui-space-4) - var(--drawer-head-height, 0px)
  );
  overflow: auto;
  scrollbar-width: thin;
  border-left: 1px solid var(--ui-color-border-subtle);
  padding-left: var(--ui-space-4);
}
.market-detail > .market-empty {
  min-height: 295px;
  border: 0;
  padding: var(--ui-space-4) var(--ui-space-2);
}
.market-detail-identity {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: var(--ui-space-2);
  margin: var(--ui-space-4) 0;
  text-align: center;
}
.market-art--large {
  width: 88px;
  height: 88px;
  flex-basis: 88px;
}
.market-art--large img {
  width: 64px;
  height: 64px;
}
.market-art--large img.market-pokemon-art {
  width: 78px;
  height: 78px;
}
.market-detail-identity h4 {
  margin: 0;
  font: 700 22px var(--ui-font-display);
}
.market-detail .market-detail-identity {
  flex-direction: row;
  gap: var(--ui-space-2);
  margin: var(--ui-space-3) 0;
  text-align: left;
}
.market-detail .market-art--large {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
}
.market-detail .market-art--large img {
  width: 40px;
  height: 40px;
}
.market-detail .market-art--large img.market-pokemon-art {
  width: 52px;
  height: 52px;
}
.market-detail-heading {
  min-width: 0;
}
.market-detail-heading h4 {
  font-size: 20px;
  line-height: 1.1;
  overflow-wrap: anywhere;
  margin-bottom: var(--ui-space-1);
}
.market-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--ui-space-2);
  margin: var(--ui-space-2) 0;
}
.market-detail-meta > div:last-child {
  grid-column: 1 / -1;
}
.market-detail-meta > div {
  padding: var(--ui-space-2) 0;
  border-bottom: 1px solid var(--ui-color-border-subtle);
}
.market-detail-meta dt {
  font-size: 10px;
  color: var(--ui-color-text-muted);
}
.market-detail-meta dd {
  margin: var(--ui-space-1) 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.market-pokemon-genetics .ui-section__title {
  font-size: 9px;
}
.market-pokemon-stats {
  gap: var(--ui-space-1);
}
.market-pokemon-stats .iv-cell {
  padding: var(--ui-space-1) var(--ui-space-2);
  background: var(--ui-color-background);
  border: 1px solid var(--ui-color-border-subtle);
}
.market-pokemon-stats .iv-cell strong {
  font-size: 11px;
  font-weight: 700;
}
.market-pokemon-stats .iv-cell small {
  font-size: 8px;
}
.market-field {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-2);
  margin: var(--ui-space-3) 0;
  font-size: 11px;
  color: var(--ui-color-text-muted);
}
.market-field .ui-number-field,
.market-field select {
  width: 100%;
  height: 38px;
  color: var(--ui-color-text);
}
.market-detail-action {
  width: 100%;
  margin-top: var(--ui-space-2);
}
.market-detail .market-field,
.market-create-form .market-field {
  gap: var(--ui-space-1);
  margin: var(--ui-space-2) 0;
}
.market-detail .market-total,
.market-create-form .market-total {
  margin-top: var(--ui-space-2);
  padding: var(--ui-space-2);
}
.market-back-list {
  display: none;
}
.market-total {
  margin-top: var(--ui-space-4);
  padding: var(--ui-space-3);
  border: 1px solid var(--ui-color-border-subtle);
  background: var(--ui-color-background);
}
.market-total > span {
  display: block;
  color: var(--ui-color-text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-bottom: var(--ui-space-2);
}
.market-total .market-money strong {
  font-size: 20px;
}
.market-total-placeholder {
  font-size: 20px;
  color: var(--ui-color-text-muted);
}
.market-confirmation {
  margin: var(--ui-space-3) 0;
  padding: var(--ui-space-3);
  border: 1px solid var(--ui-color-accent);
  background: var(--ui-color-surface-control);
}
.market-confirmation > strong {
  color: var(--ui-color-accent-strong);
  font-size: 13px;
}
.market-confirmation p {
  line-height: 1.5;
  margin: var(--ui-space-2) 0;
}
.market-confirmation button {
  font-size: 11px;
  min-height: 28px;
}
.market-buy-dialog {
  width: min(420px, calc(100vw - 2 * var(--ui-space-4)));
  max-height: calc(100dvh - 2 * var(--ui-space-4));
  padding: 0;
  overflow: auto;
  color: var(--ui-color-text);
  background: var(--ui-color-surface-raised);
  border: 1px solid var(--ui-color-border);
  border-top: 3px solid var(--ui-color-primary);
  border-radius: var(--ui-radius);
  font-family: var(--ui-font-body);
  box-shadow: 0 12px 48px
    color-mix(in srgb, var(--ui-color-background), transparent 15%);
}
.market-buy-dialog::backdrop {
  background: color-mix(in srgb, var(--ui-color-background), transparent 20%);
}
.market-buy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-3);
  padding: var(--ui-space-4);
  border-bottom: 1px solid var(--ui-color-border-subtle);
}
.market-buy-head small {
  color: var(--ui-color-text-muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.market-buy-head h2 {
  margin: var(--ui-space-1) 0 0;
  font: 400 28px/1 var(--ui-font-display);
}
.market-buy-close {
  display: grid;
  place-items: center;
  width: 36px;
  padding: 0;
  flex: 0 0 auto;
}
.market-buy-body {
  padding: var(--ui-space-4);
}
.market-buy-identity {
  display: flex;
  align-items: center;
  gap: var(--ui-space-3);
}
.market-buy-identity > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-1);
}
.market-buy-identity strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.market-buy-identity small,
.market-buy-body > p,
.market-buy-summary dt {
  color: var(--ui-color-text-muted);
  font-size: 12px;
}
.market-buy-body > p {
  line-height: 1.4;
  margin: var(--ui-space-3) 0;
}
.market-buy-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ui-space-3);
  margin: var(--ui-space-3) 0;
}
.market-buy-summary dd {
  margin: var(--ui-space-1) 0 0;
  font-weight: 700;
  font-size: 18px;
}
.market-buy-body .market-total {
  margin-top: var(--ui-space-3);
}
.market-buy-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--ui-space-2);
  padding: var(--ui-space-3) var(--ui-space-4);
  border-top: 1px solid var(--ui-color-border-subtle);
}
.market-buy-actions button {
  min-height: 40px;
}
.market[data-tab="own"] .market-workspace {
  grid-template-columns: minmax(0, 1fr) 280px;
}
.market[data-tab="create"] .market-workspace,
.market[data-tab="buyback"] .market-workspace,
.market[data-tab="history"] .market-workspace {
  display: block;
}
.market-buyback-intro {
  max-width: 860px;
}
.market-buyback-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  margin: var(--ui-space-3) 0;
}
.market-buyback-list {
  display: grid;
  gap: var(--ui-space-2);
}
.market-buyback-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ui-space-2) var(--ui-space-3);
  padding: var(--ui-space-3);
}
.market-buyback-identity {
  display: flex;
  align-items: center;
  gap: var(--ui-space-2);
  min-width: 0;
}
.market-buyback-identity > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.market-buyback-identity strong {
  overflow-wrap: anywhere;
}
.market-buyback-identity small,
.market-buyback-action > small {
  color: var(--ui-color-text-muted);
  font-size: 11px;
}
.market-buyback-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  display: grid;
  justify-items: end;
  gap: var(--ui-space-2);
}
.market-buyback-cost {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-2);
}
.market-buyback-cost .market-money strong {
  font-size: 15px;
}
.market-buyback-attributes {
  min-width: 0;
  grid-column: 1;
}
.market-buyback-attributes summary {
  cursor: pointer;
  color: var(--ui-color-text-muted);
  font-size: 11px;
  width: fit-content;
}
.market-buyback-attributes .market-pokemon-genetics {
  margin-top: var(--ui-space-2);
}
@media (max-width: 720px) {
  .market-buyback-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .market-buyback-action {
    grid-column: 1;
    grid-row: auto;
    justify-items: start;
  }
  .market-buyback-action > button {
    width: 100%;
  }
  .market-buyback-filters {
    gap: var(--ui-space-1);
  }
}
.market-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--ui-space-5);
}
.market-create-inventory,
.market-create-form {
  min-width: 0;
}
.market-create-tabs {
  margin-bottom: var(--ui-space-3);
}
.market-create-tabs button {
  display: inline-flex;
  align-items: baseline;
  gap: var(--ui-space-1);
}
.market-create-tabs button > span {
  margin-left: 0;
}
.market-create-toolbar .market-search {
  min-width: 0;
}
.market-selection-note {
  padding: var(--ui-space-2);
  border-left: 2px solid var(--ui-color-accent);
  background: var(--ui-color-surface-control);
}
.market-create-form {
  padding-left: var(--ui-space-5);
  border-left: 1px solid var(--ui-color-border-subtle);
}
.market-inventory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ui-space-2);
}
.market-inventory-item {
  display: flex;
  align-items: center;
  text-align: left;
  gap: var(--ui-space-2);
  padding: var(--ui-space-2);
  background: var(--ui-color-background);
  border-color: var(--ui-color-border-subtle);
  min-width: 0;
}
.market-inventory-item > span:last-child {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-1);
  min-width: 0;
}
.market-inventory-item strong {
  font-size: 13px;
  color: var(--ui-color-text);
  overflow-wrap: anywhere;
}
.market-inventory-item small {
  color: var(--ui-color-text-muted);
  font-size: 10px;
}
.market-inventory-item:hover {
  border-color: var(--ui-color-accent);
}
.market-pokemon-meta {
  font-size: 10px;
  line-height: 1.5;
  color: var(--ui-color-text-muted);
  font-weight: 400;
}
.market-pokemon-meta .market-iv-total,
.market-pokemon-meta .market-quality strong {
  font-size: inherit;
  font-weight: 700;
  color: inherit;
}
.market-pokemon-meta .market-quality {
  color: var(--quality-color, var(--ui-color-text-muted));
}
.market-history-list {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-2);
}
.market-history-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 175px 95px;
  gap: var(--ui-space-3);
  align-items: center;
  padding: var(--ui-space-3);
  background: var(--ui-color-background);
  border-color: var(--ui-color-border-subtle);
}
.market-history-row > .ui-chip {
  justify-self: start;
}
.market-history-row > div {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-1);
}
.market-history-row small,
.market-history-row time {
  font-size: 10px;
  color: var(--ui-color-text-muted);
}
/* Encomendas: own orders sit above the open orders sellers can supply. */
.market-my-orders {
  margin-bottom: var(--ui-space-4);
  padding-bottom: var(--ui-space-3);
  border-bottom: 1px solid var(--ui-color-border-subtle);
}
.market-my-orders > .ui-note {
  margin: 0;
}
.market-my-orders .market-result-heading {
  align-items: center;
}
.market-my-orders .market-result-heading > span {
  margin-left: auto;
}
.market-order-new {
  min-height: 30px;
  padding: 4px var(--ui-space-2);
  font-size: 11px;
}
.market-my-orders-list {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-2);
}
.market-my-order {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--ui-space-2) var(--ui-space-3);
  padding: var(--ui-space-2) var(--ui-space-3);
  background: var(--ui-color-background);
  border-color: var(--ui-color-border-subtle);
}
.market-my-order .market-art {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}
.market-my-order .market-art img {
  width: 32px;
  height: 32px;
}
.market-my-order-identity {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-1);
  min-width: 0;
}
.market-my-order-identity strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.market-my-order-identity small {
  color: var(--ui-color-text-muted);
  font-size: 10px;
}
.market-my-order-cancel {
  min-height: 34px;
}
.market-my-order-note {
  grid-column: 1 / -1;
  margin: 0;
}
.market-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.market button:focus-visible,
.market input:focus-visible,
.market select:focus-visible {
  outline: var(--ui-focus-width) solid var(--ui-color-focus);
  outline-offset: var(--ui-focus-offset);
}
@media (max-width: 380px) {
  #game-shell .topbar {
    gap: 2px;
    padding-inline: 4px;
  }
  .topbar .top-actions {
    gap: 0;
  }
  #game-shell .topbar .nav-button {
    min-width: 30px;
    padding-inline: 0;
  }
}
.market-search:focus-within {
  border-color: var(--ui-color-focus);
  outline: var(--ui-focus-width) solid var(--ui-color-focus);
  outline-offset: -1px;
}
.market-search input:focus-visible,
.market .ui-multi-autocomplete__input:focus-visible {
  outline: none;
}
.market-pokemon-filters {
  margin-bottom: var(--ui-space-3);
}
.market-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
}
.market-pokemon-filters .ui-integer-field {
  width: 64px;
  min-width: 0;
  height: 32px;
  padding: 0 var(--ui-space-2);
  border: 1px solid var(--ui-color-border-subtle);
  background: var(--ui-color-background);
  color: var(--ui-color-text);
  font-size: 12px;
  font-weight: 400;
}
.market-pokemon-filters .icon-sparkles {
  --ui-icon: url("/_assets/b88d45443fa2dbfe501f/icons/sparkles.svg");
}
.market-pokemon-filters .market-shiny-chip {
  --ui-filter-chip-color: #f1c644;
  min-height: 32px;
}
.market-pokemon-filters .market-holo-chip {
  --ui-filter-chip-color: var(--ui-color-accent);
  min-height: 32px;
}
.market-quality-chips,
.market-type-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-1);
  margin-top: var(--ui-space-2);
}
.market-quality-chips > span,
.market-type-filter > span {
  margin-right: var(--ui-space-1);
  color: var(--ui-color-text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.market-quality-chips .ui-filter-chip {
  --ui-filter-chip-color: var(--quality-color, var(--ui-color-text));
}
.market-type-filter {
  flex-wrap: nowrap;
}
.market-type-filter .ui-multi-autocomplete {
  flex: 1 1 auto;
  max-width: 520px;
}
.market-reset-filters {
  min-height: 32px;
  margin-left: auto;
  padding-inline: var(--ui-space-2);
  font-size: 11px;
}
.market-lot .market-iv-total,
.market-lot .market-quality strong {
  font-weight: 700;
}
.market-lot .market-quality {
  color: var(--quality-color, var(--ui-color-text-muted));
}

@container market (max-width: 1020px) {
  .market-workspace {
    grid-template-columns: 112px minmax(0, 1fr) 220px;
    gap: var(--ui-space-3);
  }
  .market-categories {
    padding-right: var(--ui-space-2);
  }
  .market-categories button {
    padding: var(--ui-space-2);
    font-size: 11px;
  }
  .market-toolbar {
    flex-wrap: wrap;
  }
  .market-search {
    flex-basis: 100%;
  }
  .market-sort {
    flex: 1;
  }
  .market-sort select {
    width: 100%;
  }
  .market-list {
    grid-template-columns: 1fr;
  }
}
@container market (max-width: 690px) {
  .market-header > p {
    display: none;
  }
  .market-wallet {
    margin-left: 0;
    flex: 1;
  }
  .market-workspace,
  .market[data-tab="own"] .market-workspace {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: var(--ui-space-3);
  }
  .market-categories {
    grid-column: 1 / -1;
    flex-direction: row;
    overflow-x: auto;
    border: 0;
    padding: 0 0 var(--ui-space-1);
  }
  .market-categories button {
    flex: 0 0 auto;
    min-height: 38px;
  }
  .market-categories .ui-icon {
    width: 15px;
  }
  .market-create {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: var(--ui-space-3);
  }
  .market-inventory {
    grid-template-columns: 1fr;
  }
  .market-create-form {
    padding-left: var(--ui-space-3);
  }
  .market-tabs button {
    flex: 1;
    padding: var(--ui-space-2);
    font-size: 11px;
  }
  .market-history-row {
    grid-template-columns: 70px minmax(0, 1fr) 130px;
    gap: var(--ui-space-2);
  }
  .market-history-row time {
    grid-column: 2;
  }
}
@container market (max-width: 480px) {
  .drawer-head small {
    display: none;
  }
  .market-header {
    gap: var(--ui-space-1);
  }
  /* Tabs wrap instead of scrolling, keeping every destination in view. */
  .market-tabs {
    flex-wrap: wrap;
    row-gap: 2px;
  }
  .market-wallet {
    gap: var(--ui-space-2);
  }
  .market-wallet .market-money strong {
    font-size: 15px;
  }
  .market-wallet > div > span {
    font-size: 9px;
    letter-spacing: 0;
  }
  .market-wallet .market-money img {
    width: 18px;
    height: 18px;
  }
  .market-refresh {
    padding: 6px;
    min-height: 30px;
    font-size: 11px;
  }
  .market-refresh .ui-icon {
    width: 13px;
  }
  .market-workspace,
  .market[data-tab="own"] .market-workspace {
    display: flex;
    flex-direction: column;
  }
  .market-categories {
    align-self: stretch;
    min-width: 0;
    max-width: 100%;
  }
  .market-detail {
    position: static;
    align-self: stretch;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--ui-color-border-subtle);
    padding: var(--ui-space-4) 0 0;
  }
  .market-back-list {
    display: block;
    width: 100%;
    margin-top: var(--ui-space-2);
  }
  .market-detail > .market-empty {
    min-height: 160px;
  }
  .market-list {
    grid-template-columns: 1fr;
    gap: var(--ui-space-2);
  }
  .market-lot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    align-items: center;
    padding: var(--ui-space-2);
  }
  .market-lot-main {
    align-items: center;
  }
  .market-lot-name > strong {
    font-size: 13px;
  }
  .market-lot-bottom {
    flex-direction: column;
    align-items: flex-end;
    border: 0;
    padding: 0;
    gap: var(--ui-space-1);
  }
  .market-lot-bottom .market-money {
    justify-content: flex-end;
    max-width: 116px;
  }
  .market-lot-action {
    width: auto;
    text-align: center;
  }
  .market-money strong {
    font-size: 13px;
  }
  .market-create {
    grid-template-columns: 1fr;
  }
  .market-inventory {
    grid-template-columns: 1fr;
  }
  .market-inventory-item {
    flex-direction: row;
    align-items: center;
  }
  .market-create-form {
    border-left: 0;
    border-top: 1px solid var(--ui-color-border-subtle);
    padding: var(--ui-space-4) 0 0;
  }
  .market-tabs button {
    flex: 1 0 auto;
    min-width: 0;
    padding: var(--ui-space-1) 6px;
    white-space: nowrap;
    line-height: 1.2;
  }
  .market-tabs [data-market-own-count] {
    display: inline;
  }
  .market-history-row {
    grid-template-columns: 65px minmax(0, 1fr);
  }
  .market-my-order {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .market-my-order-cancel {
    grid-column: 2 / -1;
  }
  .market-history-row .market-money {
    grid-column: 2;
  }
}
