.trade_list {
  margin-top: 12px;
}
.trade_empty {
  text-align: center;
  color: var(--ink2);
  font-weight: 800;
  font-size: 13.5px;
}
.trade_card {
  display: grid;
  gap: 10px;
}
.trade_card_head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.trade_avatar {
  width: 44px;
  height: 44px;
  flex: none;
}
.trade_avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}
.trade_card_who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.trade_card_who b {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trade_card_who span {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
}
.trade_status {
  flex: none;
  display: inline-block;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}
.trade_status_pending {
  background: #f5b400;
  color: #3a2a00;
}
.trade_status_accepted,
.trade_status_delivered,
.trade_status_alive {
  background: #2fbf71;
  color: #062b17;
}
.trade_status_rejected,
.trade_status_dead {
  background: #e0243a;
  color: #fff;
}
.trade_status_cancelled {
  background: #3b2c48;
  color: #d9cce4;
  border-color: #5b4a6c;
}
.trade_status_expired {
  background: #15121b;
  color: #a596b4;
  border-color: #5b4a6c;
}
.trade_sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.trade_side {
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.trade_side_title {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink2);
}
.trade_thing {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 8px;
  align-items: center;
  min-width: 0;
}
.trade_thing svg {
  grid-row: span 2;
  width: 40px;
  height: 40px;
}
.trade_thing_name {
  font-weight: 900;
  font-size: 12.5px;
  line-height: 1.15;
  align-self: end;
}
.trade_thing small {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
  line-height: 1.2;
  align-self: start;
}
.trade_thing .rar {
  justify-self: start;
  align-self: start;
  white-space: nowrap;
}
.trade_thing_coins svg {
  grid-row: auto;
  width: 26px;
  height: 26px;
  justify-self: center;
  color: var(--gold);
}
.trade_thing_coins .trade_thing_name {
  align-self: center;
  color: var(--gold);
}
.trade_nothing {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink2);
}
.trade_note {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
  line-height: 1.4;
}
.trade_note_warning {
  color: #ff8a96;
}
.trade_actions {
  display: flex;
  gap: 8px;
}
.trade_actions .btn {
  flex: 1;
}
.trade_friend_head {
  width: 64px;
  height: 64px;
  margin: auto;
}
.trade_friend_head svg {
  width: 100%;
  height: 100%;
  display: block;
}
.trade_friend_name {
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trade_builder_head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
}
.trade_builder_head h3 {
  margin: 0;
}
.trade_peepee_card {
  border-color: var(--gold);
}
.it.trade_blocked {
  opacity: 0.55;
  cursor: not-allowed;
}
.it.trade_blocked svg {
  filter: grayscale(1);
}
.trade_lock_badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 900;
  color: #ffd23f;
}
.it.trade_blocked .trade_lock_badge svg {
  width: 13px;
  height: 13px;
  filter: none;
}
.trade_coin_field {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  font-weight: 900;
  font-size: 13px;
}
.trade_coin_input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surf2);
  padding-left: 12px;
}
.trade_coin_input:focus-within {
  border-color: var(--blue);
}
.trade_coin_input svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
  flex: none;
}
.trade_coin_input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 11px 12px 11px 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  outline: none;
}
.trade_coin_field small {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
}
.trade_coin_field small.short {
  color: #ff8a96;
}
.trade_builder_footer {
  position: sticky;
  bottom: calc(-20px - env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: grid;
  gap: 8px;
  margin: 14px -16px 0;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--soft);
  border-top: 1px solid var(--line);
}
.trade_database_tabs {
  flex-wrap: wrap;
  overflow: visible;
  margin-top: 10px;
}
.trade_database_tabs .chip {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  padding: 6px 10px;
}
.trade_database_scroll {
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surf);
}
.trade_database_table {
  border-collapse: collapse;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  white-space: nowrap;
  min-width: 100%;
}
.trade_database_table th {
  text-align: left;
  padding: 8px 8px;
  color: var(--ink2);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.trade_database_table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.trade_database_table td i {
  color: var(--ink2);
}
.trade_database_table .trade_status {
  padding: 2px 8px;
  font-size: 10.5px;
  text-transform: none;
  letter-spacing: 0;
}

.trade_screen_title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 22px;
}
.trade_inbox_button {
  position: relative;
}
.trade_badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 99px;
  background: #e0243a;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.trade_friend_grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 8px;
  padding: 16px 12px;
}
.trade_friend_grid .frb {
  width: auto;
}

.trade_topbar_actions {
  display: flex;
  gap: 8px;
}
.trade_room_row {
  min-width: 0;
  box-sizing: border-box;
  border: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.trade_room_avatars {
  display: flex;
  flex: none;
}
.trade_room_avatar {
  width: 40px;
  height: 40px;
  margin-right: -12px;
}
.trade_room_avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}
.trade_room_text {
  flex: 1;
  min-width: 0;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
}
.trade_room_text span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trade_history_button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trade_history_button::after {
  content: "";
  position: absolute;
  inset: -4px -4px -22px -22px;
}
.trade_history_button:active {
  transform: scale(0.9);
  filter: brightness(1.4);
}
.trade_room_row:active {
  transform: scale(0.98);
  filter: brightness(1.2);
}
.it .trade_history_button svg {
  width: 16px;
  height: 16px;
}
.trade_history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.trade_history_title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 900;
  font-size: 13.5px;
}
.trade_history_chart {
  width: 100%;
  height: 90px;
  display: block;
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.trade_history_stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
}
.trade_history_stats small {
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink2);
}
.trade_history_stats b {
  font-size: 14px;
}
