:root {
  --bg: #07080a; --card: #0e1014; --card2: #13161c; --line: #1e222b; --text: #e8eaf0; --muted: #7c8494;
  --up: #22c55e; --down: #ef4444; --sugar: #f5c542; --bitter: #a855f7; --loom: #ef4444; --wind: #38bdf8; --mem: #f97316;
  --spike: #ffd166; --inhib: #4f6cff; --accent: #ffd166; --mono: "IBM Plex Mono", ui-monospace, monospace; --sans: "Instrument Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; }
a { color: inherit; }
.page { max-width: 1440px; margin: 0 auto; padding: 16px; }
.muted { color: var(--muted); }
.up { color: var(--up); } .down { color: var(--down); }
b { font-weight: 600; }
.head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.head__id { display: flex; gap: 14px; align-items: flex-start; }
.mark { width: 46px; height: 46px; border-radius: 12px; background: radial-gradient(circle at 35% 35%, #ffd166, #b4441e 60%, #2a1a12); box-shadow: 0 0 24px #ffd16644; flex: none; }
h1 { margin: 0; font-size: 26px; letter-spacing: .08em; font-weight: 700; }
.sub { margin: 2px 0 8px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); background: var(--card); text-decoration: none; }
.chip b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.chip--live i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); animation: pulse 1.6s infinite; }
.chip.paper i { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
@keyframes pulse { 50% { opacity: .35; } }
.head__wallet { text-align: right; }
.eq { display: flex; align-items: baseline; gap: 8px; justify-content: flex-end; }
.eq b { font-size: 30px; font-family: var(--mono); font-weight: 600; }
.eq .unit { color: var(--muted); }
.eq-sub { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.btn { background: var(--card2); border: 1px solid var(--line); color: var(--text); padding: 7px 12px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13px; }
.btn--primary { background: var(--accent); color: #1a1200; border-color: transparent; font-weight: 600; }
.grid { display: grid; grid-template-columns: 1.35fr 1fr 1.15fr; grid-template-areas: "market fly brain" "log log trades"; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.market { grid-area: market; } .flycard { grid-area: fly; } .brain { grid-area: brain; } .decisions { grid-area: log; } .trades { grid-area: trades; }
.card__h { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.tok { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tok img { width: 40px; height: 40px; border-radius: 50%; background: var(--card2); object-fit: cover; }
.tok img:not([src]), .tok img[src=""] { visibility: hidden; }
.tok__id { flex: 1; min-width: 120px; }
.tok__tick { font-size: 20px; font-weight: 700; font-family: var(--mono); }
.tok__name { font-size: 12px; }
.stat { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); min-width: 56px; }
.stat b { font-family: var(--mono); font-size: 14px; color: var(--text); }
.chart { position: relative; height: 240px; }
.chart canvas { width: 100%; height: 100%; display: block; }
.chip--float { position: absolute; top: 8px; right: 10px; }
.senses { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line); margin-top: auto; align-items: center; }
.sense i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #888); box-shadow: 0 0 8px var(--c, #888); }
.sense.sugar { --c: var(--sugar); } .sense.bitter { --c: var(--bitter); } .sense.loom { --c: var(--loom); } .sense.wind { --c: var(--wind); } .sense.mem { --c: var(--mem); }
.sense.spike { --c: var(--spike); } .sense.inhib { --c: var(--inhib); }
.spacer { flex: 1; }
.motor.on { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px #ffd16633; }
.art { position: relative; flex: 1; min-height: 260px; background: radial-gradient(ellipse at 50% 60%, #171a20, #0b0c0f 70%); }
.art canvas { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.toast { position: absolute; left: 50%; top: 12px; transform: translateX(-50%) translateY(-8px); background: #1b1e26; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; opacity: 0; transition: .25s; pointer-events: none; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.act { padding: 12px 14px; border-top: 1px solid var(--line); }
.act__t { font-weight: 600; font-size: 15px; }
.act__s { font-family: var(--mono); font-size: 12px; }
.brain__views { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); flex: 1; min-height: 260px; }
.view { position: relative; background: #0a0b0e; }
.view canvas { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.view__l { position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.list { list-style: none; margin: 0; padding: 0; overflow: auto; max-height: 420px; }
.item { display: flex; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); align-items: center; animation: fade .3s; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }
.item__ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--card2); font-size: 13px; flex: none; }
.item--buy .item__ic { background: #0f2d1a; } .item--sell .item__ic { background: #0f1d3d; } .item--learn .item__ic { background: #2d1a0f; } .item--honeypot .item__ic, .item--avoid .item__ic { background: #2d0f0f; }
.item__m { flex: 1; min-width: 0; }
.item__t { font-weight: 600; font-size: 13px; }
.item__s { color: var(--muted); font-family: var(--mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__r { font-family: var(--mono); font-size: 12px; text-align: right; }
.item__time { color: var(--muted); font-size: 10px; font-family: var(--mono); }
.trades__h { align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; }
.tab { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 4px 9px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12px; }
.tab.active { background: var(--card2); color: var(--text); border-color: var(--line); }
.trades__sum { font-weight: 400; font-size: 12px; margin-left: auto; }
.table-wrap { overflow: auto; max-height: 420px; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--mono); }
.table th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); white-space: nowrap; }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td img { width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.table-empty { padding: 28px; text-align: center; color: var(--muted); }
.bar { display: inline-block; width: 80px; height: 6px; background: var(--card2); border-radius: 3px; position: relative; vertical-align: middle; }
.bar i { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.foot { margin: 16px 4px; font-size: 12px; line-height: 1.5; }
.modal { position: fixed; inset: 0; background: #000a; display: none; place-items: center; z-index: 10; padding: 16px; }
.modal.open { display: grid; }
.modal__dialog { background: var(--card); border: 1px solid var(--line); border-radius: 16px; max-width: 640px; width: 100%; padding: 22px; position: relative; max-height: 90vh; overflow: auto; }
.modal__close { position: absolute; right: 12px; top: 10px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.modal__heading { font-size: 20px; font-weight: 700; }
.modal__body { color: var(--muted); margin: 4px 0 14px; }
.modal__item { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.modal__item .n { font-family: var(--mono); color: var(--accent); flex: none; width: 24px; }
.modal__item .t { font-weight: 600; } .modal__item .s { color: var(--muted); font-size: 13px; line-height: 1.45; }
.modal__note { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px; }
.modal__footer { text-align: right; }
@media (max-width: 1100px) { .grid { grid-template-columns: 1fr 1fr; grid-template-areas: "market market" "fly brain" "log trades"; } }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; grid-template-areas: "market" "fly" "brain" "log" "trades"; } .head__wallet { text-align: left; } .eq { justify-content: flex-start; } h1 { font-size: 22px; } }
