:root {
  --bg: #0a0a0a;
  --panel: #111113;
  --panel-2: #17171a;
  --ink: #ededed;
  --ink-2: #a1a1aa;
  --ink-3: #8f8f99;
  --rule: #ffffff12;
  --rule-2: #ffffff22;
  --accent: #2ee6a6;
  --accent-ink: #04140e;
  --accent-soft: #2ee6a61c;
  --red: #ff5d6c;
  --red-soft: #ff5d6c1c;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 14px/1.5 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.r { text-align: right; }
.c { text-align: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; cursor: pointer; transition: background .15s, opacity .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #5cf0bd; }
.btn--ghost { background: var(--panel-2); border-color: var(--rule-2); }
.btn--sell { background: var(--red); color: #1b0508; }
.btn--sell:hover { background: #ff7b88; }
.btn--sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; }
.btn--block { width: 100%; height: 50px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; height: 60px; padding: 0 20px; background: #0a0a0ae6; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; letter-spacing: -.02em; flex: none; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--rule); color: var(--ink-3); }
.search:focus-within { border-color: var(--rule-2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font: 13.5px var(--mono); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chain-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.chain-pill.bad { color: #ffb35c; border-color: #ffb35c55; }
.dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); flex: none; }
#connect.is-on { background: var(--panel-2); color: var(--ink); border: 1px solid var(--rule-2); font-family: var(--mono); font-weight: 500; }

/* layout */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr) 360px; grid-template-areas: "list center trade"; gap: 12px; padding: 12px; align-items: start; }
.list { grid-area: list; position: sticky; top: 72px; max-height: calc(100vh - 84px); display: flex; flex-direction: column; }
.center { grid-area: center; display: grid; gap: 12px; min-width: 0; }
.trade { grid-area: trade; position: sticky; top: 72px; }
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; padding: 16px; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "center trade" "list trade"; }
  .list { position: static; max-height: none; }
}
/* mobile layout: see the end of this file */

/* segmented control */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--rule); }
.seg button { flex: 1; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); font-weight: 500; font-size: 13px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2); }
.seg--sm { display: inline-flex; padding: 3px; }
.seg--sm button { flex: none; padding: 0 10px; height: 28px; font-family: var(--mono); font-size: 12px; }
.seg--trade button { height: 38px; font-size: 14px; font-weight: 600; }
.seg--trade button.on[data-side="buy"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px #2ee6a640; }
.seg--trade button.on[data-side="sell"] { background: var(--red-soft); color: var(--red); box-shadow: inset 0 0 0 1px #ff5d6c40; }

/* avatars */
.av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-weight: 700; font-size: 13px; color: #fff; background: radial-gradient(circle at 30% 25%, var(--a, #3a3a40), var(--b, #1d1d22)); box-shadow: inset 0 0 0 1px #ffffff1f; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av--lg { width: 52px; height: 52px; font-size: 19px; }

/* token list */
.tokens { list-style: none; margin: 12px -8px 0; padding: 0; overflow-y: auto; flex: 1; }
.tokens li a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; }
.tokens li a:hover { background: var(--panel-2); }
.tokens li a.on { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--rule-2); }
.tokens .tk { flex: 1; min-width: 0; display: grid; }
.tokens .tk b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tokens .tk small { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tokens .px { display: grid; text-align: right; font-size: 12.5px; }
.tokens .px small { font-size: 11.5px; }
.tag { font: 500 9.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 3px 5px; border-radius: 5px; background: #ffffff0f; color: var(--ink-3); margin-left: 6px; vertical-align: 1px; }
.tag--curve { background: var(--accent-soft); color: var(--accent); }
.tokens li.sk { height: 50px; margin: 4px 8px; border-radius: 10px; background: linear-gradient(90deg, #ffffff06, #ffffff0d, #ffffff06); background-size: 200% 100%; animation: sh 1.4s linear infinite; }
@keyframes sh { to { background-position: -200% 0; } }
.list__note { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.up { color: var(--accent); } .down { color: var(--red); }

/* token head */
.head { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center; }
.head__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.head__id > div { min-width: 0; }
.head h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--ink-2); }
.addr { height: 24px; padding: 0 8px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--rule); font: 12px var(--mono); color: var(--ink-2); cursor: pointer; }
.addr:hover { color: var(--ink); }
.ext { color: var(--ink-3); font-size: 12px; }
.ext:hover { color: var(--ink); }
.venue { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 5px 7px; border-radius: 6px; background: #ffffff0f; color: var(--ink-2); }
.venue.ok { background: var(--accent-soft); color: var(--accent); }
.head__price { text-align: right; }
.head__price strong { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.chg { font: 500 13px var(--mono); }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin: 0; border-radius: 12px; overflow: hidden; background: var(--rule); border: 1px solid var(--rule); }
.stats div { background: var(--panel); padding: 10px 12px; }
.stats dt { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.stats dd { margin: 3px 0 0; font-weight: 600; font-size: 14.5px; }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .head { grid-template-columns: 1fr; }
  .head__price { text-align: left; }
}
.curve { grid-column: 1 / -1; }
.curve__row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.curve__row span:last-child { font-family: var(--mono); color: var(--accent); }
.bar { height: 8px; border-radius: 99px; background: #ffffff10; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #1fb985, var(--accent)); transition: width .6s ease; }
.curve p { margin-top: 8px; font-size: 12px; color: var(--ink-3); }

/* chart */
.chart-panel { padding: 12px; }
.chart-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.chart { position: relative; height: 420px; }
@media (max-width: 860px) { .chart { height: 320px; } }
.chart__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); z-index: 2; pointer-events: none; }

/* trades */
.panel__title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.panel__title h2 { font-size: 15px; font-weight: 600; }
.live { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--mono); color: var(--ink-3); text-transform: uppercase; }
.table-wrap { overflow-x: auto; margin: 0 -16px -16px; }
.trades { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.trades th { position: sticky; top: 0; text-align: left; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 8px 16px; border-bottom: 1px solid var(--rule); background: var(--panel); }
.trades th.r { text-align: right; }
.trades td { padding: 9px 16px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.trades tr:last-child td { border-bottom: 0; }
.trades td.buy { color: var(--accent); font-weight: 600; }
.trades td.sell { color: var(--red); font-weight: 600; }
.trades a { color: var(--ink-2); font-family: var(--mono); font-size: 12px; }
.trades a:hover { color: var(--ink); }
.trades tr.fresh td { animation: flash 1.5s ease; }
@keyframes flash { from { background: #2ee6a614; } }

/* trade panel */
.trade { display: grid; gap: 12px; }
.field { padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--rule); }
.field:focus-within { border-color: var(--rule-2); }
.field__top { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.bal { background: none; border: 0; padding: 0; color: var(--ink-3); font-size: 12px; cursor: pointer; }
.bal:hover { color: var(--accent); }
.field__row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.trade, .trade > * { min-width: 0; }
.field input, .field output { flex: 1; min-width: 0; width: 100%;background: none; border: 0; outline: none; color: var(--ink); font: 600 26px "Geist", sans-serif; letter-spacing: -.02em; padding: 0; }
.field output { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field--out output { color: var(--ink-2); }
.field--out output.has { color: var(--ink); }
.unit { flex: none; padding: 6px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--rule); font-weight: 600; font-size: 13px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presets { display: flex; gap: 6px; margin-top: 10px; }
.presets button { flex: 1; height: 28px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--rule); color: var(--ink-2); font: 500 12px var(--mono); cursor: pointer; }
.presets button:hover { color: var(--ink); border-color: var(--rule-2); }
.quote { margin: 0; display: grid; gap: 8px; padding: 2px 4px; font-size: 13px; }
.quote div { display: flex; justify-content: space-between; gap: 10px; }
.quote dt { color: var(--ink-3); }
.quote dd { margin: 0; text-align: right; }
.q-nofee { padding: 8px 10px; margin: 0 -6px; border-radius: 10px; background: var(--accent-soft); }
.q-nofee dt { color: var(--accent); }
.q-nofee s { color: var(--ink-3); }
.q-nofee b { color: var(--accent); }
.slip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--rule-2); font: 500 12px var(--mono); cursor: pointer; }
.slip:hover, .slip[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.trade__msg { min-height: 0; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.trade__msg:empty { display: none; }
.trade__msg.err { color: var(--red); }
.pos { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--rule); font-size: 13px; }
.pos div { display: flex; justify-content: space-between; }
.fine { font-size: 11.5px; color: var(--ink-3); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: #000000a6; backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal__card { width: 100%; max-width: 380px; padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--rule-2); box-shadow: 0 30px 80px -20px #000; }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal__head h2 { font-size: 17px; font-weight: 600; }
.x { width: 32px; height: 32px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--rule); font-size: 18px; cursor: pointer; }
.wlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wlist button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--rule); cursor: pointer; font-weight: 500; text-align: left; }
.wlist button:hover { border-color: var(--rule-2); }
.wlist img { width: 30px; height: 30px; border-radius: 8px; }
.wlist small { margin-left: auto; color: var(--ink-3); font-size: 11.5px; }

/* account menu */
.menu { position: fixed; top: 64px; right: 16px; z-index: 40; width: 260px; padding: 8px; border-radius: 14px; background: var(--panel); border: 1px solid var(--rule-2); box-shadow: 0 20px 50px -16px #000; }
.menu[hidden] { display: none; }
.menu__row { display: flex; justify-content: space-between; padding: 8px 10px; font-size: 13px; }
.menu__row b { font-family: var(--mono); font-weight: 500; }
.menu__item { display: block; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; text-align: left; font-size: 13.5px; cursor: pointer; }
.menu__item:hover { background: var(--panel-2); }

/* loading screen */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(60% 50% at 50% 45%, #2ee6a614, transparent 70%), var(--bg);
  transition: opacity .45s ease, visibility .45s;
}
.splash.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.splash__logo { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.splash__mark { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 0 0 0 #2ee6a666, 0 20px 50px -10px #2ee6a655; animation: mark-pulse 1.8s ease-in-out infinite; }
.splash__o { stroke-dasharray: 54; stroke-dashoffset: 54; animation: draw-o 1.8s ease-in-out infinite; }
.splash__slash { stroke-dasharray: 17; stroke-dashoffset: 17; animation: draw-slash 1.8s ease-in-out infinite; }
.splash__ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 90 262; transform-origin: center; animation: spin 1.1s linear infinite; opacity: .85; }
.splash__name { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.splash__msg { font: 500 12px var(--mono); color: var(--ink-3); letter-spacing: .02em; min-height: 18px; }
@keyframes mark-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); box-shadow: 0 0 0 14px #2ee6a600, 0 20px 50px -10px #2ee6a655; } }
@keyframes draw-o { 0% { stroke-dashoffset: 54; } 45%, 100% { stroke-dashoffset: 0; } }
@keyframes draw-slash { 0%, 35% { stroke-dashoffset: 17; } 70%, 100% { stroke-dashoffset: 0; } }

/* chart loader (switching tokens or timeframes) */
.chart__loading { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--panel); color: var(--ink-3); font: 500 12px var(--mono); }
.chart__loading img { border-radius: 10px; animation: mark-pulse 1.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .splash__mark, .splash__ring, .chart__loading img { animation: none; }
  .splash__o, .splash__slash { animation: none; stroke-dashoffset: 0; }
}

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--rule-2); box-shadow: 0 20px 40px -16px #000; font-size: 13px; animation: tin .25s ease; }
.toast b { display: block; margin-bottom: 2px; }
.toast a { color: var(--accent); }
.toast.ok { border-color: #2ee6a655; }
.toast.err { border-color: #ff5d6c55; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- header: app nav, chain selector ---------- */
.top__nav { display: flex; gap: 4px; }
.top__nav a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.top__nav a:hover { color: var(--ink); background: var(--panel); }
.top__nav a.on { color: var(--ink); background: var(--panel-2); }
.soon { padding: 2px 6px; border-radius: 999px; background: #ffffff12; color: var(--ink-2); font: 500 9.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.chainsel { position: relative; }
button.chain-pill { cursor: pointer; font: inherit; font-size: 13px; color: var(--ink-2); }
button.chain-pill:hover { border-color: var(--rule-2); color: var(--ink); }
.chain-menu { position: absolute; right: 0; top: 44px; z-index: 45; width: 280px; padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--rule-2); box-shadow: 0 20px 50px -16px #000; }
.chain-opt { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; font-size: 14px; }
.chain-opt.on { background: var(--panel-2); }
.chain-opt.off { color: var(--ink-3); cursor: not-allowed; }
.chain-opt .tagl { margin-left: auto; }
.dotc--off { background: #ffffff33; box-shadow: none; }
.chain-note { padding: 8px 10px 4px; font-size: 12px; color: var(--ink-3); }
.tagl { display: inline-block; padding: 3px 7px; border-radius: 6px; background: #ffffff10; color: var(--ink-2); font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.tagl--live { background: var(--accent-soft); color: var(--accent); }

/* ---------- token list filter ---------- */
.only { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.only input { position: absolute; opacity: 0; pointer-events: none; }
.only__box { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--rule-2); background: var(--bg); display: grid; place-items: center; }
.only input:checked + .only__box { background: var(--accent); border-color: var(--accent); }
.only input:checked + .only__box::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg); }
.only input:focus-visible + .only__box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- chart-only notice (replaces the trade form) ---------- */
.chartonly { display: grid; gap: 10px; padding: 6px 2px 2px; }
.chartonly h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.chartonly p { font-size: 14px; color: var(--ink-2); }
.chartonly .tagl { justify-self: start; }
#trade-form { display: grid; gap: 12px; }

/* ---------- slippage panel ---------- */
.quote { position: relative; }
.slippop { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--rule-2); box-shadow: 0 20px 50px -20px #000; }
.slippop__head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.slippop .x { width: 28px; height: 28px; font-size: 16px; }
.slippop__presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slippop__presets button { height: 34px; border-radius: 9px; border: 1px solid var(--rule-2); background: var(--bg); color: var(--ink-2); font: 500 12.5px var(--mono); cursor: pointer; }
.slippop__presets button:hover { color: var(--ink); }
.slippop__presets button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.slippop__custom { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--rule-2); font-size: 13px; color: var(--ink-2); }
.slippop__custom input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: none; color: var(--ink); font: 500 14px var(--mono); text-align: right; }
.slippop__custom input.bad { color: var(--red); }
.slippop__help { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.slippop__help b { color: var(--ink); font-weight: 600; }
.slippop__warn { font-size: 12.5px; color: #ffb35c; }

/* ---------- eligibility line ---------- */
.elig { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); padding: 0 4px; }
.elig a, .elig b { color: var(--ink); }
.elig a { text-decoration: underline; text-underline-offset: 2px; }
.quote dt { color: var(--ink-2); }
.fine { color: var(--ink-3); line-height: 1.5; }

/* ---------- chart toolbar: one line ---------- */
.chart-src { white-space: nowrap; font-size: 12.5px; }

/* ---------- mobile: find a token first, then its price, then trade it ---------- */
@media (max-width: 860px) {
  .layout { display: flex; flex-direction: column; align-items: stretch; padding: 10px; gap: 10px; }
  .center { display: contents; }
  .list { order: 1; position: static; max-height: none; padding: 12px; }
  .head { order: 2; } .chart-panel { order: 3; } .trade { order: 4; position: static; } .trades-panel { order: 5; }
  .layout > *, .center > * { min-width: 0; max-width: 100%; }
  /* the token list becomes a strip you swipe sideways */
  .tokens { display: flex; gap: 8px; margin: 12px -12px 0; padding: 0 12px 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; flex: none; }
  .tokens li { flex: none; width: 220px; scroll-snap-align: start; }
  .tokens li a { border: 1px solid var(--rule); background: var(--bg); }
  .tokens li.sk { width: 220px; margin: 0; }
  .list__note { display: none; }
  .only { margin-top: 10px; }
  /* header: brand, chain, wallet on top; search and the app's sections under them */
  .top { height: auto; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; }
  .brand span { display: none; }
  .top__right { gap: 8px; }
  .search { display: flex; order: 3; flex: 1 1 100%; max-width: none; height: 40px; }
  .search input { font-size: 14px; }
  .top__nav { order: 4; flex: 1 1 100%; overflow-x: auto; }
  .chain-pill .chain-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
  .chain-menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .chart-bar { flex-wrap: nowrap; }
  .seg--sm button { padding: 0 8px; }
  .chart-src { font-size: 11.5px; }
  /* the trades table scrolls inside its card, never the page */
  .trades-panel { overflow: hidden; }
  .table-wrap { margin: 0 -16px -16px; max-width: calc(100% + 32px); overscroll-behavior-x: contain; }
  .menu { right: 12px; left: 12px; width: auto; }
}
@media (max-width: 420px) {
  .chain-pill .chain-name { display: none; }
  #connect { padding: 0 12px; }
}
