/* Qorlith Markets. Builds on ../assets/qorlith.css (load that first): tokens, cards, seg, tabs, tables, buttons, dialog. */

sub { font-size: .72em; vertical-align: -.25em; line-height: 0; color: var(--muted); }
.flat { color: var(--dim); }
.tb-sp { flex: 1; }
.ar { font-style: normal; font-size: .62em; margin-right: 3px; vertical-align: .12em; }
kbd { font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: rgba(255, 255, 255, .03); }
body.no-scroll { overflow: hidden; }
/* Markets is a full-width tool: let the shared bar span the window like the sidebar layout below it */
.mk .appbar > .wrap, .mk .foot > .wrap { max-width: none; padding: 0 22px; }

/* ============================================================ app layout: sidebar + content */
.mk-app { --sw: 232px; flex: 1; display: grid; grid-template-columns: var(--sw) minmax(0, 1fr); min-width: 0; }
body.side-mini .mk-app { --sw: 68px; }
.mk-content { min-width: 0; padding: 0 22px 56px; }
.mk-main { padding-top: 18px; outline: none; }

.mk-side { position: sticky; top: 60px; height: calc(100vh - 60px); height: calc(100dvh - 60px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 12px; border-right: 1px solid var(--line); background: rgba(8, 12, 21, .55); }
.side-top { display: flex; gap: 6px; }
.side-search { flex: 1; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 13px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--dim); font: 14px var(--sans); cursor: pointer; transition: border-color .15s ease, color .15s ease; min-width: 0; }
.side-search:hover { border-color: rgba(92, 242, 200, .5); color: var(--muted); }
.side-search kbd { margin-left: auto; }
.side-close { display: none; }
.side-nav { display: grid; gap: 14px; margin-top: 10px; }
.side-g { display: grid; gap: 2px; }
.side-gh { font-size: 12px; color: var(--dim); padding: 0 12px 4px; }
.side-nav a { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 12px; border-radius: 999px; color: var(--muted); font-size: 14px; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.side-nav a:hover { text-decoration: none; color: var(--text); background: rgba(255, 255, 255, .04); }
.side-nav a[aria-current="page"] { color: var(--text); background: var(--mint-soft); box-shadow: inset 0 0 0 1px rgba(92, 242, 200, .18); }
.side-nav a[aria-current="page"] .side-ic { color: var(--mint); }
.side-ic { display: grid; place-items: center; width: 18px; flex: none; color: var(--dim); }
.side-ic svg { width: 17px; height: 17px; }
.side-n { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--card2); color: var(--text); font: 500 11.5px/20px var(--mono); text-align: center; }
.side-ext { margin-left: auto; color: var(--dim); display: grid; opacity: .7; }
.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.side-collapse { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 0 12px; border: 0; background: none; color: var(--dim); font: 13.5px var(--sans); cursor: pointer; border-radius: 999px; }
.side-collapse:hover { color: var(--text); background: rgba(255, 255, 255, .04); }

body.side-mini .side-txt { display: none; }
body.side-mini .mk-side { padding: 14px 10px; align-items: stretch; }
body.side-mini .side-search, body.side-mini .side-nav a, body.side-mini .side-collapse { justify-content: center; padding: 0; }
body.side-mini .side-search { height: 42px; }
body.side-mini .side-nav { gap: 10px; }
body.side-mini .side-g + .side-g { border-top: 1px solid var(--line); padding-top: 10px; }
body.side-mini .side-nav a { min-height: 42px; }

.side-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(3, 5, 10, .62); backdrop-filter: blur(3px); }
.mk-mbar { display: none; }

/* ============================================================ market strip */
.mk-strip { display: flex; align-items: center; gap: 18px; min-height: 46px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; white-space: nowrap; margin: 0 -22px; padding: 0 22px; }
.mk-strip::-webkit-scrollbar { display: none; }
.st-tot { display: flex; gap: 20px; }
.st-i { display: flex; align-items: baseline; gap: 7px; }
.st-i span { font-size: 12.5px; color: var(--dim); }
.st-i b { font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; }
.st-i small { color: var(--dim); font-size: 11px; }
.ticker { display: flex; align-items: center; gap: 6px; padding-left: 18px; border-left: 1px solid var(--line); }
.tk-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.tk-lbl svg { width: 14px; height: 14px; color: var(--amber); }
.tk-i { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); font-size: 12.5px; color: var(--text); }
.tk-i:hover { text-decoration: none; border-color: var(--line2); background: rgba(255, 255, 255, .05); }
.tk-i b { font-weight: 500; }
.tk-i .mono, .tk-i span { font-size: 12px; font-family: var(--mono); }

/* ============================================================ page head + toolbar */
.mk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.mk-head h1 { font-size: 24px; }
.mk-head p { margin: 5px 0 0; font-size: 14px; }
.mk-head-actions { align-items: center; }
.mk-board { overflow: hidden; }
.mk-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mk-toolbar .sub { color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.tf-seg button { font-family: var(--mono); font-size: 12.5px; padding: 6px 11px; }
.rank-sel { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 30px 0 13px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(255, 255, 255, .03); font-size: 13px; color: var(--dim); }
.rank-sel:focus-within { border-color: rgba(92, 242, 200, .6); }
.rank-sel select { appearance: none; -webkit-appearance: none; background: none; border: 0; color: var(--text); font: 500 13px var(--sans); cursor: pointer; outline: none; padding: 0; }
.rank-sel select option { background: var(--card2); }
.rank-sel svg { position: absolute; right: 11px; pointer-events: none; color: var(--dim); }
.dir-btn { font-family: var(--mono); font-size: 12.5px; }
.fcount { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); font: 600 11px/1 var(--mono); }
.fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.fchip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); border-color: rgba(92, 242, 200, .35); background: var(--mint-soft); font-family: var(--sans); }
.fchip svg { width: 12px; height: 12px; color: var(--muted); }
.fchip:hover svg { color: var(--text); }
.mk-api { margin: 14px 2px 0; }

/* ============================================================ pairs table */
.mk-tbl { max-height: max(420px, calc(100dvh - 280px)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.board { font-size: 13px; }
.board th, .board td { padding: 8px 8px; border-bottom: 1px solid var(--line); }
.board thead th { position: sticky; top: 0; z-index: 2; background: var(--card); box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; font-size: 12px; padding-top: 9px; padding-bottom: 9px; }
.board .c-tok { position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 190px; max-width: 240px; }
.board thead .c-tok { z-index: 3; }
.board tbody th { font-weight: 400; }
.board tbody tr { cursor: pointer; }
.board td.mono { font-size: 12.5px; }
.board .c-rank { width: 36px; padding-left: 14px; padding-right: 2px; font-size: 12px; }
.board .c-star { width: 40px; padding: 0 8px 0 0; }
.board .c-sp { width: 76px; }
.board .c-sp svg { width: 72px; }
.board .c-sf { width: 84px; }
@media (max-width: 1360px) { .board .c-sp { display: none; } }
.board tbody tr:last-child > * { border-bottom: 0; }
@media (hover: hover) { .board tbody tr:hover > * { background: var(--hover); } }
.board tr.boosted > td:first-child { box-shadow: inset 2px 0 0 rgba(255, 196, 107, .65); }
.board th.tf-on, .board td.tf-on { background: rgba(255, 255, 255, .025); }
.board thead th.tf-on { background: var(--card2); }
.th-sort { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.th-sort:hover, .th-sort.on { color: var(--text); }
.th-sort i { font-style: normal; color: var(--mint); min-width: 7px; }
th.num .th-sort { flex-direction: row; }
.sk-board td .sk { height: 11px; width: 70%; margin-left: auto; }
.sk-board .sk-tok { width: 150px !important; height: 26px !important; margin: 0 !important; border-radius: 999px; }

.tk { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.tk:hover { text-decoration: none; }
.tk:hover b { color: var(--mint); }
.tk-t { display: grid; min-width: 0; }
.tk-s { display: flex; align-items: center; gap: 3px; line-height: 1.3; white-space: nowrap; }
.tk-s b { font-weight: 600; font-size: 13.5px; transition: color .15s ease; }
.tk-s .dim { font-size: 12px; }
.tk-n { font-size: 12px; color: var(--dim); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.boost-mk { display: inline-grid; place-items: center; color: var(--amber); margin-left: 2px; }
.boost-mk svg { width: 12px; height: 12px; }
.vf { display: inline-grid; place-items: center; color: var(--mint); margin-left: 2px; }
.vf svg { width: 14px; height: 14px; }
.la-badge { font-size: 10.5px; padding: 0 7px; line-height: 1.6; margin-left: 4px; }

.av { --h: 160; position: relative; width: 28px; height: 28px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  font: 600 10.5px/1 var(--sans); letter-spacing: .02em; color: hsl(var(--h) 70% 78%); background: hsl(var(--h) 35% 18%); box-shadow: inset 0 0 0 1px hsl(var(--h) 50% 40% / .45); }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--card2); }
.av.lg { width: 48px; height: 48px; font-size: 15px; }
span.sk.av { box-shadow: none; }

.spark-l { display: block; }
.spark-l.up { color: var(--ok); } .spark-l.down { color: var(--red); } .spark-l.flat { color: var(--dim); }
.sf { display: inline-flex; gap: 2px; vertical-align: middle; }
.sf i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: var(--dim); opacity: .5; }
.sf i.on { color: var(--mint); background: var(--mint-soft); opacity: 1; }
.sf svg { width: 14px; height: 14px; }

.star { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; border: 0; background: none; color: var(--dim); cursor: pointer; transition: color .15s ease, background-color .15s ease, transform .16s var(--ease-out); }
.star:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.star:active { transform: scale(.9); }
.star.on { color: var(--mint); }

@media (prefers-reduced-motion: no-preference) {
  .fl-up { animation: flUp .9s var(--ease-out); }
  .fl-down { animation: flDown .9s var(--ease-out); }
  .trades tr.new > td { animation: rowIn 1.6s var(--ease-out); }
}
@keyframes flUp { from { background-color: rgba(74, 222, 154, .18); } }
@keyframes flDown { from { background-color: rgba(255, 122, 140, .18); } }
@keyframes rowIn { from { background-color: rgba(92, 242, 200, .12); } }
[data-price] { border-radius: 6px; }

/* mobile cards */
.mk-cards { display: none; }
.mk-card { position: relative; display: grid; grid-template-columns: 18px 36px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.mk-card:last-child { border-bottom: 0; }
.mk-card .av { width: 36px; height: 36px; }
.mk-card.boosted { box-shadow: inset 2px 0 0 rgba(255, 196, 107, .65); }
.mc-rank { font-size: 11.5px; color: var(--dim); text-align: center; }
.mc-id { display: grid; min-width: 0; }
.mc-id .tk-n { display: flex; gap: 8px; max-width: none; }
.tk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mc-px { display: grid; justify-items: end; gap: 1px; font-size: 14px; }
.mc-px .small { font-size: 12px; }
.mc-meta { grid-column: 3 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 12px; color: var(--muted); margin-top: 6px; padding-right: 40px; }
.mc-meta em { font-style: normal; color: var(--dim); }
.mc-meta .mono { font-size: 12px; color: var(--text); }
.mc-meta .sf i { width: 20px; height: 20px; border-radius: 6px; }
.mc-meta .sf svg { width: 12px; height: 12px; }
.mc-link { position: absolute; inset: 0; z-index: 1; border-radius: 0; }
.mc-star { position: absolute; right: 8px; bottom: 6px; z-index: 2; width: 40px; height: 40px; }
@media (hover: hover) { .mk-card:hover { background: var(--hover); } }
.sk-card { grid-template-columns: 18px 36px 1fr; }
.sk-card .sk:not(.av) { grid-column: 3; height: 11px; }
.sk-card .av { grid-row: span 2; grid-column: 2; }
.mk-err { display: grid; gap: 12px; justify-items: start; padding: 18px; }

/* ============================================================ filters drawer */
dialog.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(400px, 100%); max-width: 100%; border-radius: 20px 0 0 20px; border-right: 0; }
@media (prefers-reduced-motion: no-preference) {
  dialog.drawer[open] { animation: drawerIn .24s var(--ease-out); }
  @keyframes drawerIn { from { transform: translateX(24px); opacity: 0; } }
}
.drawer-in { display: flex; flex-direction: column; height: 100%; gap: 0; }
.drawer-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { margin: 0; font-size: 18px; }
.drawer-b { flex: 1; overflow: auto; padding: 16px 20px; display: grid; gap: 16px; align-content: start; }
.drawer-b fieldset.mm { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-b legend { font-size: 13.5px; color: var(--muted); padding: 0; margin-bottom: 7px; }
.drawer-b input[type=number] { font-family: var(--mono); font-size: 14px; padding: 9px 12px; }
.flags { display: grid; gap: 12px; padding-top: 4px; }
.flags .check { font-size: 14px; }
.drawer-f { display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer-f .btn { flex: 1; }

/* ============================================================ dialogs (alert, watchlist import/export) */
dialog .form { gap: 14px; }
.d-head { display: flex; align-items: center; gap: 12px; }
.d-head h2 { margin: 0; font-size: 17px; }
.d-head p { margin: 2px 0 0; }
.d-head .av { width: 36px; height: 36px; }
.a-val { align-items: flex-end; }
.a-val label { display: grid; gap: 7px; }
.a-val .grow { flex: 1; min-width: 0; }
.a-val .a-tf { flex: 0 0 40%; }
.a-btns { align-items: center; }
.form select { appearance: auto; }
.btn.icon.sm { width: 32px; }

/* ============================================================ search modal */
dialog.sdlg { width: min(640px, calc(100% - 24px)); margin: 10vh auto auto; padding: 0; border-radius: 20px; }
.s-in { display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 18px; border-bottom: 1px solid var(--line); color: var(--dim); }
.s-in input { flex: 1; min-width: 0; height: 52px; background: none; border: 0; outline: none; color: var(--text); font: 16px var(--sans); }
.s-in input::placeholder { color: var(--dim); }
.s-in input::-webkit-search-cancel-button { display: none; }
.s-esc { font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 8px; background: none; cursor: pointer; }
.s-res { max-height: min(60vh, 520px); overflow: auto; padding: 6px; }
.s-group { font-size: 12px; color: var(--dim); padding: 10px 12px 4px; }
.s-opt { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; cursor: pointer; }
.s-opt[aria-selected="true"] { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line2); }
.s-opt .av { width: 32px; height: 32px; }
.so-id { display: grid; min-width: 0; }
.so-id > span { display: flex; align-items: center; gap: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-id b { font-weight: 600; }
.so-px { display: grid; justify-items: end; font-size: 13px; }
.so-px .up, .so-px .down, .so-px .flat { font-size: 12px; }
.so-liq { min-width: 76px; text-align: right; }
.s-empty { display: grid; gap: 4px; padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.s-empty b { color: var(--text); font-weight: 500; }
.s-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.s-foot kbd { margin-right: 3px; }

/* ============================================================ pair page */
.pp { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
.pp-l, .pp-r { display: grid; gap: 12px; min-width: 0; }
.pp-chart { overflow: hidden; }
.ch-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 50px; }
.ch-bar .seg button { font-family: var(--mono); font-size: 12px; padding: 5px 10px; }
.ch-mode button { font-family: var(--sans) !important; }
.ch-box { position: relative; }
#chart { height: clamp(360px, 58vh, 640px); }
.ch-legend { position: absolute; top: 8px; left: 10px; z-index: 3; pointer-events: none; font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: rgba(12, 18, 32, .78); color: var(--muted); display: flex; flex-wrap: wrap; gap: 3px 6px; max-width: calc(100% - 90px); }
.ch-legend b { color: var(--text); font-weight: 500; font-family: var(--sans); }
.lg-k { color: var(--dim); margin: 0 3px 0 2px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.pp-chart:fullscreen { border-radius: 0; display: flex; flex-direction: column; background: var(--card); }
.pp-chart:fullscreen .ch-box { flex: 1; }
.pp-chart:fullscreen #chart { height: calc(100vh - 52px); }
.pp-chart.fs-fallback { position: fixed; inset: 0; z-index: 80; border-radius: 0; display: flex; flex-direction: column; }
.pp-chart.fs-fallback .ch-box { flex: 1; }
.pp-chart.fs-fallback #chart { height: calc(100dvh - 52px); }

.pp-tabs { overflow: hidden; }
.pp-tabs .tabs button { padding: 13px 12px 11px; font-size: 13.5px; }
.tab-n { font: 500 11px var(--mono); color: var(--muted); background: var(--card2); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.tx-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tx-bar .seg button { padding: 5px 12px; }
.min-size { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; font-size: 12.5px; color: var(--dim); }
.min-size:focus-within { border-color: rgba(92, 242, 200, .6); }
.min-size input { width: 64px; background: none; border: 0; outline: none; color: var(--text); font: 13px var(--mono); }
.live-dot { display: inline-flex; align-items: center; gap: 6px; }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 154, .15); }
.tx-wrap { max-height: 560px; overflow: auto; scrollbar-width: thin; }
.trades { font-size: 12.5px; }
.trades th, .trades td { padding: 7px 12px; }
.trades thead th { position: sticky; top: 0; z-index: 1; background: var(--card); box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; }
.trades th:first-child, .trades td:first-child { padding-left: 16px; }
.trades td a { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.trades td a:hover { color: var(--mint); text-decoration: none; }
.trades .c-rank { width: 40px; }
.side { font-weight: 500; }
.trades tbody tr > :first-child { box-shadow: inset 2px 0 0 transparent; }
.trades tr.is-buy > :first-child { box-shadow: inset 2px 0 0 rgba(74, 222, 154, .5); }
.trades tr.is-sell > :first-child { box-shadow: inset 2px 0 0 rgba(255, 122, 140, .5); }
.maker { display: inline-flex; align-items: center; gap: 2px; }
.mk-maker { background: none; border: 0; color: var(--text); padding: 3px 6px; margin-left: -6px; border-radius: 999px; cursor: pointer; font-size: 12.5px; }
.mk-maker:hover { color: var(--mint); background: var(--mint-soft); }
.sub2 { display: block; font-size: 11px; color: var(--dim); margin-top: 1px; }
.traders td { padding-top: 6px; padding-bottom: 6px; }
.h-addr { display: inline-flex; align-items: center; gap: 4px; }
.tag { display: inline-flex; align-items: center; font: 500 11px var(--sans); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); margin-left: 4px; white-space: nowrap; }
.t-pool { color: var(--mint); border-color: rgba(92, 242, 200, .3); }
.t-burn { color: #ff9a5c; border-color: rgba(255, 154, 92, .35); }
.t-owner { color: var(--amber); border-color: rgba(255, 196, 107, .35); }
.c-share { width: 180px; }
.share { display: flex; align-items: center; gap: 10px; }
.share-bar { flex: 0 0 90px; height: 6px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.share-bar span { display: block; height: 100%; background: var(--mint); border-radius: 999px; min-width: 2px; }
.sk-line { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sk-line .sk { height: 16px; }
.liq { padding: 16px; display: grid; gap: 16px; }
.liq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.liq-grid .stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.liq-grid .stat .v { font-size: 18px; }
.liq-grid .stat .v small { font: 500 12px var(--sans); color: var(--muted); }
.lb-h { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.liq-burn p, .liq > p { margin: 8px 0 0; }

/* right column */
.pp-head { overflow: hidden; }
.ph-banner { height: 96px; background: var(--card2); }
.ph-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-top { display: flex; align-items: center; gap: 12px; padding: 14px 14px 8px 16px; }
.ph-name { min-width: 0; }
.ph-name h1 { font-size: 20px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-name h1 .dim { font-weight: 400; font-size: 16px; }
.ph-name p { margin: 1px 0 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-act { margin-left: auto; display: flex; gap: 6px; flex: none; }
.btn-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); color: var(--muted); cursor: pointer; transition: color .15s ease, border-color .15s ease, transform .16s var(--ease-out); }
.btn-ic:hover { color: var(--text); border-color: rgba(200, 215, 245, .38); }
.btn-ic:active { transform: scale(.94); }
.btn-ic.on { color: var(--mint); border-color: rgba(92, 242, 200, .4); }
.ph-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.ph-badges .badge { font-size: 11.5px; padding: 2px 9px; }
.ph-badges .badge svg { width: 12px; height: 12px; }
.ph-addrs { display: grid; gap: 2px; padding: 8px 16px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.ph-addrs > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.addr { display: inline-flex; align-items: center; gap: 2px; }
.addr a { color: var(--text); }
.addr a:hover { color: var(--mint); }
.copy { min-width: 30px; min-height: 30px; display: inline-grid; place-items: center; }

.px-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; }
.px-k { font-size: 12.5px; color: var(--dim); }
.px-big { font-size: 26px; font-weight: 500; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; padding: 0 3px; margin-left: -3px; }
.px-big small { font: 500 13px var(--sans); color: var(--muted); letter-spacing: 0; }
.px-big sub { font-size: .5em; vertical-align: -.15em; }
.px-ch { font-size: 14px; padding-bottom: 4px; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-grid > div { background: var(--card); padding: 10px 16px; min-width: 0; }
.stat-grid dt { font-size: 12px; color: var(--dim); }
.stat-grid dd { margin: 2px 0 0; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat-grid dd small { font: 500 11px var(--sans); color: var(--dim); }
.tf-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 10px 12px 0; }
.tf-tabs button { display: grid; gap: 1px; justify-items: center; padding: 7px 4px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; font: 12px var(--sans); color: var(--muted); }
.tf-tabs button:hover { background: rgba(255, 255, 255, .03); }
.tf-tabs button[aria-selected="true"] { background: var(--card2); border-color: var(--line2); }
.tf-tabs b { font-size: 13px; font-weight: 500; }
.tf-body { padding: 12px 16px 14px; }
.tf-line { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; }
.tf-line > div { display: grid; min-width: 0; }
.tf-line > div:not(:first-child) { text-align: right; }
.tf-line span { font-size: 12px; }
.tf-line b { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ratio { display: flex; gap: 2px; height: 5px; border-radius: 999px; overflow: hidden; margin: 7px 0 12px; background: var(--bg2); }
.ratio span { display: block; height: 100%; }
.r-buy { background: var(--ok); }
.r-sell { background: var(--red); }
.tf-note { margin: 0; line-height: 1.45; }

.pp-trade { padding: 14px; }
.two-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sell-btn { color: var(--red); border-color: rgba(255, 122, 140, .4); background: rgba(255, 122, 140, .06); }
.sell-btn:hover { background: rgba(255, 122, 140, .12); border-color: rgba(255, 122, 140, .6); }
.trade-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.trade-more .btn { padding: 0 8px; }
.trade-note { margin: 10px 2px 0; }

.desc { margin: 0 0 12px; color: var(--text); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.desc.muted { color: var(--muted); }
.link-row { gap: 6px; margin-top: 10px; }
.link-row .btn svg { color: var(--muted); }
.dom-ok { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13.5px; color: var(--muted); }
.dom-ok svg { color: var(--mint); }
.la-warn { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 12px; border: 1px solid rgba(255, 122, 140, .45); background: rgba(255, 122, 140, .08); border-radius: var(--r); }
.la-warn .la-ic { color: var(--red); padding-top: 2px; }
.la-warn b { font-weight: 600; }
.la-warn p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.sf-sum { display: flex; align-items: center; gap: 14px; padding-bottom: 6px; font-size: 14px; }
.sf-score { flex: none; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; font-size: 13px; color: var(--muted); border: 2px solid var(--line2); }
.sf-score b { font-size: 19px; color: var(--text); font-weight: 500; line-height: 1; }
.sf-score.all { border-color: rgba(92, 242, 200, .55); }
.sf-score.most { border-color: rgba(255, 196, 107, .5); }
.sf-score.few { border-color: rgba(255, 122, 140, .55); }
.checks { list-style: none; margin: 0; padding: 2px 16px 8px; }
.checks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.checks .ci { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.checks li.ok .ci { color: var(--mint); background: var(--mint-soft); }
.checks li.no .ci { color: var(--amber); background: rgba(255, 196, 107, .1); }
.checks b { font-weight: 500; font-size: 14px; }
.checks p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.rules { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.rules h3 { font-size: 14px; }
.rules .chips { gap: 6px; }
.rules .chip { font-size: 12px; padding: 3px 10px; }
.rules .chip.warn { border-color: rgba(255, 196, 107, .4); }
.rules .chip.warn b { color: var(--amber); }
.owner-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; }

.mk-kv { grid-template-columns: 112px minmax(0, 1fr); font-size: 13.5px; }
.mk-kv > div { padding: 9px 16px; }
.mk-kv .k { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-kv .v { word-break: normal; text-align: right; }
.op-list { list-style: none; margin: 0; padding: 4px 0; }
.op-list li { display: flex; align-items: center; gap: 12px; padding: 9px 16px; font-size: 13.5px; }
.op-list li a { margin-right: auto; color: var(--text); }
.op-none { margin: 0; }

/* ============================================================ gainers and losers */
.mv-bar { margin-bottom: 12px; }
.movers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.mv-list { list-style: none; margin: 0; padding: 0; }
.mv-row { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto 82px 36px; gap: 10px; align-items: center; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); }
.mv-row:last-child { border-bottom: 0; }
.mv-row .av { width: 30px; height: 30px; }
.mv-n { font-size: 12px; }
.mv-id { display: grid; min-width: 0; color: var(--text); }
.mv-id:hover { text-decoration: none; }
.mv-id:hover b { color: var(--mint); }
.mv-id b { font-weight: 600; font-size: 14px; }
.mv-id .dim { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-px { display: grid; justify-items: end; font-size: 13px; }
.mv-px .small { font-size: 11.5px; font-family: var(--sans); }
.mv-ch { text-align: right; font-size: 14px; }
.mv-up .card-h h2 { color: var(--ok); }
.mv-down .card-h h2 { color: var(--red); }
.movers .mv-row .sk { width: 100%; grid-column: 1 / -1; }

/* ============================================================ multicharts */
.mc-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mc-grid.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mc-cell { overflow: hidden; display: flex; flex-direction: column; }
.mc-h { flex-wrap: wrap; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); min-height: 46px; }
.mc-name { display: inline-flex; align-items: center; gap: 6px; color: var(--text); white-space: nowrap; min-width: 0; }
.mc-name .av { width: 22px; height: 22px; font-size: 9px; }
.mc-name b { font-weight: 600; font-size: 13.5px; }
.mc-name .dim { font-size: 12px; }
.mcx-px { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; gap: 6px; align-items: baseline; }
.mc-int select { appearance: none; -webkit-appearance: none; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 999px; padding: 4px 10px; font: 12px var(--mono); cursor: pointer; }
.mc-chart { position: relative; }
.mc-c { height: 300px; }
.mc-grid.n2 .mc-c { height: clamp(360px, 62vh, 620px); }
.mc-grid.n6 .mc-c { height: 260px; }
.mc-empty { min-height: 347px; display: grid; }
.mc-grid.n2 .mc-empty { min-height: clamp(407px, calc(62vh + 47px), 667px); }
.mc-grid.n6 .mc-empty { min-height: 307px; }
.mc-add { margin: 10px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line2); border-radius: 12px; background: none; color: var(--muted); font: 14px var(--sans); cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.mc-add:hover { border-color: rgba(92, 242, 200, .5); color: var(--text); }
.mc-add svg { width: 22px; height: 22px; }

/* ============================================================ alerts */
.al-note { margin-bottom: 12px; }
.al-note b { color: var(--text); font-weight: 500; }
.al-perm { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 14px; color: var(--muted); }
.al-perm .btn { margin-left: auto; flex: none; }
.al-perm-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg2); color: var(--dim); flex: none; }
.al-perm-i.on { color: var(--mint); background: var(--mint-soft); }
.al-tbl td { padding-top: 9px; padding-bottom: 9px; }
.al-act { display: flex; justify-content: flex-end; gap: 6px; }

/* ============================================================ launchpad: curve chip, progress bars */
.cv-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 5px; padding: 0 7px; border-radius: 999px; font: 500 10.5px/1.7 var(--sans); color: var(--mint); background: var(--mint-soft); border: 1px solid rgba(92, 242, 200, .28); white-space: nowrap; }
.cv-chip b { font-weight: 500; font-size: 10.5px; }
.cv-bar { display: block; position: relative; height: 5px; border-radius: 999px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cv-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgba(92, 242, 200, .55), var(--mint)); min-width: 3px; }
.cv-bar.lg { height: 10px; }
.cv-bar.done > span { background: var(--ok); }
.cv-cell { display: inline-grid; grid-template-columns: 46px auto; align-items: center; gap: 7px; font-size: 12px; }
.mc-meta .mc-cv { width: 64px; }
.th-tf { color: var(--dim); font-family: var(--mono); font-size: 10.5px; }

/* curve panel + graduated banner on the pair page */
.cv-panel { display: grid; gap: 10px; }
.cv-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.cv-head b { font-size: 18px; font-weight: 500; }
.cv-sold { margin: 0; }
.cv-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 4px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cv-kv > div { background: var(--card); padding: 9px 12px; min-width: 0; }
.cv-kv dt { font-size: 12px; color: var(--dim); }
.cv-kv dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cv-kv dd small { font: 500 11px var(--sans); color: var(--dim); }
.cv-kv .addr a { font-size: 13px; }
.cv-rule { margin: 2px 0 0; line-height: 1.5; }
.trade-more.two { grid-template-columns: 1fr 1fr; }
.grad-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; border: 1px solid rgba(92, 242, 200, .35); background: var(--mint-soft); border-radius: var(--r); }
.grad-banner .gb-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: rgba(92, 242, 200, .14); color: var(--mint); }
.grad-banner b { font-weight: 600; }
.grad-banner p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.grad-banner .btn { margin-left: auto; flex: none; }

/* launchpad screen */
.lp-cta { display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 16px; background: linear-gradient(120deg, rgba(92, 242, 200, .07), transparent 60%), var(--card); }
.lp-cta-ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--mint-soft); color: var(--mint); }
.lp-cta-ic svg { width: 24px; height: 24px; }
.lp-cta-t { flex: 1; min-width: 0; }
.lp-cta h2 { font-size: 17px; margin: 0 0 4px; }
.lp-cta p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.lp-cta .btn { flex: none; }
.lp-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.lp-tabs::-webkit-scrollbar { display: none; }
.lp-tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid transparent; color: var(--muted); font-size: 14px; white-space: nowrap; transition: color .15s ease, background-color .15s ease; }
.lp-tabs a:hover { text-decoration: none; color: var(--text); background: rgba(255, 255, 255, .03); }
.lp-tabs a[aria-current="page"] { color: var(--text); background: var(--card2); border-color: var(--line2); }
.lp-tabs .sub { white-space: nowrap; padding-left: 10px; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.lp-card { position: relative; display: grid; gap: 12px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
@media (hover: hover) { .lp-card:not(.sk-lp):hover { border-color: var(--line2); background: var(--hover); } }
.lp-card:focus-within { border-color: rgba(92, 242, 200, .45); }
.lp-top { display: flex; gap: 12px; align-items: flex-start; }
.lp-id { flex: 1; min-width: 0; display: grid; gap: 1px; }
.lp-id h3 { margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.lp-link { color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-link:hover { text-decoration: none; color: var(--mint); }
.lp-link:focus-visible { outline: none; }
.lp-sym { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.lp-sym b { font-weight: 500; }
.lp-gb { font-size: 11px; padding: 0 8px; margin-left: 4px; }
.lp-by { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.lp-by a { color: var(--muted); position: relative; z-index: 1; }
.lp-by a:hover { color: var(--mint); }
.lp-star { position: relative; z-index: 1; margin: -4px -6px 0 0; width: 40px; height: 40px; }
.lp-desc { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; overflow-wrap: anywhere; }
.lp-desc.loading { display: grid; gap: 6px; align-content: start; }
.lp-desc .sk { height: 11px; }
.lp-mc { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.lp-mc b { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lp-mc b small { font: 500 11.5px var(--sans); color: var(--dim); }
.lp-mc .small { margin-left: auto; }
.lp-prog { display: grid; gap: 6px; }
.lp-prog .cv-bar { height: 8px; }
.lp-pl { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lp-pl b { font-weight: 500; }
.lp-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.lp-foot .mono { color: var(--text); }
.lp-foot > span:last-child { margin-left: auto; }
.lp-pool { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 2px; color: var(--mint); font-weight: 500; }
.lp-pool svg { width: 14px; height: 14px; }
.lp-card.grad { border-color: rgba(74, 222, 154, .22); }
.sk-lp { cursor: default; }
#lpBox > .sk-lp { display: none; }
#lpBox:has(> .sk-lp) { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
#lpBox:has(> .sk-lp) > .sk-lp { display: grid; }
.lp-more { border-top: 0; justify-content: center; padding: 16px 0 0; }
.o-curve { scroll-margin-top: 72px; }
@media (max-width: 1060px) { .o-curve { order: 3; } .grad-banner { flex-wrap: wrap; } }
@media (max-width: 760px) {
  .lp-cta { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .lp-cta-ic { display: none; }
  .lp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .lp-tabs a { justify-content: center; border-color: var(--line); }
  .lp-tabs .tb-sp { display: none; }
  .lp-cta .btn { width: 100%; }
  .lp-grid, #lpBox:has(> .sk-lp) { grid-template-columns: minmax(0, 1fr); }
  .lp-tabs .sub { display: none; }
  .grad-banner { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
  .grad-banner .btn { grid-column: 1 / -1; margin-left: 0; justify-content: center; height: 40px; }
}

/* ============================================================ responsive */
@media (max-width: 1240px) {
  .pp { grid-template-columns: minmax(0, 1fr) 330px; }
  .mc-grid.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1060px) {
  /* one column: header, chart, trade buttons, stats, activity tabs, then details */
  .pp { grid-template-columns: minmax(0, 1fr); }
  .pp-l, .pp-r { display: contents; }
  .o-head { order: 1; } .o-chart { order: 2; } .o-trade { order: 3; } .o-stats { order: 4; } .o-tabs { order: 5; } .o-rest { order: 6; }
}
@media (max-width: 900px) {
  .mk-app { grid-template-columns: minmax(0, 1fr); }
  .mk-side { position: fixed; top: 0; left: 0; bottom: 0; height: 100%; width: min(300px, 86vw); z-index: 60; background: var(--bg2); border-right: 1px solid var(--line2);
    transform: translateX(-102%); visibility: hidden; transition: transform .24s var(--ease-out), visibility 0s .24s; padding-top: calc(14px + env(safe-area-inset-top)); }
  body.side-open .mk-side { transform: none; visibility: visible; transition: transform .24s var(--ease-out); }
  body.side-mini .mk-side { padding: 14px 12px 12px; }
  body.side-mini .side-txt { display: revert; }
  body.side-mini .side-search, body.side-mini .side-nav a { justify-content: flex-start; padding: 0 12px; }
  .side-close { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line2); background: none; color: var(--muted); cursor: pointer; flex: none; }
  .side-search { height: 42px; }
  .side-nav a { min-height: 44px; font-size: 15px; }
  .side-foot { display: none; }
  .mk-content { padding: 0 14px 48px; }
  .mk-mbar { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
  .mk-mbar .btn { height: 40px; }
  .m-search { margin-left: auto; }
  .mk-strip { margin: 0 -14px; padding: 0 14px; min-height: 40px; border-top: 1px solid var(--line); }
  .st-tot { gap: 14px; }
}
@media (max-width: 760px) {
  .mk-head { margin-bottom: 10px; }
  .mk-head h1 { font-size: 21px; }
  .mk-head p { font-size: 13.5px; }
  .mk-head-actions { width: 100%; }
  .mk-toolbar { padding: 10px; gap: 6px; }
  .mk-toolbar .tf-seg { order: -1; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .mk-toolbar .tf-seg button { padding: 8px 0; }
  .rank-sel, .mk-toolbar .btn.sm { height: 38px; }
  .mk-toolbar .sub { width: 100%; order: 9; }
  .mk-toolbar .tb-sp { display: none; }
  .mk-tbl { display: none; }
  .mk-cards { display: block; }
  .st-i:nth-child(4) { display: none; }
  .ticker { padding-left: 14px; }
  .movers { grid-template-columns: minmax(0, 1fr); }
  .mv-row { grid-template-columns: 18px 30px minmax(0, 1fr) auto 70px 36px; gap: 8px; padding-left: 12px; }
  .mc-grid, .mc-grid.n6 { grid-template-columns: minmax(0, 1fr); }
  .mcx-px { order: 9; flex-basis: 100%; padding: 0 0 4px; }
  .al-tbl thead { display: none; }
  .al-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .al-tbl tbody tr:last-child { border-bottom: 0; }
  .al-tbl td { border: 0 !important; padding: 0 !important; white-space: normal; box-shadow: none !important; }
  .al-tbl td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .al-tbl td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; font-size: 13.5px; color: var(--muted); }
  .al-tbl td:nth-child(3) { grid-column: 2; grid-row: 1; align-self: center; }
  .al-tbl td:nth-child(4) { grid-column: 1; grid-row: 3; align-self: center; }
  .al-tbl td:nth-child(5) { grid-column: 2; grid-row: 3; }
  .mc-c, .mc-grid.n2 .mc-c, .mc-grid.n6 .mc-c { height: 280px; }
  .mc-empty, .mc-grid.n2 .mc-empty, .mc-grid.n6 .mc-empty { min-height: 160px; }
  #chart { height: 340px; }
  .ch-bar { gap: 6px; padding: 8px; }
  .ch-int { order: 1; width: 100%; display: grid; grid-template-columns: repeat(6, 1fr); }
  .ch-int button { padding: 7px 0 !important; }
  .ch-unit { display: none; }
  .lg-o { display: none; }
  .pp-tabs .tabs { padding: 0 6px; }
  .pp-tabs .tabs button { padding: 12px 8px 10px; font-size: 13px; }
  .mk-kv { grid-template-columns: 120px minmax(0, 1fr); }
  .mk-kv .k { border-bottom: 1px solid var(--line) !important; padding-bottom: 9px; font-size: 13px; color: var(--muted); }
  .mk-kv .v { padding-top: 9px; }
  .mk-kv > div:nth-last-child(-n+2) { border-bottom: 0 !important; }
  .ch-legend { font-size: 10.5px; max-width: calc(100% - 70px); }
  .tx-bar { padding: 10px 12px; }
  .tx-bar .live-dot, .tx-bar > .small.dim { display: none; }
  .trades th, .trades td { padding: 8px 10px; }
  .trades th:first-child, .trades td:first-child { padding-left: 12px; }
  .trades .c-tx { display: none; }
  .liq-grid { grid-template-columns: minmax(0, 1fr); }
  .al-perm { flex-wrap: wrap; }
  .al-perm .btn { margin-left: 48px; }
  .s-opt { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .so-liq { display: none; }
  .s-foot { display: none; }
  dialog.sdlg { margin-top: 12px; }
  .la-badge { display: none; }
  .mc-meta .la-badge, .mk-card .la-badge { display: inline-flex; }
}
@media (max-width: 420px) {
  .trade-more .btn { font-size: 12.5px; gap: 5px; }
  .trade-more .btn svg { display: none; }
  .ph-name h1 { font-size: 18px; }
}
.o-tabs, .o-chart { scroll-margin-top: 72px; }

/* .qor names next to wallets (makers, holders, creators) */
.qn { font-family: var(--sans); font-weight: 500; color: var(--text); letter-spacing: 0; }
.qn .qn-tld { color: var(--muted); font-weight: 400; }
a .qn, .mk-maker .qn { color: inherit; }
a:has(> .qn-who .qn) { color: var(--text); }
@media (hover: hover) { a:hover .qn, .mk-maker:hover .qn { color: var(--mint); } }

/* ============================================================ NFTs (nft.js) */
.nf-q { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--dim); min-width: 0; }
.nf-q:focus-within { border-color: rgba(92, 242, 200, .6); }
.nf-q input { background: none; border: 0; outline: none; color: var(--text); font: 13px var(--sans); width: 190px; min-width: 0; }
.nf-q input::placeholder { color: var(--dim); }
.nf-tbl tbody tr { cursor: pointer; }
.nf-tbl th, .nf-tbl td { padding-top: 10px; padding-bottom: 10px; white-space: nowrap; }
.nf-tbl tbody th { font-weight: 400; }
@media (hover: hover) { .nf-tbl tbody tr:hover > * { background: var(--hover); } }
.nf-mk { border-radius: 10px; }
.nf-mk.lg { border-radius: 14px; }
.nf-sk { display: grid; }
.nf-skr { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.nf-skr .sk { height: 12px; }
.nf-cards { display: none; }
.nf-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.nf-card:last-child { border-bottom: 0; }
.nf-card:hover { text-decoration: none; background: var(--hover); }
.nf-card-t { display: grid; gap: 3px; min-width: 0; }
.nf-card-t b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-card-t .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-card-t .badge { font-size: 11px; padding: 1px 8px; }
.nf-card-v { display: grid; justify-items: end; gap: 2px; text-align: right; }
.nf-card-v b { font-weight: 500; font-size: 14px; }
.nf-card-v small, .nf-tbl small, .nf-item-p small, .nc-stats small, .ni-price small, .nf-act small, .nf-ls small { color: var(--dim); font-family: var(--sans); font-size: 11px; }

/* art: image over a generated tile */
.nf-art { --h: 160; position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: linear-gradient(135deg, hsl(var(--h) 45% 22%), hsl(calc(var(--h) + 50) 40% 14%)); }
.nf-ph { position: absolute; inset: 0; display: grid; place-items: center; font: 500 15px var(--mono); color: hsl(var(--h) 70% 78%); background: linear-gradient(135deg, hsl(var(--h) 45% 22%), hsl(calc(var(--h) + 50) 40% 14%)); }
.nf-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; background: var(--card2); }
.nf-art.xs { width: 32px; height: 32px; flex: none; border-radius: 8px; }
.nf-art.xs .nf-ph { font-size: 9px; }
.nf-art.big { border-radius: 14px; }
.nf-art.big .nf-ph { font-size: 32px; }

/* collection header */
.nc-head { padding: 18px; display: grid; gap: 14px; margin-bottom: 14px; }
.nc-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nc-top .av.lg { width: 56px; height: 56px; font-size: 17px; }
.nc-name { min-width: 0; flex: 1; }
.nc-name h1 { font-size: 22px; display: flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.nc-name p { margin: 4px 0 0; color: var(--muted); }
.nc-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nc-desc { margin: 0; color: var(--muted); max-width: 80ch; white-space: pre-line; overflow-wrap: anywhere; }
.nc-badges { padding: 0; }
.nc-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.nc-stats > div { display: grid; gap: 4px; padding: 11px 14px; border-right: 1px solid var(--line); min-width: 0; }
.nc-stats > div:last-child { border-right: 0; }
.nc-stats span { font-size: 12.5px; color: var(--dim); }
.nc-stats b { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-mint { margin: -4px 0 0; }
.nc-tabs .tx-bar { gap: 10px; }
.nc-tabs .btn.on { border-color: rgba(92, 242, 200, .45); background: var(--mint-soft); color: var(--text); }
.nc-tabs .btn.on svg { width: 13px; height: 13px; color: var(--mint); }
.nf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; padding: 14px; }
.nf-item { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg2); color: var(--text); transition: border-color .15s ease, transform .2s var(--ease-out); }
.nf-item .nf-art { border-radius: 0; }
.nf-item:hover { text-decoration: none; border-color: var(--line2); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .nf-item:hover { transform: translateY(-2px); } }
.nf-item-t { display: grid; gap: 4px; padding: 10px 12px 12px; min-width: 0; }
.nf-item-t b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-item-p .mono { font-size: 13px; }
.nf-row { display: inline-flex !important; align-items: center; gap: 8px !important; color: var(--text) !important; max-width: 220px; }
.nf-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev { display: inline-flex; font-size: 12px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.ev-sale { color: var(--ok); border-color: rgba(74, 222, 154, .3); }
.ev-mint { color: var(--mint); border-color: rgba(92, 242, 200, .3); }
.ev-burn { color: var(--red); border-color: rgba(255, 122, 140, .3); }
.nf-act td, .nf-ls td { white-space: nowrap; }

/* item page */
.ni { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.ni-l, .ni-side { display: grid; gap: 14px; min-width: 0; }
.ni-media { padding: 12px; }
.ni-head { padding: 18px; display: grid; gap: 12px; }
.ni-col { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; justify-self: start; }
.ni-col .av { width: 24px; height: 24px; font-size: 9px; border-radius: 7px; }
.ni-head h1 { font-size: 26px; overflow-wrap: anywhere; }
.ni-own { margin: 0; }
.ni-buy { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.ni-buy > div { display: grid; gap: 2px; min-width: 0; }
.ni-price { font: 500 26px/1.2 var(--mono); letter-spacing: -.03em; }
.ni-price.dim { font: 500 18px/1.4 var(--sans); letter-spacing: 0; }
.ni-desc { margin: 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.ni-links { gap: 8px; }
.ni-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 14px; }
.ni-attr { display: grid; gap: 2px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); min-width: 0; }
.ni-attr span { font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-attr b { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.ni-side .mk-kv .v { word-break: normal; }

@media (max-width: 1060px) {
  .nc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nc-stats > div:nth-child(3n) { border-right: 0; }
  .nc-stats > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) { .ni { grid-template-columns: minmax(0, 1fr); } .ni-l { display: contents; } .ni-media { order: 1; } .ni-side { order: 2; } .ni-attrc { order: 3; } }
@media (max-width: 760px) {
  .nf-tblw { display: none; }
  .nf-cards { display: block; }
  .nf-sort { order: -1; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .nf-sort button { padding: 8px 0; }
  .nf-q { width: 100%; height: 38px; }
  .nf-q input { width: 100%; font-size: 16px; }
  .nc-head { padding: 14px; }
  .nc-name h1 { font-size: 19px; }
  .nc-act { width: 100%; }
  .nc-act .btn.primary { flex: 1; }
  .nc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nc-stats > div { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .nc-stats > div:nth-child(odd) { border-right: 1px solid var(--line) !important; }
  .nc-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
  .nf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
  .nf-act .c-tx { display: none; }
  .ni-head h1 { font-size: 21px; }
  .ni-buy .btn { width: 100%; }
  .ni-price { font-size: 22px; }
}

/* ============================================================ Qorlith Social on Markets: pair page card, trade links, trending strip */
.card-h h2 .ic, .card-h h2 svg, .sx-h h2 svg { vertical-align: -3px; margin-right: 4px; color: var(--mint); }
.pp-social .card-b { display: grid; gap: 12px; padding: 14px 18px 16px; }
.soc-sk { display: block; height: 56px; }
.soc-m { margin: 0; color: var(--muted); font-size: 13.5px; }
.soc-m b { color: var(--text); }
.soc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.soc-list a { display: grid; gap: 2px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; color: var(--text); }
.soc-list a:hover { background: rgba(255, 255, 255, .035); text-decoration: none; }
.soc-who { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.soc-who b { font-weight: 600; }
.soc-t { font-size: 13.5px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.soc-acts .btn { flex: 1 1 auto; justify-content: center; }
.maker .tx-soc { color: var(--dim); display: inline-grid; place-items: center; }
.maker .tx-soc:hover { color: var(--mint); }
.soc-trend { margin-bottom: 14px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.sx-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sx-h h2 { font-size: 15px; font-weight: 500; }
.sx-h .sub { color: var(--dim); font-size: 13px; }
.sx-h .sx-all { margin-left: auto; color: var(--mint); }
.sx-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.sx-row::-webkit-scrollbar { display: none; }
.sx-i { flex: none; display: flex; align-items: center; gap: 9px; min-width: 150px; padding: 8px 12px 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); scroll-snap-align: start; transition: border-color .15s ease; }
.sx-i:hover { border-color: var(--line2); text-decoration: none; }
.sx-n { color: var(--dim); font-size: 11.5px; }
.sx-t { display: grid; line-height: 1.25; }
.sx-t b { font-weight: 600; font-size: 13.5px; }
.sx-t .dim { font-size: 12px; }
.sx-c { font-size: 12.5px; font-variant-numeric: tabular-nums; margin-left: 4px; }

/* ------------------------------------------------------------------ volume check (wash trading) */
.vq { display: grid; gap: 10px; }
.vq-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.vq-bar span { display: block; height: 100%; }
.vq-org { background: var(--mint); }
.vq-rt { background: var(--amber); }
.vq-leg { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); }
.vq-leg span { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.vq-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.vq-dot.org { background: var(--mint); } .vq-dot.rt { background: var(--amber); }
.vq-ex { margin: 0; color: var(--text); }
.vq-note { margin: 0; }
.vq-badge { font-size: 11px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
.vq-cell .vq-badge { display: flex; width: max-content; margin: 3px 0 0 auto; font-family: var(--sans); }
.mc-meta .vq-badge { margin-left: 6px; }
