/* ================================================================
   THE BEAST — QUANT SNIPER · operator HUD
   Same product DNA as the Risk Matrix TRADE terminal
   (trade.riskmatrixlabs.com): identical tokens, Inter body /
   Rajdhani display / JetBrains Mono numbers, wallet-ov hero,
   scan-row, stat/pos tiles, trade-card, safe-chip, ord-row flash.
   Adapted for a crypto perps sniper. PAPER / TESTNET only.
   ================================================================ */
:root {
  --accent: #BDFF00; --bg: #0A0A0A; --card: #111111; --card2: #161616; --border: #222222;
  --text: #FFFFFF; --text2: #A0A0A0; --muted: #6B7280; --loss: #FF3B3B; --warn: #FFAE2B;
  --pos: #BDFF00; --glow: 0 0 14px rgba(189,255,0,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }
.scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 9000;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.18) 3px, rgba(0,0,0,0) 4px); }

/* Mobile-first phone column, widened on desktop (same as terminal) */
.app { max-width: 440px; margin: 0 auto; padding: 0 10px 28px; position: relative; z-index: 1; }
@media (min-width: 600px) { .app { max-width: 620px; } }

/* ===== TOP BAR ===== */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px 10px;
  position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, var(--bg) 72%, rgba(10,10,10,0)); }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--accent);
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--glow); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .14em; }
.brand-tag { font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 9px; letter-spacing: .26em;
  color: var(--bg); background: var(--accent); padding: 1px 5px; border-radius: 4px; width: fit-content; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--border);
  color: var(--text); padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  font-family: 'Rajdhani', sans-serif; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: var(--glow);
  animation: breathe 1.5s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.72); } }
.status-pill.hunting { border-color: rgba(189,255,0,.55); color: var(--accent); box-shadow: 0 0 16px rgba(189,255,0,.18); }
.status-pill.stale { opacity: .5; }
.paper-pill { display: inline-flex; align-items: center; gap: 5px; font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; color: var(--text2); background: var(--card);
  border: 1px dashed var(--border); padding: 5px 9px; border-radius: 999px; }
.paper-pill .pp-diamond { color: var(--accent); }

/* ===== TERMINAL COLUMN ===== */
.terminal { display: flex; flex-direction: column; gap: 8px; }

/* ===== EQUITY / P&L HERO (wallet-ov) ===== */
.wallet-ov { position: relative; text-align: center; overflow: hidden; border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 16px 14px;
  background: radial-gradient(120% 140% at 50% 0%, rgba(189,255,0,.12), transparent 60%), linear-gradient(180deg, var(--card2), var(--card)); }
.wallet-ov::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: .55; }
.wo-label { font-size: 9px; letter-spacing: .2em; color: var(--muted); font-weight: 700; }
.wo-total { font-family: 'JetBrains Mono', monospace; font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 5px 0 3px; line-height: 1; color: var(--text); }
.wo-total.up { color: var(--pos); } .wo-total.down { color: var(--loss); }
.wo-change { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; margin: 0 0 11px; min-height: 15px; }
.wo-change:empty { display: none; }
.wo-change.up { color: var(--pos); } .wo-change.down { color: var(--loss); }
.wo-change .wc-arrow { margin-right: 4px; }
.wo-sub { display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin: 0 auto 13px; padding: 5px 13px;
  border: 1px solid var(--border); background: rgba(255,255,255,.03); border-radius: 999px; font-size: 11px; font-weight: 700; min-height: 12px; }
.wo-sub:empty { display: none; }
.wo-sub .wos-div { width: 1px; height: 11px; background: var(--border); }
.wo-sub .wos-a { color: var(--text2); } .wo-sub .wos-b { color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.wo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wo-stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  background: rgba(255,255,255,.025); border: 1px solid var(--border); border-radius: 10px; padding: 9px 8px; }
.wo-k { font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; }
.wo-v { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wo-v.up { color: var(--pos); } .wo-v.down { color: var(--loss); }

/* value change flash — reused everywhere a number ticks */
.flash-up { animation: flashUp 1s ease-out; }
.flash-down { animation: flashDown 1s ease-out; }
@keyframes flashUp { 0% { color: var(--pos); text-shadow: 0 0 16px rgba(189,255,0,.6); } 100% {} }
@keyframes flashDown { 0% { color: var(--loss); text-shadow: 0 0 16px rgba(255,59,59,.55); } 100% {} }

/* ===== PERFORMANCE / STATS ===== */
.stats-wrap { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.stats-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sh-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-k { font-size: 7.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sh-v { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--text); }
.sh-v.up { color: var(--pos); } .sh-v.down { color: var(--loss); }
.sh-sub { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; color: var(--muted); }
.sh-sub:empty { display: none; }
.stats-spark { width: 120px; height: 48px; flex: 0 0 auto; }
.stats-spark .spk-line { transition: stroke .3s ease; filter: drop-shadow(0 0 4px rgba(189,255,0,.35)); }
.stats-spark.falling .spk-line { filter: drop-shadow(0 0 4px rgba(255,59,59,.35)); }
.stats-spark.empty { opacity: .25; }
.stats-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.stat { position: relative; background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 3px 7px; display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: .5; }
.stat-k { font-size: 7px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; }
.stat-v { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 800; color: var(--text); letter-spacing: -.02em; white-space: nowrap; }
.stat-v.up { color: var(--pos); } .stat-v.down { color: var(--loss); } .stat-v.na { color: var(--muted); font-weight: 700; }
.stats-empty { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted); padding: 2px 0 1px; }
.stats-empty[hidden] { display: none; }

/* ===== PANELS ===== */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.panel-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .16em; }
.panel-sub { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.live-dot { color: var(--pos); font-weight: 700; font-size: 9px; letter-spacing: .06em; animation: livePulse 1.4s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ===== WATCHLIST (scan-row) ===== */
.scan-list { display: flex; flex-direction: column; }
.scan-row { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.scan-row:last-child { border-bottom: 0; }
.scan-row:hover { background: rgba(189,255,0,.03); }
.scan-row.top { background: linear-gradient(90deg, rgba(189,255,0,.06), transparent 72%); }
.scan-rank { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 13px; color: var(--muted); width: 16px; text-align: center; flex: 0 0 auto; }
.scan-tok { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.st-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-sym { font-weight: 700; font-size: 14px; font-family: 'Rajdhani', sans-serif; letter-spacing: .04em; }
.st-side { font-family: 'JetBrains Mono', monospace; font-size: 8.5px; font-weight: 800; letter-spacing: .1em; padding: 1px 6px; border-radius: 4px; width: fit-content; }
.st-side.long { color: var(--accent); background: rgba(189,255,0,.12); }
.st-side.short { color: var(--loss); background: rgba(255,59,59,.12); }
.scan-mid { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sm-mark { font-size: 12px; font-weight: 600; font-family: 'JetBrains Mono', monospace; color: var(--text2); }
.sm-bar { width: 62px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; }
.sm-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #3a4030, var(--accent)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.scan-row.top .sm-fill { box-shadow: var(--glow); }
.scan-score { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 0 0 auto; min-width: 50px; }
.scan-score .ss-num { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.scan-score .ss-tier { font-size: 8px; font-weight: 700; letter-spacing: .08em; padding: 1px 5px; border-radius: 4px; }
.tier-prime { color: var(--bg); background: var(--accent); }
.tier-strong { color: var(--accent); border: 1px solid var(--accent); }
.tier-caution { color: var(--warn); border: 1px solid var(--warn); }
.tier-avoid { color: var(--loss); border: 1px solid var(--loss); }
.scan-empty { text-align: center; color: var(--muted); font-size: 11px; padding: 18px; font-family: 'JetBrains Mono', monospace; }

/* ===== BEST SHOT ===== */
.best-body { padding: 12px; display: flex; flex-direction: column; gap: 11px; }
.best-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.best-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.best-sym { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 34px; line-height: .9; letter-spacing: .01em; }
.best-side { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .1em; padding: 4px 11px; border-radius: 7px; }
.best-side.long { color: var(--bg); background: var(--accent); box-shadow: var(--glow); }
.best-side.short { color: #fff; background: var(--loss); }
.best-side.none { color: var(--muted); border: 1px solid var(--border); }
.best-conf { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.bc-num { font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 30px; line-height: 1; color: var(--accent); letter-spacing: -.03em; }
.bc-tier { font-size: 8px; font-weight: 700; letter-spacing: .1em; padding: 1px 6px; border-radius: 4px; }
.bc-meter { width: 92px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.bc-fill { height: 100%; width: 0; border-radius: 3px; background: var(--accent); box-shadow: var(--glow); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.best-cells { grid-template-columns: repeat(4, 1fr); }
.pos.loss .pos-v { color: var(--loss); }
.safety { display: flex; flex-wrap: wrap; gap: 6px; }
.safe-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--text2);
  background: var(--card2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; font-family: 'JetBrains Mono', monospace; }
.safe-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.safe-chip.good { color: var(--text); border-color: rgba(189,255,0,.35); } .safe-chip.good .safe-dot { background: var(--accent); box-shadow: var(--glow); }
.safe-chip.bad { color: var(--text); border-color: rgba(255,59,59,.35); } .safe-chip.bad .safe-dot { background: var(--loss); }

/* EXECUTE button (btn.buy DNA) */
.btn-exec { width: 100%; border: 0; cursor: pointer; border-radius: 11px; padding: 14px; margin-top: 2px;
  background: var(--accent); color: var(--bg); box-shadow: var(--glow); display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: 'Rajdhani', sans-serif; transition: transform .08s ease, box-shadow .2s ease; }
.btn-exec:hover { box-shadow: 0 0 24px rgba(189,255,0,.5); }
.btn-exec:active { transform: scale(.985); }
.exec-label { font-weight: 700; font-size: 20px; letter-spacing: .22em; padding-left: .22em; }
.exec-sub { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: .16em; opacity: .7; text-transform: uppercase; }
.btn-exec.armed { background: transparent; color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
.btn-exec.disabled { background: var(--card2); color: var(--muted); border: 1px solid var(--border); box-shadow: none; cursor: not-allowed; }
.exec-note { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: var(--muted); letter-spacing: .02em; margin-top: -2px; }

/* stat / pos tiles (shared with terminal) */
.pos-grid { display: grid; gap: 4px; }
.pos { position: relative; background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 3px 7px; display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center;
  overflow: hidden; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.pos::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: .5; }
.pos:hover { border-color: rgba(189,255,0,.45); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.pos-k { font-size: 7.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.pos-v { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pos.pnl .pos-v { color: var(--pos); }

/* ===== POSITIONS (trade-card DNA + CLOSE) ===== */
.pos-cards { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.pcard { position: relative; background: var(--card); border: 1px solid var(--border); border-left: 2px solid var(--muted);
  border-radius: 10px; padding: 10px 12px 9px; transition: border-color .15s ease; }
.pcard.up { border-left-color: var(--pos); } .pcard.down { border-left-color: var(--loss); }
.pcard.enter { animation: cardIn .4s cubic-bezier(.2,.8,.2,1); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pcard.closing { opacity: .5; pointer-events: none; }
.pc-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.pc-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-sym { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .03em; }
.pc-side { font-family: 'JetBrains Mono', monospace; font-size: 8.5px; font-weight: 800; letter-spacing: .1em; padding: 2px 7px; border-radius: 5px; }
.pc-side.long { color: var(--accent); background: rgba(189,255,0,.12); } .pc-side.short { color: var(--loss); background: rgba(255,59,59,.12); }
.pc-lev { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; color: var(--muted); }
.pc-pl { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; }
.pc-pl b { font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 18px; letter-spacing: -.02em; line-height: 1; }
.pc-pl i { font-family: 'JetBrains Mono', monospace; font-style: normal; font-size: 10px; font-weight: 700; }
.pc-pl.up b, .pc-pl.up i { color: var(--pos); } .pc-pl.down b, .pc-pl.down i { color: var(--loss); }
.pc-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 9px; }
.pc-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pc-cell span { font-size: 7.5px; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.pc-cell b { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 700; }
.pc-cell b.liq { color: var(--warn); }
.pc-track { position: relative; height: 6px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 9px; }
.pc-track .fillbar { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; transition: width .55s cubic-bezier(.2,.8,.2,1); }
.pcard.up .fillbar { background: linear-gradient(90deg, rgba(189,255,0,.4), var(--accent)); }
.pcard.down .fillbar { background: linear-gradient(90deg, rgba(255,59,59,.4), var(--loss)); }
.pc-track .midtick { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 1px; background: rgba(255,255,255,.18); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-labels { display: flex; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--muted); }
.pc-labels .l-stop { color: var(--loss); } .pc-labels .l-tgt { color: var(--accent); }
.btn-close { background: transparent; border: 1px solid var(--loss); color: var(--loss); border-radius: 8px;
  padding: 7px 16px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .06em; cursor: pointer; transition: all .12s ease; }
.btn-close:hover { background: var(--loss); color: #fff; }
.btn-close:active { transform: scale(.96); }
.btn-close.pending { border-color: var(--muted); color: var(--muted); cursor: wait; }
.pos-empty { text-align: center; padding: 22px 14px; }
.pos-empty .pe-ic { color: var(--border); display: grid; place-items: center; }
.pos-empty .pe-ic svg { animation: pePulse 2.4s ease-in-out infinite; }
@keyframes pePulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.pos-empty .pe-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .18em; color: var(--text2); margin-top: 10px; }
.pos-empty .pe-sub { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); margin-top: 5px; }

/* ===== LIVE TAPE (ord-row) ===== */
.tape-body { max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(189,255,0,.3) transparent; }
.tape-body::-webkit-scrollbar { width: 5px; }
.tape-body::-webkit-scrollbar-thumb { background: rgba(189,255,0,.28); border-radius: 4px; }
.tape-row { display: grid; grid-template-columns: 14px 58px 1fr auto; align-items: center; gap: 9px; padding: 8px 13px;
  border-bottom: 1px solid rgba(34,34,34,.6); font-family: 'JetBrains Mono', monospace; }
.tape-row:last-child { border-bottom: 0; }
.tape-row.enter { animation: tapeIn .42s cubic-bezier(.2,.8,.2,1); }
@keyframes tapeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.tape-row.entry.enter { animation: tapeIn .42s cubic-bezier(.2,.8,.2,1), flashBuy 1.6s ease-out; }
.tape-row.exit.win.enter { animation: tapeIn .42s cubic-bezier(.2,.8,.2,1), flashBuy 1.6s ease-out; }
.tape-row.exit.loss.enter { animation: tapeIn .42s cubic-bezier(.2,.8,.2,1), flashSell 1.6s ease-out; }
@keyframes flashBuy { 0% { background: rgba(189,255,0,.24); } 100% { background: transparent; } }
@keyframes flashSell { 0% { background: rgba(255,59,59,.22); } 100% { background: transparent; } }
.tp-ic { text-align: center; font-size: 11px; font-weight: 800; line-height: 1; }
.tp-kind { font-size: 8px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.tp-mid { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; }
.tp-sym { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .03em; }
.tp-side { font-size: 8px; font-weight: 800; letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; }
.tp-side.long { color: var(--accent); background: rgba(189,255,0,.12); } .tp-side.short { color: var(--loss); background: rgba(255,59,59,.12); }
.tp-sz { font-size: 10px; font-weight: 700; color: var(--text2); }
.tp-note { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-right { display: flex; align-items: center; gap: 9px; justify-self: end; }
.tp-px { font-size: 10px; font-weight: 700; color: var(--text2); }
.tp-pnl { font-size: 12px; font-weight: 800; letter-spacing: -.02em; }
.tp-pnl.win { color: var(--pos); } .tp-pnl.loss { color: var(--loss); }
.tp-time { font-size: 9px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tape-row.entry .tp-ic, .tape-row.entry .tp-kind { color: var(--accent); }
.tape-row.exit .tp-ic { color: var(--text2); }
.tape-row.error .tp-ic, .tape-row.error .tp-kind { color: var(--warn); }
.tape-row.skip { opacity: .5; }
.tape-empty { text-align: center; color: var(--muted); font-size: 11px; padding: 18px; font-family: 'JetBrains Mono', monospace; }

/* footer */
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.fb-dot { color: var(--border); }

/* toast */
#rmToast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: var(--card2);
  border: 1px solid rgba(189,255,0,.4); color: var(--text); padding: 11px 16px; border-radius: 10px; font-size: 12px; max-width: 90vw;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 9500; box-shadow: 0 8px 30px rgba(0,0,0,.5); text-align: center; }
#rmToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .status-dot, .live-dot, .flash-up, .flash-down, .tape-row.enter, .pcard.enter,
  .sm-fill, .bc-fill, .fillbar { animation: none !important; transition: none !important; }
}
