:root {
  --bg: #0c0e12;
  --panel: #141820;
  --elevated: #1a2030;
  --border: #242a36;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --subtle: #5c6578;
  --up: #3dd68c;
  --down: #f07178;
  --accent: #6eb0ff;
  --buy: var(--up);
  --sell: var(--down);
  --buy-dim: rgba(61, 214, 140, 0.14);
  --sell-dim: rgba(240, 113, 120, 0.14);
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  --micro: 0.625rem;
  --2xs: 0.6875rem;
  --radius: 2px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  letter-spacing: -0.011em;
  min-height: 100dvh;
}
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
h1, h2 { margin: 0; text-wrap: balance; }
::selection { background: var(--text); color: var(--bg); }

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  background: var(--bg);
}

.top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.top-left, .top-right {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  min-width: 0;
}
.brand {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  animation: brandMark 5.5s ease-in-out infinite;
}
@keyframes brandMark {
  0%, 100% { color: #e8ecf4; }
  40% { color: #8ec4ff; }
  70% { color: #6ed9a0; }
}
.meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.dot { color: var(--subtle); }
.live { display: inline-flex; align-items: center; gap: 4px; }
.live i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--subtle); display: inline-block;
}
.live.is-on i { background: var(--up); }

.subnav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 24, 32, 0.55);
}
.subnav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.chips {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
}
.chips.full { display: flex; width: 100%; }
.chips button {
  height: 32px;
  min-width: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius);
  padding: 0 10px;
  font-family: var(--mono);
  font-size: var(--2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 150ms var(--ease), background 150ms var(--ease);
}
.chips.full button { flex: 1; }
.chips button:hover { color: var(--text); }
.chips button[aria-checked="true"] {
  background: rgba(110, 176, 255, 0.14);
  color: var(--accent);
  border: 1px solid rgba(110, 176, 255, 0.35);
}

.icon-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: transparent; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--muted); }
.icon-btn.spin svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  border-radius: var(--radius);
}
.toggle:hover, .toggle[aria-expanded="true"] { border-color: var(--muted); }

.totals {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: var(--mono);
  font-size: var(--2xs);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.buy { color: var(--buy); }
.sell { color: var(--sell); }
.subtle { color: var(--subtle); }

.wallets-panel {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  background: var(--panel);
  max-height: 220px;
  overflow: auto;
}
.wallets-panel[hidden] { display: none !important; }
.wallet-form {
  display: grid;
  grid-template-columns: 2fr 1fr 0.7fr auto;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}
.add-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius);
}
.add-input:focus {
  outline: none;
  border-color: var(--accent);
}
.add-btn {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  border-radius: var(--radius);
}
.add-btn.apply {
  border-color: var(--accent);
  color: var(--accent);
}
.add-btn:hover { border-color: var(--muted); }
.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wallet-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.35rem 0.25rem;
  border-top: 1px solid var(--border);
}
.wallet-row .addr { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.wallet-row .score { color: var(--accent); }
.wallet-row button {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.wallet-row button:hover { color: var(--down); border-color: var(--down); }

.mobile-tabs {
  display: none;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  padding: 4px 12px;
  gap: 4px;
}
.mobile-tabs button {
  flex: 1; height: 44px; border: 0; background: transparent;
  color: var(--muted); font-family: var(--mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
}
.mobile-tabs button.on { color: var(--accent); }

.panes {
  display: grid;
  grid-template-columns: minmax(280px, 40%) 1fr;
  min-height: 0;
  flex: 1;
}
section.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
section.pane + section.pane { border-left: 1px solid var(--border); }
.pane-head {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  background: rgba(20, 24, 32, 0.35);
}
.pane-head.row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.pane-head.row.tight {
  padding: 0;
  border: 0;
  background: transparent;
}
.pane-head h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--subtle);
  font-weight: 500;
}
.pane-head h2 b {
  margin-left: 8px;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.scroll::-webkit-scrollbar-track {
  background: transparent;
}
.scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.scroll::-webkit-scrollbar-thumb:hover {
  background: var(--subtle);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.scroll::-webkit-scrollbar-corner {
  background: transparent;
}
.empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.vol {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: inherit;
  transition: background 150ms var(--ease);
}
.vol:first-child { border-top: 0; }
.vol:hover { background: rgba(110, 176, 255, 0.05); }
.vol.on {
  background: rgba(110, 176, 255, 0.1);
  border-color: rgba(110, 176, 255, 0.25);
}
.vol-top { display: flex; align-items: center; gap: 10px; }
.rank {
  width: 20px; flex-shrink: 0;
  font-family: var(--mono); font-size: var(--2xs);
  font-variant-numeric: tabular-nums; color: var(--subtle);
}
.logo, .logo-fb {
  flex-shrink: 0; border-radius: var(--radius); object-fit: cover;
  outline: 1px solid rgb(232 236 244 / 0.1); outline-offset: -1px;
}
.logo-sm { width: 24px; height: 24px; }
.logo-lg { width: 40px; height: 40px; }
.logo-fb {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); font-family: var(--mono);
  font-size: var(--micro); color: var(--muted);
}
.vol-id { min-width: 0; flex: 1; }
.vol-id .sym { display: flex; align-items: baseline; gap: 8px; }
.vol-id .sym strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol-id .sym span { font-size: 12px; color: var(--subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol-sub { margin-top: 2px; display: flex; align-items: center; gap: 6px; font-size: var(--2xs); color: var(--muted); }
.vol-amt { flex-shrink: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.vol-amt .t { font-size: 14px; }
.vol-amt .n { font-size: var(--2xs); }
.bar {
  margin-left: 28px; height: 4px; display: flex; overflow: hidden;
  border-radius: 999px; background: var(--elevated);
}
.bar .b { height: 100%; background: var(--buy); }
.bar .s { height: 100%; background: var(--sell); }
.vol-stats {
  margin-left: 28px; display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-family: var(--mono); font-size: var(--2xs);
  font-variant-numeric: tabular-nums; color: var(--muted);
}

.badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 2px 8px;
  font-family: var(--mono); font-size: var(--2xs); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.badge.buy { background: var(--buy-dim); color: var(--buy); }
.badge.sell { background: var(--sell-dim); color: var(--sell); }
.badge.bond { background: var(--panel); color: var(--text); border: 1px solid var(--border); }
.badge.pre { background: var(--panel); color: var(--subtle); border: 1px solid var(--border); }
.badge.first {
  background: rgba(201, 162, 39, 0.14);
  color: #c9a227;
  border: 1px solid rgba(201, 162, 39, 0.45);
}
.badge.radar {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-transform: none;
}
button.badge.radar {
  appearance: none;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.3;
}
button.badge.radar:hover {
  color: var(--text);
  border-color: var(--accent);
}

.ev {
  border-bottom: 1px solid var(--border);
  padding: 14px 12px;
}
.ev-row { display: flex; align-items: flex-start; gap: 12px; }
.ev-side {
  flex-shrink: 0;
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.logo-link {
  display: block;
  line-height: 0;
  border-radius: var(--radius);
}
.logo-link:hover { outline: 1px solid var(--accent); }
.logo-search {
  appearance: none;
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  border-radius: var(--radius);
  cursor: zoom-in;
}
.logo-search:hover { outline: 1px solid var(--accent); }
.logo-search-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(8, 10, 14, 0.55);
  color: #f2f4f8;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.logo-search:hover .logo-search-icon,
.logo-search:focus-visible .logo-search-icon {
  opacity: 1;
}
.ev-labels {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}
.ev-labels .badge {
  max-width: 100%;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 500;
  padding: 2px 6px;
  line-height: 1.2;
  letter-spacing: 0.03em;
}
.size-emoji,
.age-emoji {
  font-size: 14px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  cursor: help;
}
.ev-body { min-width: 0; flex: 1; }
.ev-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
}
.ev-top .name {
  font-weight: 600; letter-spacing: -0.02em;
  color: var(--text);
}
.ev-top .nm {
  font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px;
}
a.fomo-link:hover { color: var(--accent); }
.mint-copy {
  appearance: none;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: var(--2xs);
  color: var(--subtle);
  cursor: pointer;
  letter-spacing: 0.02em;
}
.mint-copy:hover { color: var(--accent); }
.mint-copy.ok { color: var(--up); }
.mc-line {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums;
}
.clock {
  margin-left: auto;
  font-family: var(--mono); font-size: var(--2xs);
  font-variant-numeric: tabular-nums; color: var(--subtle);
}

.ev-primary,
.ev-coin-slots {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 14px;
  margin-top: 10px;
}
.ev-primary .slot,
.ev-coin-slots .slot {
  flex: 0 0 auto;
  min-width: 4.5rem;
}
.more-grid {
  display: grid;
  gap: 8px 16px;
  margin-top: 10px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.slot dt {
  display: block;
  font-size: var(--micro);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtle);
  margin: 0 0 2px;
}
.slot dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-height: 1.2em;
}
.slot .usd {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.slot .tok {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 400;
}
.slot .hint {
  margin-left: 4px;
  font-size: var(--micro);
  color: var(--subtle);
  font-weight: 400;
}

.ev-stats {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-family: var(--mono);
  font-size: var(--2xs);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.ev-stats .up { color: var(--up); }
.ev-stats .down { color: var(--down); }

.ev-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.socials {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}
.soc {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
.soc:hover { color: var(--accent); border-color: var(--muted); }
.act-link {
  font-family: var(--mono);
  font-size: var(--2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 0.5rem;
}
.act-link:hover { color: var(--text); border-color: var(--muted); }
.act-link.chart { color: var(--accent); border-color: rgba(110, 176, 255, 0.35); }
.act-link.chart:hover { border-color: var(--accent); }

.ev-more {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 6px;
}
.ev-more summary {
  font-family: var(--mono);
  font-size: var(--2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--subtle);
  cursor: pointer;
  list-style: none;
}
.ev-more summary::-webkit-details-marker { display: none; }
.ev-more summary:hover { color: var(--muted); }
.ev-more[open] summary { color: var(--muted); margin-bottom: 8px; }

.log-search { display: flex; gap: 8px; align-items: center; }
.log-search .add-input { font-size: 0.75rem; padding: 0.4rem 0.55rem; }
.clear-mint {
  height: 28px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); color: var(--text);
  padding: 0 8px; font-family: var(--mono); font-size: var(--2xs);
  cursor: pointer;
}
.clear-mint:hover { border-color: var(--accent); }
.hint-sort { font-size: var(--2xs); color: var(--subtle); }
.jup-tag {
  color: var(--accent);
  opacity: 0.85;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .ev-top .nm { max-width: 100px; }
  .mobile-tabs { display: flex; }
  .panes { grid-template-columns: 1fr; }
  section.pane + section.pane { border-left: 0; }
  section.pane { display: none; }
  section.pane.show { display: flex; }
  .wallet-form { grid-template-columns: 1fr; }
}
@media (min-width: 768px) {
  section.pane { display: flex !important; }
}
@media (prefers-reduced-motion: reduce) {
  .brand { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
