:root {
  --bg: #0B0D12; --panel: #12151C; --panel-2: #1A1F2B; --line: #232835; --line-2: #1C2130; --line-3: #2A3040;
  --text: #E8EAF0; --text-2: #B8C0CC; --muted: #8A93A3; --faint: #7E8798;
  --accent: #C8F560; --up: #3DDC97; --down: #FF6B6B; --violet: #A99BFF; --cyan: #4FC3F7; --orange: #FF8A3D; --gold: #F5C451;
  --mono: 'JetBrains Mono', ui-monospace, monospace; --head: 'Space Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select { font: inherit; background: var(--bg); color: var(--text); border: 1px solid var(--line-3); border-radius: 8px; padding: 9px 12px; min-height: 40px; width: 100%; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mono { font-family: var(--mono); }
.app { max-width: 1400px; margin: 0 auto; padding: 24px 28px 48px; transition: margin-right .2s; }
body.drawer-open .app { margin-right: 380px; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.brand { display: flex; gap: 14px; align-items: center; }
.logo { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.status { font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }
.status.live .dot { background: var(--up); }
.status.err .dot { background: var(--down); }
.top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { background: transparent; border: 1px solid var(--line-3); border-radius: 8px; padding: 8px 14px; min-height: 40px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.btn:hover { border-color: var(--faint); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
.btn.ghost { border: none; min-height: 32px; padding: 4px 8px; }
.count { background: var(--line); border-radius: 10px; padding: 1px 7px; margin-left: 4px; color: var(--text); }
.seg { display: flex; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { background: transparent; border: none; border-radius: 7px; padding: 6px 10px; min-height: 32px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--line); color: var(--text); }
.banner { background: rgba(245,196,81,.1); border: 1px solid rgba(245,196,81,.35); color: var(--gold); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.main { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; min-width: 0; }
.hero { flex: 999 1 560px; display: flex; flex-direction: column; gap: 16px; }
.home { flex: 1 1 380px; display: flex; flex-direction: column; gap: 14px; }
.label { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.big { font-family: var(--mono); font-weight: 700; font-size: clamp(36px, 5vw, 56px); line-height: 1.1; letter-spacing: -.02em; }
.chip { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 6px; display: inline-block; }
.chip.up { background: rgba(61,220,151,.14); color: var(--up); }
.chip.down { background: rgba(255,107,107,.14); color: var(--down); }
.up { color: var(--up); } .down { color: var(--down); }
.stackbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line-2); gap: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat-k { font-size: 12px; color: var(--muted); }
.stat-v { font-family: var(--mono); font-size: 16px; margin-top: 2px; }
.home-title { font-family: var(--head); font-size: 20px; font-weight: 700; margin-top: 2px; }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--violet); }
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.note { font-size: 12px; color: var(--faint); }
.chart-card { display: flex; flex-wrap: wrap; padding: 0; overflow: hidden; }
.watchlist { flex: 1 1 270px; min-width: 0; border-right: 1px solid var(--line); }
.watchlist h2 { margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.asset { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 18px; border: none; border-bottom: 1px solid var(--line-2); background: transparent; min-height: 58px; text-align: left; }
.asset:hover { background: #161A23; }
.asset[aria-pressed="true"] { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.06); display: grid; place-items: center; flex: none; }
.asset-name { font-size: 13px; font-weight: 500; }
.asset-sub { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.asset-right { margin-left: auto; text-align: right; font-family: var(--mono); }
.asset-right .p { font-size: 13px; }
.asset-right .c { font-size: 11px; }
.asset-hold { font-family: var(--mono); font-size: 10px; color: var(--text-2); margin-top: 2px; }
.chart-wrap { flex: 999 1 620px; min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.chart-title { display: flex; gap: 10px; align-items: center; }
.chart-title h2 { margin: 0; font-family: var(--head); font-size: 22px; }
.price-big { font-family: var(--mono); font-size: 28px; font-weight: 700; }
.chart { height: 460px; width: 100%; position: relative; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 20px; }
.chart-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
h2.sec { margin: 0; font-family: var(--head); font-size: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 6px; font-size: 12px; }
td { padding: 10px 6px; border-top: 1px solid var(--line-2); }
td.num, th.num { text-align: right; font-family: var(--mono); }
.empty { color: var(--muted); font-size: 14px; padding: 18px 0 6px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100vw; background: var(--panel); border-left: 1px solid var(--line); padding: 20px; overflow-y: auto; z-index: 20; display: flex; flex-direction: column; gap: 14px; }
.pillrow { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { background: transparent; border: 1px solid var(--line-3); border-radius: 8px; padding: 5px 10px; min-height: 32px; font-family: var(--mono); font-size: 11px; color: var(--text-2); }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
.idea { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; border: 1px solid currentColor; padding: 2px 7px; border-radius: 4px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--down); font-size: 12px; }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 30; display: grid; place-items: center; padding: 16px; }
.modal-back[hidden], .drawer[hidden] { display: none; }
.modal { background: var(--panel); border: 1px solid var(--line-3); border-radius: 16px; padding: 22px; width: min(460px, 100%); max-height: 90vh; overflow-y: auto; }
.modal h2 { margin: 0 0 14px; font-family: var(--head); font-size: 20px; }
.calc { font-family: var(--mono); font-size: 12px; color: var(--text-2); background: var(--bg); border-radius: 8px; padding: 10px 12px; }
@media (max-width: 1100px) { body.drawer-open .app { margin-right: auto; } }
@media (max-width: 700px) { .app { padding: 16px; } .watchlist { border-right: none; border-bottom: 1px solid var(--line); } .chart { height: 360px; } }
