.exchange {
  --gold: #d1b870;
  --line: #3e484b;
  --muted: #a6b3b9;
  max-width: 1480px;
  margin: auto;
  padding: 24px 32px;
}
body:has(.exchange) { background: #101517; }
.exchange .topbar { justify-content: flex-start; padding: 14px 0 24px; border-bottom: 1px solid var(--gold); }
.exchange-brand { object-fit: contain; flex: 0 0 56px; image-rendering: pixelated; }
.exchange-heading { min-width: 0; }
.exchange-eyebrow { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.exchange h1 { font-family: Georgia, serif; font-size: 30px; line-height: 1.25; margin: 4px 0; }
.exchange h1 span { background: none; color: #8adaf8; }
.exchange-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); margin: 0 0 24px; }
.exchange-tabs button { min-height: 48px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; padding: 10px 20px; color: #bac3c6; }
.exchange-tabs button[aria-pressed="true"] { border-bottom-color: var(--gold); color: #f3dc9e; background: #252b2d; }
.exchange-tabs button:hover { color: #9bf7ff; background: #20282b; }
.exchange .filters { grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(110px, 1fr)); gap: 14px; }
.exchange input, .exchange select { min-height: 44px; background: #171f23; border-color: #47545c; border-radius: 2px; }
.exchange .stats-grid { display: flex; gap: 28px; padding: 6px 0 18px; margin: 0; }
.exchange .stats-grid article { display: flex; gap: 8px; align-items: baseline; padding: 0; border: 0; background: none; box-shadow: none; }
.exchange .stats-grid strong { font-size: 14px; color: var(--gold); }
.exchange .workspace { grid-template-columns: minmax(320px, 430px) minmax(0, 1fr); gap: 22px; }
.exchange .item-panel, .exchange .detail-panel { border-radius: 2px; background: #192126; box-shadow: none; min-width: 0; }
.exchange .panel-header { background: #242e32; border-color: var(--line); }
.exchange .panel-header h2, .exchange .chart-heading h3 { font-family: Georgia, serif; color: #e0c981; font-size: 17px; font-weight: normal; margin: 0; }
.exchange .item-list { max-height: 780px; }
.exchange .item-row { grid-template-columns: 34px minmax(0, 1fr) minmax(90px, auto); align-items: center; gap: 12px; min-height: 78px; padding: 12px; border-color: #303c42; }
.exchange .item-row img { image-rendering: pixelated; object-fit: contain; }
.exchange .item-label { min-width: 0; display: grid; gap: 4px; }
.exchange .item-label strong { color: #e7e4d9; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.exchange .item-label span { font-size: 11px; }
.exchange .item-row .item-price { color: #e5cb7c; text-align: right; font-size: 13px; overflow-wrap: anywhere; }
.exchange .item-price small { display: block; color: #a2b5bc; font-size: 10px; }
.exchange .item-row.active { background: #283b43; box-shadow: inset 3px 0 0 #89d8ee; }
.exchange .detail-header { flex-wrap: wrap; align-items: center; padding: 20px; background: #202b31; gap: 12px; }
.exchange .detail-title { flex: 1; min-width: 140px; }
.exchange .detail-title h2 { font-family: Georgia, serif; font-size: 23px; line-height: 1.3; color: #e7d395; overflow-wrap: anywhere; }
.exchange .detail-title p { overflow-wrap: anywhere; font-size: 11px; margin-top: 6px; }
.exchange #retryHistory { width:40px;height:36px;padding:0;font-size:22px; }
.selected-icon { image-rendering: pixelated; object-fit: contain; }
.exchange .price-chip { background: none; border: 0; padding: 0; color: #a9bac1; font-size: 12px; font-weight: normal; max-width: 100%; overflow-wrap: anywhere; }
.market-strip { display: grid; grid-template-columns: 1.25fr .8fr 1fr; margin: 0; padding: 22px 20px 12px; gap: 16px; }
.market-strip div { min-width: 0; }
.market-strip dt { color: #aebcc2; font-size: 12px; margin-bottom: 6px; }
.market-strip dd { margin: 0; font-size: 23px; font-weight: 650; color: #f0d78d; line-height: 1.2; overflow-wrap: anywhere; }
.market-strip #marketTrend { font-size: 19px; }
#marketTrend[data-direction="up"] { color: #89cf97; }
#marketTrend[data-direction="down"] { color: #f29591; }
.market-basis { color: #a6b3b9; font-size: 11px; padding: 0 20px 18px; border-bottom: 1px solid var(--line); }
.pricing-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 12px 20px 0; font-size: 12px; color: #a6b3b9; }
.pricing-status strong { color: #edcb7a; }
.transaction-evidence { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.transaction-evidence header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; justify-content: space-between; }
.transaction-evidence h3 { margin: 0; font-size: 16px; color: #e7d395; }
.transaction-evidence header strong { color: #f2b1a8; font-size: 12px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 16px 0; }
.evidence-grid dt { font-size: 11px; color: #a6b3b9; }
.evidence-grid dd { margin: 5px 0 0; font-size: 15px; color: #e7e4d9; overflow-wrap: anywhere; }
.transaction-evidence p { font-size: 11px; color: #a6b3b9; line-height: 1.6; }
.transaction-evidence summary { cursor: pointer; padding: 12px 0 0; color: #8adaf8; font-size: 12px; }
@media (max-width: 700px) { .evidence-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.chart-heading { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; gap: 10px; }
.chart-heading span { font-size: 11px; color: var(--muted); }
.exchange .chart-wrap { height: 330px; padding: 12px 20px 20px; }
.exchange #priceChart { border-radius: 0; background: #101a20; border-color: #3e515a; }
.exchange .insights { gap: 0; padding: 0 20px 20px; }
.exchange .insights article { border: 0; border-left: 1px solid var(--line); background: none; border-radius: 0; box-shadow: none; padding: 0 10px; min-width: 0; overflow-wrap: anywhere; }
.exchange .insights article:first-child { border-left: 0; padding-left: 0; }
.exchange .insights strong { font-size: 15px; }
.exchange .insights span { font-size: 11px; }
.exchange th { background: #242e32; }
.exchange td { font-size: 12px; }
.exchange .site-footer { border-top: 1px solid var(--line); margin-top: 28px; }
@media (max-width: 1000px) {
  .exchange { padding: 16px; }
  .exchange .workspace { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 14px; }
  .exchange .item-row { grid-template-columns: 28px minmax(0,1fr); gap: 8px; }
  .exchange .item-price { grid-column: 2; text-align: left !important; }
  .exchange .item-price small { display: inline; margin-left: 10px; }
  .market-strip { grid-template-columns: 1fr 1fr; }
  .market-strip > div:first-child { grid-column: 1 / -1; }
  .exchange .insights { grid-template-columns: 1fr 1fr; gap: 14px 0; }
}
@media (max-width: 700px) {
  .exchange .topbar { flex-direction: row; align-items: center; }
  .exchange-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .exchange-tabs button { white-space: nowrap; }
  .exchange .workspace { grid-template-columns: 1fr; }
  .exchange .filters { grid-template-columns: 1fr 1fr; }
  .exchange .filters > label:first-child { grid-column: 1 / -1; }
  .exchange .filters > label:last-child { grid-column: 1 / -1; }
  .exchange .item-panel { min-height: 0; }
  .exchange .item-list { max-height: 330px; }
  .exchange .item-row { grid-template-columns: 32px minmax(0,1fr) minmax(90px, auto); }
  .exchange .item-price { grid-column: auto; text-align: right !important; }
  .exchange .item-price small { display: block; margin: 0; }
  .exchange-tabs button { padding: 10px 12px; font-size: 12px; flex: 1 0 auto; }
  .exchange h1 { font-size: 24px; }
  .exchange .detail-header { flex-direction: row; align-items: center; padding: 16px; }
  .exchange .detail-title h2 { font-size: 21px; }
  .exchange .price-chip { flex-basis: 100%; }
}
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 22px 8px; font-size: 12px; }
.item-appearances { padding: 10px 20px; border-bottom: 1px solid #3e515a; color: #a6b3b9; font-size: 12px; }
.item-appearances[hidden] { display: none; }
.item-appearances > div { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; }
.item-appearances a { flex: 0 0 36px; }
.item-appearances img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
@media (max-width: 380px) {
  .exchange { padding: 10px; }
  .exchange .item-row { grid-template-columns: 24px minmax(0,1fr); }
  .exchange .item-price { grid-column: 2; text-align: left !important; }
  .exchange .topbar { gap: 10px; }
  .exchange-brand { width: 40px; height: 40px; flex-basis: 40px; }
}
