/* Dexscreener on Solana 2 — reference-matched dense market layout */
#dex-icon { top: 336px; }
#dex-icon img { width: 46px; height: 46px; object-fit: contain; }
/* Positioned without a transform: translate(-50%) lands on half a pixel at odd window sizes and blurs all the text. */
.dex-window { left: 21px; top: 28px; width: calc(100% - 42px); height: calc(100% - 56px); min-height: 440px; max-width: none; overflow: hidden; }
.dex-window.maximized { left: 6px; top: 6px; width: calc(100% - 12px); height: calc(100% - 12px); min-height: 0; }
.dex-window .window-title img { width: 18px; height: 18px; object-fit: contain; }
.dex-shell { display: grid; grid-template-columns: 196px minmax(0, 1fr); height: calc(100% - 30px); min-width: 0; overflow: hidden; background: #202024; color: #e4e4e8; font-family: "Pump Inter", Inter, Arial, sans-serif; font-size: 12px; scrollbar-color: #62636c #25252a; scrollbar-width: thin; }
.dex-shell *, .dex-shell *::before, .dex-shell *::after { box-sizing: border-box; }
.dex-shell button, .dex-shell input, .dex-shell select { font-family: inherit; }
.dex-shell button { cursor: pointer; }
.dex-shell button:focus-visible, .dex-shell input:focus-visible, .dex-shell select:focus-visible, .dex-pair-row:focus-visible { outline: 2px solid #a9b7ff; outline-offset: -2px; }
.dex-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.dex-shell sub { font-size: .72em; line-height: 0; vertical-align: -.22em; }
.dex-positive { color: #48dfa4 !important; }
.dex-negative { color: #ff7181 !important; }

/* Left navigation */
.dex-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; border-right: 1px solid #414149; background: #1b1b1f; }
.dex-brand { display: flex; align-items: center; gap: 9px; flex: 0 0 48px; padding: 0 10px; background: #202024; }
.dex-brand > img { width: 29px; height: 32px; flex: 0 0 29px; object-fit: contain; }
.dex-brand > strong { color: #f5f5f6; font-size: 17px; font-weight: 500; letter-spacing: -.5px; white-space: nowrap; }
.dex-brand > strong span { color: #f5f5f6; }
.dex-search-form { display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; flex: 0 0 37px; height: 37px; margin: 8px 9px 10px; overflow: hidden; border: 1px solid #3b3b43; border-radius: 6px; background: #2d2d33; }
.dex-search-form:focus-within { border-color: #8b9ff4; }
.dex-search-form svg { width: 18px; height: 18px; margin-left: 9px; fill: none; stroke: #f0f0f3; stroke-width: 2; }
.dex-search-form input { min-width: 0; height: 100%; padding: 0 8px; border: 0; outline: 0; background: transparent; color: #fff; font-size: 13px; }
.dex-search-form input::placeholder { color: #f0f0f3; opacity: 1; }
.dex-search-form input::-webkit-search-cancel-button { display: none; }
.dex-search-form kbd { display: grid; place-items: center; width: 21px; height: 23px; margin-right: 7px; border: 1px solid #666670; border-radius: 3px; background: #222228; color: #fff; font-family: inherit; font-size: 12px; }
.dex-launch-app { display: flex; align-items: center; justify-content: center; gap: 9px; flex: 0 0 36px; margin: 0 9px 8px; border: 0; border-radius: 5px; background: #45454e; color: #f3f3f6; font-size: 12px; font-weight: 650; }
.dex-launch-app:hover { background: #52525d; }
.dex-launch-app img { width: 20px; height: 20px; object-fit: contain; }
.dex-primary-nav { display: grid; flex: 0 0 auto; padding: 0 7px 8px; }
.dex-primary-nav button, .dex-chain-nav button { display: flex; align-items: center; gap: 11px; width: 100%; height: 36px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: #f0f0f3; font-size: 13px; font-weight: 550; text-align: left; }
.dex-primary-nav button:hover, .dex-chain-nav button:hover { background: #303036; }
.dex-primary-nav button.active { background: #34343d; }
.dex-primary-nav button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dex-primary-nav button > svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: #f4f4f6; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dex-primary-nav button:first-child > svg { fill: #f4f4f6; stroke-width: 1.1; }
.dex-chain-nav { display: grid; flex: 0 0 auto; gap: 1px; margin: 0 9px; padding: 8px 0 10px; border-top: 1px solid #3c3c43; }
.dex-chain-nav button { height: 35px; padding-inline: 7px; }
.dex-chain-nav button.active { background: #34343d; }
.dex-solana2-icon { position: relative; display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; }
.dex-chain-nav button > span:not(.dex-solana2-icon) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dex-solana2-icon img { width: 20px; height: 20px; }
.dex-solana2-icon b { position: absolute; right: -5px; bottom: -3px; display: grid; place-items: center; width: 12px; height: 12px; border: 1px solid #34343d; border-radius: 50%; background: #8298ff; color: white; font-size: 8px; }
.dex-chain-nav button > i { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #35d7a0; }
.dex-watchlist { flex: 0 0 auto; margin: 0 9px; padding: 11px 0 18px; border-top: 1px solid #3c3c43; }
.dex-watchlist-title { display: flex; justify-content: space-between; padding: 0 3px 8px; color: #f1f1f4; font-size: 11px; font-weight: 650; }
.dex-watchlist-title > span:last-child { color: #b6b6be; font-weight: 500; }
.dex-watchlist-items { display: grid; gap: 1px; }
.dex-watchlist-items button { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; height: 30px; padding: 0 5px; border: 0; border-radius: 4px; background: transparent; color: #e8e8ec; font-size: 11px; text-align: left; }
.dex-watchlist-items button:hover { background: #303036; }
.dex-watchlist-items img { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 3px; object-fit: cover; }
.dex-watchlist-items strong { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dex-watchlist-items .dex-change { margin-left: auto; flex: 0 0 auto; font-size: 10px; }
.dex-watchlist-items p { margin: 4px 3px 0; color: #8a8a94; font-size: 10px; line-height: 1.4; }
.dex-sidebar-bottom { display: flex; align-items: center; gap: 8px; min-height: 43px; margin-top: auto; padding: 8px 11px; border-top: 1px solid #3c3c43; color: #f0f0f3; font-size: 11px; }
.dex-sidebar-bottom strong { min-width: 0; overflow: hidden; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.dex-user-dot { width: 19px; height: 19px; flex: 0 0 19px; border: 2px solid #f0f0f3; border-radius: 50%; }
.dex-live-status { flex: 0 0 auto; margin-left: auto; color: #a5a5ae; font-size: 9px; white-space: nowrap; }

/* Ticker, network message and summary */
.dex-workspace { display: flex; flex-direction: column; container-type: inline-size; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; background: #202024; }
.dex-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 48px; min-width: 0; padding: 0 10px; overflow: hidden; background: #17171b; }
.dex-ticker-tape { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.dex-ticker-tape button { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; height: 34px; padding: 0 6px; border: 0; border-radius: 4px; background: transparent; color: #f0f0f3; font-size: 11px; white-space: nowrap; }
.dex-ticker-tape button:hover { background: #2c2c32; }
.dex-ticker-tape img { width: 19px; height: 19px; border-radius: 50%; object-fit: cover; }
.dex-ticker-tape strong { color: #f4f4f6; font-size: 12px; }
.dex-ticker-tape button > span:not(.dex-change) { color: #f0f0f3; }
.dex-ticker-tape .dex-change { font-size: 10px; }
.dex-ticker-empty { padding-left: 5px; color: #aaaab2; font-size: 11px; }
.dex-network-badge { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: #d6d6dc; font-size: 10px; }
.dex-network-badge i, .dex-table-footer i { width: 6px; height: 6px; border-radius: 50%; background: #35d7a0; }
.dex-board-view { min-width: 0; }
.dex-promo { display: flex; align-items: center; gap: 8px; min-height: 46px; margin: 10px 10px 8px; padding: 0 13px; border: 1px solid #46464f; border-radius: 9px; background: #2b2b32; color: #f0f0f4; font-size: 12px; }
.dex-promo > img { width: 20px; height: 20px; }
.dex-promo > strong { white-space: nowrap; }
.dex-promo > span { color: #e0e0e6; }
.dex-promo > button { padding: 5px 9px; border: 1px solid #5a5b68; border-radius: 4px; background: #3a3b46; color: #fff; font-size: 10px; }
.dex-promo > button:hover { background: #4a4b58; }
.dex-market-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0 10px 9px; }
.dex-market-strip > div { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; height: 42px; border: 1px solid #38383e; border-radius: 9px; background: #151519; }
.dex-market-strip dt { color: #c9c9d0; font-size: 11px; white-space: nowrap; }
.dex-market-strip dd { margin: 0; overflow: hidden; color: #fff; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }

/* Filter row */
.dex-market { min-width: 0; }
.dex-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 49px; padding: 7px 10px; overflow-x: auto; background: #2b2b30; scrollbar-width: thin; }
.dex-filter-group, .dex-market-tools { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dex-filter-group { flex: 1 0 auto; }
.dex-filter-group > button, .dex-trending-control > button { height: 32px; padding: 0 10px; border: 1px solid #484850; border-radius: 6px; background: #303037; color: #f1f1f4; font-size: 11px; font-weight: 550; white-space: nowrap; }
.dex-filter-group > button:hover { background: #41414a; }
.dex-filter-group > button.active { border-color: #91a7f6; background: #7f96e8; color: #fff; }
.dex-trending-control { display: flex; align-items: center; overflow: hidden; border: 1px solid #484850; border-radius: 6px; background: #303037; }
.dex-trending-control.is-active { border-color: #91a7f6; background: #8299eb; }
.dex-trending-control > button { border: 0; border-radius: 0; background: transparent; }
.dex-trending-control > button:hover { background: #ffffff1a; }
.dex-timeframes { display: flex; align-items: center; gap: 2px; height: 30px; padding-right: 3px; }
.dex-timeframes button { min-width: 32px; height: 26px; padding: 0 6px; border: 0; border-radius: 4px; background: #45454e; color: #fff; font-size: 10px; font-weight: 600; }
.dex-trending-control.is-active .dex-timeframes button { background: #6c83d2; }
.dex-timeframes button.active, .dex-trending-control.is-active .dex-timeframes button.active { background: #fff; color: #6884e8; }
.dex-market-tools { flex: 0 0 auto; }
#dex-result-count { padding-right: 5px; color: #b6b6be; font-size: 11px; white-space: nowrap; }
.dex-market-tools label { display: flex; align-items: center; gap: 5px; height: 32px; padding-left: 9px; border: 1px solid #4b4b54; border-radius: 5px; background: #242429; color: #f0f0f3; font-size: 11px; font-weight: 550; white-space: nowrap; }
.dex-market-tools select { align-self: stretch; max-width: 110px; padding: 0 5px; border: 0; outline: 0; background: #242429; color: #fff; font-size: 11px; }
#dex-order { width: 21px; height: 28px; padding: 0; border: 0; background: transparent; color: #fff; font-size: 14px; }

/* Reference table */
.dex-table-scroll { width: 100%; min-width: 0; overflow-x: auto; scrollbar-color: #62636c #25252a; scrollbar-width: thin; }
.dex-pairs-table { width: 100%; min-width: 1120px; border-collapse: collapse; table-layout: fixed; }
.dex-pairs-table th { height: 37px; padding: 0; border-right: 1px solid #66666e; background: #55555d; color: #fff; font-size: 11px; font-weight: 650; text-align: left; text-transform: uppercase; white-space: nowrap; }
.dex-pairs-table th:first-child { width: 290px; padding: 0 10px; }
.dex-pairs-table th:nth-child(2), .dex-pairs-table th:nth-child(12) { width: 106px; }
.dex-pairs-table th:nth-child(3) { width: 90px; }
.dex-pairs-table th:nth-child(4) { width: 54px; }
.dex-pairs-table th:nth-child(5) { width: 58px; }
.dex-pairs-table th:nth-child(6) { width: 106px; }
.dex-pairs-table th:nth-child(7) { width: 72px; }
.dex-pairs-table th:nth-child(n+8):nth-child(-n+11) { width: 72px; }
.dex-pairs-table th button { display: block; width: 100%; height: 37px; padding: 0 10px; overflow: hidden; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-overflow: ellipsis; text-transform: inherit; white-space: nowrap; }
.dex-pairs-table th button:hover { background: #64646d; }
.dex-pairs-table th button[data-order="DESC"]::after { content: " ↓"; }
.dex-pairs-table th button[data-order="ASC"]::after { content: " ↑"; }
.dex-pairs-table th:first-child, .dex-pairs-table td:first-child { position: sticky; left: 0; z-index: 1; }
.dex-pairs-table th:first-child { z-index: 2; }
.dex-pairs-table td { height: 43px; padding: 4px 10px; overflow: hidden; border-right: 1px solid #3b3b42; border-bottom: 1px solid #3b3b42; background: #29292f; color: #f2f2f4; font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.dex-pair-row { cursor: pointer; }
.dex-pair-row:hover td { background: #34343b; }
.dex-token { display: flex; align-items: center; gap: 7px; min-width: 0; }
.dex-star { flex: 0 0 18px; width: 18px; height: 22px; padding: 0; border: 0; background: transparent; color: #8e8e98; font-size: 14px; line-height: 1; }
.dex-star:hover, .dex-star.active { color: #f5d34e; }
.dex-rank { width: 23px; flex: 0 0 23px; color: #c7c7cf; font-size: 10px; }
.dex-token-chain { width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; }
.dex-token-image { width: 29px; height: 29px; flex: 0 0 29px; border-radius: 3px; object-fit: cover; background: #eee; }
.dex-token-copy { min-width: 0; overflow: hidden; }
.dex-token-copy > span { display: flex; align-items: baseline; min-width: 0; overflow: hidden; white-space: nowrap; }
.dex-token-copy strong { color: #f5d34e; font-size: 12px; font-weight: 750; }
.dex-token-copy small { flex: 0 0 auto; margin-left: 5px; color: #c7c7cf; font-size: 10px; }
.dex-token-copy > span > span { min-width: 0; margin-left: 7px; overflow: hidden; color: #f0f0f3; font-size: 11px; text-overflow: ellipsis; }
.dex-mcap { color: #72d7f3 !important; }
.dex-price { color: #f4f4f6 !important; }
.dex-age { color: #e7e7eb !important; }
.dex-change { color: #d4d4da; }
.dex-change.positive { color: #48dfa4; }
.dex-change.negative { color: #ff7181; }
.dex-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; color: #b0b0b9; text-align: center; white-space: normal; }
.dex-empty strong { color: #f0f0f3; font-size: 13px; }
.dex-empty span { font-size: 11px; }
.dex-empty button { margin-top: 8px; padding: 8px 14px; border: 1px solid #91a7f6; border-radius: 5px; background: #91a7f6; color: #121830; font-size: 11px; font-weight: 650; }
.dex-empty button:hover { background: #a3b6ff; }
.dex-table-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px 18px; background: #202024; color: #92929c; font-size: 9px; }
.dex-table-footer > span:first-child { display: flex; align-items: center; gap: 6px; }

/* Coin page: chart and activity on the left, coin profile and statistics on the right */
.dex-detail-view { flex: 1 1 auto; min-width: 0; min-height: 470px; display: flex; flex-direction: column; }
.dex-detail-tabs { display: none; }
.dex-detail-layout { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 318px; grid-template-rows: minmax(0, 1fr); min-width: 0; min-height: 0; }
/* Until the coin loads, hide the previous coin's banner and numbers instead of flashing them. */
.dex-detail-layout.is-loading .dex-detail-main, .dex-detail-layout.is-loading .dex-detail-sidebar > :not(.dex-pair-header) { visibility: hidden; }
.dex-detail-main { display: grid; grid-template-rows: minmax(250px, 1fr) minmax(150px, 36%); min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid #414149; }
.dex-chart-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #17171b; }
.dex-chart-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; flex: 0 0 auto; min-height: 36px; padding: 3px 10px; border-bottom: 1px solid #38383e; background: #202024; }
.dex-chart-back { height: 26px; margin-right: 4px; padding: 0 8px 0 2px; border: 0; background: transparent; color: #b8b8c2; font-size: 11px; white-space: nowrap; }
.dex-chart-back:hover { color: #fff; }
.dex-chart-group { display: flex; align-items: center; gap: 2px; }
.dex-chart-group button { height: 24px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: #c9c9d2; font-size: 11px; font-weight: 550; }
.dex-chart-group button:hover { background: #303036; color: #fff; }
.dex-chart-group button.active { background: #34343d; color: #a9b9ff; }
.dex-chart-legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; flex: 0 0 auto; min-height: 26px; padding: 6px 10px 2px; color: #a9a9b4; font-size: 11px; font-variant-numeric: tabular-nums; }
.dex-chart-legend strong { color: #f0f0f4; font-weight: 600; }
.dex-chart-legend b { font-weight: 500; }
.dex-chart-legend em { color: #8f8f9a; font-style: normal; }
.dex-detail-chart-wrap { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; cursor: crosshair; touch-action: pan-y; }
.dex-trades { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-top: 1px solid #414149; }
.dex-trades-tabs { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; height: 34px; padding: 0 6px; background: #202024; }
.dex-trades-tabs button { height: 34px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #b8b8c2; font-size: 11px; font-weight: 600; white-space: nowrap; }
.dex-trades-tabs button:hover { color: #fff; }
.dex-trades-tabs button.active { border-bottom-color: #a9b9ff; color: #fff; }
.dex-trades .dex-table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
.dex-trades table { width: 100%; min-width: 520px; border-collapse: collapse; }
.dex-trades th { position: sticky; top: 0; z-index: 1; padding: 7px 9px; border-bottom: 1px solid #42424b; background: #34343b; color: #eeeef2; font-size: 10px; font-weight: 600; text-align: left; text-transform: uppercase; white-space: nowrap; }
.dex-trades td { padding: 7px 9px; border-bottom: 1px solid #33333a; background: #24242a; color: #dedee4; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dex-trade-buy td:nth-child(n+3):nth-child(-n+5) { color: #48dfa4; }
.dex-trade-sell td:nth-child(n+3):nth-child(-n+5) { color: #ff7181; }
.dex-trades code { color: #a9b9e9; font-size: 10px; }
.dex-side { font-weight: 600; }
.dex-side.buy { color: #48dfa4; }
.dex-side.sell { color: #ff7181; }
.dex-no-trades { padding: 26px !important; color: #aaaab4 !important; text-align: center; white-space: normal !important; }
.dex-detail-sidebar { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; padding: 10px; overflow-y: auto; background: #1d1d21; }
.dex-pair-header { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dex-pair-header > img { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 4px; object-fit: cover; background: #34343c; }
.dex-pair-identity { display: grid; flex: 1 1 auto; gap: 1px; min-width: 0; }
.dex-pair-identity h1 { margin: 0; overflow: hidden; color: #f4f4f6; font-size: 15px; font-weight: 650; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.dex-pair-identity > span { color: #e0e0e6; font-size: 11px; font-weight: 550; }
.dex-pair-identity > small { color: #9a9aa5; font-size: 10px; }
.dex-age-badge { flex: 0 0 auto; align-self: flex-start; padding: 2px 6px; border-radius: 4px; background: #15352b; color: #48dfa4; font-size: 10px; font-weight: 600; }
.dex-age-badge:empty { display: none; }
.dex-coin-profile { flex: 0 0 auto; min-width: 0; overflow: hidden; border: 1px solid #42424b; border-radius: 6px; background: #24242a; }
.dex-banner-shell { position: relative; width: 100%; aspect-ratio: 3 / 1; overflow: hidden; border-bottom: 1px solid #42424b; background: #2b2b31; }
.dex-banner-shell.can-edit:not(.has-banner) { cursor: pointer; }
.dex-banner-shell.can-edit:not(.has-banner):hover { background: #33333b; }
#dex-detail-banner { display: block; width: 100%; height: 100%; object-fit: cover; }
.dex-banner-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; padding: 10px; color: #b1b1bc; text-align: center; }
.dex-banner-placeholder strong { color: #dedee5; font-size: 12px; font-weight: 600; }
.dex-banner-shell.can-edit .dex-banner-placeholder strong { color: #a9b9ff; }
.dex-banner-placeholder span { max-width: 240px; font-size: 10px; line-height: 1.4; }
.dex-profile-content { display: grid; gap: 8px; padding: 9px; }
.dex-detail-description { margin: 0; color: #d0d0d8; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.dex-detail-description.is-empty { color: #8f8f9a; }
.dex-social-links { display: flex; flex-wrap: wrap; gap: 5px; }
.dex-social-links a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 auto; min-height: 27px; padding: 4px 8px; border: 1px solid #45454f; border-radius: 4px; background: #303038; color: #e5e5eb; font-size: 10px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.dex-social-links a:hover { border-color: #676775; background: #3b3b44; }
.dex-edit-profile { width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid #91a7f6; border-radius: 5px; background: #91a7f6; color: #121830; font-size: 11px; font-weight: 650; }
.dex-edit-profile:hover { background: #a3b6ff; }
.dex-profile-note { margin: 0; color: #8f8f9a; font-size: 10px; line-height: 1.45; }
.dex-stat-boxes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; flex: 0 0 auto; }
.dex-stat-boxes.has-usd, .dex-stat-boxes:has(> #dex-price-usd-box:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dex-stat-boxes-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dex-stat-boxes > div { display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 7px 4px; border: 1px solid #38383f; border-radius: 6px; background: #24242a; text-align: center; }
.dex-stat-boxes span { color: #a4a4af; font-size: 9px; font-weight: 550; letter-spacing: .3px; }
.dex-stat-boxes-three strong { font-size: 11px !important; letter-spacing: -.2px; }
.dex-stat-boxes strong { max-width: 100%; overflow: hidden; color: #f2f2f5; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.dex-change-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 0 0 auto; overflow: hidden; border: 1px solid #38383f; border-radius: 6px; background: #24242a; }
.dex-change-tabs button { display: grid; justify-items: center; gap: 2px; min-width: 0; padding: 6px 2px; border: 0; border-right: 1px solid #38383f; background: transparent; }
.dex-change-tabs button:last-child { border-right: 0; }
.dex-change-tabs button:hover { background: #2e2e35; }
.dex-change-tabs button.active { background: #3a3a43; }
.dex-change-tabs span:first-child { color: #a4a4af; font-size: 9px; font-weight: 550; }
.dex-change-tabs strong { font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.dex-flow { display: grid; gap: 8px; flex: 0 0 auto; padding: 9px; border: 1px solid #38383f; border-radius: 6px; background: #24242a; }
.dex-flow-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; min-width: 0; }
.dex-flow-row > div:first-child { display: grid; align-content: start; gap: 2px; min-width: 0; padding-right: 8px; border-right: 1px solid #38383f; }
.dex-flow-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; min-width: 0; }
.dex-flow-split > div { display: grid; gap: 2px; min-width: 0; }
.dex-flow-split > div:nth-child(2) { justify-items: end; text-align: right; }
.dex-flow span { color: #a4a4af; font-size: 9px; font-weight: 550; }
.dex-flow strong { overflow: hidden; color: #f0f0f4; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.dex-flow-bar { grid-column: 1 / -1; display: block; height: 3px; overflow: hidden; border-radius: 2px; background: #ff7181; }
.dex-flow-bar.is-empty { background: #3e3e46; }
.dex-flow-bar b { display: block; width: 0; height: 100%; background: #48dfa4; }
.dex-watch-toggle { flex: 0 0 34px; width: 100%; border: 1px solid #45454f; border-radius: 5px; background: #2b2b31; color: #ececf0; font-size: 12px; font-weight: 600; }
.dex-watch-toggle:hover { background: #36363d; }
.dex-watch-toggle.active { border-color: #7a6a2c; color: #f5d34e; }
.dex-trade-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; flex: 0 0 auto; }
.dex-trade-actions button { height: 36px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 700; }
.dex-trade-actions .buy { border-color: #2c8e6c; background: #1f5a47; color: #6ff0be; }
.dex-trade-actions .buy:hover { background: #26705a; }
.dex-trade-actions .sell { border-color: #a34a56; background: #5f2a33; color: #ff9aa6; }
.dex-trade-actions .sell:hover { background: #743341; }
.dex-pair-info { flex: 0 0 auto; margin: 0; padding: 2px 9px; border: 1px solid #38383f; border-radius: 6px; background: #24242a; }
.dex-pair-info > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; border-bottom: 1px solid #33333a; }
.dex-pair-info > div:last-child { border-bottom: 0; }
.dex-pair-info dt { color: #a4a4af; font-size: 10px; white-space: nowrap; }
.dex-pair-info dd { min-width: 0; margin: 0; overflow: hidden; color: #eeeef2; font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.dex-pair-info code { color: #a9b9e9; font-size: 10px; }
#dex-copy-address { padding: 2px 5px; border: 1px solid #45454f; border-radius: 4px; background: #303038; color: #e5e5eb; font-size: 10px; white-space: nowrap; }
#dex-copy-address:hover { background: #3b3b44; }

/* Banner and info editor */
.dex-profile-dialog { width: min(540px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: auto; border: 1px solid #51515c; border-radius: 8px; background: #202024; color: #e4e4e8; box-shadow: 0 20px 70px #0009; font-family: "Pump Inter", Inter, Arial, sans-serif; scrollbar-color: #62636c #25252a; scrollbar-width: thin; }
.dex-profile-dialog *, .dex-profile-dialog *::before, .dex-profile-dialog *::after { box-sizing: border-box; }
.dex-profile-dialog button { font-family: inherit; cursor: pointer; }
.dex-profile-dialog::backdrop { background: #08080ccc; }
.dex-profile-dialog form { margin: 0; }
.dex-profile-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #3e3e46; }
.dex-profile-dialog-header span { color: #9999a4; font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.dex-profile-dialog-header h2 { margin: 4px 0 0; color: #f4f4f6; font-size: 18px; font-weight: 600; }
#dex-profile-close { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #c6c6cf; font-size: 23px; line-height: 1; }
#dex-profile-close:hover { background: #36363e; color: #fff; }
.dex-profile-intro { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin: 0; padding: 14px 18px 0; color: #aaaab5; font-size: 11px; }
.dex-profile-intro strong { color: #48dfa4; font-size: 10px; font-weight: 550; white-space: nowrap; }
.dex-profile-fields { display: grid; gap: 13px; padding: 16px 18px; }
.dex-profile-field { display: grid; gap: 7px; min-width: 0; }
.dex-profile-field > span { display: flex; justify-content: space-between; gap: 10px; color: #e1e1e7; font-size: 11px; font-weight: 550; }
.dex-profile-field > span small, .dex-profile-field > small { color: #8f8f9a; font-size: 9px; font-weight: 400; line-height: 1.5; }
.dex-profile-field input, .dex-profile-field textarea { width: 100%; min-width: 0; border: 1px solid #484852; border-radius: 4px; outline: 0; background: #17171b; color: #ededf2; font-family: inherit; font-size: 12px; }
.dex-profile-field input { height: 36px; padding: 0 10px; }
.dex-profile-banner-frame { aspect-ratio: 3 / 1; overflow: hidden; border: 1px solid #484852; border-radius: 4px; background: #17171b; }
.dex-profile-banner-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dex-file-control { display: flex; align-items: center; min-width: 0; height: 37px; overflow: hidden; border: 1px solid #484852; border-radius: 4px; background: #17171b; }
.dex-file-control > button { align-self: stretch; flex: 0 0 auto; padding: 0 11px; border: 0; border-right: 1px solid #484852; background: #3b3b44; color: #f0f0f4; font-size: 10px; }
.dex-file-control > button:hover { background: #4a4a55; }
.dex-file-control > span { flex: 1 1 auto; min-width: 0; padding: 0 10px; overflow: hidden; color: #a9a9b4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dex-file-control > .dex-file-remove { border-right: 0; border-left: 1px solid #484852; background: transparent; color: #ff9aa6; }
.dex-profile-field textarea { min-height: 72px; max-height: 140px; padding: 9px 10px; line-height: 1.5; resize: vertical; }
.dex-profile-field input:focus-visible, .dex-profile-field textarea:focus-visible { border-color: #a9b7ff; outline: 2px solid #a9b7ff; outline-offset: 1px; }
.dex-profile-link-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dex-profile-link-fields > label:last-child { grid-column: 1 / -1; }
.dex-profile-dialog-footer { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid #3e3e46; background: #202024; }
#dex-profile-status { flex: 1; margin-right: auto; color: #48dfa4; font-size: 10px; line-height: 1.4; }
#dex-profile-status.error { color: #ff8996; }
.dex-profile-dialog-footer button { height: 34px; padding: 0 12px; border: 1px solid #51515d; border-radius: 5px; background: #303038; color: #e4e4eb; font-size: 11px; white-space: nowrap; }
#dex-profile-save { border-color: #91a7f6; background: #91a7f6; color: #121830; font-weight: 650; }
.dex-profile-dialog button:disabled { cursor: wait; opacity: .6; }

/* Narrow window: the coin page becomes tabs. Container queries, because the window can be resized on any screen. */
@container (max-width: 860px) {
  .dex-detail-tabs { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; height: 36px; padding: 0 6px; border-bottom: 1px solid #38383e; background: #202024; }
  .dex-detail-tabs button { height: 28px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: #c9c9d2; font-size: 12px; font-weight: 600; }
  .dex-detail-tabs button.active { background: #34343d; color: #fff; }
  .dex-detail-back { padding-inline: 9px !important; font-size: 15px !important; }
  .dex-chart-back { display: none; }
  .dex-detail-layout { display: block; }
  .dex-detail-main { display: block; height: 100%; border-right: 0; }
  .dex-detail-layout[data-tab="info"] .dex-detail-main, .dex-detail-layout:not([data-tab="info"]) .dex-detail-sidebar { display: none; }
  .dex-detail-layout[data-tab="chart"] .dex-trades, .dex-detail-layout[data-tab="activity"] .dex-chart-panel { display: none; }
  .dex-chart-panel { height: 100%; min-height: 300px; }
  .dex-trades { height: 100%; border-top: 0; }
  .dex-detail-sidebar { height: 100%; }
  .dex-market-strip dt { font-size: 10px; }
}

@media (max-width: 1150px) {
  .dex-shell { grid-template-columns: 174px minmax(0, 1fr); }
  .dex-brand > strong { font-size: 14px; }
  .dex-brand > img { width: 25px; flex-basis: 25px; }
  .dex-ticker-tape button:nth-child(n+5) { display: none; }
}
@media (max-width: 760px) {
  .dex-window, .dex-window.maximized { left: 6px; top: 6px; width: calc(100% - 12px); height: calc(100% - 12px); min-height: 0; }
  .dex-window .window-title { font-size: 11px; }
  .dex-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .dex-sidebar { display: grid; grid-template-columns: auto minmax(110px, 1fr) auto; align-items: center; overflow: visible; border-right: 0; border-bottom: 1px solid #414149; }
  .dex-brand { min-height: 45px; }
  .dex-brand > strong { font-size: 12px; }
  .dex-search-form { margin: 5px 7px; }
  .dex-launch-app, .dex-primary-nav, .dex-watchlist, .dex-sidebar-bottom { display: none; }
  .dex-chain-nav { display: flex; gap: 3px; margin: 0; padding: 5px 7px 5px 0; border: 0; }
  .dex-chain-nav button { width: auto; height: 31px; padding: 0 7px; }
  .dex-chain-nav button > span:not(.dex-solana2-icon), .dex-chain-nav button > i { display: none; }
  .dex-topbar { flex-basis: 40px; }
  .dex-ticker-tape button { padding-inline: 4px; }
  .dex-ticker-tape button > span:not(.dex-change), .dex-ticker-tape button:nth-child(n+4) { display: none; }
  .dex-promo { min-height: 42px; margin: 8px; padding-inline: 10px; }
  .dex-promo > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dex-market-strip { padding: 0 8px 8px; }
  .dex-filterbar { padding-inline: 8px; }
}
@media (max-width: 520px) {
  #dex-icon { top: 268px; }
  .dex-sidebar { grid-template-columns: auto minmax(85px, 1fr) auto; }
  .dex-brand { gap: 5px; padding-inline: 7px; }
  .dex-brand > strong span { display: none; }
  .dex-brand > img { width: 22px; flex-basis: 22px; }
  .dex-search-form kbd, .dex-network-badge { display: none; }
  .dex-promo > strong, .dex-promo > span { font-size: 10px; }
  .dex-promo > button { display: none; }
  .dex-market-strip { gap: 5px; }
  .dex-market-strip > div { flex-direction: column; gap: 1px; height: 43px; }
  .dex-market-strip dt { font-size: 9px; }
  .dex-market-strip dd { font-size: 11px; }
  .dex-market-tools { display: none; }
  .dex-table-footer { padding-inline: 10px; }
}
@media (max-height: 570px) {
  .dex-window, .dex-window.maximized { top: 6px; max-height: none; overflow: hidden; }
}
