.icon-trade {
  --ui-icon: url("/_assets/b88d45443fa2dbfe501f/icons/handshake.svg");
}
#nav-trade {
  position: relative;
}
.drawer.trade-drawer {
  width: min(calc(840px + var(--ui-nav-rail-size)), 100%);
}
.trade-drawer .drawer-panel {
  container: trade / inline-size;
  padding: var(--ui-space-3);
}
.trade-drawer .drawer-head {
  padding-bottom: var(--ui-space-2);
}
.trade {
  --ui-accent: var(--ui-color-primary);
  color: var(--ui-color-text);
  font: 13px/1.4 var(--ui-font-body);
}
.trade [hidden],
.trade-banner[hidden],
.trade-banner [hidden] {
  display: none !important;
}
.trade h3 {
  margin: 0;
  color: var(--ui-color-text);
  font: 26px/1.1 var(--ui-font-display);
}
.trade h4 {
  margin: 0;
  font: 800 11px/1.3 var(--ui-font-body);
}
.trade p {
  margin: var(--ui-space-2) 0;
}
.trade button,
.trade input {
  font-family: var(--ui-font-body);
}
.trade .ui-icon,
.trade-banner .ui-icon {
  flex: none;
  width: 20px;
  height: 20px;
}
.trade-topline,
.trade-session-head,
.trade-picker-head,
.trade-offer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-3);
}
.trade-topline {
  margin-bottom: var(--ui-space-2);
}
.trade-topline p,
.trade-session-head p {
  margin: var(--ui-space-1) 0;
}
.trade-topline p,
.trade-session-head p {
  color: var(--ui-color-text-muted);
  font-size: 12px;
}
.trade-status {
  border: 1px solid var(--ui-color-border);
  padding: var(--ui-space-1) var(--ui-space-2);
}
.trade-status[data-tone="success"] {
  color: var(--ui-color-success);
}
.trade-status[data-tone="danger"] {
  color: var(--ui-color-danger);
  border-color: var(--ui-color-danger);
}
.trade-invite-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--ui-space-3);
  padding: var(--ui-space-5);
  border-top: 2px solid var(--ui-color-primary);
}
.trade-invite-emblem {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--ui-color-primary);
  border: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface-control);
}
.trade-invite-emblem .ui-icon {
  width: 28px;
  height: 28px;
}
.trade-invite-card p {
  color: var(--ui-color-text-muted);
}
.trade-invite-card form,
.trade-invite-card > [data-trade-intro-fee] {
  grid-column: 1 / -1;
}
.trade-invite-card label,
.trade-search-label,
.trade-quantity-label {
  display: block;
  color: var(--ui-color-text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.trade-invite-fields {
  display: flex;
  gap: var(--ui-space-2);
  margin-top: var(--ui-space-2);
}
.trade-invite-fields input,
.trade-search-label input {
  box-sizing: border-box;
  min-width: 0;
  min-height: 40px;
  width: 100%;
  padding: var(--ui-space-2) var(--ui-space-3);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface-control);
  color: var(--ui-color-text);
  font: 500 14px/1.2 var(--ui-font-body);
  letter-spacing: normal;
}
.trade input::placeholder {
  color: var(--ui-color-text-muted);
}
.trade input:focus-visible {
  outline: var(--ui-focus-width) solid var(--ui-color-focus);
  outline-offset: var(--ui-focus-offset);
}
.trade input:disabled {
  opacity: 0.55;
}
.trade-fee {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-1);
  color: var(--ui-color-text-muted);
  font: 12px/1.4 var(--ui-font-body);
}
.trade-fee img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  image-rendering: pixelated;
}
.trade-fee s {
  color: var(--ui-color-text-muted);
}
.trade-fee strong {
  color: var(--ui-color-success);
  font-size: 15px;
}
.trade-promotion {
  color: var(--ui-color-success);
}
.trade-rules {
  padding-left: 18px;
  margin: var(--ui-space-4) 0 0;
  color: var(--ui-color-text-muted);
  font-size: 12px;
}
.trade-rules li {
  margin-bottom: var(--ui-space-2);
  padding-left: var(--ui-space-1);
}
.trade-invitation {
  padding: var(--ui-space-5);
  border-top: 2px solid var(--ui-color-primary);
}
.trade-invitation p {
  color: var(--ui-color-text-muted);
}
.trade-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  margin-top: var(--ui-space-2);
}
.trade-session-head {
  margin-bottom: var(--ui-space-2);
}
.trade-session-head h3 {
  color: var(--ui-color-primary);
  overflow-wrap: anywhere;
}
.trade-session-head > .ui-chip {
  white-space: nowrap;
}
.trade-offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ui-space-2);
}
.trade-offer {
  padding: var(--ui-space-2);
  background: var(--ui-color-surface);
}
.trade-offer[aria-labelledby="trade-self-title"] {
  border-width: 2px;
  border-color: var(--ui-color-primary);
}
.trade-offer[aria-labelledby="trade-self-title"] h4 {
  color: var(--ui-color-text);
}
.trade-offer[data-confirmed="true"] {
  border-color: var(--ui-color-success);
}
.trade-offer .ui-chip[data-tone="pending"] {
  color: var(--ui-color-text-muted);
  border-color: var(--ui-color-border);
}
.trade-offer > header {
  align-items: start;
  min-height: 20px;
  margin-bottom: var(--ui-space-1);
  gap: var(--ui-space-1);
}
.trade-offer h4 {
  color: var(--ui-color-text-muted);
  overflow-wrap: anywhere;
}
.trade-offer .ui-chip {
  padding: 3px 5px;
  font-size: 9px;
  white-space: nowrap;
}
.trade-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ui-space-1);
}
.trade-slot {
  box-sizing: border-box;
  min-width: 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--ui-space-1) / 2);
  padding: var(--ui-space-1);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  color: var(--ui-color-text);
  background: var(--ui-color-surface-raised);
  text-align: center;
}
.trade-slot > strong {
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.trade-slot-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--ui-space-1) / 2);
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--ui-radius);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.trade-slot-content > strong {
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.trade-slot-content:hover:not(:disabled) .trade-slot-edit {
  color: var(--ui-color-primary-hover);
  text-decoration: underline;
}
.trade-slot-content:focus-visible {
  outline: var(--ui-focus-width) solid var(--ui-color-focus);
  outline-offset: var(--ui-focus-offset);
}
.trade-slot-content:disabled {
  opacity: 0.55;
  cursor: wait;
}
.trade-slot--empty {
  min-height: 68px;
  background: var(--ui-color-background);
  color: var(--ui-color-text-muted);
  border-style: dashed;
}
.trade-slot--empty > span {
  font: 28px/1 var(--ui-font-body);
}
.trade-slot--empty > small {
  font-size: 10px;
}
button.trade-slot {
  cursor: pointer;
}
button.trade-slot:hover:not(:disabled) {
  border-color: var(--ui-color-primary);
  background: var(--ui-color-surface-control);
}
button.trade-slot:focus-visible {
  outline: var(--ui-focus-width) solid var(--ui-color-focus);
  outline-offset: var(--ui-focus-offset);
}
button.trade-slot:disabled {
  opacity: 0.55;
  cursor: wait;
}
.trade-slot-edit {
  color: var(--ui-color-primary);
  font-size: 10px;
}
.trade-slot-quantity {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.trade-art {
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
}
.trade-art img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}
.trade-art img.trade-pokemon-art {
  width: 40px;
  height: 40px;
}
.trade-pokemon-meta {
  display: block;
  color: var(--ui-color-text-muted);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.trade-pokemon-meta b {
  color: var(--ui-color-text);
}
.trade-pokemon-meta > span {
  color: var(--ui-color-border);
}
.trade-quality {
  margin-top: 2px;
}
.trade-quality .quality-badge {
  padding: 2px 4px;
  font-size: 9px;
  letter-spacing: 0;
  white-space: normal;
}
.trade-shiny {
  margin-top: 0;
  font-size: 9px;
}
.trade-offer footer {
  margin-top: var(--ui-space-2);
  padding-top: var(--ui-space-1);
  border-top: 1px solid var(--ui-color-border-subtle);
}
.trade-offer footer .trade-fee {
  font-size: 10px;
}
.trade-currencies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ui-space-2);
  margin-bottom: var(--ui-space-1);
}
.trade-currency-field {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-1);
  min-width: 0;
}
.trade-currency-field > span {
  display: flex;
  align-items: center;
  gap: var(--ui-space-1);
  color: var(--ui-color-text-muted);
  font-size: 10px;
  font-weight: 700;
}
.trade-currency-field img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
}
.trade-currency-field input,
.trade-currency-value {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: var(--ui-space-1) var(--ui-space-2);
  font: 700 13px/1.4 var(--ui-font-body);
  font-variant-numeric: tabular-nums;
}
.trade-currency-value {
  display: flex;
  align-items: center;
  border: 1px solid var(--ui-color-border-subtle);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface-raised);
  overflow-wrap: anywhere;
}
.trade-currency-field > small {
  color: var(--ui-color-text-muted);
  font-size: 10px;
}
.trade .trade-confirm {
  min-height: 40px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.trade .trade-confirm[data-confirmation="waiting"] {
  --ui-accent: var(--ui-color-success);
}
.trade .trade-confirm[data-confirmation="confirmed"],
.trade .trade-confirm[data-confirmation="completed"] {
  opacity: 1;
  border-color: var(--ui-color-success);
  background: color-mix(
    in srgb,
    var(--ui-color-success) 12%,
    var(--ui-color-surface-raised)
  );
  color: var(--ui-color-success);
  cursor: default;
}
.trade .trade-confirm[data-confirmation="pending"] {
  opacity: 1;
  border-color: var(--ui-color-accent);
  background: var(--ui-color-surface-control);
  color: var(--ui-color-accent-strong);
  cursor: wait;
}
[data-trade-confirm-icon]:empty {
  display: none;
}
.trade-safety {
  padding: var(--ui-space-2);
  margin: var(--ui-space-2) 0;
}
.trade-picker {
  margin-top: var(--ui-space-4);
  padding: var(--ui-space-4);
  border-top: 2px solid var(--ui-color-primary);
}
.trade-picker-head {
  margin-bottom: var(--ui-space-3);
}
.trade-picker-tabs {
  margin-bottom: var(--ui-space-3);
}
.trade-search-label input {
  min-height: var(--ui-control-height);
  margin-top: var(--ui-space-1);
}
.trade-picker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--ui-space-3);
  margin-top: var(--ui-space-3);
}
.trade-inventory {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-1);
  max-height: 300px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.trade-inventory-row {
  display: flex;
  align-items: center;
  gap: var(--ui-space-2);
  padding: var(--ui-space-2);
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.trade-inventory-row[aria-pressed="true"] {
  border-color: var(--ui-color-primary);
  box-shadow: inset 2px 0 var(--ui-color-primary);
}
.trade-inventory-row:hover:not(:disabled) {
  background: var(--ui-color-surface-control);
}
.trade-inventory-row:focus-visible {
  outline: var(--ui-focus-width) solid var(--ui-color-focus);
  outline-offset: -2px;
}
.trade-inventory-row:disabled {
  opacity: 0.55;
}
.trade-inventory-copy {
  display: block;
  min-width: 0;
}
.trade-inventory-copy > strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.trade-inventory-copy > small {
  display: block;
  color: var(--ui-color-text-muted);
  font-size: 11px;
}
.trade-inventory-copy > small.trade-in-offer {
  color: var(--ui-color-primary);
}
.trade-editor {
  min-width: 0;
  padding-left: var(--ui-space-3);
  border-left: 1px solid var(--ui-color-border-subtle);
}
.trade-editor-identity {
  display: flex;
  gap: var(--ui-space-2);
  align-items: center;
  margin-bottom: var(--ui-space-3);
}
.trade-editor-identity h4 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.trade-editor-identity small {
  color: var(--ui-color-text-muted);
}
.trade-quantity-label .ui-integer-field {
  margin-top: var(--ui-space-1);
}
.trade-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  margin-top: var(--ui-space-3);
}
.trade-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ui-space-2);
  margin: var(--ui-space-3) 0;
}
.trade-stats > div {
  padding: var(--ui-space-1);
  border-bottom: 1px solid var(--ui-color-border-subtle);
}
.trade-stats dt {
  color: var(--ui-color-text-muted);
  font-size: 9px;
}
.trade-stats dd {
  margin: 2px 0;
  font-weight: 700;
  font-size: 12px;
}
.trade-stat-iv {
  color: var(--ui-color-text-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.trade-empty {
  padding: var(--ui-space-3);
}
.trade-pokemon-details {
  margin-top: var(--ui-space-1);
  width: 100%;
}
.trade-pokemon-details > summary {
  display: flex;
  align-items: center;
  gap: var(--ui-space-1);
  justify-content: center;
  min-height: 28px;
  color: var(--ui-color-accent-strong);
  font-size: 11px;
  cursor: pointer;
  list-style: none;
}
.trade-pokemon-details > summary::-webkit-details-marker {
  display: none;
}
.trade-pokemon-details > summary:focus-visible {
  outline: var(--ui-focus-width) solid var(--ui-color-focus);
  outline-offset: var(--ui-focus-offset);
}
.trade-pokemon-details > summary .ui-icon {
  width: 14px;
  height: 14px;
}
.trade-pokemon-details[open] > summary .ui-icon {
  transform: rotate(180deg);
}
.trade-pokemon-details .trade-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--ui-space-1);
}
.trade-result {
  padding: var(--ui-space-5);
  text-align: center;
}
.trade-result > .ui-icon {
  width: 36px;
  height: 36px;
  color: var(--ui-color-success);
  margin-bottom: var(--ui-space-3);
}
.trade-result p {
  color: var(--ui-color-text-muted);
  margin-bottom: var(--ui-space-4);
}
.trade-banner {
  position: fixed;
  z-index: 112;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ui-space-3);
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: var(--ui-space-3) var(--ui-space-4);
  border: 1px solid var(--ui-color-primary);
  border-left-width: 3px;
  background: var(--ui-color-surface);
  box-shadow: 0 5px 18px #0005;
  color: var(--ui-color-text);
  font: 13px/1.4 var(--ui-font-body);
}
.trade-banner-copy {
  display: flex;
  align-items: center;
  gap: var(--ui-space-3);
  min-width: 0;
  flex: 1;
}
.trade-banner-copy > .ui-icon {
  color: var(--ui-color-primary);
}
.trade-banner-copy > div {
  min-width: 0;
}
.trade-banner-copy strong {
  display: block;
  overflow-wrap: anywhere;
}
.trade-banner-copy .trade-fee {
  font-size: 10px;
}
.trade-banner-copy .trade-fee img {
  width: 16px;
  height: 16px;
}
.trade-banner-copy .trade-fee strong {
  font-size: 12px;
}
.trade-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
}
.trade-banner > p {
  width: 100%;
  margin: 0;
  color: var(--ui-color-text-muted);
  font-size: 11px;
}
@container trade (max-width: 560px) {
  .trade-offers {
    grid-template-columns: minmax(0, 1fr);
  }
  .trade-session-head {
    align-items: start;
    flex-wrap: wrap;
  }
  .trade-picker-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .trade-inventory {
    max-height: 220px;
  }
  .trade-editor {
    border-left: 0;
    border-top: 1px solid var(--ui-color-border-subtle);
    padding: var(--ui-space-3) 0 0;
  }
  .trade-invite-card,
  .trade-invitation {
    padding: var(--ui-space-4);
  }
}
@media (max-width: 650px) {
  .trade-pokemon-details > summary {
    min-height: 44px;
  }
  .trade-currency-field input,
  .trade-currency-value {
    min-height: 44px;
  }
  .trade-banner {
    top: 56px;
    width: calc(100vw - 16px);
    max-width: none;
    padding: var(--ui-space-2) var(--ui-space-3);
    gap: var(--ui-space-2);
  }
  .trade-banner-actions {
    margin-left: auto;
  }
  .trade-banner-actions .ui-button {
    min-height: 40px;
  }
  .trade-actions > .ui-button {
    min-height: 44px;
    flex: 1;
  }
}
