:root {
  --bg: #070a08;
  --bg-deep: #030504;
  --panel: #101411;
  --panel-2: #151a16;
  --panel-3: #1a201b;
  --line: #262d27;
  --line-strong: #343d35;
  --text: #f2f6f3;
  --muted: #909a92;
  --muted-2: #687169;
  --green: #c5ff00;
  --green-soft: #9ee63b;
  --green-dim: rgba(197, 255, 0, .12);
  --red: #ff5d6c;
  --red-dim: rgba(255, 93, 108, .12);
  --amber: #f3bd4f;
  --cyan: #47c9ff;
  --purple: #ad8cff;
  --shadow: 0 18px 48px rgba(0, 0, 0, .36);
  --radius: 14px;
  --radius-sm: 9px;
  --top: 64px;
  --ticker: 36px;
  --dock: 38px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--green); color: #081000; }
* { scrollbar-width: thin; scrollbar-color: #394139 transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-thumb { background: #394139; border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

.app-shell { min-height: 100vh; background:
  radial-gradient(circle at 50% -240px, rgba(197,255,0,.07), transparent 420px),
  var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top);
  display: flex; align-items: center; gap: 22px; padding: 0 18px;
  border-bottom: 1px solid var(--line); background: rgba(7,10,8,.94);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: max-content; }
.brand-mark { width: 31px; height: 31px; border-radius: 8px; object-fit: cover; }
.brand-name { font-weight: 850; letter-spacing: -.03em; font-size: 18px; }
.brand-chain { font-size: 9px; font-weight: 750; color: var(--green); border: 1px solid rgba(197,255,0,.28); background: var(--green-dim); border-radius: 5px; padding: 3px 5px; letter-spacing: .08em; }
.beta-badge { display: inline-flex; align-items: center; min-height: 19px; padding: 2px 7px; border: 1px solid rgba(243,189,79,.42); border-radius: 999px; background: rgba(243,189,79,.10); color: var(--amber); font-size: 8px; font-weight: 850; letter-spacing: .09em; line-height: 1; white-space: nowrap; }
.main-nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; }
.nav-link { position: relative; display: flex; align-items: center; padding: 0 12px; color: #cbd2cc; font-weight: 650; font-size: 13px; transition: color .16s, background .16s; border-radius: 8px; margin: 10px 0; }
.nav-link:hover { color: #fff; background: var(--panel-2); }
.nav-link.active { color: var(--green); }
.nav-link.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 2px; background: var(--green); box-shadow: 0 0 12px rgba(197,255,0,.65); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.icon-button, .utility-button, .chain-pill, .wallet-button, .ghost-button, .primary-button, .danger-button, .chip, .quick-buy, .source-button, .pagination-button {
  border: 1px solid var(--line); background: var(--panel); border-radius: 10px; cursor: pointer; transition: .16s ease;
}
.icon-button:hover, .utility-button:hover, .chain-pill:hover, .ghost-button:hover, .chip:hover, .source-button:hover, .pagination-button:hover { background: var(--panel-3); border-color: var(--line-strong); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; font-size: 18px; }
.utility-button { height: 36px; padding: 0 12px; color: #d9dfda; font-size: 12px; font-weight: 700; }
.x-button { height: 36px; min-width: 42px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: #f4f7f5; font-size: 12px; font-weight: 800; transition: .16s ease; }
.x-button svg { width: 15px; height: 15px; flex: 0 0 auto; fill: currentColor; }
.x-button:hover { background: #f4f7f5; border-color: #f4f7f5; color: #050706; transform: translateY(-1px); }
.x-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.global-search { width: clamp(180px, 20vw, 330px); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; color: var(--muted); }
.global-search:focus-within { border-color: rgba(197,255,0,.5); box-shadow: 0 0 0 3px rgba(197,255,0,.08); }
.global-search input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
kbd { border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; color: var(--muted); background: #0b0e0c; font-size: 10px; }
.chain-pill { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--muted); font-size: 11px; }
.chain-pill strong { color: #e5eae6; font-weight: 700; }
.status-dot, .pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 9px currentColor; }
.status-dot.online, .pulse-dot { background: var(--green); color: var(--green); }
.status-dot.offline { background: var(--red); color: var(--red); }
.wallet-button { height: 38px; padding: 0 14px; background: var(--green); color: #061000; border-color: var(--green); font-weight: 850; }
.wallet-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.wallet-button.connected { background: var(--panel-2); color: var(--green); border-color: rgba(197,255,0,.3); }

.ticker-bar { position: sticky; top: var(--top); z-index: 35; height: var(--ticker); display: grid; grid-template-columns: auto 1fr auto; align-items: center; border-bottom: 1px solid var(--line); background: #0b0e0c; overflow: hidden; }
.ticker-label { height: 100%; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-right: 1px solid var(--line); color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.ticker-track { display: flex; align-items: center; gap: 25px; padding: 0 14px; white-space: nowrap; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
.ticker-item { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; cursor: pointer; }
.ticker-item b { color: #f1f5f2; }
.ticker-item small { color: var(--muted); }
.ticker-item .up { color: var(--green-soft); }
.ticker-refresh { width: 38px; height: 100%; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.ticker-refresh:hover { color: var(--green); background: var(--panel); }
.ticker-refresh.loading { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.main-content { min-height: calc(100vh - var(--top) - var(--ticker) - var(--dock)); padding: 18px 18px 56px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.page-heading { display: flex; align-items: center; gap: 12px; }
.page-icon { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid rgba(197,255,0,.22); background: var(--green-dim); color: var(--green); border-radius: 11px; font-size: 18px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 22px; letter-spacing: -.025em; }
h2 { font-size: 16px; letter-spacing: -.015em; }
h3 { font-size: 14px; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.ghost-button, .primary-button, .danger-button { min-height: 36px; padding: 0 13px; font-size: 12px; font-weight: 750; }
.primary-button { background: var(--green); color: #071000; border-color: var(--green); }
.primary-button:hover { filter: brightness(1.08); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.danger-button { background: var(--red-dim); color: var(--red); border-color: rgba(255,93,108,.25); }

.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(130px,1fr)); gap: 10px; margin-bottom: 14px; }
.stat-card { min-height: 84px; padding: 13px; border: 1px solid var(--line); background: linear-gradient(145deg, var(--panel-2), var(--panel)); border-radius: var(--radius); }
.stat-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { margin-top: 9px; font-size: 20px; font-weight: 820; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-foot { margin-top: 4px; color: var(--muted-2); font-size: 10px; }

.control-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; }
.segmented button { height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.segmented button.active { background: var(--panel-3); color: var(--green); box-shadow: inset 0 0 0 1px rgba(197,255,0,.16); }
.control-search, .control-select, .control-input { height: 36px; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 10px; padding: 0 11px; outline: 0; font-size: 12px; }
.control-search { min-width: 220px; }
.control-search:focus, .control-select:focus, .control-input:focus { border-color: rgba(197,255,0,.45); }
.control-spacer { flex: 1; }
.chip { height: 32px; padding: 0 10px; color: var(--muted); font-size: 11px; }
.chip.active { color: var(--green); border-color: rgba(197,255,0,.3); background: var(--green-dim); }

.trenches-grid { display: grid; grid-template-columns: repeat(3, minmax(290px,1fr)); gap: 12px; height: calc(100vh - 262px); min-height: 480px; }
.trench-column { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(15,19,16,.8); border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 25px rgba(0,0,0,.12); }
.column-head { min-height: 57px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.column-title { min-width: 86px; }
.column-title b { font-size: 15px; }
.column-title small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.column-search { flex: 1; min-width: 80px; height: 31px; border: 1px solid var(--line); background: #0d100e; color: var(--text); border-radius: 9px; padding: 0 9px; outline: none; font-size: 11px; }
.column-count { min-width: 25px; text-align: center; color: var(--green); font-weight: 800; font-size: 11px; }
.column-body { flex: 1; overflow: auto; }
.token-row { position: relative; display: grid; grid-template-columns: 66px minmax(0,1fr) auto; gap: 10px; min-height: 119px; padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .14s; }
.token-row:hover { background: #161b17; }
.token-avatar { position: relative; width: 66px; height: 66px; overflow: hidden; border-radius: 11px; border: 1px solid var(--line-strong); background: #0b0e0c; }
.token-avatar img { width: 100%; height: 100%; object-fit: cover; }
.token-avatar .fallback { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, rgba(197,255,0,.28), transparent 44%), #101810; color: var(--green); font-size: 24px; font-weight: 900; }
.source-badge { position: absolute; right: -3px; bottom: -4px; padding: 2px 4px; border-radius: 5px; border: 1px solid #445045; background: #090c0a; color: var(--green); font-size: 7px; font-weight: 900; }
.token-main { min-width: 0; }
.token-name-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.token-symbol { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 850; }
.token-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.token-meta-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.token-age { color: var(--green-soft); font-weight: 800; }
.token-contract { color: var(--cyan); }
.token-contract:hover { text-decoration: underline; }
.token-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.mini-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 21px; padding: 0 7px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(9,12,10,.55); font-size: 9px; }
.mini-pill.good { color: var(--green-soft); border-color: rgba(158,230,59,.18); }
.mini-pill.warn { color: var(--amber); border-color: rgba(243,189,79,.19); }
.mini-pill.bad { color: var(--red); border-color: rgba(255,93,108,.18); }
.token-side { min-width: 88px; text-align: right; }
.metric-pair { font-size: 9px; color: var(--muted-2); line-height: 1.6; }
.metric-pair b { color: #e9eeea; font-size: 11px; font-variant-numeric: tabular-nums; }
.metric-pair b.green { color: var(--green-soft); }
.quick-buy { margin-top: 13px; width: 88px; height: 28px; border-color: rgba(197,255,0,.5); background: var(--green); color: #061000; font-size: 11px; font-weight: 900; }
.quick-buy:hover { filter: brightness(1.07); transform: translateY(-1px); }
.progress-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #1e251f; }
.progress-line span { display: block; height: 100%; background: var(--green); box-shadow: 0 0 8px rgba(197,255,0,.5); }
.empty-state { padding: 50px 24px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { display: block; margin-bottom: 10px; color: var(--muted-2); font-size: 28px; }
.loading-list { padding: 12px; }
.skeleton { height: 104px; margin-bottom: 8px; border-radius: 10px; background: linear-gradient(100deg,#111512 20%,#1c221d 38%,#111512 58%); background-size: 200% 100%; animation: shimmer 1.35s linear infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }

.card-grid { display: grid; grid-template-columns: repeat(4, minmax(230px,1fr)); gap: 12px; }
.market-card, .content-card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.market-card { padding: 14px; cursor: pointer; transition: .17s; }
.market-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.market-card-head { display: flex; align-items: center; gap: 10px; }
.market-card .token-avatar { width: 46px; height: 46px; }
.market-card-title { min-width: 0; flex: 1; }
.market-card-title b, .market-card-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-card-title span { color: var(--muted); font-size: 10px; }
.market-card-value { margin-top: 16px; font-size: 21px; font-weight: 850; letter-spacing: -.03em; }
.market-card-row { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 10px; }
.market-card-row b { color: var(--text); }
.sparkline { width: 100%; height: 42px; margin-top: 10px; }
.sparkline path { fill: none; stroke: var(--green); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.two-column-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(310px,.7fr); gap: 13px; }
.content-card { padding: 15px; }
.content-card + .content-card { margin-top: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { padding: 9px 10px; color: var(--muted); font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.data-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #151a16; }
.table-token { display: flex; align-items: center; gap: 8px; }
.table-token .token-avatar { width: 30px; height: 30px; border-radius: 8px; }
.positive { color: var(--green-soft) !important; }
.negative { color: var(--red) !important; }
.muted { color: var(--muted); }
.monospace { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .94em; }

.wallet-empty { padding: 50px 20px; text-align: center; }
.wallet-empty img { width: 82px; height: 82px; border-radius: 18px; opacity: .9; }
.wallet-empty h2 { margin: 16px 0 7px; font-size: 19px; }
.wallet-empty p { max-width: 480px; margin: 0 auto 18px; color: var(--muted); line-height: 1.6; }
.form-row { display: grid; gap: 6px; margin-bottom: 12px; }
.form-row label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.form-row input, .form-row select, .form-row textarea { width: 100%; min-height: 39px; border: 1px solid var(--line); background: #0c100d; color: var(--text); border-radius: 9px; padding: 9px 10px; outline: none; }
.form-row textarea { min-height: 85px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: rgba(197,255,0,.45); }
.settings-list { display: grid; gap: 9px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 59px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { display: block; margin-bottom: 3px; font-size: 12px; }
.setting-row small { color: var(--muted); }
.toggle { position: relative; width: 38px; height: 22px; border: 0; border-radius: 20px; background: #323933; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .18s; }
.toggle.on { background: var(--green); }
.toggle.on::after { left: 19px; background: #071000; }

.alert-card, .track-card { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 12px; border: 1px solid var(--line); background: #111512; border-radius: 11px; }
.alert-card + .alert-card, .track-card + .track-card { margin-top: 8px; }
.alert-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--green-dim); color: var(--green); }
.alert-info { min-width: 0; flex: 1; }
.alert-info b { display: block; margin-bottom: 4px; }
.alert-info small { color: var(--muted); }

.reward-hero { position: relative; overflow: hidden; min-height: 245px; display: grid; grid-template-columns: 1.2fr .8fr; border: 1px solid var(--line); background: linear-gradient(125deg, #131a13, #0d110e); border-radius: 18px; }
.reward-hero::after { content: ""; position: absolute; width: 390px; height: 390px; right: -80px; top: -170px; border-radius: 50%; background: rgba(197,255,0,.1); filter: blur(8px); }
.reward-copy { position: relative; z-index: 1; padding: 35px; }
.reward-copy .eyebrow { color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.reward-copy h1 { margin: 10px 0; max-width: 600px; font-size: 35px; }
.reward-copy p { max-width: 600px; color: var(--muted); line-height: 1.7; }
.reward-visual { position: relative; z-index: 1; display: grid; place-items: center; }
.reward-visual img { width: min(220px,70%); border-radius: 35px; filter: drop-shadow(0 25px 45px rgba(0,0,0,.45)); }
.referral-box { display: flex; gap: 8px; margin-top: 18px; }
.referral-box input { flex: 1; min-width: 0; height: 39px; padding: 0 11px; border: 1px solid var(--line); background: #080b09; color: var(--text); border-radius: 10px; }

.bottom-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; min-height: var(--dock); display: grid; grid-template-columns: 150px 1fr auto; align-items: center; border-top: 1px solid var(--line); background: rgba(8,11,9,.96); backdrop-filter: blur(14px); font-size: 10px; }
.dock-status { display: flex; align-items: center; gap: 7px; height: 100%; padding: 0 12px; color: var(--green-soft); border-right: 1px solid var(--line); }
.status-bars { color: var(--green); }
.dock-nav { display: flex; align-items: center; gap: 3px; height: 100%; padding: 0 7px; overflow-x: auto; }
.dock-link { display: flex; align-items: center; gap: 5px; height: 27px; padding: 0 8px; border-radius: 7px; color: var(--muted); white-space: nowrap; }
.dock-link:hover, .dock-link.active { color: var(--text); background: var(--panel-2); }
.dock-market { display: flex; gap: 16px; padding: 0 13px; color: var(--muted); }
.dock-market b { color: var(--text); }

.mobile-menu { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(320px,88vw); padding: 15px; background: #090c0a; border-right: 1px solid var(--line); transform: translateX(-103%); transition: transform .22s ease; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mobile-nav { display: grid; gap: 5px; padding-top: 14px; }
.mobile-nav .nav-link { min-height: 45px; margin: 0; }
.mobile-nav .nav-link.active::after { display: none; }
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.66); backdrop-filter: blur(3px); }
.mobile-only { display: none; }

.token-dialog, .trade-dialog, .legal-dialog { width: min(960px, calc(100vw - 28px)); max-height: min(850px, calc(100vh - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 18px; background: #0c100d; color: var(--text); box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.trade-dialog { width: min(510px, calc(100vw - 28px)); }
.legal-dialog { width: min(760px, calc(100vw - 28px)); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: rgba(12,16,13,.96); }
.dialog-head h2 { margin: 0; }
.dialog-close { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; color: var(--muted); cursor: pointer; }
.dialog-body { padding: 16px; }
.token-hero { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: center; }
.token-hero .token-avatar { width: 78px; height: 78px; }
.token-hero h2 { margin: 0 0 5px; font-size: 21px; }
.token-hero p { color: var(--muted); margin-bottom: 7px; }
.token-hero-actions { display: flex; align-items: center; gap: 7px; }
.detail-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 15px 0; }
.detail-box { min-height: 68px; padding: 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; }
.detail-box small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.detail-box b { display: block; margin-top: 7px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.risk-panel { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }
.risk-item { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #101411; }
.risk-item strong { display: block; margin-bottom: 4px; font-size: 11px; }
.risk-item span { color: var(--muted); font-size: 10px; }
.trade-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); background: #080b09; border-radius: 10px; }
.trade-tabs button { flex: 1; height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.trade-tabs button.active.buy { background: var(--green); color: #071000; font-weight: 850; }
.trade-tabs button.active.sell { background: var(--red); color: #fff; font-weight: 850; }
.amount-box { margin-top: 14px; padding: 13px; border: 1px solid var(--line); background: #080b09; border-radius: 12px; }
.amount-box-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.amount-input-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.amount-input-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 24px; font-weight: 760; }
.amount-input-row b { font-size: 13px; }
.preset-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-top: 9px; }
.preset-row button { height: 28px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 10px; }
.quote-box { display: grid; gap: 7px; margin: 13px 0; padding: 11px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; }
.quote-row { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.quote-row b { color: var(--text); }
.trade-warning { padding: 10px; border: 1px solid rgba(243,189,79,.22); background: rgba(243,189,79,.07); color: #d7c493; border-radius: 9px; font-size: 10px; line-height: 1.5; }
.full-width { width: 100%; }

.toast-region { position: fixed; z-index: 100; right: 14px; bottom: 54px; display: grid; gap: 8px; width: min(350px,calc(100vw - 28px)); }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line-strong); background: #111612; border-radius: 11px; box-shadow: var(--shadow); animation: toast-in .2s ease; }
.toast.success { border-color: rgba(197,255,0,.28); }
.toast.error { border-color: rgba(255,93,108,.28); }
.toast strong { display: block; margin-bottom: 3px; font-size: 11px; }
.toast span { color: var(--muted); font-size: 10px; line-height: 1.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.noscript { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; padding: 30px; background: var(--bg); color: var(--text); text-align: center; }

.legal-copy { color: #c5ccc6; line-height: 1.7; font-size: 12px; }
.legal-copy h2, .legal-copy h3 { color: #fff; margin-top: 20px; }
.legal-copy a { color: var(--green); }
.legal-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 10px; }
.legal-links button { border: 0; background: transparent; color: inherit; padding: 0; cursor: pointer; }
.legal-links button:hover { color: var(--green); }

@media (max-width: 1260px) {
  .main-nav { display: none; }
  .mobile-only { display: grid; }
  .stats-grid { grid-template-columns: repeat(3,1fr); }
  .card-grid { grid-template-columns: repeat(3,1fr); }
  .trenches-grid { grid-template-columns: repeat(3, minmax(270px,1fr)); overflow-x: auto; }
  .trench-column { min-width: 300px; }
}
@media (max-width: 930px) {
  .hide-small { display: none; }
  .trenches-grid { height: auto; grid-template-columns: 1fr; overflow: visible; }
  .trench-column { min-width: 0; max-height: 640px; }
  .card-grid { grid-template-columns: repeat(2,1fr); }
  .two-column-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .reward-hero { grid-template-columns: 1fr; }
  .reward-visual { display: none; }
  .bottom-dock { grid-template-columns: auto 1fr; }
  .dock-market { display: none; }
}
@media (max-width: 650px) {
  :root { --top: 56px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .brand-name { font-size: 16px; }
  .brand-chain, .hide-narrow { display: none; }
  .beta-badge { padding: 2px 5px; font-size: 7px; }
  .x-button { min-width: 36px; width: 36px; padding: 0; }
  .hide-x-label { display: none; }
  .brand-mark { width: 29px; height: 29px; }
  .wallet-button { padding: 0 10px; font-size: 11px; }
  .main-content { padding: 13px 10px 58px; }
  .page-header { align-items: center; }
  .page-actions .ghost-button { display: none; }
  .control-search { min-width: 0; width: 100%; }
  .control-spacer { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .stat-card { min-height: 74px; padding: 10px; }
  .stat-value { font-size: 17px; }
  .card-grid { grid-template-columns: 1fr; }
  .token-row { grid-template-columns: 56px minmax(0,1fr) auto; padding: 10px; min-height: 108px; }
  .token-avatar { width: 56px; height: 56px; }
  .token-side { min-width: 74px; }
  .quick-buy { width: 74px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .risk-panel { grid-template-columns: 1fr; }
  .token-hero { grid-template-columns: auto 1fr; }
  .token-hero-actions { grid-column: 1 / -1; }
  .bottom-dock { grid-template-columns: 78px 1fr; }
  .dock-status { padding: 0 8px; }
  .dock-status span:last-child { display: none; }
  .reward-copy { padding: 24px 18px; }
  .reward-copy h1 { font-size: 27px; }
}

/* NEXEM 1.1 workspace, token page, filters, and encrypted wallet vault */
.page-tabs { display:flex; gap:24px; align-items:center; min-height:48px; margin:-4px 0 16px; border-bottom:1px solid var(--line); }
.page-tabs a { height:48px; display:flex; align-items:center; color:var(--muted); font-size:17px; font-weight:650; }
.page-tabs a.active { color:var(--text); }
.center-button { display:grid; place-items:center; }
.wallet-empty-actions { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.wallet-summary-card { display:grid; gap:5px; padding:13px; margin-bottom:12px; border:1px solid var(--line); background:#0b0f0c; border-radius:11px; }
.wallet-summary-card span { color:#dfe6e0; font-size:11px; overflow-wrap:anywhere; }
.wallet-summary-card small { color:var(--muted); }

.column-filter-button { position:relative; min-width:31px; height:31px; border:1px solid var(--line); background:#0d100e; color:var(--muted); border-radius:8px; cursor:pointer; }
.column-filter-button:hover { color:var(--green); border-color:rgba(197,255,0,.35); }
.filter-count { position:absolute; top:-5px; right:-5px; display:grid; place-items:center; min-width:15px; height:15px; padding:0 3px; border-radius:9px; background:var(--green); color:#071000; font-size:8px; font-weight:900; }
.filter-dialog { width:min(620px,calc(100vw - 24px)); height:min(900px,calc(100vh - 24px)); padding:0; border:1px solid var(--line-strong); border-radius:15px; background:#17171c; color:var(--text); box-shadow:0 32px 100px rgba(0,0,0,.72); }
.filter-dialog-head { background:#17171c; }
.filter-stage-tabs { display:flex; height:54px; padding:0 20px; gap:8px; border-bottom:1px solid #303038; }
.filter-stage-tabs button { min-width:74px; border:0; border-bottom:2px solid transparent; background:transparent; color:#9c9ca6; font-weight:750; cursor:pointer; }
.filter-stage-tabs button.active { color:#64f69a; border-color:#64f69a; }
.filter-keyword-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; padding:19px 20px; border-bottom:1px solid #303038; }
.filter-keyword-grid label { display:grid; gap:8px; color:#f4f4f6; font-weight:720; font-size:12px; }
.filter-keyword-grid input { width:100%; height:40px; padding:0 13px; border:1px solid #34343d; border-radius:20px; background:#0f0f13; color:#e8e8eb; outline:0; }
.filter-keyword-grid input:focus { border-color:#6941ff; box-shadow:0 0 0 3px rgba(105,65,255,.12); }
.filter-section-tabs { display:flex; align-items:center; gap:3px; padding:18px 20px 8px; overflow-x:auto; }
.filter-section-tabs button { height:34px; padding:0 14px; border:0; border-radius:18px; background:transparent; color:#9c9ca6; font-weight:700; cursor:pointer; white-space:nowrap; }
.filter-section-tabs button.active { color:white; background:#45454f; }
.filter-section-body { min-height:480px; padding:12px 20px 90px; }
.filter-range-row { display:grid; grid-template-columns:minmax(130px,1fr) minmax(280px,1.4fr); gap:16px; align-items:center; min-height:55px; border-bottom:1px solid rgba(255,255,255,.035); }
.filter-range-row > label { font-weight:650; color:#e4e4e8; }
.filter-range-inputs { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.filter-range-inputs > div { height:36px; display:flex; align-items:center; border:1px solid #35353e; border-radius:18px; background:#101014; overflow:hidden; }
.filter-range-inputs input { min-width:0; width:100%; height:100%; padding:0 12px; border:0; outline:0; background:transparent; color:white; }
.filter-range-inputs span { padding-right:12px; color:#eee; font-weight:700; font-size:11px; }
.filter-check-grid { display:grid; gap:10px; }
.filter-check { display:grid; grid-template-columns:auto 1fr; column-gap:10px; padding:13px; border:1px solid #303038; border-radius:11px; background:#131318; cursor:pointer; }
.filter-check input { grid-row:1 / span 2; align-self:center; accent-color:var(--green); }
.filter-check span { color:#f2f2f4; font-weight:700; }
.filter-check small { color:#888893; }
.filter-footer { position:sticky; bottom:0; display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:68px; padding:10px 15px; border-top:1px solid #303038; background:#17171c; }
.filter-footer > div { display:flex; gap:8px; }
.saved-filter-list { display:grid; gap:8px; align-content:start; min-height:600px; }
.saved-filter-list > button { display:flex; justify-content:space-between; align-items:center; padding:14px; border:1px solid #303038; border-radius:10px; background:#111116; color:white; cursor:pointer; text-align:left; }
.saved-filter-list small { color:#90909a; }

.wallet-dialog { width:min(520px,calc(100vw - 24px)); max-height:calc(100vh - 24px); padding:0; border:1px solid var(--line-strong); border-radius:16px; background:#0e1210; color:var(--text); box-shadow:0 32px 100px rgba(0,0,0,.7); }
.wallets-toolbar { display:flex; justify-content:space-between; align-items:center; gap:15px; min-height:58px; margin-bottom:12px; }
.wallets-toolbar h1 { margin:0 0 4px; }
.wallet-network-select { display:flex; align-items:center; gap:8px; height:44px; padding:0 14px; border:1px solid var(--line); border-radius:22px; background:var(--panel-2); }
.wallet-network-select select { border:0; outline:0; background:transparent; color:var(--text); font-weight:700; }
.wallets-layout { display:grid; grid-template-columns:minmax(620px,1fr) minmax(350px,.9fr); min-height:620px; border-top:1px solid var(--line); }
.wallets-trading-panel { padding-right:0; border-right:1px solid var(--line); }
.withdrawal-panel { min-width:0; }
.wallets-section-head { display:flex; align-items:center; justify-content:space-between; min-height:104px; gap:15px; padding:18px 20px; border-bottom:1px solid var(--line); }
.wallets-section-head h2 { margin:0 0 12px; font-size:15px; }
.count-badge { display:inline-grid; place-items:center; min-width:26px; height:26px; padding:0 7px; margin-left:7px; border-radius:5px; background:#272a2c; color:#adb4ae; font-size:12px; }
.edit-order { color:#d4dad5; font-size:11px; }
.edit-order input { margin-right:6px; accent-color:var(--green); }
.wallet-create-actions { display:flex; align-items:center; gap:9px; }
.round-action { width:46px; height:46px; border:0; border-radius:50%; background:#70f6a0; color:#07120b; font-size:18px; cursor:pointer; }
.pill-button { min-height:46px; padding:0 20px; border-radius:24px; font-size:13px; }
.managed-wallet-row { display:grid; grid-template-columns:minmax(260px,1fr) 115px auto; align-items:center; gap:18px; min-height:98px; padding:15px 20px; border-bottom:1px solid var(--line); transition:background .15s; }
.managed-wallet-row:hover, .managed-wallet-row.active { background:#0e1410; }
.managed-wallet-row.active { box-shadow:inset 3px 0 0 var(--green); }
.managed-wallet-main { display:flex; align-items:center; gap:12px; min-width:0; }
.managed-wallet-main > div:last-child { display:grid; gap:5px; min-width:0; }
.managed-wallet-main b { font-size:13px; }
.managed-wallet-main span { color:#9db1ff; font-size:11px; }
.managed-wallet-main small { color:var(--muted-2); font-size:9px; }
.wallet-identicon { width:39px; height:39px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; background:linear-gradient(145deg,#2c4b35,#102417); color:#7cff9f; font-weight:900; }
.wallet-identicon.browser { background:linear-gradient(145deg,#33445c,#172435); color:#8fc2ff; }
.wallet-assets { display:grid; gap:6px; text-align:right; }
.wallet-assets span { color:var(--muted); font-size:9px; }
.wallet-assets b { font-size:11px; font-variant-numeric:tabular-nums; }
.wallet-row-actions { display:flex; gap:8px; align-items:center; }
.browser-connect-row { width:calc(100% - 40px); display:flex; align-items:center; gap:12px; min-height:74px; margin:12px 20px; padding:12px 15px; border:1px dashed var(--line-strong); border-radius:11px; background:#0b0f0c; color:var(--text); cursor:pointer; text-align:left; }
.browser-connect-row > span { color:var(--green); font-size:22px; }
.browser-connect-row div { display:grid; gap:4px; }
.browser-connect-row small { color:var(--muted); }
.wallet-list-empty { padding:35px 20px; color:var(--muted); text-align:center; }
.wallet-list-empty b { color:var(--text); }
.archived-wallets-row { width:100%; min-height:66px; display:flex; align-items:center; gap:12px; padding:0 20px; border:0; border-bottom:1px solid var(--line); background:transparent; color:#dce1dd; cursor:pointer; text-align:left; }
.archived-wallets-row span:first-child { font-weight:700; }
.archived-wallets-row span:last-child { margin-left:auto; }
.withdrawal-wallet-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:76px; padding:12px 20px; border-bottom:1px solid var(--line); }
.withdrawal-wallet-row > div { display:grid; gap:5px; }
.withdrawal-wallet-row span { color:#9db1ff; font-size:11px; }
.withdrawal-empty { min-height:470px; display:grid; place-items:center; color:#a4aabb; font-size:12px; }
.secret-input { min-height:120px; resize:vertical; padding:10px; border:1px solid var(--line); border-radius:10px; background:#090c0a; color:var(--text); line-height:1.5; }
.wallet-modal-warning { margin:12px 0; padding:11px; border:1px solid rgba(243,189,79,.25); border-radius:9px; background:rgba(243,189,79,.07); color:#dccb9f; font-size:10px; line-height:1.55; }
.wallet-modal-warning.danger { border-color:rgba(255,93,108,.3); background:rgba(255,93,108,.08); color:#ffc0c6; }
.recovery-phrase, .private-key-box { padding:14px; margin:12px 0; border:1px solid var(--line-strong); border-radius:10px; background:#070a08; color:#eaf0eb; font-size:13px; line-height:1.75; overflow-wrap:anywhere; user-select:all; }
.copy-address-box { display:flex; align-items:center; gap:8px; padding:8px 10px; margin:12px 0; border:1px solid var(--line); border-radius:9px; background:#080b09; }
.copy-address-box span { flex:1; min-width:0; overflow-wrap:anywhere; font-size:10px; }
.copy-address-box button { border:0; background:transparent; color:var(--green); cursor:pointer; font-weight:750; }
.deposit-panel { text-align:center; }
.deposit-symbol { width:72px; height:72px; display:grid; place-items:center; margin:0 auto 12px; border-radius:50%; background:var(--green-dim); color:var(--green); font-size:30px; }
.wallet-action-list { display:grid; gap:7px; }
.wallet-action-list button { min-height:45px; padding:0 13px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--text); cursor:pointer; text-align:left; }

.account-drawer { position:fixed; top:0; right:0; bottom:0; z-index:82; width:min(390px,92vw); padding:12px; border-left:1px solid var(--line); background:#18181d; transform:translateX(105%); transition:transform .22s ease; box-shadow:-20px 0 60px rgba(0,0,0,.45); }
.account-drawer.open { transform:translateX(0); }
.account-scrim { z-index:80; }
.account-card { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:11px; padding:13px; margin-bottom:12px; border:1px solid #303039; border-radius:9px; background:#1e1e24; }
.account-avatar { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:#175b33; color:#6af79a; font-size:19px; }
.account-card > div:nth-child(2) { display:grid; gap:4px; }
.account-card span { color:#a8a8b2; font-size:10px; }
.account-card a { color:#6af79a; }
.account-menu { display:grid; margin-bottom:12px; border:1px solid #303039; border-radius:9px; overflow:hidden; }
.account-menu a, .account-menu button { min-height:52px; display:grid; grid-template-columns:27px 1fr; align-items:center; gap:7px; padding:0 14px; border:0; border-bottom:1px solid #303039; background:#1d1d23; color:#b9b9c1; cursor:pointer; text-align:left; }
.account-menu > :last-child { border-bottom:0; }
.account-menu a:hover, .account-menu button:hover { color:#6af79a; background:#222229; }

.token-trade-page { margin:-18px -18px -56px; min-height:calc(100vh - var(--top) - var(--ticker)); background:#0d0c11; }
.token-overview-strip { min-height:74px; display:grid; grid-template-columns:minmax(330px,1fr) auto minmax(300px,.65fr); align-items:center; border-bottom:1px solid #29282f; background:#111015; }
.trade-token-identity { display:flex; align-items:center; gap:12px; min-width:0; padding:10px 20px; }
.trade-hero-avatar { width:46px; height:46px; border-radius:7px; }
.trade-hero-avatar img, .trade-hero-avatar .fallback { width:100%; height:100%; border-radius:7px; }
.trade-token-title { display:flex; align-items:baseline; gap:8px; }
.trade-token-title b { font-size:14px; }
.trade-token-title span { color:#9d9aa5; font-size:12px; }
.trade-token-links { display:flex; align-items:center; gap:8px; margin-top:6px; color:#9d9aa5; font-size:10px; }
.trade-token-links button { padding:0; border:0; background:transparent; color:#9d9aa5; cursor:pointer; }
.trade-token-links button:hover, .trade-token-links a:hover { color:#6af79a; }
.source-tag { font-size:8px; font-weight:850; }
.trade-metrics { display:flex; align-items:center; gap:28px; padding:0 20px; border-left:1px solid #29282f; }
.trade-metrics > div { display:grid; gap:4px; min-width:76px; }
.trade-metrics span, .trade-pnl-summary span { color:#aaa7b2; font-size:9px; }
.trade-metrics b { font-size:12px; }
.trade-pnl-summary { height:100%; display:grid; grid-template-columns:repeat(4,1fr); align-items:center; gap:10px; padding:0 18px; border-left:1px solid #29282f; }
.trade-pnl-summary span { display:grid; gap:5px; }
.trade-pnl-summary b { color:#e7e5eb; }
.trade-workspace { min-height:calc(100vh - var(--top) - var(--ticker) - 74px); }
.chart-and-table { min-width:0; padding-right:370px; }
.trade-side-panel { position:fixed; top:calc(var(--top) + var(--ticker) + 74px); right:0; bottom:var(--dock); width:370px; overflow-y:auto; border-left:1px solid #29282f; background:#121116; z-index:20; }
.chart-toolbar { min-height:48px; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:0 12px; border-bottom:1px solid #29282f; background:#111015; }
.chart-timeframes, .chart-tools { display:flex; align-items:center; gap:4px; }
.chart-timeframes button, .chart-tools button { min-height:32px; padding:0 10px; border:0; border-radius:6px; background:transparent; color:#aaa7b2; cursor:pointer; }
.chart-timeframes button.active, .chart-tools button:hover { color:#f1eff4; background:#1d1c23; }
.chart-tools b { color:#58ef7a; }
.chart-shell { position:relative; height:390px; border-bottom:1px solid #29282f; background:#0b0c10; }
.chart-heading { position:absolute; z-index:2; left:13px; top:10px; display:grid; gap:5px; pointer-events:none; }
.chart-heading b { font-size:13px; }
.chart-heading span { color:#86838e; font-size:9px; }
#priceChartCanvas { width:100%; height:100%; display:block; }
.chart-empty-note { position:absolute; inset:0; display:grid; place-items:center; color:#6e6b75; font-size:11px; pointer-events:none; }
.chart-footer { min-height:36px; display:flex; align-items:center; gap:16px; padding:0 14px; border-bottom:1px solid #29282f; color:#a7a4ae; font-size:10px; }
.chart-footer-spacer { flex:1; }
.green { color:#58ef7a !important; }
.red { color:#ff6472 !important; }
.token-data-tabs { height:47px; display:flex; align-items:stretch; gap:17px; padding:0 16px; border-bottom:1px solid #29282f; background:#111015; }
.token-data-tabs button { position:relative; border:0; background:transparent; color:#9c99a4; cursor:pointer; }
.token-data-tabs button.active { color:#58ef7a; }
.token-data-tabs button.active::after { content:""; position:absolute; left:0; right:0; bottom:0; height:2px; background:#58ef7a; }
.token-tab-content { min-height:280px; background:#0f0e13; }
.trade-data-table th, .trade-data-table td { padding:9px 12px; font-size:10px; }
.position-card { display:inline-flex; flex-direction:column; gap:5px; min-width:230px; margin-top:12px; padding:13px; border:1px solid #2e2d35; border-radius:10px; background:#15141a; }
.position-card span { color:#9996a1; }
.trade-ticket-card { padding:12px; border-bottom:1px solid #29282f; }
.trade-wallet-select { height:44px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 10px; margin-bottom:9px; border:1px solid #2d2c34; border-radius:8px; background:#18171d; }
.trade-wallet-select select { min-width:0; max-width:220px; border:0; outline:0; background:transparent; color:white; font-weight:750; }
.trade-wallet-select span { color:#d9d6df; font-size:10px; }
.trade-tabs.inline { display:grid; grid-template-columns:1fr 1fr 1.2fr; border-radius:6px; }
.trade-tabs.inline .order-type { border-left:1px solid #2d2c34; color:#e2dfe6; }
.inline-total { display:grid; gap:6px; margin-top:13px; }
.inline-total label { color:#9996a1; font-size:10px; }
.inline-total > div { height:48px; display:flex; align-items:center; gap:8px; padding:0 10px; border:1px solid #292830; border-radius:7px; background:#101015; }
.inline-total input { min-width:0; width:100%; border:0; outline:0; background:transparent; color:white; font-size:18px; }
.inline-total span { color:#a7a4ae; font-size:11px; }
.trade-presets { margin-top:9px; }
.trade-presets button { height:34px; font-size:11px; }
.trade-settings-line { display:flex; justify-content:space-between; margin:13px 0; color:#a7a4ae; font-size:10px; }
.trade-settings-line b { color:#e5e2e9; }
.quote-box.compact { margin:0 0 12px; }
.trade-submit { width:100%; height:52px; border:0; border-radius:26px; font-weight:900; cursor:pointer; }
.trade-submit.buy { background:#42ec72; color:#061009; }
.trade-submit.sell { background:#ff5d6c; color:white; }
.trade-change-grid { display:grid; grid-template-columns:repeat(4,1fr); border-bottom:1px solid #29282f; }
.trade-change-grid > div { min-height:52px; display:grid; place-items:center; gap:2px; padding:8px 2px; border-right:1px solid #29282f; }
.trade-change-grid > div:last-child { border-right:0; }
.trade-change-grid span { color:#a7a4ae; font-size:9px; }
.trade-change-grid b { font-size:10px; }
.security-panel { background:#15141a; }
.security-head { height:50px; display:flex; align-items:center; justify-content:space-between; padding:0 13px; border-bottom:1px solid #29282f; }
.security-head h3 { margin:0; font-size:12px; }
.security-head button { border:0; background:transparent; color:#aaa7b2; cursor:pointer; }
.security-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:12px; }
.security-grid > div { min-height:70px; display:grid; place-items:center; align-content:center; gap:7px; border:1px solid #2d2c34; border-radius:7px; background:#111015; }
.security-grid b { color:#58ef7a; font-size:13px; }
.security-grid span { color:#96939e; font-size:9px; }
.security-addresses { display:grid; gap:7px; padding:0 12px 12px; }
.security-addresses > div { min-height:36px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:7px; padding:0 9px; border:1px solid #2d2c34; border-radius:6px; background:#111015; }
.security-addresses span { color:#8e8b96; font-size:9px; }
.security-addresses b { min-width:0; overflow:hidden; text-overflow:ellipsis; font-size:9px; }
.security-addresses button, .security-addresses a { border:0; background:transparent; color:#aaa7b2; cursor:pointer; font-size:9px; }
.security-disclaimer { padding:0 12px 14px; color:#77747e; font-size:9px; line-height:1.5; }

@media (max-width: 1180px) {
  .wallets-layout { grid-template-columns:1fr; }
  .wallets-trading-panel { border-right:0; }
  .withdrawal-panel { border-top:1px solid var(--line); }
  .token-overview-strip { grid-template-columns:1fr auto; }
  .trade-pnl-summary { display:none; }
  .trade-metrics { border-left:0; }
}
@media (max-width: 900px) {
  .token-trade-page { margin:-13px -10px -58px; }
  .chart-and-table { padding-right:0; }
  .trade-side-panel { position:static; width:auto; border-left:0; border-top:1px solid #29282f; }
  .trade-workspace { display:flex; flex-direction:column; }
  .chart-and-table { order:1; }
  .trade-side-panel { order:0; }
  .chart-shell { height:330px; }
  .token-overview-strip { grid-template-columns:1fr; }
  .trade-metrics { overflow-x:auto; padding-bottom:10px; }
  .wallets-layout { min-height:0; }
  .managed-wallet-row { grid-template-columns:1fr; gap:12px; }
  .wallet-assets { text-align:left; }
  .wallet-row-actions { flex-wrap:wrap; }
}
@media (max-width: 650px) {
  .filter-keyword-grid { grid-template-columns:1fr; gap:12px; }
  .filter-range-row { grid-template-columns:1fr; gap:8px; padding:9px 0; }
  .filter-section-body { min-height:420px; }
  .filter-footer { align-items:flex-end; }
  .filter-footer > div { flex-wrap:wrap; }
  .wallets-toolbar { align-items:flex-start; flex-direction:column; }
  .wallet-network-select { width:100%; justify-content:center; }
  .wallets-section-head { align-items:flex-start; flex-direction:column; }
  .wallet-create-actions { width:100%; flex-wrap:wrap; }
  .pill-button { flex:1; }
  .trade-token-identity { padding:10px; }
  .trade-metrics { gap:18px; padding:0 10px 10px; }
  .chart-tools button:nth-child(2), .chart-tools button:nth-child(4) { display:none; }
  .token-data-tabs { overflow-x:auto; gap:13px; }
  .token-data-tabs button { white-space:nowrap; }
}

@media (max-width: 480px) {
  .chain-pill { display: none; }
  .brand { gap: 7px; }
  .beta-badge { max-width: 53px; text-align: center; line-height: 1.05; white-space: normal; }
}

/* NEXEM 1.3 clean launch cards and official token page */
.clean-token-row {
  grid-template-columns: 76px minmax(0, 1fr) 112px;
  gap: 12px;
  min-height: 132px;
  padding: 12px 13px;
  background: #111115;
  border-bottom-color: #28272e;
}
.clean-token-row:hover { background: #17171c; }
.clean-token-avatar { width: 76px; height: 76px; border-radius: 10px; border-color: #424047; }
.clean-token-avatar .source-badge { right: -2px; bottom: -3px; background: #0b0b0e; }
.clean-token-main { align-self: start; }
.token-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.clean-token-row .token-symbol { max-width: 55%; font-size: 15px; color: #f6f4f8; }
.clean-token-row .token-name { font-size: 12px; color: #85818b; }
.watch-star { flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: #8d8993; cursor: pointer; font-size: 15px; }
.watch-star:hover { color: var(--green); }
.clean-meta-line { min-height: 20px; gap: 7px; margin-top: 4px; color: #96929d; }
.clean-meta-line .token-age { font-size: 13px; color: #4cf27b; }
.token-social-links { display: inline-flex; align-items: center; gap: 5px; }
.token-social-links a { width: 18px; height: 18px; display: inline-grid; place-items: center; color: #aaa6b0; border-radius: 5px; transition: .14s; }
.token-social-links a:hover { color: #55efff; background: #24232a; }
.token-social-links svg { width: 13px; height: 13px; fill: currentColor; }
.social-empty { color: #59565f; }
.token-creator-line { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 3px; font-size: 10px; }
.token-creator-line a { color: #28b9e7; }
.compact-ca { min-width: 0; padding: 0; border: 0; background: transparent; color: #7d7983; font-family: var(--mono); cursor: pointer; }
.compact-ca:hover { color: #d8d5dc; }
.token-risk-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.risk-chip { min-height: 22px; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border: 1px solid #2d2c33; border-radius: 999px; background: #15151a; color: #97939e; font-size: 9px; white-space: nowrap; }
.risk-chip.good { color: #55ec77; border-color: rgba(85,236,119,.24); }
.risk-chip.warn { color: #f3bd4f; border-color: rgba(243,189,79,.24); }
.clean-token-side { min-width: 112px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; }
.clean-metrics { display: grid; gap: 3px; color: #88848e; font-size: 9px; font-variant-numeric: tabular-nums; }
.clean-metrics span { display: flex; justify-content: flex-end; gap: 6px; }
.clean-metrics b { color: #ddd9e1; font-size: 11px; }
.clean-metrics b.green { color: #45bdf2; }
.clean-quick-buy { width: 106px; height: 31px; margin-top: auto; border-radius: 18px; background: #6ff1a0; border-color: transparent; color: #07110b; }
.market-card-socials { margin-top: 5px; }
.clean-market-card .token-social-links a { width: 20px; height: 20px; }
.trade-socials { margin-left: 2px; }
.trade-socials a { width: 21px; height: 21px; border: 1px solid #2c2b32; }

.nexem-coin-hero { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(340px,.8fr); gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(circle at 20% 20%, rgba(197,255,0,.11), transparent 36%), linear-gradient(135deg,#111711,#0b0e0c); overflow: hidden; }
.nexem-coin-brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.nexem-coin-logo { flex: 0 0 auto; width: 112px; height: 112px; overflow: hidden; border: 1px solid rgba(197,255,0,.28); border-radius: 24px; background: #050705; box-shadow: 0 18px 48px rgba(0,0,0,.35); }
.nexem-coin-logo img, .nexem-coin-logo .fallback { width: 100%; height: 100%; object-fit: cover; }
.nexem-coin-brand .eyebrow { color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.nexem-coin-brand h1 { margin: 8px 0 6px; font-size: clamp(30px,4vw,52px); letter-spacing: -.04em; }
.nexem-coin-brand h1 small { color: var(--green); font-size: .42em; letter-spacing: .02em; }
.nexem-coin-brand p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.65; }
.coin-social-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.coin-social-button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #0c100d; color: #e8ece9; font-size: 11px; }
.coin-social-button:hover { border-color: rgba(197,255,0,.35); color: var(--green); }
.coin-social-button svg { width: 14px; height: 14px; fill: currentColor; }
.nexem-coin-actions { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.coin-ca-box, .coin-config-notice { display: grid; gap: 8px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(7,10,8,.74); }
.coin-ca-box span, .coin-config-notice span { color: var(--muted); font-size: 10px; }
.coin-ca-box code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f0f4f1; font-size: 11px; }
.coin-ca-box button { justify-self: start; height: 29px; padding: 0 10px; border: 1px solid rgba(197,255,0,.28); border-radius: 8px; background: var(--green-dim); color: var(--green); cursor: pointer; }
.coin-config-notice b { color: var(--amber); }
.coin-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.coin-action { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; }
button.coin-action:disabled { opacity: .45; cursor: not-allowed; }
.nexem-coin-stats { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-top: 12px; }
.dex-chart-card, .config-guide-card { margin-top: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); overflow: hidden; }
.dex-chart-card .card-head { padding: 13px 15px; }
.dex-chart-card .card-head h2 { margin: 0 0 4px; }
.dex-chart-card .card-head p { margin: 0; font-size: 10px; }
.config-live-dot { color: var(--green); font-size: 10px; }
.config-live-dot::before { content: ""; width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.dexscreener-frame { display: block; width: 100%; height: min(680px,68vh); min-height: 520px; border: 0; background: #09090c; }
.dex-chart-empty { min-height: 480px; display: grid; place-items: center; align-content: center; gap: 9px; padding: 30px; text-align: center; }
.dex-chart-empty img { width: 76px; height: 76px; border-radius: 18px; opacity: .88; }
.dex-chart-empty p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.6; }
.config-guide-card { display: grid; grid-template-columns: 1fr minmax(300px,.7fr); gap: 20px; align-items: center; padding: 18px; }
.config-guide-card h2 { margin: 0 0 6px; }
.config-guide-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.config-guide-card pre { margin: 0; padding: 13px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #080b09; color: #dfe6e0; font-size: 10px; }

@media (max-width: 1100px) {
  .nexem-coin-hero { grid-template-columns: 1fr; }
  .nexem-coin-stats { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 650px) {
  .clean-token-row { grid-template-columns: 62px minmax(0,1fr); min-height: 150px; padding: 10px; }
  .clean-token-avatar { width: 62px; height: 62px; }
  .clean-token-side { grid-column: 1 / -1; min-width: 0; width: 100%; flex-direction: row; align-items: center; }
  .clean-metrics { grid-template-columns: 1fr 1fr; gap: 12px; }
  .clean-quick-buy { width: 96px; }
  .token-risk-line { margin-left: -74px; padding-top: 4px; }
  .nexem-coin-hero { padding: 17px; }
  .nexem-coin-brand { align-items: flex-start; gap: 13px; }
  .nexem-coin-logo { width: 72px; height: 72px; border-radius: 16px; }
  .nexem-coin-brand h1 { font-size: 29px; }
  .coin-action-row { grid-template-columns: 1fr; }
  .nexem-coin-stats { grid-template-columns: 1fr 1fr; }
  .dexscreener-frame { min-height: 460px; height: 64vh; }
  .config-guide-card { grid-template-columns: 1fr; }
}

/* 1.3.1 market-cap candlestick chart */
.chart-shell { height: 430px; background: #0b0c10; }
.chart-heading { left: 14px; top: 9px; right: 82px; gap: 3px; }
.chart-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chart-title-line b { font-size: 13px; }
#chartOhlc { font-size: 10px; font-weight: 800; letter-spacing: .01em; }
#chartStatus { color: #7f7c87; font-size: 9px; }
#chartVolume { color: #35ef72; font-size: 10px; font-weight: 750; }
.chart-tools .chart-mode-active { color: #58ef7a; font-weight: 850; }
.chart-tools button[data-action="toggle-chart-mode"] { min-width: 103px; }
#priceChartCanvas { cursor: crosshair; }

@media (max-width: 650px) {
  .chart-shell { height: 350px; }
  .chart-heading { right: 62px; }
  #chartOhlc { display: block; width: 100%; font-size: 9px; }
}
