/* trill 전용 — 재료·색·반경 토큰은 vendor_app.css / vendor_glass.css 것을 그대로 쓴다.
   여기에는 「지갑 표」에만 필요한 규칙만 둔다 (토큰을 재유도하면 dash 와 갈린다). */

.tbl-wrap {
  overflow-x: auto;
  padding: 4px 0;
  border-radius: var(--g-r-in, 20px);
}

table.rank { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.rank th, table.rank td {
  padding: 6px 9px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--grid);
}
table.rank th {
  position: sticky; top: 0; z-index: 2;
  font-weight: 600; font-size: 11.5px; color: var(--text-secondary);
  background: var(--surface-1);
  cursor: pointer;
}
table.rank th.num::after { content: ""; }
table.rank th[data-sorted="desc"]::after { content: " ▼"; color: var(--muted); }
table.rank th[data-sorted="asc"]::after { content: " ▲"; color: var(--muted); }
table.rank th:first-child, table.rank td:first-child { text-align: left; }
table.rank td.addr { text-align: left; font-variant-numeric: tabular-nums; }
table.rank tbody tr:last-child td { border-bottom: 0; }

/* 지갑 주소 — 앞뒤만 보이고 전체는 title 로. 클릭하면 펼친다. */
.wal { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.wal b { font-weight: 700; }

.pill {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; border: 1px solid var(--border);
  color: var(--text-secondary);
}
.pill.swing { color: var(--s-frgn); border-color: var(--s-frgn); }
.pill.fast { color: var(--s-etcc); border-color: var(--s-etcc); }

/* 등락색은 글로벌 관례(상승 초록·하락 빨강). 색만으로 방향을 말하지 않으려고
   금액에 부호를 항상 붙인다 — 적록색약에서 색은 두 번째 단서여야 한다. */
.up { color: var(--pos); font-weight: 600; }
.dn { color: var(--neg); font-weight: 600; }
.zero { color: var(--muted); }

/* 「모른다」는 0 이 아니라 대시로 적는다. */
.na { color: var(--muted); }

.tier { font-variant-numeric: tabular-nums; }
.tier i { font-style: normal; color: var(--muted); }
.tier b.on { color: var(--text-primary); }

tr.posrow > td { background: var(--day-band); }
tr.posrow table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
tr.posrow th, tr.posrow td { border-bottom: 1px solid var(--grid); padding: 4px 8px; }
tr.posrow > td { padding: 0 0 0 18px; }
tr.posrow .phead { font-weight: 600; color: var(--text-secondary); }

.howto { padding: 14px 16px; font-size: 13px; line-height: 1.75; }
.howto h3 { margin: 14px 0 6px; font-size: 14px; }
.howto h3:first-child { margin-top: 0; }
.howto code { font-size: 12px; background: var(--day-band); padding: 1px 5px; border-radius: 4px; }
.howto ul { margin: 4px 0 4px 18px; padding: 0; }
.howto .warn { color: var(--neg); font-weight: 600; }

@media (max-width: 760px) {
  table.rank th, table.rank td { padding: 5px 6px; font-size: 11.5px; }
}

/* 0행 안내 — 빈 화면은 「고장」으로 읽힌다. */
table.rank tr.empty td {
  text-align: left; padding: 18px 14px; color: var(--text-secondary); font-size: 13px;
}

/* 요약 타일 — 긴 라벨이 격자를 밀어 본문 가로 넘침(실측 13px)을 냈다.
   칸이 내용보다 좁아질 수 있게 min-width 를 풀고, 값은 줄바꿈을 허용한다. */
#stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
#stats .tile { min-width: 0; }
#stats .tile .name, #stats .tile .val { overflow-wrap: anywhere; white-space: normal; }
