/*
 * NoFee approved terminal composition
 * -----------------------------------
 * Presentation-only override for the real production token screen. This file
 * deliberately targets the existing IDs/classes consumed by app.js; it does
 * not replace the chart, quote, wallet, funding, execution, or stream surfaces.
 * Load after styles.css, site-pro.css, and terminal-pro.css.
 */

body[data-screen="token"] {
  --ta-void: #090a0c;
  --ta-panel: #0b0c0e;
  --ta-panel-2: #0d0f12;
  --ta-panel-3: #111317;
  --ta-hover: #15171b;
  --ta-line: #24272c;
  --ta-line-soft: #191c20;
  --ta-line-strong: #34383e;
  --ta-text: #e8eaed;
  --ta-text-strong: #f0f1f2;
  --ta-muted: #969ca3;
  --ta-dim: #747a82;
  --ta-buy: #70d99b;
  --ta-sell: #ed6e7a;
  --ta-route: #d6b87f;
  --ta-sans: var(--sans, "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  --ta-mono: var(--mono, "Geist Mono", "SFMono-Regular", ui-monospace, monospace);
  color: var(--ta-text);
  background: var(--ta-void);
}

body[data-screen="token"],
body[data-screen="token"] button,
body[data-screen="token"] input,
body[data-screen="token"] select,
body[data-screen="token"] textarea {
  font-family: var(--ta-sans);
  font-optical-sizing: auto;
  font-kerning: normal;
  font-synthesis: none;
}

body[data-screen="token"] :is(
  .price-main,
  .delta,
  .price-usd,
  .watch-row em,
  .chart-meta,
  .token-stat-row b,
  .trades-table td,
  .trade-balance strong,
  .trade-input input,
  .trade-input b,
  .slippage-row b,
  .q-row b
) {
  font-variant-numeric: tabular-nums lining-nums slashed-zero;
  font-feature-settings: "tnum" 1, "lnum" 1, "zero" 1;
}

body[data-screen="token"] .app-header {
  border-bottom-color: var(--ta-line) !important;
  background: rgba(8, 9, 11, .965) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) saturate(110%);
}

body[data-screen="token"] .app-header::before { display: none !important; }
body[data-screen="token"] .route-link { color: #858b92; font-size: 13px; }
body[data-screen="token"] .route-link:hover,
body[data-screen="token"] .route-link.current { color: var(--ta-text-strong); }
body[data-screen="token"] .route-link.current::after { background: #d9dde0; box-shadow: none; }
body[data-screen="token"] .global-search,
body[data-screen="token"] .wallet-trigger {
  border-color: var(--ta-line);
  border-radius: 4px;
  background: #0d0f12;
  box-shadow: none;
}

/* Terminal frame -------------------------------------------------------- */
body[data-screen="token"] #token.terminal-screen {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ta-text);
  background: var(--ta-void) !important;
  font: 400 13px/1.42 var(--ta-sans);
  animation: none;
}

body[data-screen="token"] #token .asset-context-ribbon {
  display: none;
}

/* Asset bar ------------------------------------------------------------- */
body[data-screen="token"] #token .terminal-topbar {
  width: 100%;
  height: 72px;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--ta-line);
  background: #0b0c0e;
}

body[data-screen="token"] #token .back-to-market {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ta-line);
  border-radius: 3px;
  color: #899098;
  background: transparent;
  font-size: 0;
}

body[data-screen="token"] #token .back-to-market::before {
  content: "\2190";
  font: 500 16px/1 var(--ta-sans);
}

body[data-screen="token"] #token .back-to-market:hover {
  color: #fff;
  border-color: #444a51;
  background: #121417;
}

body[data-screen="token"] #token .selected-token-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

body[data-screen="token"] #token .selected-token-title .token-avatar,
body[data-screen="token"] #token .selected-token-title img.token-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #30343a;
  border-radius: 8px;
  box-shadow: none;
}

body[data-screen="token"] #token .selected-token-title > div { min-width: 0; }
body[data-screen="token"] #token .selected-token-title h2 {
  max-width: min(38vw, 560px);
  margin: 0;
  overflow: hidden;
  color: var(--ta-text-strong);
  font: 600 19px/23px var(--ta-sans);
  letter-spacing: -.022em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .selected-token-title h2 span {
  color: var(--ta-muted);
  font: 500 11px/15px var(--ta-sans);
  letter-spacing: .025em;
}

body[data-screen="token"] #token .selected-token-title p {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  overflow: hidden;
  color: #92989f;
  font: 450 12px/16px var(--ta-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .selected-token-title .copy-ca {
  max-width: 220px;
  overflow: hidden;
  color: #7f858c;
  font: 500 11px/15px var(--ta-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .selected-token-title .copy-ca:hover { color: #d9dde0; }
body[data-screen="token"] #token .token-price-cluster {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0;
  white-space: nowrap;
}

body[data-screen="token"] #token .price-main {
  color: var(--ta-text-strong);
  font: 500 23px/28px var(--ta-mono);
  letter-spacing: -.025em;
}

body[data-screen="token"] #token .delta {
  font: 600 13px/18px var(--ta-mono);
  letter-spacing: -.01em;
}

body[data-screen="token"] #token .price-usd {
  color: #858b92;
  font: 500 11px/15px var(--ta-mono);
}

body[data-screen="token"] #token .terminal-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
}

body[data-screen="token"] #token .terminal-actions .icon-button,
body[data-screen="token"] #token .terminal-chain,
body[data-screen="token"] #token .terminal-actions .qt-reopen {
  min-width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #858b92;
  background: transparent;
  box-shadow: none;
}

body[data-screen="token"] #token .terminal-actions .icon-button:hover,
body[data-screen="token"] #token .terminal-actions .icon-button.active,
body[data-screen="token"] #token .terminal-actions .qt-reopen:hover {
  color: #e1e3e5;
  border-color: var(--ta-line);
  background: var(--ta-panel-3);
}

body[data-screen="token"] #token .terminal-chain {
  gap: 7px;
  padding: 0 9px;
  border-color: var(--ta-line);
  font: 500 11px/1 var(--ta-sans);
  cursor: default;
}

body[data-screen="token"] #token .terminal-actions .qt-reopen {
  position: static;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: none;
}

body[data-screen="token"] #token .terminal-actions .qt-reopen[hidden] {
  display: none !important;
}

body[data-screen="token"] #token .terminal-chain i { display: none; }

/* Three-column workstation --------------------------------------------- */
body[data-screen="token"] #token .asset-workspace.terminal-grid {
  width: 100%;
  height: calc(100dvh - var(--header-h) - 72px);
  min-height: 0;
  display: grid;
  grid-template-columns: 224px minmax(520px, 1fr) 348px;
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "radar stage intent";
  overflow: hidden;
  background: var(--ta-void);
}

body[data-screen="token"] #token .terminal-left,
body[data-screen="token"] #token .terminal-right {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2e33 transparent;
}

body[data-screen="token"] #token .terminal-left {
  position: relative;
  grid-area: radar;
  display: block;
  border-right: 1px solid var(--ta-line);
  background: #0a0b0d;
}

body[data-screen="token"] #token .terminal-center {
  grid-area: stage;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 43px 24px minmax(250px, 1.18fr) 64px minmax(195px, .82fr);
  overflow: hidden;
  background: var(--ta-void);
}

body[data-screen="token"] #token .terminal-right {
  grid-area: intent;
  padding: 0;
  border-left: 1px solid var(--ta-line);
  background: #0c0d10;
}

/* Watchlist and movers -------------------------------------------------- */
body[data-screen="token"] #token .panel-head {
  width: 100%;
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--ta-line);
  color: #e0e3e5;
  font: 600 13px/17px var(--ta-sans);
  letter-spacing: -.008em;
}

body[data-screen="token"] #token .panel-add,
body[data-screen="token"] #token .hot-filter {
  color: #8b9198;
  font: 500 11px/15px var(--ta-sans);
}

body[data-screen="token"] #token .panel-add {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 16px;
}

body[data-screen="token"] #token .panel-add:hover {
  color: #e1e3e5;
  border-color: var(--ta-line);
  background: var(--ta-panel-3);
}

body[data-screen="token"] #token .hot-filter { cursor: default; }
body[data-screen="token"] #token .watch-list {
  display: block;
  height: auto;
  padding: 0;
  overflow: visible;
}
body[data-screen="token"] #token .watch-row {
  width: 100%;
  min-height: 57px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 0;
  border-bottom: 1px solid var(--ta-line-soft);
  border-radius: 0;
  color: #cbd0d4;
  background: transparent;
  text-align: left;
  transition: background-color .14s ease, box-shadow .14s ease;
}

body[data-screen="token"] #token .watch-row:hover { background: #101216; }
body[data-screen="token"] #token .watch-row.active {
  border: 0;
  background: #111419;
  box-shadow: inset 2px 0 #aeb4ba;
}

body[data-screen="token"] #token .watch-row .token-avatar {
  width: 28px;
  height: 28px;
  border: 1px solid #30343a;
  border-radius: 50%;
  color: #b9bec3;
  background: #15181c;
  font: 600 9px/1 var(--ta-sans);
  box-shadow: none;
}

body[data-screen="token"] #token .watch-row > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body[data-screen="token"] #token .watch-row b {
  overflow: hidden;
  color: #d9dcdf;
  font: 600 12px/16px var(--ta-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .watch-row i {
  overflow: hidden;
  color: #8b9198;
  font: 500 11px/14px var(--ta-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .watch-row em {
  color: var(--ta-buy);
  font: 500 11px/14px var(--ta-mono);
  font-style: normal;
}

body[data-screen="token"] #token .watch-row em.negative { color: var(--ta-sell); }
body[data-screen="token"] #token .left-divider {
  width: 100%;
  height: 1px;
  margin: 0;
  background: var(--ta-line);
}
body[data-screen="token"] #token .hot-list { padding: 0; }
body[data-screen="token"] #token .hot-list button {
  width: 100%;
  height: 39px;
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-bottom: 1px solid var(--ta-line-soft);
  text-align: left;
}

body[data-screen="token"] #token .hot-list button:hover { background: #101216; }
body[data-screen="token"] #token .hot-list > button > b { color: #6f757c; font: 500 10px/1 var(--ta-mono); }
body[data-screen="token"] #token .mini-asset { min-width: 0; display: flex; flex: 1; align-items: center; gap: 7px; }
body[data-screen="token"] #token .mini-asset .token-avatar { width: 20px; height: 20px; border-radius: 50%; font-size: 8px; }
body[data-screen="token"] #token .mini-asset strong {
  overflow: hidden;
  color: #c9cdd1;
  font: 600 11px/15px var(--ta-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .hot-list em { color: var(--ta-buy); font: 500 11px/14px var(--ta-mono); font-style: normal; }
body[data-screen="token"] #token .left-footnote {
  position: sticky;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 12px;
  border-top: 1px solid var(--ta-line);
  color: #7d838a;
  background: rgba(10, 11, 13, .95);
  font: 500 10px/14px var(--ta-sans);
}

body[data-screen="token"] #token .circle-spark {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--ta-buy);
  box-shadow: none;
}

/* Token information can be moved into the approved left rail without any
   selector or data-contract change. */
body[data-screen="token"] #token .terminal-left .right-info-panel {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--ta-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-screen="token"] #token .terminal-left .info-content { grid-template-columns: 1fr; }
body[data-screen="token"] #token .terminal-left .info-line { border-right: 0; }

/* Real chart ------------------------------------------------------------ */
body[data-screen="token"] #token .chart-toolbar {
  width: 100%;
  height: 43px;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-bottom: 1px solid var(--ta-line);
  background: #0c0d10;
}

body[data-screen="token"] #token .chart-view-tabs { display: none; }
body[data-screen="token"] #token .range-tabs {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

body[data-screen="token"] #token .range-tabs::-webkit-scrollbar { display: none; }
body[data-screen="token"] #token .range-tabs button,
body[data-screen="token"] #token .chart-switch button,
body[data-screen="token"] #token .chart-expand {
  min-height: 29px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: #92989f;
  background: transparent;
  font: 500 12px/16px var(--ta-sans);
}

body[data-screen="token"] #token .range-tabs button:hover,
body[data-screen="token"] #token .chart-switch button:hover,
body[data-screen="token"] #token .chart-expand:hover { color: #c7cbd0; background: #131519; }
body[data-screen="token"] #token .range-tabs button.selected,
body[data-screen="token"] #token .chart-switch button.selected {
  color: #e1e3e5;
  border-color: var(--ta-line-strong);
  background: var(--ta-hover);
  box-shadow: none;
  font-weight: 600;
}

body[data-screen="token"] #token .chart-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 2px;
  border: 1px solid var(--ta-line);
  border-radius: 3px;
}

body[data-screen="token"] #token .chart-expand { width: 30px; padding: 0; }
body[data-screen="token"] #token .chart-meta {
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 12px;
  overflow: hidden;
  color: #90969d;
  background: var(--ta-void);
  font: 500 11px/15px var(--ta-mono);
  letter-spacing: -.005em;
  white-space: nowrap;
}

body[data-screen="token"] #token .chart-meta b { color: #d0d4d7; font: inherit; font-weight: 600; }
body[data-screen="token"] #token .chart-meta b.mint { color: var(--ta-buy); }
body[data-screen="token"] #token #chart-coverage {
  margin-left: auto;
  overflow: hidden;
  color: #858b92;
  font: 600 9px/13px var(--ta-sans);
  letter-spacing: .025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token #chart-coverage.complete { color: #92caaa; }
body[data-screen="token"] #token #chart-coverage.stale { color: #c7a678; }
body[data-screen="token"] #token .asset-workspace .terminal-stage .chart-canvas-wrap:not(.expanded) {
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--ta-line);
  border-radius: 0;
  background: var(--ta-void);
  box-shadow: none;
}

body[data-screen="token"] #token #price-chart {
  width: 100%;
  height: 100%;
  min-height: 0;
}

body[data-screen="token"] #token #price-chart::before { display: none; }
body[data-screen="token"] #token .chart-watermark { display: none; }
body[data-screen="token"] #token .chart-full-close {
  border: 1px solid var(--ta-line);
  color: #b9bec3;
  background: #101216;
}

body[data-screen="token"] #token .token-stat-row {
  width: 100%;
  height: 64px;
  min-height: 64px;
  display: grid;
  margin: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border-bottom: 1px solid var(--ta-line);
  background: #0c0d10;
}

/* Compact laptop heights still keep both the chart and the live tape visible.
   This overrides the fixed minima accumulated by the legacy Signal Deck. */
@media (min-width: 881px) and (max-height: 760px) {
  body[data-screen="token"] #token .terminal-center {
    grid-template-rows: 40px 22px minmax(154px, 1.15fr) 72px minmax(115px, .85fr);
  }

  body[data-screen="token"] #token .chart-toolbar {
    height: 40px;
    min-height: 40px;
  }

  body[data-screen="token"] #token .chart-meta {
    height: 22px;
  }

  body[data-screen="token"] #token .token-stat-row {
    height: 72px;
    min-height: 72px;
  }
}

body[data-screen="token"] #token .token-stat-row > div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 8px 11px;
  border-right: 1px solid var(--ta-line-soft);
}

body[data-screen="token"] #token .token-stat-row > div:last-child { border-right: 0; }
body[data-screen="token"] #token .token-stat-row span {
  overflow: hidden;
  color: #8b9198;
  font: 500 11px/14px var(--ta-sans);
  letter-spacing: .005em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

body[data-screen="token"] #token .token-stat-row b {
  overflow: hidden;
  color: #e5e7e9;
  font: 500 14px/18px var(--ta-mono);
  letter-spacing: -.012em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .token-stat-row i { color: #8e949b; font: 500 10px/14px var(--ta-mono); }

/* Real transaction / holders / traders panes --------------------------- */
body[data-screen="token"] #token .terminal-tape {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--ta-void);
  box-shadow: none;
}

body[data-screen="token"] #token .trade-feed-head {
  width: 100%;
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  overflow: visible;
  border-bottom: 1px solid var(--ta-line);
  background: var(--ta-void);
  box-shadow: none;
}

body[data-screen="token"] #token .detail-tabs {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
}

body[data-screen="token"] #token .detail-tabs button {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 2px;
  color: #858b92;
  font: 600 13px/17px var(--ta-sans);
}

body[data-screen="token"] #token .detail-tabs button:hover { color: #c9cdd1; background: #121418; }
body[data-screen="token"] #token .detail-tabs button.selected { color: #e4e6e8; background: var(--ta-hover); }
body[data-screen="token"] #token .detail-tabs button.selected::after { display: none; }
body[data-screen="token"] #token .feed-controls { color: #8b9198; font: 500 11px/15px var(--ta-sans); }
body[data-screen="token"] #token .feed-controls .online-dot { width: 5px; height: 5px; box-shadow: none; }
body[data-screen="token"] #token #trades-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  scrollbar-width: thin;
  scrollbar-color: #2a2e33 transparent;
}

body[data-screen="token"] #token .trade-filter-rail {
  position: sticky;
  z-index: 4;
  top: 0;
  min-height: 44px;
  border-bottom: 1px solid var(--ta-line);
  background: rgba(11, 12, 14, .97);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

body[data-screen="token"] #token :is(.trade-side-filter, .trade-range-filter, .trade-wallet-filter) {
  border-color: var(--ta-line);
  border-radius: 3px;
  background: #0e1013;
}

body[data-screen="token"] #token .trade-side-filter button.selected {
  color: #dff8eb;
  background: rgba(112, 217, 155, .10);
  box-shadow: inset 0 0 0 1px rgba(112, 217, 155, .18);
}

body[data-screen="token"] #token .trades-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

body[data-screen="token"] #token .trades-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 30px;
  padding: 0 10px;
  border-bottom: 1px solid var(--ta-line);
  color: #8b9198;
  background: #0b0c0e;
  font: 600 11px/14px var(--ta-sans);
  letter-spacing: .01em;
  text-transform: none;
}

body[data-screen="token"] #token #trades-pane:has(.trade-filter-rail) .trades-table th { top: 44px; }
body[data-screen="token"] #token .trades-table td {
  height: 36px;
  padding: 0 10px;
  border-bottom: 1px solid var(--ta-line-soft);
  color: #c4c8cc;
  font: 500 12px/17px var(--ta-mono);
  letter-spacing: -.008em;
}

body[data-screen="token"] #token .trades-table tbody tr {
  transition: background-color .14s ease, box-shadow .14s ease;
}

body[data-screen="token"] #token .trades-table tbody tr:hover,
body[data-screen="token"] #token .trades-table tbody tr:focus-within {
  background: #101216;
  box-shadow: inset 2px 0 #3c4147;
}

body[data-screen="token"] #token .trade-type {
  min-width: 40px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  color: var(--ta-buy);
  background: rgba(112, 217, 155, .08);
  font: 700 10px/13px var(--ta-sans);
  letter-spacing: .025em;
}

body[data-screen="token"] #token .trade-type i { display: none; }
body[data-screen="token"] #token .trade-type.sell { color: var(--ta-sell); background: rgba(237, 110, 122, .08); }
body[data-screen="token"] #token .wallet-short { color: #c8cdd1; }

/* Execution ticket ----------------------------------------------------- */
body[data-screen="token"] #token .mobile-sheet-close,
body[data-screen="token"] #token .terminal-intent-heading { display: none; }
body[data-screen="token"] #token .terminal-intent .trade-card {
  margin: 0;
  padding: 0 16px 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-screen="token"] #token .trade-card::before { display: none !important; }
body[data-screen="token"] #token .trade-card-head {
  height: 50px;
  min-height: 50px;
  display: flex;
  align-items: center;
  margin: 0 -16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ta-line);
  background: #0b0c0e;
}

body[data-screen="token"] #token .buy-sell-tabs {
  height: 100%;
  display: flex;
  flex: 1;
  gap: 0;
}

body[data-screen="token"] #token .buy-sell-tabs button {
  position: relative;
  min-height: 50px;
  flex: 1;
  color: #858b92;
  font: 600 14px/19px var(--ta-sans);
}

body[data-screen="token"] #token .buy-sell-tabs button.selected { color: var(--ta-text-strong); }
body[data-screen="token"] #token .buy-sell-tabs button.selected::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  box-shadow: none;
}

body[data-screen="token"] #token .buy-sell-tabs[data-side="buy"] button.selected::after { background: var(--ta-buy); }
body[data-screen="token"] #token .buy-sell-tabs[data-side="sell"] button.selected::after { background: var(--ta-sell); }
body[data-screen="token"] #token .settings-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: #858b92;
}

body[data-screen="token"] #token .settings-button:hover { color: #d7dade; background: var(--ta-hover); }
body[data-screen="token"] #token .trade-balance {
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 0 10px;
}

body[data-screen="token"] #token .trade-balance > span { color: #8a9198; font: 500 12px/16px var(--ta-sans); }
body[data-screen="token"] #token .trade-balance button {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, auto);
  align-items: center;
  justify-content: end;
  justify-items: end;
  gap: 1px 6px;
  color: #8b9198;
}

body[data-screen="token"] #token .trade-balance .aggregate-nodes { grid-row: 1 / span 2; }
body[data-screen="token"] #token .trade-balance strong {
  max-width: 210px;
  overflow: hidden;
  color: var(--ta-text-strong);
  font: 500 20px/24px var(--ta-mono);
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .trade-balance em {
  max-width: 240px;
  overflow: hidden;
  color: #7d838a;
  font: 500 10px/14px var(--ta-sans);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .aggregate-nodes::before,
body[data-screen="token"] #token .aggregate-nodes::after,
body[data-screen="token"] #token .aggregate-nodes b {
  background: #aeb4ba;
  box-shadow: none;
}

body[data-screen="token"] #token .trade-input {
  display: block;
  position: relative;
  margin-top: 0;
  padding: 13px 14px;
  border: 1px solid #2a2d32;
  border-radius: 4px;
  background: #101216;
  box-shadow: none;
  transition: border-color .14s ease;
}

body[data-screen="token"] #token .trade-input:focus-within { border-color: #555b62; box-shadow: none; }
body[data-screen="token"] #token .trade-input > span { color: #969ca3; font: 500 12px/16px var(--ta-sans); }
body[data-screen="token"] #token .trade-input > div { display: flex; align-items: center; gap: 9px; margin-top: 6px; }
body[data-screen="token"] #token .trade-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: #f3f4f5;
  font: 500 32px/36px var(--ta-mono);
  letter-spacing: -.04em;
}

body[data-screen="token"] #token .trade-input b { color: #c1c5c9; font: 600 12px/16px var(--ta-mono); letter-spacing: .015em; }
body[data-screen="token"] #token .trade-input button {
  padding: 4px 6px;
  border-radius: 2px;
  color: #b8bdc2;
  background: #1b1e22;
  font: 700 10px/13px var(--ta-sans);
}

body[data-screen="token"] #token .trade-input small { display: block; margin-top: 5px; color: #8b9198; font: 450 11px/15px var(--ta-sans); }
body[data-screen="token"] #token .preset-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

body[data-screen="token"] #token .preset-row button {
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #25282d;
  border-radius: 3px;
  color: #858b92;
  background: #0f1114;
  font: 600 12px/15px var(--ta-sans);
}

body[data-screen="token"] #token .preset-row button:hover,
body[data-screen="token"] #token .preset-row button.selected {
  color: #e4e6e8;
  border-color: #464c52;
  background: #181a1e;
  box-shadow: none;
}

body[data-screen="token"] #token .trade-swap-icon { display: none; }
body[data-screen="token"] #token .trade-input.receive {
  margin-top: 10px;
  border-color: var(--ta-line);
  background: #0e1013;
}

body[data-screen="token"] #token .trade-input.receive input { font-size: 27px; line-height: 32px; letter-spacing: -.035em; }
body[data-screen="token"] #token .slip-wrap { position: relative; }
body[data-screen="token"] #token .slippage-row {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  color: #92989f;
  font: 500 12px/16px var(--ta-sans);
}

body[data-screen="token"] #token .slippage-row b { margin-left: auto; color: #c9cdd1; font: 500 11px/15px var(--ta-mono); }
body[data-screen="token"] #token .slippage-row i { color: var(--ta-route); font-style: normal; }
body[data-screen="token"] #token .slip-pop {
  z-index: 12;
  border-color: var(--ta-line);
  border-radius: 6px;
  background: rgba(14, 16, 19, .99);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .46);
}

body[data-screen="token"] #token .trade-quote-extra,
body[data-screen="token"] #token .funding-details {
  border-color: var(--ta-line);
  border-radius: 4px;
  background: #0e1013;
  box-shadow: none;
}

body[data-screen="token"] #token .trade-quote-extra {
  color: #9da3a9;
  font: 500 11px/15px var(--ta-sans);
}

body[data-screen="token"] #token .q-row { min-height: 27px; border-bottom-color: var(--ta-line-soft); }
body[data-screen="token"] #token .q-row:last-child { border-bottom: 0; }
body[data-screen="token"] #token .q-row b { color: #c9cdd1; font: 500 11px/15px var(--ta-mono); }
body[data-screen="token"] #token .q-row b.up { color: var(--ta-buy); }
body[data-screen="token"] #token .q-row b.dn,
body[data-screen="token"] #token .q-row b.warn { color: #d8b47c; }
body[data-screen="token"] #token .funding-details summary {
  min-height: 34px;
  color: #92989f;
  font: 500 11px/15px var(--ta-sans);
  letter-spacing: 0;
}

body[data-screen="token"] #token .funding-summary { color: #bfc4c8; font: 500 11px/16px var(--ta-sans); }
body[data-screen="token"] #token .trade-submit {
  width: 100%;
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: 3px;
  color: #07100b;
  background: var(--ta-buy);
  box-shadow: none;
  font: 700 15px/19px var(--ta-sans);
  transition: background-color .14s ease, opacity .14s ease;
}

body[data-screen="token"] #token .trade-submit:not(.sell-mode):hover { background: #80e4aa; transform: none; }
body[data-screen="token"] #token .trade-submit.sell-mode { color: #17080a; background: var(--ta-sell); }
body[data-screen="token"] #token .trade-submit.sell-mode:hover { background: #f27f89; transform: none; }
body[data-screen="token"] #token .trade-submit i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  color: inherit;
  background: rgba(255, 255, 255, .25);
  font-style: normal;
}

body[data-screen="token"] #token .trade-submit.disabled,
body[data-screen="token"] #token .trade-submit:disabled {
  color: #858b92;
  background: #181b1f;
  opacity: 1;
  cursor: wait;
}

body[data-screen="token"] #token .fee-truth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 10px;
  color: #8b9198;
  font: 500 11px/15px var(--ta-sans);
}

body[data-screen="token"] #token .fee-truth b { color: #aeb4ba; font-weight: 600; }
body[data-screen="token"] #token .fee-truth i { width: 2px; height: 2px; border-radius: 50%; background: #777d84; }
body[data-screen="token"] #token .trade-status {
  min-height: 0;
  margin-top: 9px;
  color: #aeb4ba;
  font: 500 12px/16px var(--ta-sans);
}

body[data-screen="token"] #token .trade-status a { color: #d8dcdf; text-decoration-color: #626970; text-underline-offset: 3px; }

/* Token information ---------------------------------------------------- */
body[data-screen="token"] #token .terminal-intent .right-info-panel {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--ta-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-screen="token"] #token .info-tab-head {
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--ta-line-soft);
}

body[data-screen="token"] #token .info-tab-head button {
  color: #e0e3e5;
  font: 600 13px/17px var(--ta-sans);
  pointer-events: none;
  cursor: default;
}

body[data-screen="token"] #token .info-tab-head button:nth-child(2),
body[data-screen="token"] #token .info-tab-head button::after { display: none; }
body[data-screen="token"] #token .info-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

body[data-screen="token"] #token .info-line {
  min-width: 0;
  min-height: 48px;
  height: auto;
  display: block;
  padding: 9px 13px;
  border-right: 1px solid var(--ta-line-soft);
  border-bottom: 1px solid var(--ta-line-soft);
  color: #8b9198;
  font: 500 11px/14px var(--ta-sans);
}

body[data-screen="token"] #token .info-line:nth-child(2n) { border-right: 0; }
body[data-screen="token"] #token .info-line > :is(b, button, a) {
  display: block;
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: #c9cdd1;
  font: 500 12px/16px var(--ta-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="token"] #token .locked-stamp {
  width: max-content;
  border-color: rgba(112, 217, 155, .24);
  color: #9bdbb8 !important;
  background: rgba(112, 217, 155, .055);
}

body[data-screen="token"] #token .check-line { color: #9bdbb8 !important; }
body[data-screen="token"] #token .terminal-disclaimer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  color: #7d838a;
  font: 500 10px/14px var(--ta-sans);
}

/* Existing real quick-trade overlay ------------------------------------ */
body[data-screen="token"] .qt-float {
  width: 310px;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--ta-line-strong);
  border-radius: 5px;
  background: rgba(12, 13, 16, .975);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .48);
  backdrop-filter: blur(14px);
}

/* The legacy base rule assigns display:flex to the floating ticket, which can
   outrank the browser's built-in [hidden] rule. Keep it absent until app.js
   explicitly opens it; otherwise an empty trade shell leaks onto Markets. */
.qt-float[hidden],
.qt-reopen[hidden] { display: none !important; }

body[data-screen="token"] .qt-drag { color: #c9cdd1; font: 600 12px/16px var(--ta-sans); }
body[data-screen="token"] .qt-status { color: #858b92; font: 500 10px/14px var(--ta-mono); opacity: 1; }
body[data-screen="token"] .qt-row { gap: 5px; }
body[data-screen="token"] .qt-row button,
body[data-screen="token"] .qt-row input {
  min-height: 34px;
  border-radius: 3px;
  font: 600 11px/15px var(--ta-sans);
}

body[data-screen="token"] .qt-buy button { color: var(--ta-buy); border-color: rgba(112, 217, 155, .28); background: rgba(112, 217, 155, .075); }
body[data-screen="token"] .qt-sell button { color: var(--ta-sell); border-color: rgba(237, 110, 122, .26); background: rgba(237, 110, 122, .07); }
body[data-screen="token"] .qt-reopen {
  width: 40px;
  height: 40px;
  border-color: var(--ta-line-strong);
  border-radius: 4px;
  color: #d5b779;
  background: rgba(12, 13, 16, .97);
}

/* Tablet --------------------------------------------------------------- */
@media (max-width: 1180px) and (min-width: 881px) {
  body[data-screen="token"] #token .asset-workspace.terminal-grid {
    grid-template-columns: minmax(500px, 1fr) 348px;
    grid-template-areas: "stage intent";
  }

  body[data-screen="token"] #token .terminal-left { display: none; }
}

/* Phone / compact tablet ----------------------------------------------- */
@media (max-width: 880px) {
  body[data-screen="token"].trade-sheet-open { overflow: hidden; }
  body[data-screen="token"].trade-sheet-open #token .mobile-trade-dock { opacity: 0; pointer-events: none; }

  body[data-screen="token"] #token.terminal-screen {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  body[data-screen="token"] #token .terminal-topbar {
    height: auto;
    min-height: 66px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
    padding: 8px 11px;
  }

  body[data-screen="token"] #token .back-to-market { width: 36px; height: 36px; }
  body[data-screen="token"] #token .selected-token-title { gap: 8px; }
  body[data-screen="token"] #token .selected-token-title .token-avatar,
  body[data-screen="token"] #token .selected-token-title img.token-avatar { width: 38px; height: 38px; flex-basis: 38px; }
  body[data-screen="token"] #token .selected-token-title h2 { max-width: 42vw; font-size: 15px; line-height: 19px; }
  body[data-screen="token"] #token .selected-token-title p { max-width: 43vw; font-size: 10px; line-height: 13px; }
  body[data-screen="token"] #token .token-price-cluster { display: grid; gap: 1px; text-align: right; }
  body[data-screen="token"] #token .price-main { font-size: 16px; line-height: 20px; }
  body[data-screen="token"] #token .delta { font-size: 10px; line-height: 13px; }
  body[data-screen="token"] #token :is(.price-usd, .terminal-actions) { display: none; }
  body[data-screen="token"] #token .asset-workspace.terminal-grid {
    height: auto;
    min-height: 0;
    display: block;
    grid-template-areas: none;
    overflow: visible;
  }

  body[data-screen="token"] #token .terminal-left,
  body[data-screen="token"] #token .terminal-right { display: none; }
  body[data-screen="token"] #token .terminal-center { display: block; overflow: visible; }
  body[data-screen="token"] #token .chart-toolbar { position: sticky; z-index: 7; top: var(--header-h); }
  body[data-screen="token"] #token .chart-meta { gap: 8px; padding-inline: 9px; font-size: 10px; }
  body[data-screen="token"] #token #chart-coverage { display: none; }
  body[data-screen="token"] #token .asset-workspace .terminal-stage .chart-canvas-wrap:not(.expanded) {
    height: clamp(240px, 58vw, 310px);
    min-height: 240px;
  }

  body[data-screen="token"] #token .token-stat-row {
    height: 64px;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 42vw);
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-screen="token"] #token .token-stat-row::-webkit-scrollbar { display: none; }
  body[data-screen="token"] #token .terminal-tape { display: block; overflow: visible; }
  body[data-screen="token"] #token .trade-feed-head { overflow-x: auto; scrollbar-width: none; }
  body[data-screen="token"] #token .trade-feed-head::-webkit-scrollbar { display: none; }
  body[data-screen="token"] #token .detail-tabs { min-width: max-content; }
  body[data-screen="token"] #token .detail-tabs button { min-height: 42px; }
  body[data-screen="token"] #token #trades-pane { max-height: min(38dvh, 330px); }
  body[data-screen="token"] #token .trades-table { min-width: 640px; }
  body[data-screen="token"] #token .terminal-right.mobile-open {
    position: fixed;
    z-index: 244;
    inset: auto 0 0;
    display: block;
    max-height: calc(100dvh - var(--header-h));
    padding: 0 0 calc(14px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    border: 1px solid var(--ta-line);
    border-radius: 14px 14px 0 0;
    background: #0c0d10;
    box-shadow: 0 -22px 60px rgba(0, 0, 0, .54);
  }

  body[data-screen="token"] #token .terminal-right.mobile-open .mobile-sheet-close {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: 1px solid var(--ta-line);
    color: #aeb4ba;
    font: 600 12px/16px var(--ta-sans);
  }

  body[data-screen="token"] #token .terminal-right.mobile-open .right-info-panel { display: block; }
  body[data-screen="token"] #token .mobile-trade-dock {
    position: fixed;
    z-index: 80;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px));
    height: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--ta-line);
    background: rgba(10, 11, 13, .965);
    backdrop-filter: blur(16px);
  }

  body[data-screen="token"] #token .mobile-trade-dock > div { min-width: 0; display: grid; flex: 1; gap: 2px; }
  body[data-screen="token"] #token .mobile-trade-dock span { color: #8b9198; font: 500 10px/14px var(--ta-sans); }
  body[data-screen="token"] #token .mobile-trade-dock b { overflow: hidden; color: #e0e3e5; font: 500 11px/15px var(--ta-mono); text-overflow: ellipsis; white-space: nowrap; }
  body[data-screen="token"] #token .mobile-trade-dock button {
    min-width: 84px;
    min-height: 44px;
    height: 44px;
    border-radius: 4px;
    color: #07100b;
    background: var(--ta-buy);
    font: 700 13px/17px var(--ta-sans);
  }

  body[data-screen="token"] #token .mobile-trade-dock .mobile-sell { color: #17080a; background: var(--ta-sell); }
  body[data-screen="token"] .qt-float {
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: min(310px, calc(100vw - 20px));
  }

  body[data-screen="token"] .qt-reopen { right: 10px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 560px) {
  body[data-screen="token"] #token .selected-token-title .token-avatar,
  body[data-screen="token"] #token .selected-token-title img.token-avatar { display: none; }
  body[data-screen="token"] #token .selected-token-title h2 { max-width: 47vw; }
  body[data-screen="token"] #token .selected-token-title p { max-width: 48vw; }
  body[data-screen="token"] #token .chart-toolbar { padding-inline: 8px; }
  body[data-screen="token"] #token .range-tabs button { min-width: 42px; min-height: 36px; padding-inline: 7px; }
  body[data-screen="token"] #token .chart-switch button { min-height: 34px; }
  body[data-screen="token"] #token .chart-meta span:nth-child(5) { display: none; }
  body[data-screen="token"] #token .trade-card-head { position: sticky; z-index: 5; top: 42px; }
}

/* Workstation ---------------------------------------------------------- */
@media (min-width: 1600px) and (min-height: 900px) {
  body[data-screen="token"] #token .terminal-topbar {
    height: 82px;
    min-height: 82px;
    grid-template-columns: auto minmax(430px, 1fr) auto auto;
    gap: 24px;
    padding: 11px 20px;
  }

  body[data-screen="token"] #token .selected-token-title .token-avatar,
  body[data-screen="token"] #token .selected-token-title img.token-avatar { width: 52px; height: 52px; flex-basis: 52px; }
  body[data-screen="token"] #token .selected-token-title h2 { font-size: 22px; line-height: 27px; }
  body[data-screen="token"] #token .asset-workspace.terminal-grid {
    height: calc(100dvh - var(--header-h) - 82px);
    grid-template-columns: 270px minmax(700px, 1fr) 430px;
  }

  body[data-screen="token"] #token .terminal-center {
    grid-template-rows: 50px 26px minmax(330px, 1.18fr) 74px minmax(220px, .82fr);
  }

  body[data-screen="token"] #token .panel-head { min-height: 48px; height: 48px; padding-inline: 15px; }
  body[data-screen="token"] #token .watch-row { min-height: 64px; grid-template-columns: 31px minmax(0, 1fr) auto; padding: 9px 14px; }
  body[data-screen="token"] #token .watch-row .token-avatar { width: 31px; height: 31px; }
  body[data-screen="token"] #token .watch-row b { font-size: 13px; }
  body[data-screen="token"] #token .watch-row i,
  body[data-screen="token"] #token .watch-row em { font-size: 11px; }
  body[data-screen="token"] #token .chart-toolbar { min-height: 50px; height: 50px; padding-inline: 16px; }
  body[data-screen="token"] #token .chart-toolbar button { min-height: 34px; padding-inline: 10px; font-size: 12px; }
  body[data-screen="token"] #token .token-stat-row { min-height: 74px; height: 74px; }
  body[data-screen="token"] #token .token-stat-row > div { padding-inline: 14px; }
  body[data-screen="token"] #token .token-stat-row span { font-size: 12px; }
  body[data-screen="token"] #token .token-stat-row b { font-size: 15px; }
  body[data-screen="token"] #token .trade-feed-head { min-height: 54px; height: 54px; padding-inline: 14px; }
  body[data-screen="token"] #token .terminal-tape { grid-template-rows: 54px minmax(0, 1fr); }
  body[data-screen="token"] #token .trades-table th { font-size: 11px; }
  body[data-screen="token"] #token .trades-table td { height: 41px; padding-inline: 12px; font-size: 13px; }
  body[data-screen="token"] #token .buy-sell-tabs button { min-height: 58px; font-size: 15px; }
  body[data-screen="token"] #token .trade-card-head { height: 58px; min-height: 58px; }
  body[data-screen="token"] #token .trade-balance { padding: 20px 4px 14px; }
  body[data-screen="token"] #token .trade-balance strong { font-size: 22px; }
  body[data-screen="token"] #token .trade-input { padding: 16px; }
  body[data-screen="token"] #token .trade-input input { font-size: 37px; line-height: 42px; }
  body[data-screen="token"] #token .trade-input.receive input { font-size: 29px; line-height: 35px; }
  body[data-screen="token"] #token .preset-row button { min-height: 38px; height: 38px; }
}

/* 4K — more information, still a terminal rather than an enlarged poster. */
@media (min-width: 2560px) and (min-height: 1200px) {
  body[data-screen="token"] #token .terminal-topbar {
    height: 84px;
    min-height: 84px;
    padding-inline: 24px;
  }

  body[data-screen="token"] #token .asset-workspace.terminal-grid {
    height: calc(100dvh - var(--header-h) - 84px);
    grid-template-columns: 300px minmax(900px, 1fr) 480px;
  }

  body[data-screen="token"] #token .terminal-center {
    grid-template-rows: 52px 28px minmax(390px, 1.2fr) 74px minmax(250px, .8fr);
  }

  body[data-screen="token"] #token .trades-table td { height: 40px; font-size: 13px; }
}

@media (min-width: 3400px) and (min-height: 1800px) {
  body[data-screen="token"] #token .terminal-topbar {
    height: 96px;
    min-height: 96px;
    padding-inline: 30px;
  }

  body[data-screen="token"] #token .asset-workspace.terminal-grid {
    height: calc(100dvh - var(--header-h) - 96px);
    grid-template-columns: 390px minmax(1200px, 1fr) 620px;
  }

  body[data-screen="token"] #token .terminal-center {
    grid-template-rows: 58px 32px minmax(520px, 1.22fr) 84px minmax(320px, .78fr);
  }

  body[data-screen="token"] #token .selected-token-title h2 { font-size: 23px; line-height: 28px; }
  body[data-screen="token"] #token .price-main { font-size: 29px; line-height: 34px; }
  body[data-screen="token"] #token .panel-head,
  body[data-screen="token"] #token .detail-tabs button { font-size: 15px; }
  body[data-screen="token"] #token .watch-row :is(b, i, em) { font-size: 14px; }
  body[data-screen="token"] #token .trade-input input { font-size: 40px; line-height: 46px; }
}

@media (pointer: coarse) {
  body[data-screen="token"] #token :is(
    .terminal-actions .icon-button,
    .range-tabs button,
    .chart-switch button,
    .chart-expand,
    .detail-tabs button,
    .buy-sell-tabs button,
    .preset-row button
  ) { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-screen="token"] #token *,
  body[data-screen="token"] .qt-float,
  body[data-screen="token"] .qt-reopen {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
