﻿/* Live tape: ticker-tape rows, not a table */
.rail { position: sticky; top: calc(var(--topbar) + 16px); height: calc(100vh - var(--topbar) - 32px); display: flex; flex-direction: column; gap: 12px; }
.tape { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.tape-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 16px 12px; }
.tape-head h3 { font: 700 16px var(--f-display); letter-spacing: -0.03em; }
.tape-head .st { font: 500 11px var(--f-mono); color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }
.flow { position: relative; height: 3px; margin: 0 16px; border-radius: 3px; background: var(--down); overflow: hidden; }
.flow .fb { position: absolute; left: 0; top: 0; bottom: 0; width: var(--b, 50%); background: var(--up); transition: width .4s var(--ease); }
.flow .fs { display: none; }
.flow-n { display: flex; justify-content: space-between; padding: 9px 16px 12px; font: 500 11.5px var(--f-mono); color: var(--text-3); border-bottom: 1px solid var(--border); }
.tape-list { flex: 1; overflow-y: auto; padding: 4px 0 8px; }
.trade {
  position: relative; display: grid; grid-template-columns: 10px 22px minmax(0,1fr) auto 26px; gap: 10px; align-items: center; height: 36px; padding: 0 16px;
  font: 500 12.5px var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  background: linear-gradient(270deg, rgba(255,255,255,0.05) var(--w, 0%), transparent var(--w, 0%)); transition: background-color .18s var(--ease);
}
.trade:hover { background-color: var(--elevated); }
.trade .ar { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.trade.buy .ar { border-bottom: 7px solid var(--up); }
.trade.sell .ar { border-top: 7px solid var(--down); }
.trade .avatar { width: 22px; height: 22px; border-radius: 7px; }
.trade .tk { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade .amt { text-align: right; }
.trade.buy .amt { color: var(--up); } .trade.sell .amt { color: var(--down); }
.trade .amt em { font-style: normal; color: var(--text-3); margin-left: 5px; font-size: 11px; }
.trade .tm { text-align: right; color: var(--text-3); font-size: 11.5px; }
.trade.enter { animation: push-in .28s var(--ease) both; }
@keyframes push-in { from { opacity: 0; transform: translateY(-10px); max-height: 0; height: 0; } to { opacity: 1; transform: none; max-height: 36px; height: 36px; } }
.tape.paused .tape-head .st { color: var(--text-2); }

.op-card { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); display: flex; gap: 14px; align-items: center; }
.op-card svg { width: 34px; height: 34px; flex: none; overflow: visible; }
.op-card b { font: 700 13.5px var(--f-ui); display: flex; align-items: baseline; gap: 8px; }
.op-card span { color: var(--text-3); font-size: 12px; line-height: 1.35; display: block; margin-top: 2px; }
.op-card b span { display: inline; margin: 0; font-size: 12px; }

/* Mobile live dock */
.dock { display: none; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); }
.sheet .tape-list { max-height: 56vh; padding: 0; }
.sheet .trade { height: 44px; padding: 0 4px; }

/* ===== Responsive: home ===== */
@media (min-width: 1760px) { .grid:not(.is-list) { grid-template-columns: repeat(4, minmax(0,1fr)); } .wrap { max-width: 1680px; } }
@media (max-width: 1180px) {
  .board { grid-template-columns: minmax(0,1fr); }
  .rail { display: none; }
  .dock {
    display: flex; position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(var(--tabbar) + 8px + env(safe-area-inset-bottom)); height: 44px;
    align-items: center; gap: 12px; padding: 0 14px; background: var(--elevated); border: 1px solid var(--border-hi); border-radius: 14px;
    font: 500 12.5px var(--f-mono); box-shadow: 0 8px 24px rgba(0,0,0,.35); width: auto;
  }
  .dock .live-dot { flex: none; } .dock .d-text { flex: 1; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .dock .d-act { font: 600 12px var(--f-ui); color: var(--text); }
  .grid:not(.is-list) { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1180px) and (min-width: 721px) { .dock { left: 32px; right: 32px; } }
