/* Rex terminal theme. Tokens match the live brand; components are shared by every screen. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter.woff2?v=c940764593") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/assets/fonts/space-grotesk.woff2?v=a0d054c4af") format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --accent: #f97316; --accent-2: #fb923c; --accent-ink: #140a02; --accent-rgb: 249, 115, 22;
  --blue: #0052ff; --blue-2: #4d86ff;
  --bg: #0d0e11; --bg-2: #141519; --bg-3: #1b1d22; --bg-rgb: 13, 14, 17;
  --panel: rgba(255, 255, 255, .035); --panel-2: rgba(255, 255, 255, .06);
  --ink: #f4f4f2; --ink-2: #b4b8c2; --ink-3: #7b818d;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --up: #00ec97; --up-2: #5cf5c0; --up-3: #00c983; --up-ink: #00331f; --up-rgb: 0, 236, 151;
  --down: #f43f5e; --down-2: #fb7185; --down-rgb: 244, 63, 94; --warn: #f59e0b; --warn-rgb: 245, 158, 11;
  --s-sunk: #0a0b0d; --s-base: #131418; --s-raised: #1a1c21; --s-overlay: #22252b; --s-hover: rgba(255, 255, 255, .045);
  --e1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 1px 2px rgba(0, 0, 0, .4);
  --e2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 12px 32px -8px rgba(0, 0, 0, .6);
  --e3: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 32px 80px -24px rgba(0, 0, 0, .85);
  --focus: 0 0 0 3px rgba(var(--accent-rgb), .35);
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --top: 64px; --tab: 68px; --rail-w: 232px; --content-w: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(900px 500px at 85% -10%, rgba(var(--accent-rgb), .10), transparent 60%) no-repeat, var(--bg); min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { max-width: 100%; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 14px; width: 100%; outline: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input:focus, select:focus, textarea:focus { border-color: rgba(var(--accent-rgb), .5); box-shadow: var(--focus); }
input::placeholder { color: var(--ink-3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.skip:focus { top: 12px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--ink-3); } .ink-2 { color: var(--ink-2); }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.fine { font-size: 12px; color: var(--ink-3); }

/* Icons: mask images tinted by currentColor. */
.ico { width: 18px; height: 18px; display: inline-block; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }

/* Shell */
#app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "ticker" "view"; grid-template-rows: auto auto 1fr; min-height: 100dvh; }
.rail { display: none; }
.top { grid-area: top; position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 max(14px, env(safe-area-inset-left)); background: rgba(var(--bg-rgb), .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 20px var(--display); letter-spacing: -.02em; color: var(--ink); }
.brand img { border-radius: 50%; }
.brand .beta { font: 600 10px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 7px; }
.brand b { color: var(--accent); font-weight: 700; }
.chain { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-weight: 600; font-size: 13px; white-space: nowrap; }
.chain img { width: 16px; height: 16px; border-radius: 50%; }
.search { position: relative; flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; }
.search .ico { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search input { height: 40px; padding: 0 38px 0 38px; border-radius: 999px; background: var(--bg-2); }
.search kbd { position: absolute; right: 10px; font: 600 11px var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.search-results { position: absolute; top: 46px; left: 0; right: 0; z-index: 30; background: var(--s-overlay); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--e3); padding: 6px; max-height: 60vh; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results a { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: var(--r-sm); }
.search-results a:hover, .search-results a.on { background: var(--s-hover); }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wallet { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font: 600 13px var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px rgba(var(--up-rgb), .7); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn .ico { width: 16px; height: 16px; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; background: transparent; border: 0; color: var(--ink-3); }
.icon-btn.sm .ico { width: 14px; height: 14px; }
.icon-btn.sm:hover { background: var(--panel-2); color: var(--ink); }
.m-search { display: inline-grid; }
@media (max-width: 719px) { .top .search { display: none; } .top.searching .search { display: flex; position: absolute; left: 10px; right: 10px; max-width: none; } .top.searching > :not(.search) { visibility: hidden; } .top .chain span { display: none; } }
@media (min-width: 720px) { .m-search { display: none; } }

.ticker { grid-area: ticker; height: 32px; overflow: hidden; border-bottom: 1px solid var(--line); background: rgba(var(--bg-rgb), .7); font-size: 12.5px; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker:empty { display: none; }
.tk-track { display: flex; width: max-content; height: 100%; animation: tk-run var(--dur, 60s) linear infinite; }
.ticker:hover .tk-track { animation-play-state: paused; }
.tk { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; white-space: nowrap; color: var(--ink); font-weight: 600; }
.tk .rank { color: var(--ink-3); font-weight: 500; }
.tk .rank.hot { color: var(--accent); }
.tk img, .tk .ticon { width: 16px; height: 16px; font-size: 8px; }
.tk:hover { color: var(--accent-2); }
@keyframes tk-run { to { transform: translateX(-50%); } }

.view { grid-area: view; width: 100%; max-width: var(--content-w); margin: 0 auto; padding: 18px 14px calc(var(--tab) + 28px + env(safe-area-inset-bottom)); min-width: 0; animation: view-in .28s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }

.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(var(--bg-rgb), .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--ink-3); position: relative; }
.tabbar .ico { width: 21px; height: 21px; }
.tabbar .on { color: var(--accent); }
.tabbar .on::before { content: ""; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .8); }

.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); animation: fade .2s var(--ease); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--s-raised); border-top: 1px solid var(--line-2); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--e3); padding: 10px 14px calc(18px + env(safe-area-inset-bottom)); animation: sheet-up .28s var(--ease); max-height: 80dvh; overflow-y: auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: center; }
.sheet-grid a.on { color: var(--accent); border-color: rgba(var(--accent-rgb), .4); }
.sheet-grid .ico { width: 20px; height: 20px; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.status-bar { display: none; }

@media (min-width: 960px) {
  #app { grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-areas: "rail top" "rail ticker" "rail view"; }
  #app.rail-min { --rail-w: 72px; }
  .top { height: var(--top); gap: 14px; padding: 0 22px; }
  .top .brand { display: none; }
  .rail { grid-area: rail; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 14px 10px 10px; border-right: 1px solid var(--line); background: rgba(var(--bg-rgb), .6); overflow-y: auto; scrollbar-width: none; }
  .rail .brand { padding: 4px 8px 16px; }
  .rail-group { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
  .rail-group > .label { font-size: 11px; letter-spacing: .06em; padding: 4px 10px 6px; text-transform: none; font-weight: 500; }
  .rail a, .rail button.rail-link { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: 14px; transition: background .15s var(--ease), color .15s var(--ease); width: 100%; text-align: left; }
  .rail a:hover, .rail button.rail-link:hover { background: var(--s-hover); color: var(--ink); }
  .rail a.on { background: rgba(var(--accent-rgb), .10); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
  .rail a.on .ico { color: var(--accent); }
  .rail .ico { width: 17px; height: 17px; }
  .rail .soon { margin-left: auto; font-size: 10px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
  .rail-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 1px; }
  .rail-legal { display: flex; gap: 10px; padding: 6px 10px; font-size: 11px; color: var(--ink-3); }
  #app.rail-min .rail .rail-label, #app.rail-min .rail .label, #app.rail-min .rail .soon, #app.rail-min .rail .brand span, #app.rail-min .rail-legal { display: none; }
  #app.rail-min .rail a, #app.rail-min .rail button.rail-link { justify-content: center; }
  .tabbar, .m-only { display: none !important; }
  .view { padding: 26px 28px 64px; }
  .status-bar { position: fixed; left: var(--rail-w); right: 0; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 18px; height: 28px; padding: 0 16px; background: rgba(var(--bg-rgb), .92); border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
  .status-bar .live { display: inline-flex; align-items: center; gap: 6px; color: var(--up); font-weight: 600; }
  .status-bar .live.off { color: var(--down); }
  .status-bar .end { margin-left: auto; display: flex; gap: 14px; }
  .status-bar a:hover { color: var(--ink); }
}
@media (max-width: 959px) { .d-only { display: none !important; } }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse-dot 2s infinite; display: inline-block; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(var(--up-rgb), .6); } 70% { box-shadow: 0 0 0 6px rgba(var(--up-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--up-rgb), 0); } }

/* Loading placeholders */
.skeleton { height: 64px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton.line { height: 14px; border-radius: 6px; }
.skeleton.tall { height: 380px; }
.skel-stack { display: grid; gap: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* critical:end */

/* Page heads */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font: 700 clamp(28px, 4.2vw, 44px)/1 var(--display); letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.page-head h1::before { content: "///"; color: var(--accent); font-style: italic; letter-spacing: -.12em; margin-right: 4px; }
.page-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 620px; font-size: 14.5px; }
.h1 { font: 700 26px var(--display); letter-spacing: -.02em; margin: 4px 0 14px; }
h2, h3 { font-family: var(--display); letter-spacing: -.01em; }

/* Surfaces */
.card { position: relative; background: var(--s-base); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--e1); }
.card + .card { margin-top: 12px; }
.card h3 { margin: 0 0 12px; font: 600 12px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.hero-card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 22px; background: radial-gradient(640px 320px at 0% 0%, rgba(255, 255, 255, .06), transparent 70%), linear-gradient(160deg, var(--bg-3), var(--bg-2)); box-shadow: var(--e2); }
.hero-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(var(--accent-rgb), .55), rgba(255, 255, 255, .06) 38%, rgba(255, 255, 255, .04)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hero-card::after { content: ""; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 24px 2px rgba(var(--accent-rgb), .45); }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 1100px) { .grid2 { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .sticky { position: sticky; top: calc(var(--top) + 46px); } }

/* Segmented controls and chips */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px -4px rgba(var(--accent-rgb), .6); }
.seg.block { display: flex; } .seg.block button { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.on { border-color: rgba(var(--accent-rgb), .5); color: var(--accent-2); background: rgba(var(--accent-rgb), .08); }
.chip img { width: 14px; height: 14px; border-radius: 50%; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); transition: transform .12s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease), border-color .15s; white-space: nowrap; }
.btn:hover { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); }
.btn:active { transform: scale(.97); }
.btn-buy, .btn-primary { color: var(--accent-ink); background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; box-shadow: 0 8px 24px -8px rgba(var(--accent-rgb), .7), 0 1px 0 rgba(255, 255, 255, .3) inset; }
.btn-buy:hover, .btn-primary:hover { background: linear-gradient(180deg, #fdba74, var(--accent-2)); border-color: transparent; }
.btn-sell { color: #fff; background: linear-gradient(180deg, var(--blue-2), var(--blue)); border-color: transparent; box-shadow: 0 8px 24px -8px rgba(0, 82, 255, .7), 0 1px 0 rgba(255, 255, 255, .25) inset; }
.btn-sell:hover { background: linear-gradient(180deg, #7aa6ff, var(--blue-2)); border-color: transparent; }
.btn-danger { color: var(--down-2); background: rgba(var(--down-rgb), .1); border-color: rgba(var(--down-rgb), .35); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.qb { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .4); background: rgba(var(--accent-rgb), .08); color: var(--accent-2); font-weight: 700; font-size: 13px; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease), transform .12s; }
.qb:hover { background: var(--accent); color: var(--accent-ink); }
.qb:active { transform: scale(.96); }
.qb .ico { width: 12px; height: 12px; }
.qb[disabled] { opacity: .5; }

/* Badges */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.pill.good { color: var(--up); background: rgba(var(--up-rgb), .12); }
.pill.bad { color: var(--down-2); background: rgba(var(--down-rgb), .12); }
.pill.mid { color: var(--warn); background: rgba(var(--warn-rgb), .12); }
.pill.acc { color: var(--accent-2); background: rgba(var(--accent-rgb), .12); }
.delta { display: inline-flex; padding: 3px 8px; border-radius: 8px; font: 600 12.5px var(--display); font-variant-numeric: tabular-nums; }
.delta.up { background: rgba(var(--up-rgb), .12); } .delta.down { background: rgba(var(--down-rgb), .12); }

/* Market toolbar */
.mk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.quick-box { display: flex; align-items: center; gap: 10px; }
.quick-box .label { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.quick-box .ico { width: 13px; height: 13px; }
.mk-card { background: var(--s-base); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14px; box-shadow: var(--e1); }
.mk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mk-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.mk-status .live-dot { color: var(--accent); width: 6px; height: 6px; }
.mk-search-row { display: flex; gap: 8px; margin-bottom: 6px; }
.mk-search-row input { height: 42px; }

/* Token table (desktop) and cards (phone) */
.tbl { width: 100%; }
.tbl-head, .trow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; }
.tbl-head { display: none; padding: 10px 12px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.trow { padding: 12px; border-bottom: 1px solid var(--line); border-radius: 0; transition: background .12s var(--ease); position: relative; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--s-hover); }
.tok { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ticon { position: relative; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--bg-3); object-fit: cover; display: grid; place-items: center; font: 700 13px var(--display); color: var(--ink-2); overflow: hidden; }
.ticon.round { border-radius: 50%; }
.ticon.sm { width: 28px; height: 28px; font-size: 10px; border-radius: 8px; }
.ticon.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 18px; }
.tname { font: 700 15px var(--display); display: flex; gap: 6px; align-items: center; min-width: 0; }
.tname > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.tsub .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.tmeta { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 6px; grid-column: 1 / -1; padding-left: 52px; }
.tmeta b { color: var(--ink); font: 600 12.5px var(--display); font-variant-numeric: tabular-nums; }
.tcol { display: none; text-align: right; font: 600 14px var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tcol small { display: block; font: 500 11.5px var(--body); }
.tval { text-align: right; display: grid; }
.tval b { font: 700 16px var(--display); font-variant-numeric: tabular-nums; }
.tval small { font-size: 12px; font-weight: 600; }
.bs { font: 600 13px var(--display); font-variant-numeric: tabular-nums; }
.flow { height: 3px; border-radius: 3px; background: rgba(var(--down-rgb), .7); overflow: hidden; width: 72px; margin-top: 5px; margin-left: auto; }
.flow i { display: block; height: 100%; background: var(--up); }
@media (min-width: 960px) {
  .tbl-head, .trow { grid-template-columns: minmax(200px, 1.7fr) repeat(5, minmax(84px, 1fr)) 92px; }
  .tbl-head { display: grid; }
  .tbl-head > :not(:first-child) { text-align: right; }
  .tcol { display: block; }
  .tval, .tmeta { display: none; }
}

/* Pulse columns */
.pulse-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .pulse-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pstat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--s-base); border: 1px solid var(--line); box-shadow: var(--e1); }
.pstat img { width: 40px; height: 40px; border-radius: 10px; }
.pstat b { display: block; font: 700 22px var(--display); font-variant-numeric: tabular-nums; }
.pstat small { color: var(--ink-3); font-size: 12px; }
.pulse-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; }
.pulse-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pulse-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 1100px) { .pulse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pulse-grid .seg { display: none; } }
@media (max-width: 1099px) { .pulse-col:not(.on) { display: none; } }
.pulse-col { background: var(--s-base); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14px; min-width: 0; }
.pulse-col .panel-head { margin-bottom: 8px; }
.pulse-col .count { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.pulse-list { display: grid; gap: 8px; max-height: 72vh; overflow-y: auto; scrollbar-width: thin; }
.pcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); transition: border-color .15s var(--ease), transform .15s var(--ease); }
.pcard:hover { border-color: rgba(var(--accent-rgb), .45); transform: translateY(-1px); }
.pcard .kv { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.pcard .kv b { display: block; color: var(--ink); font: 600 13px var(--display); font-variant-numeric: tabular-nums; }
.pcard .bsbar { grid-column: 1 / -1; display: flex; height: 4px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.pcard .bsbar i { background: var(--up); } .pcard .bsbar u { background: var(--down); flex: 1; }

/* Token page */
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; margin-bottom: 12px; }
.crumb:hover { color: var(--ink); }
.t-hero { display: grid; gap: 16px; margin-bottom: 14px; }
.t-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.t-id h1 { margin: 0; font: 700 26px/1.1 var(--display); letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-links { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.t-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price { font: 700 clamp(30px, 4.4vw, 44px)/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.t-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-3); font-size: 12.5px; }
.t-facts b { display: block; color: var(--ink); font: 600 15px var(--display); font-variant-numeric: tabular-nums; }
.t-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 960px) { .t-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.chart-card { padding: 12px 12px 8px; }
.chart-bar { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-box { position: relative; height: 380px; border-radius: var(--r-md); overflow: hidden; }
@media (max-width: 719px) { .chart-box { height: 300px; } }
.chart-box .skeleton { position: absolute; inset: 0; height: auto; border-radius: var(--r-md); }
.chart-box .chart-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: 13px; padding: 20px; }
.chart-credit { font-size: 11px; color: var(--ink-3); text-align: right; margin-top: 6px; }
.chart-credit a { color: var(--ink-2); }
.changes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.changes div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; }
.changes small { display: block; color: var(--ink-3); font-size: 11px; }
.changes b { font: 600 14px var(--display); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.stat small { display: block; color: var(--ink-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: 4px; }
.stat b { font: 700 17px var(--display); font-variant-numeric: tabular-nums; }

/* Safety */
.grade { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); margin-bottom: 12px; border: 1px solid var(--line); }
.grade.ok { background: rgba(var(--up-rgb), .08); border-color: rgba(var(--up-rgb), .25); }
.grade.caution { background: rgba(var(--warn-rgb), .08); border-color: rgba(var(--warn-rgb), .25); }
.grade.danger { background: rgba(var(--down-rgb), .09); border-color: rgba(var(--down-rgb), .3); }
.grade .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.grade.ok .dot { background: var(--up); box-shadow: 0 0 10px var(--up); } .grade.caution .dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); } .grade.danger .dot { background: var(--down); box-shadow: 0 0 10px var(--down); }
.reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.reasons li::before { content: "•"; color: var(--warn); margin-right: 8px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; font-size: 13px; }
.check { display: flex; justify-content: space-between; gap: 8px; background: var(--panel); border: 1px solid var(--line); padding: 8px 10px; border-radius: var(--r-sm); }
.bar { height: 6px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 6px; }
.holder { display: grid; grid-template-columns: minmax(0, 1fr) 80px; gap: 10px; align-items: center; font-size: 12px; margin-top: 8px; }
.holder .acct { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

/* Trade panel */
.trade { background: var(--s-raised); border-color: var(--line-2); box-shadow: var(--e2); }
.trade .seg { margin-bottom: 14px; }
.trade .seg.sides button.on.sell { background: var(--blue); color: #fff; box-shadow: 0 4px 14px -4px rgba(0, 82, 255, .7); }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.presets button { padding: 10px 0; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); font: 700 14px var(--display); color: var(--ink-2); transition: border-color .12s, color .12s; }
.presets button:hover { color: var(--ink); border-color: var(--line-2); }
.presets button.on { border-color: rgba(var(--accent-rgb), .6); color: var(--accent-2); background: rgba(var(--accent-rgb), .08); }
.amount { position: relative; }
.amount input { padding-right: 64px; font: 600 16px var(--display); height: 48px; }
.amount span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; font-size: 13px; }
.quote { display: flex; flex-direction: column; gap: 7px; font-size: 13px; margin: 12px 0; padding: 12px; background: var(--s-sunk); border: 1px solid var(--line); border-radius: var(--r-md); }
.quote div { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-3); } .quote b { font: 600 13.5px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }

/* Feedback */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); display: flex; align-items: center; gap: 10px; background: var(--s-overlay); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--e3); padding: 12px 16px; border-radius: var(--r-md); font-weight: 600; font-size: 13.5px; opacity: 0; transition: opacity .2s var(--ease), transform .25s var(--ease); pointer-events: none; z-index: 60; max-width: min(92vw, 440px); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 10px var(--accent); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 44px; left: calc(50% + var(--rail-w) / 2); } }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 16px; color: var(--ink-2); }
.empty img { width: 132px; height: 132px; object-fit: contain; margin-bottom: 6px; filter: drop-shadow(0 18px 40px rgba(var(--accent-rgb), .25)); }
.empty h3 { margin: 0; font: 700 18px var(--display); color: var(--ink); text-transform: none; letter-spacing: -.01em; }
.empty p { margin: 0; max-width: 420px; color: var(--ink-3); font-size: 13.5px; }
.empty .btn { margin-top: 12px; }
.empty.error h3 { color: var(--down-2); }
.empty-page { padding: 48px 16px; }
.empty-page img { width: 220px; height: 220px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.quick { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }

table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t thead, table.t tbody { display: table; width: 100%; border-collapse: collapse; }
table.t th { text-align: left; color: var(--ink-3); font-weight: 500; font-size: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--s-hover); }
table.t td.r, table.t th.r { text-align: right; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.big { font: 700 clamp(30px, 5vw, 44px)/1.05 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* Leaderboard medals */
.medal { width: 28px; height: 28px; vertical-align: middle; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.podium .pod { text-align: center; padding: 16px 10px; border-radius: var(--r-lg); background: var(--s-base); border: 1px solid var(--line); }
.podium .pod img { width: 56px; height: 56px; }
.podium .pod.first { border-color: rgba(var(--accent-rgb), .45); background: linear-gradient(180deg, rgba(var(--accent-rgb), .1), var(--s-base)); }
.art-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.art-hero img { width: 140px; height: 140px; object-fit: contain; }
@media (max-width: 719px) { .art-hero img { width: 96px; height: 96px; } }

/* Keep every screen inside the viewport on phones. */
.view > section, .grid2 > *, .card, .stats > *, .checks > * { min-width: 0; }
.mono, code { overflow-wrap: anywhere; }
@media (max-width: 480px) { .wallet { max-width: 132px; overflow: hidden; text-overflow: ellipsis; } .card { padding: 14px; } .hero-card { padding: 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } .tk-track { animation: none; } }

/* Icon set */
.i-home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11 12 3l9 8v10h-6v-6H9v6H3z'/%3E%3C/svg%3E"); }
.i-list { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v3H4zm0 6h16v3H4zm0 6h16v3H4z'/%3E%3C/svg%3E"); }
.i-shield { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.4 8 11 4.6-1.6 8-6 8-11V5z'/%3E%3C/svg%3E"); }
.i-chart { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 20h18v2H3zM5 10h3v8H5zm5.5-5h3v13h-3zM16 13h3v5h-3z'/%3E%3C/svg%3E"); }
.i-bell { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.5 2.5 0 0 0 2.4-2h-4.8a2.5 2.5 0 0 0 2.4 2zm7-6V11a7 7 0 0 0-5.5-6.8V3a1.5 1.5 0 0 0-3 0v1.2A7 7 0 0 0 5 11v5l-2 2v1h18v-1z'/%3E%3C/svg%3E"); }
.i-key { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.5 3a6.5 6.5 0 0 0-6.2 8.4L2 17.7V22h4.3v-2.2h2.2v-2.2h2.2l1.9-1.9A6.5 6.5 0 1 0 14.5 3zm2 4.2a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4z'/%3E%3C/svg%3E"); }
.i-stats { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20V10h4v10zm6 0V4h4v16zm6 0v-7h4v7z'/%3E%3C/svg%3E"); }
.i-compass { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm3.8 6.2-2.1 5.5-5.5 2.1 2.1-5.5z'/%3E%3C/svg%3E"); }
.i-collapse { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.4 6 14 4.6 6.6 12 14 19.4 15.4 18 9.4 12zM18 5h2v14h-2z'/%3E%3C/svg%3E"); }
.i-flame { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2s5 4.6 5 9.4A5 5 0 0 1 12 17a5 5 0 0 1-5-5.2C7 9 9 7 9 7s.5 2.6 2.4 3.3C11 7.2 12 2 12 2zm0 20a8 8 0 0 1-8-8c0-1.2.2-2.3.6-3.3.7 2.6 3 4.3 5.4 4.3a7 7 0 0 0 7-7c2 1.6 3 3.9 3 6a8 8 0 0 1-8 8z'/%3E%3C/svg%3E"); }
.i-radar { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10h-2a8 8 0 1 1-8-8zm0 4a6 6 0 1 0 6 6h-2a4 4 0 1 1-4-4zm0 4a2 2 0 1 0 2 2l6.4-6.4-1.4-1.4L12.6 10z'/%3E%3C/svg%3E"); }
.i-pulse { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 13h4.4l2.1-6 4 12 3-8 1.6 2H22v2h-5.9l-.6-.8L12.4 23 8.6 11.6 7.8 15H2z'/%3E%3C/svg%3E"); }
.i-copy { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 3h11a2 2 0 0 1 2 2v11h-2V5H8zM5 7h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2zm0 2v10h10V9z'/%3E%3C/svg%3E"); }
.i-out { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-8.3 8.3-1.4-1.4L17.6 5H14zM5 5h6v2H5v12h12v-6h2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.i-web { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm6.9 6h-2.9a15.7 15.7 0 0 0-1.4-3.6A8 8 0 0 1 18.9 8zM12 4a13.8 13.8 0 0 1 1.9 4h-3.8A13.8 13.8 0 0 1 12 4zM4.3 14a8.2 8.2 0 0 1 0-4h3.3a16.5 16.5 0 0 0 0 4zm.8 2h2.9a15.7 15.7 0 0 0 1.4 3.6A8 8 0 0 1 5.1 16zM8 8H5.1a8 8 0 0 1 4.3-3.6A15.7 15.7 0 0 0 8 8zm4 12a13.8 13.8 0 0 1-1.9-4h3.8A13.8 13.8 0 0 1 12 20zm2.3-6H9.7a14.7 14.7 0 0 1 0-4h4.6a14.7 14.7 0 0 1 0 4zm.3 5.6a15.7 15.7 0 0 0 1.4-3.6h2.9a8 8 0 0 1-4.3 3.6zm1.8-5.6a16.5 16.5 0 0 0 0-4h3.3a8.2 8.2 0 0 1 0 4z'/%3E%3C/svg%3E"); }
.i-x { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.8 3h3.1l-6.8 7.7L22 21h-6.2l-4.9-6.4L5.3 21H2.2l7.2-8.3L2 3h6.4l4.4 5.8zm-1.1 16.2h1.7L7.4 4.7H5.6z'/%3E%3C/svg%3E"); }
.i-tg { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.4 3.6 2.9 10.7c-1.3.5-1.2 1.2-.2 1.5l4.7 1.5 1.8 5.6c.2.6.4.8.9.8.4 0 .6-.2.9-.4l2.3-2.2 4.7 3.5c.9.5 1.5.2 1.7-.8l3.1-14.6c.3-1.3-.5-1.9-1.4-1.5zM9.9 14.2l-.4 4-1.4-4.5 10.6-6.7z'/%3E%3C/svg%3E"); }
.i-share { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 16a3 3 0 0 0-2.2 1l-7-4a3 3 0 0 0 0-2l7-4A3 3 0 1 0 15 5l-7 4a3 3 0 1 0 0 6l7 4a3 3 0 1 0 3-3z'/%3E%3C/svg%3E"); }
.i-sliders { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h10.2a3 3 0 0 1 5.6 0H21v2h-2.2a3 3 0 0 1-5.6 0H3zm13 2a1 1 0 1 0 0-2 1 1 0 0 0 0 2zM3 16h2.2a3 3 0 0 1 5.6 0H21v2H10.8a3 3 0 0 1-5.6 0H3zm5 2a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/%3E%3C/svg%3E"); }
.i-flip { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3 3 7l1.4 1.4L6 6.8V17h2V6.8l1.6 1.6L11 7zm10 18 4-4-1.4-1.4-1.6 1.6V7h-2v10.2l-1.6-1.6L13 17z'/%3E%3C/svg%3E"); }
.i-bolt { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4 14h6l-1 8 9-12h-6z'/%3E%3C/svg%3E"); }
.i-logout { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h9a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-9v-2h9V5h-9zm-.4 4.6L11 9l-2 2h8v2H9l2 2-1.4 1.4L5.2 12z'/%3E%3C/svg%3E"); }
.i-spark { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.2 6.8L21 11l-6.8 2.2L12 20l-2.2-6.8L3 11l6.8-2.2z'/%3E%3C/svg%3E"); }
.i-rocket { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3c4 0 7 3 7 7l-5 5-1 5-3-3-3 1-3-3 1-3-3-3 5-1zm1 4a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM5 16l3 3-4 2z'/%3E%3C/svg%3E"); }
.i-target { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 2h2v3.1A7 7 0 0 1 18.9 11H22v2h-3.1A7 7 0 0 1 13 18.9V22h-2v-3.1A7 7 0 0 1 5.1 13H2v-2h3.1A7 7 0 0 1 11 5.1zm1 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 3a2 2 0 1 1 0 4 2 2 0 0 1 0-4z'/%3E%3C/svg%3E"); }
.i-bridge { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 7h20v2h-2v8h-2V9.9A10 10 0 0 0 13 7.2V17h-2V7.2A10 10 0 0 0 6 9.9V17H4V9H2z M2 17h20v2H2z'/%3E%3C/svg%3E"); }
.i-more { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h6v6H4zm10 0h6v6h-6zM4 14h6v6H4zm10 0h6v6h-6z'/%3E%3C/svg%3E"); }
.i-community { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.5 3.5 2.8 10.7c-1 .4-1 1.8.1 2.1l4.6 1.4 1.8 5.6c.3.9 1.5 1.1 2.1.4l2.6-2.9 4.8 3.5c.8.6 1.9.1 2.1-.9L23.7 5c.2-1.1-.9-1.9-2.2-1.5zM9.6 14.6l8.6-7.6-6.9 8.9-.3 3z'/%3E%3C/svg%3E"); }
.i-users { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 2c-3.3 0-7 1.7-7 4.5V20h14v-2.5C16 14.7 12.3 13 9 13zm7.5-2a3.5 3.5 0 1 0-1.7-6.6A5.9 5.9 0 0 1 16 7c0 1.3-.4 2.5-1.2 3.5.5.3 1.1.5 1.7.5zm1 2.1c1.6.9 2.5 2.4 2.5 4.4V20h3v-2.2c0-2.2-2.5-3.9-5.5-4.7z'/%3E%3C/svg%3E"); }
.i-trophy { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v2h4v3a5 5 0 0 1-4.6 5A5 5 0 0 1 13 16.9V19h3v2H8v-2h3v-2.1A5 5 0 0 1 7.6 13 5 5 0 0 1 3 8V5h4zm0 4H5v1a3 3 0 0 0 2 2.8zm10 0v3.8A3 3 0 0 0 19 8V7z'/%3E%3C/svg%3E"); }
.i-help { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2zm1.8-6.2-.9.9c-.7.7-.9 1.1-.9 2.3h-2v-.5c0-1 .3-1.8.9-2.4l1.2-1.3a1.6 1.6 0 0 0-1.1-2.8 1.7 1.7 0 0 0-1.7 1.7H8.3a3.7 3.7 0 0 1 7.4 0c0 .8-.3 1.5-.9 2.1z'/%3E%3C/svg%3E"); }
.i-feed { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a1 1 0 0 1 1 1v4H3V5a1 1 0 0 1 1-1zm-1 7h18v3H3zm0 5h18v3a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.i-reply { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.i-repost { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7h10v3l4-4-4-4v3H5v6h2zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2z'/%3E%3C/svg%3E"); }
.i-heart { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.6 4.6 0 0 1 8-3 4.6 4.6 0 0 1 8 3c0 5.800-8 11-8 11z'/%3E%3C/svg%3E"); }
.i-eye { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.500 5 2.500 9.500 1 12c1.500 2.500 5.500 7 11 7s9.500-4.500 11-7c-1.500-2.500-5.500-7-11-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z'/%3E%3C/svg%3E"); }
.i-play { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4v16l13-8z'/%3E%3C/svg%3E"); }
.i-ext { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.400l-8.300 8.300-1.400-1.400L17.600 5H14zM5 5h6v2H5v12h12v-6h2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.i-search { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3a7 7 0 1 0 4.300 12.500l5.100 5.100 1.400-1.400-5.100-5.100A7 7 0 0 0 10 3zm0 2a5 5 0 1 1 0 10 5 5 0 0 1 0-10z'/%3E%3C/svg%3E"); }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.trow .icon-btn, .trow .qb, .pcard .qb { position: relative; z-index: 1; }
.trow:focus-within { background: var(--s-hover); }
#view:focus { outline: none; }
.empty img { filter: none; mix-blend-mode: lighten; -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 71%); mask-image: radial-gradient(circle, #000 52%, transparent 71%); }
.fine a { overflow-wrap: anywhere; }
.section-h { margin: 24px 0 10px; font: 700 19px var(--display); letter-spacing: -.01em; }
.seg[style*="flex-wrap"] { border-radius: var(--r-md); }
.m-trade { position: fixed; left: 0; right: 0; bottom: calc(var(--tab) + env(safe-area-inset-bottom)); z-index: 18; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 14px; background: linear-gradient(180deg, transparent, rgba(var(--bg-rgb), .95) 30%); }
@media (min-width: 1100px) { .m-trade { display: none; } }
@media (max-width: 1099px) { .has-m-trade { padding-bottom: 64px; } }

/* Touch targets: every control is at least 44 by 44 px on phones. */
.skip { min-height: 44px; }
@media (max-width: 719px) {
  .icon-btn, .icon-btn.sm { width: 44px; height: 44px; }
  .wallet { height: 44px; }
  .brand { min-height: 44px; }
  .ticker { height: 45px; }
  .seg button, .chip { min-height: 44px; min-width: 44px; flex: none; }
  .btn, .btn-sm { min-height: 44px; }
  .qb { min-height: 44px; min-width: 44px; justify-content: center; }
  input, select, textarea { min-height: 44px; }
  .icon-btn, .icon-btn.sm { flex: none; min-width: 44px; }
  .crumb { min-height: 44px; }
  .chart-credit a, .fine a { display: inline-block; padding: 15px 9px; margin: -15px -9px; }
  .presets button { min-height: 44px; }
  table a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
}

/* Live tape on Markets: the newest trades, scrolling sideways when they do not fit. */
.live-tape { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.live-tape[hidden] { display: none; }
.live-tape::-webkit-scrollbar { display: none; }
.tape-label { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.tape-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-ink); }
.tape-row { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; min-height: 36px; border-radius: 999px; color: var(--ink); font-size: 13px; white-space: nowrap; }
.tape-row:hover { background: var(--panel-2); }
.tape-row.fresh { animation: tape-in .45s ease-out; }
@keyframes tape-in { from { opacity: 0; transform: translateX(-14px); background: var(--panel-2); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tape-row.fresh { animation: none; } }
.tape-row.buy .tape-side { color: var(--up); }
.tape-row.sell .tape-side { color: var(--down); }
@media (max-width: 719px) { .tape-row { min-height: 44px; } }

/* Account recovery: the #/recover screen and the standalone /recover page */
.rec { max-width: 480px; }
.rec-card { display: grid; gap: 12px; padding: 22px; }
.rec-card h2 { margin: 0; font: 700 20px/1.25 var(--display); }
.rec-card .muted { margin: 0; color: var(--ink-2); }
.rec-art { width: 96px; height: 96px; justify-self: center; }
.rec-form { display: grid; gap: 12px; }
.rec-form label { display: grid; gap: 6px; }
.rec-form label > span { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.rec-go { width: 100%; min-height: 44px; }
.rec-msg { margin: 0; min-height: 1.2em; color: var(--down-2); font-size: 13px; }
.rec-msg:empty { min-height: 0; }
.rec-steps { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--ink-3); }
.rec-steps li { display: flex; align-items: center; gap: 6px; flex: 1; }
.rec-steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); font-weight: 700; }
.rec-steps li.on { color: var(--ink); }
.rec-steps li.on span { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.rec-steps li.done span { background: rgba(var(--up-rgb), .15); color: var(--up); border-color: transparent; }
.rec-timer { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: var(--r-md); background: rgba(var(--accent-rgb), .08); border: 1px solid rgba(var(--accent-rgb), .35); }
.rec-timer b { color: var(--accent-2); font-size: 18px; }
.rec-cmd { display: grid; gap: 8px; }
.rec-cmd p { margin: 0; color: var(--ink-2); }
.rec-cmd code { word-break: break-all; padding: 10px 12px; border-radius: var(--r-sm); background: var(--s-sunk); border: 1px solid var(--line); }
.rec-note { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.rec-page { display: flex; flex-direction: column; align-items: center; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
.rec-top { width: 100%; max-width: 480px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.rec-top .brand { display: flex; align-items: center; gap: 8px; font: 700 20px var(--display); }
.rec-badge { font-size: 12px; font-weight: 600; color: var(--accent-2); background: rgba(var(--accent-rgb), .12); border: 1px solid rgba(var(--accent-rgb), .3); padding: 4px 10px; border-radius: 999px; }
.rec-main { width: 100%; max-width: 480px; }
.rec-foot { margin-top: 18px; max-width: 480px; text-align: center; font-size: 12px; color: var(--ink-3); }

/* Motion. Small and purposeful; the reduced-motion rule above shortens every animation here to nothing. */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes float { 50% { translate: 0 -6px; } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes nudge { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
@keyframes landed-ring { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .55); } 100% { box-shadow: 0 0 0 22px rgba(var(--accent-rgb), 0); } }
@keyframes dot-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-16px); } }
section:not(.drawn) > .card, section:not(.drawn) > div > .card { animation: rise .42s ease-out backwards; }
section:not(.drawn) > .card:nth-child(2), section:not(.drawn) > div > .card:nth-child(2) { animation-delay: .05s; }
section:not(.drawn) > .card:nth-child(3), section:not(.drawn) > div > .card:nth-child(3) { animation-delay: .1s; }
section:not(.drawn) > .card:nth-child(4), section:not(.drawn) > div > .card:nth-child(4) { animation-delay: .15s; }
section:not(.drawn) > .card:nth-child(5), section:not(.drawn) > div > .card:nth-child(5) { animation-delay: .2s; }
section:not(.drawn) > .card:nth-child(n+6), section:not(.drawn) > div > .card:nth-child(n+6) { animation-delay: .25s; }
.empty img { animation: float 5.5s ease-in-out infinite; }
.card-art { float: right; width: 64px; height: 64px; object-fit: contain; margin: -6px -4px 4px 10px; filter: drop-shadow(0 10px 22px rgba(var(--accent-rgb), .3)); animation: float 6s ease-in-out infinite; }
.order-art { width: 72px; height: 72px; object-fit: contain; flex: none; filter: drop-shadow(0 10px 22px rgba(var(--accent-rgb), .3)); }
.order-art.st-awaiting, .order-art.st-processing, .order-art.st-unwrapping { animation: float 3.2s ease-in-out infinite; }
.order-art.st-done { animation: pop .6s ease-out; }
.order-art.st-refunded, .order-art.st-failed, .order-art.st-expired { animation: nudge .5s ease-out; }
.pill.st-awaiting::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dot-pulse 1.4s ease-in-out infinite; }
.pill.st-processing, .pill.st-unwrapping { background: linear-gradient(100deg, var(--panel-2) 30%, rgba(var(--accent-rgb), .35) 50%, var(--panel-2) 70%) 0 0 / 220% 100%; animation: shimmer 1.6s linear infinite; }
.pill.st-done { color: var(--up); background: rgba(var(--up-rgb), .12); animation: pop .5s ease-out; }
.pill.st-refunded, .pill.st-failed, .pill.st-expired { color: var(--down-2); background: rgba(var(--down-rgb), .12); animation: nudge .5s ease-out; }
.card.landed { animation: landed-ring 1.1s ease-out 1; }
.follow-row { animation: slide-in .35s ease-out; }
.act-list { max-height: 340px; overflow-y: auto; }
.act-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.act-row:last-child { border-bottom: 0; }
.act-row.fresh { animation: slide-in .35s ease-out; }
.act-row.buy .tape-side { color: var(--up); }
.act-row.sell .tape-side { color: var(--down); }
.act-row > :last-child { margin-left: auto; }
/* Links inside the token page lists are tap targets on a phone: at least 44 px tall. */
.act-row a, .card .row > a { display: inline-flex; align-items: center; min-height: 44px; }
.act-row { min-height: 44px; }

/* Notification bell and inbox rows. */
.bell { position: relative; }
.bell .badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; animation: pop .4s ease-out; }
.bell .badge[hidden], .bell[hidden] { display: none; }
.note { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note.new { background: linear-gradient(90deg, rgba(var(--accent-rgb), .08), transparent); }
.note-ico { flex: none; width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--panel-2); font-size: 14px; }
.note-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.note-age { flex: none; font-size: 12px; }

/* ===== 3D layer: depth for cards and buttons, glass toasts and dialogs, tilt for the illustrations ===== */
:root {
  --lift-1: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 -1px 0 rgba(0, 0, 0, .45) inset, 0 2px 4px rgba(0, 0, 0, .35), 0 14px 28px -14px rgba(0, 0, 0, .7);
  --lift-2: 0 1px 0 rgba(255, 255, 255, .09) inset, 0 -1px 0 rgba(0, 0, 0, .5) inset, 0 4px 8px rgba(0, 0, 0, .4), 0 28px 56px -18px rgba(0, 0, 0, .85);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015) 38%, transparent 70%);
}
.card, .hero-card { background-image: var(--glass); box-shadow: var(--lift-1); }
.card { transition: transform .25s var(--ease, ease), box-shadow .25s var(--ease, ease); }
@media (hover: hover) { .card:not(.trade):not(.chart-card):hover { transform: translateY(-2px); box-shadow: var(--lift-2); } }
.btn { box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 -2px 0 rgba(0, 0, 0, .35) inset, 0 3px 6px rgba(0, 0, 0, .35); transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 -1px 0 rgba(0, 0, 0, .3) inset, 0 1px 2px rgba(0, 0, 0, .4); }
.btn-primary { background-image: linear-gradient(180deg, var(--accent-2, #fb923c), var(--accent)); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 -3px 0 rgba(0, 0, 0, .22) inset, 0 6px 14px rgba(var(--accent-rgb), .35), 0 2px 4px rgba(0, 0, 0, .4); }
.btn-primary:active { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 -1px 0 rgba(0, 0, 0, .2) inset, 0 2px 6px rgba(var(--accent-rgb), .3); }
.btn-danger { box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 -3px 0 rgba(0, 0, 0, .25) inset, 0 6px 14px rgba(var(--down-rgb), .3), 0 2px 4px rgba(0, 0, 0, .4); }
.pill { box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 -1px 0 rgba(0, 0, 0, .3) inset; }
.icon-btn { box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 -1px 0 rgba(0, 0, 0, .35) inset, 0 2px 4px rgba(0, 0, 0, .3); }
input[type=text], input[type=number], input[type=password], input[type=search], select { box-shadow: 0 2px 5px rgba(0, 0, 0, .35) inset, 0 1px 0 rgba(255, 255, 255, .04); }

/* Illustrations tilt toward the pointer; app.js sets --rx and --ry on the element under it. */
[data-tilt] { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out; will-change: transform; }
@media (hover: none), (prefers-reduced-motion: reduce) { [data-tilt] { transform: none !important; } }

/* Toasts: stacked glass cards with a 3D icon, a close button and a countdown bar. */
.toasts { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tab, 0px) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 44px; left: calc(50% + var(--rail-w, 0px) / 2); } }
.toast3d { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px 10px; border-radius: 18px; pointer-events: auto; color: var(--ink); background: var(--glass), linear-gradient(180deg, rgba(34, 36, 43, .96), rgba(20, 21, 25, .96)); border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 -2px 0 rgba(0, 0, 0, .4) inset, 0 16px 34px -10px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .4); backdrop-filter: blur(10px); animation: toast-in .38s cubic-bezier(.2, .9, .3, 1.2); }
.toast3d.leaving { animation: toast-out .22s ease-in forwards; }
.toast3d.bump { animation: toast-bump .3s ease-out; }
.toast3d.error { border-color: rgba(var(--down-rgb), .4); }
.toast3d.ok { border-color: rgba(var(--up-rgb), .35); }
.toast3d.warn { border-color: rgba(var(--accent-rgb), .4); }
.toast3d.info { border-color: rgba(0, 82, 255, .4); }
.toast-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; object-fit: cover; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.toast-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.toast-x { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; }
.toast-x:hover { background: rgba(255, 255, 255, .12); color: var(--ink); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; background: var(--accent); animation: toast-count var(--ttl, 3500ms) linear forwards; }
.toast3d.error .toast-bar { background: var(--down-2, #f43f5e); }
.toast3d.ok .toast-bar { background: var(--up, #00ec97); }
.toast3d.info .toast-bar { background: #0052ff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(24px) scale(.94) rotateX(-18deg); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes toast-bump { 40% { transform: scale(1.04); } }
@keyframes toast-count { to { transform: scaleX(0); } }

/* Dialogs: a glass panel with a floating 3D illustration, centred on a desktop and a sheet on a phone. */
html.modal-open { overflow: hidden; }
.modal-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), .10), rgba(0, 0, 0, .72) 60%); backdrop-filter: blur(6px); animation: fade .2s ease-out; perspective: 1000px; }
.modal-back.leaving { animation: fade .18s ease-in reverse forwards; }
.modal3d { position: relative; width: min(420px, 100%); max-height: calc(100dvh - 36px); overflow: auto; padding: 78px 22px 20px; text-align: center; border-radius: 26px; background: var(--glass), linear-gradient(180deg, rgba(30, 32, 38, .98), rgba(17, 18, 22, .98)); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 -3px 0 rgba(0, 0, 0, .45) inset, 0 40px 80px -20px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(var(--accent-rgb), .35); animation: modal-in .42s cubic-bezier(.2, .9, .3, 1.15); transform-style: preserve-3d; }
.modal3d.danger { box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 -3px 0 rgba(0, 0, 0, .45) inset, 0 40px 80px -20px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(var(--down-rgb), .45); }
.modal3d.success { box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 -3px 0 rgba(0, 0, 0, .45) inset, 0 40px 80px -20px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(var(--up-rgb), .4); }
.modal-art { position: absolute; top: -52px; left: 50%; width: 120px; height: 120px; margin-left: -60px; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .7)); animation: float 5s ease-in-out infinite; }
.modal3d h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.modal-body { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin-bottom: 18px; overflow-wrap: anywhere; }
.modal-body p { margin: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 140px; min-height: 46px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(28px) scale(.92) rotateX(14deg); } }
@media (max-width: 560px) {
  .modal-back { place-items: end center; padding: 10px; }
  .modal3d { border-radius: 26px 26px 18px 18px; animation-name: sheet-up; }
}
@media (prefers-reduced-motion: reduce) { .toast3d, .modal3d, .modal-art { animation: none !important; } }
/* Dialog art floats above the panel without its square, and only the body scrolls. */
.modal3d { overflow: visible; max-height: none; }
.modal-body { max-height: 42vh; overflow-y: auto; }
.modal-art { mix-blend-mode: lighten; -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 72%); mask-image: radial-gradient(circle, #000 52%, transparent 72%); }
@media (max-height: 560px) { .modal3d { padding-top: 64px; } .modal-art { width: 96px; height: 96px; margin-left: -48px; top: -40px; } }

/* Portfolio extras: allocation ring and best and worst positions. */
@keyframes donut-in { from { stroke-dasharray: 0 100; opacity: 0; } }
.alloc { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-wrap { position: relative; width: 150px; height: 150px; flex: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.donut { width: 100%; height: 100%; transform: rotate(0deg); }
.donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 160px; flex: 1; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend li span:last-child { margin-left: auto; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset; }
.movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mover { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--panel-2); min-height: 44px; box-shadow: var(--lift-1); transition: transform .15s; }
@media (hover: hover) { .mover:hover { transform: translateY(-2px); } }

/* Markets: sort picker, minimum and maximum values, sortable column headers */
.mk-sort { width: auto; min-width: 150px; max-width: 46%; height: 42px; padding-top: 0; padding-bottom: 0; }
.mk-limits { margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.mk-limits > summary { cursor: pointer; padding: 10px 12px; font-size: 13px; color: var(--ink-2); list-style: none; }
.mk-limits > summary::-webkit-details-marker { display: none; }
.mk-limits[open] > summary { color: var(--ink); border-bottom: 1px solid var(--line); }
.mk-limit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; align-items: end; }
.mk-limit small { display: block; color: var(--ink-3); margin-bottom: 4px; }
.mk-limit input { height: 38px; padding-top: 0; padding-bottom: 0; }
.mk-limit input[aria-invalid="true"] { border-color: #ef4444; }
.mk-limits .fine { padding: 0 12px 12px; }
.th-sort { all: unset; cursor: pointer; font: inherit; color: inherit; border-radius: 6px; padding: 2px 4px; }
.th-sort:hover, .th-sort.on { color: var(--accent-2); }
.th-sort:focus-visible { box-shadow: var(--focus); }
@media (min-width: 760px) { .mk-limit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* A table whose header and body share column widths, scrolling sideways inside its wrapper on a narrow screen. */
.t-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t.aligned { display: table; }
table.t.aligned thead { display: table-header-group; }
table.t.aligned tbody { display: table-row-group; }

/* ---- Bridge: the band, chips, live quote, steps and the order track ---- */
.bridge-card { padding: 0; overflow: hidden; }
.bridge-band { background: radial-gradient(120% 140% at 85% 50%, rgba(249, 115, 22, .14), transparent 60%), radial-gradient(90% 140% at 8% 50%, rgba(0, 82, 255, .13), transparent 60%); border-bottom: 1px solid var(--line); padding: 4px 8px 0; }
.bridge-band-svg { display: block; max-width: 760px; margin: 0 auto; overflow: visible; }
.band-path { animation: band-flow 1.1s linear infinite; filter: drop-shadow(0 0 6px rgba(249, 115, 22, .7)); }
.band-badge { animation: band-float 4.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.band-rex { animation: band-pulse 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 12px rgba(249, 115, 22, .55)); }
@keyframes band-flow { to { stroke-dashoffset: -28; } }
@keyframes band-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes band-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.bridge-grid { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 16px; }
@media (min-width: 760px) { .bridge-grid { grid-template-columns: 1.1fr 1fr; gap: 18px; padding: 18px 20px; } }
.bridge-panel { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg, 16px); background: var(--panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.bridge-label { font: 600 11px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bridge-hint { margin: 0; }
.bridge-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bridge-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); font: 600 14px var(--body); cursor: pointer; transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease), color .16s var(--ease), background .16s var(--ease); }
.bridge-chip:hover { transform: translateY(-2px); color: var(--ink); border-color: rgba(var(--accent-rgb), .45); }
.bridge-chip:active { transform: translateY(0) scale(.97); }
.bridge-chip.on { color: var(--ink); border-color: rgba(var(--accent-rgb), .8); background: linear-gradient(180deg, rgba(var(--accent-rgb), .22), rgba(var(--accent-rgb), .08)); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .14), 0 8px 18px rgba(0, 0, 0, .35); }
.bridge-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.bridge-ico { display: inline-flex; width: 30px; height: 30px; flex: none; }
.bridge-ico svg { width: 100%; height: 100%; }
.bridge-ico.sm { width: 22px; height: 22px; }
.bridge-amount-box { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35); transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.bridge-amount-box:focus-within { border-color: rgba(var(--accent-rgb), .6); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35), var(--focus); }
.bridge-amount { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; font: 700 26px var(--display); height: 54px; color: var(--ink); }
.bridge-unit { font: 700 13px var(--body); color: var(--ink-3); padding: 4px 10px; border-radius: 999px; background: var(--panel-2); }
.bridge-quote { min-height: 96px; padding: 14px; border-radius: 14px; border: 1px dashed rgba(var(--accent-rgb), .35); background: linear-gradient(180deg, rgba(var(--accent-rgb), .07), transparent); }
.bridge-quote-idle { margin: 0; color: var(--ink-3); font-size: 14px; }
.bridge-quote-warn { margin: 0; color: #f59e0b; font-size: 14px; }
.bridge-quote-out { display: flex; align-items: center; gap: 10px; animation: quote-pop .38s var(--ease) both; }
.bridge-quote-out b { font: 700 24px var(--display); }
.bridge-quote-facts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; color: var(--ink-2); font-size: 13px; animation: quote-pop .45s .06s var(--ease) both; }
@keyframes quote-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.bridge-shimmer { border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .05) 75%); background-size: 220% 100%; animation: bridge-shim 1.2s linear infinite; }
@keyframes bridge-shim { to { background-position: -220% 0; } }
.bridge-refund-box { display: grid; gap: 8px; padding: 0 16px 6px; }
@media (min-width: 760px) { .bridge-refund-box { padding: 0 20px 6px; } }
.bridge-refund { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; }
.bridge-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 16px 16px; }
@media (min-width: 760px) { .bridge-actions { padding: 10px 20px 18px; } }
.bridge-go { min-height: 48px; padding: 0 22px; }
.bridge-go:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.bridge-steps { list-style: none; margin: 0; padding: 14px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-top: 1px solid var(--line); background: var(--panel); }
.bridge-steps li { display: flex; gap: 10px; align-items: center; opacity: .5; transition: opacity .3s var(--ease); min-width: 0; }
.bridge-steps li.done, .bridge-steps li.current { opacity: 1; }
.bridge-steps b { display: block; font-size: 13px; }
.bridge-steps small { display: block; color: var(--ink-3); font-size: 11.5px; line-height: 1.3; }
.bridge-step-dot { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font: 700 13px var(--body); background: var(--panel-2); border: 1px solid var(--line); }
.bridge-steps li.done .bridge-step-dot { background: rgba(var(--accent-rgb), .25); border-color: rgba(var(--accent-rgb), .6); }
.bridge-steps li.current .bridge-step-dot { background: var(--accent); color: var(--accent-ink); border-color: transparent; animation: step-ring 1.8s ease-out infinite; }
@keyframes step-ring { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .55); } 100% { box-shadow: 0 0 0 12px rgba(var(--accent-rgb), 0); } }
@media (max-width: 560px) { .bridge-steps { grid-template-columns: 1fr; } .bridge-steps small { display: none; } }

.bridge-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 14px 4px 4px; padding-top: 4px; }
.bridge-track-rail { position: absolute; left: 12.5%; right: 12.5%; top: 14px; height: 4px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.bridge-track-fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f97316, #fb923c); box-shadow: 0 0 10px rgba(249, 115, 22, .7); transition: width .8s var(--ease); position: relative; }
.bridge-track-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: track-glint 1.6s linear infinite; }
@keyframes track-glint { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.bridge-node { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; text-align: center; }
.bridge-node small { color: var(--ink-3); font-size: 11.5px; }
.bridge-node-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--line); transition: background .4s var(--ease), border-color .4s var(--ease); }
.bridge-node.done .bridge-node-dot { background: var(--accent); border-color: var(--accent); }
.bridge-node.current .bridge-node-dot { background: var(--bg-2); border-color: var(--accent); animation: step-ring 1.8s ease-out infinite; }
.bridge-node.done small, .bridge-node.current small { color: var(--ink); }
.bridge-node.final .bridge-node-dot { background: var(--accent); }
.bridge-track-end { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.bridge-address { padding: 8px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; }
.bridge-order { animation: quote-pop .4s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  .band-path, .band-badge, .band-rex, .bridge-shimmer, .bridge-track-fill::after, .bridge-steps li.current .bridge-step-dot, .bridge-node.current .bridge-node-dot { animation: none !important; }
}

/* A line above the trade review rows that warns the fill is far from the listed price. */
.review .warn-line { margin: 0 0 10px; padding: 9px 12px; border-radius: var(--r-sm); background: rgba(var(--warn-rgb), .12); border: 1px solid rgba(var(--warn-rgb), .35); color: var(--warn); font-size: 13px; line-height: 1.4; }

/* The panel a signed-out visitor sees in place of an account screen. */
.guest-card { max-width: 440px; margin: 48px auto; padding: 28px; text-align: center; display: grid; gap: 12px; justify-items: center; }

/* The rail's live token list: trending, watchlist and new, hidden when the rail is collapsed. */
.rail-lists { display: flex; flex-direction: column; min-height: 140px; flex: 1 1 auto; overflow: auto; margin: 4px 0 8px; }
@media (min-width: 1100px) { .rail { overflow-y: auto; } }
.rail-tabs { display: flex; gap: 4px; padding: 0 6px 6px; }
.rail-tabs button { flex: 1; font-size: 11px; padding: 4px 6px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-3); cursor: pointer; }
.rail-tabs button.on { background: rgba(var(--accent-rgb), .12); color: var(--ink); border-color: rgba(var(--accent-rgb), .4); }
.rail .rail-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 10px; font-size: 13px; }
.rail-sym { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app.rail-min .rail .rail-lists { display: none; }

/* Weekly referral earnings: eight bars, the newest on the right. */
.wk-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 120px; margin-top: 8px; }
.wk { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.wk i { display: block; width: 100%; max-width: 36px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 4px; }
.wk small { font-size: 10px; color: var(--ink-3); }

/* A notice card, such as the draft marker on the legal pages. */
.card.warn-line { background: rgba(var(--warn-rgb), .12); border: 1px solid rgba(var(--warn-rgb), .35); color: var(--warn); font-size: 13px; }
