/* macaco.club design kit v3.0 — unified visual system
 *
 * Portable stylesheet for all ecosystem apps:
 *   aura · painel · 64/TRADE · 65/ALPHA · 66/OPÇÕES · 67/WATCH · 68/TOKEN
 *
 * Include:
 *   <link rel="preconnect" href="https://fonts.googleapis.com" />
 *   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
 *   <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap" rel="stylesheet" />
 *   <link rel="stylesheet" href="https://67.macaco.club/static/kit.css" />
 *   <script src="https://67.macaco.club/static/kit.js"></script>
 */

:root {
  /* Surfaces & Borders */
  --bg: #0b0d11;
  --surface: #12161e;
  --surface-2: #181d27;
  --panel: var(--surface);
  --border: #232936;
  --border-strong: #343d4f;

  /* Text Hierarchy (WCAG AA/AAA on --bg and --surface) */
  --text: #edf1f7;
  --text-2: #b6c0d2;
  --muted: #8893a7;
  --subtle: #667085;

  /* Semantic Market Colors */
  --accent: #6eb0ff;
  --accent-soft: rgba(110, 176, 255, 0.10);
  --up: #3dd68c;
  --up-soft: rgba(61, 214, 140, 0.10);
  --down: #f07178;
  --down-soft: rgba(240, 113, 120, 0.10);
  --warn: #e0b341;
  --warn-soft: rgba(224, 179, 65, 0.10);

  /* Typography & Strict Geometry (v3.1) */
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --radius: 2px;
  --top-h: 48px;
  --subnav-h: 42px;
  --pane-head-h: 40px;
  --ctrl-h: 28px;
  --max-w: 1200px;
  --pad-x: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

::selection { background: var(--accent); color: var(--bg); }

html {
  margin: 0;
  min-height: 100%;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: var(--top-h);
  padding: 0 var(--pad-x);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
}

.brand {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  animation: brandMark 5.5s ease-in-out infinite;
}

.brand-sub {
  font-family: var(--mono);
  font-size: inherit;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--subtle);
  margin-left: 0.15em;
}

@keyframes brandMark {
  0%, 100% { color: #e8ecf4; }
  40% { color: #8ec4ff; }
  70% { color: #6ed9a0; }
}

@media (prefers-reduced-motion: reduce) {
  .brand { animation: none; }
}

a.brand-link {
  color: inherit;
  text-decoration: none;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
}

.venues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.venue-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.2rem 0.45rem;
}

.venue-pill .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--muted);
}

.venue-pill.ok { color: var(--text); }
.venue-pill.ok .dot { background: var(--up); }
.venue-pill.stale { color: #c9a227; }
.venue-pill.stale .dot { background: #c9a227; }
.venue-pill.down { color: var(--down); opacity: 0.85; }
.venue-pill.down .dot { background: var(--down); }

.venue-pill .age {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-left: 0.1rem;
}

.venue-pill.stale .age { color: #c9a227; }
.venue-pill.down .age { color: var(--down); }


.top-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.subnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  min-height: var(--subnav-h);
  padding: 6px var(--pad-x);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.subnav-right {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.subnav-coin {
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
}

/* —— toggles, menus, tips —— */
.toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  border-radius: 2px;
}

.toggle:hover { border-color: var(--muted); }
.toggle.off { color: var(--muted); opacity: 0.7; }

.sound-toggle {
  /* kept for back-compat; sound now uses plain .toggle text */
}

a.toggle.nav-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

a.toggle.nav-link:hover {
  border-color: var(--muted);
  color: inherit;
}

.nav-current {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.35rem 0.55rem;
  border-radius: 2px;
}

.menu {
  position: relative;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 50;
  min-width: 12.5rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.menu-panel[hidden] { display: none; }

.menu-section {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.45rem 0.55rem 0.2rem;
}

.menu-section:first-child {
  padding-top: 0.25rem;
}

.menu-panel-settings {
  min-width: 13.5rem;
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.settings-ico {
  display: block;
  opacity: 0.9;
}

.menu-panel [role="menuitem"] {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.menu-panel [role="menuitem"]::before {
  content: "";
  width: 0.85em;
  flex-shrink: 0;
  font-size: 0.78rem;
  line-height: 1;
  text-align: center;
  color: var(--accent);
}

.menu-panel [role="menuitem"]:hover,
.menu-panel [role="menuitem"]:focus-visible {
  background: rgba(110, 176, 255, 0.12);
  outline: none;
}

.menu-panel [role="menuitem"].on {
  color: var(--accent);
}

.menu-panel [role="menuitem"].on::before {
  content: "✓";
}

.menu.open .menu-btn {
  border-color: var(--muted);
}

.toggle[data-tip] {
  position: relative;
}

.toggle[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 40;
  width: max-content;
  max-width: min(18rem, 70vw);
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.35;
  white-space: normal;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.toggle[data-tip]:hover::after,
.toggle[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.menu.open .menu-btn[data-tip]::after {
  opacity: 0;
  pointer-events: none;
}


/* —— auth (login · avatar · menu · modal) —— */
.auth-slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-login-btn {
  text-transform: uppercase;
}

.auth-menu {
  position: relative;
}

.auth-avatar-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}

.auth-avatar-btn:hover .auth-avatar,
.auth-menu.open .auth-avatar {
  border-color: var(--accent);
}

.auth-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

.auth-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.auth-menu-panel {
  min-width: 10rem;
  padding: 0.35rem;
}

.auth-menu-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.4rem 0.55rem 0.35rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-logout-btn {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  border-radius: 2px;
}

/* Override .menu-panel [role=menuitem] flex + ✓ gutter — Out aligns with the name. */
.auth-menu-panel .auth-logout-btn,
.menu-panel .auth-logout-btn {
  display: block;
  gap: 0;
}
.auth-menu-panel .auth-logout-btn::before,
.menu-panel .auth-logout-btn::before {
  content: none;
  width: 0;
  display: none;
}

.auth-logout-btn:hover {
  background: rgba(240, 113, 120, 0.12);
  color: var(--down);
}

.auth-name {
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 12, 0.72);
  padding: 1rem;
}

.auth-modal[hidden] { display: none; }

.auth-modal-card {
  width: min(22rem, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.15rem 1.2rem;
}

.auth-modal-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.auth-modal-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.auth-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.auth-signin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}

.auth-signin .auth-tg-ico {
  flex-shrink: 0;
  opacity: 0.9;
  color: var(--accent);
}

.auth-modal .auth-signin {
  width: 100%;
  justify-content: center;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.85rem;
}

/* —— status + footer —— */
.status {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.status.live { color: var(--up); }
.status.err { color: var(--down); }

.site-foot .feed-status {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-foot .feed-status.live {
  color: var(--muted);
}

.site-foot .feed-status.ok {
  color: var(--up);
}

main { padding: 1rem 1.5rem 2rem; }

.site-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.5rem 1.35rem;
  border-top: 1px solid var(--border);
}

.site-foot .credit {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
}

.site-foot .credit:hover {
  color: var(--text);
  opacity: 0.95;
}


.site-foot .update-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  opacity: 0.9;
  cursor: pointer;
  text-decoration: none;
}

.site-foot .update-note:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-foot .app-ver {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.75;
}

/* —— section / grid / cell (compact board) —— */
.section-title {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.board:first-child .section-title { margin-top: 0.25rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.cell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.85rem 0.9rem 0.7rem;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 0.35rem;
  min-height: 184px;
  transition: opacity 0.3s ease, background-color 0.45s ease, border-color 0.45s ease;
}

body.sorting .cell {
  transition: none !important;
}

.cell.hl-up {
  background: rgba(61, 214, 140, 0.16);
  border-color: rgba(61, 214, 140, 0.45);
}

.cell.hl-down {
  background: rgba(240, 113, 120, 0.16);
  border-color: rgba(240, 113, 120, 0.45);
}

.cell.stale {
  opacity: 0.45;
}

body.compact .grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.45rem;
}

body.compact .cell {
  padding: 0.55rem 0.6rem 0.45rem;
  gap: 0.2rem;
  min-height: 144px;
}

body.compact .cell .price {
  font-size: 1rem;
  letter-spacing: -0.03em;
}
body.compact .cell .meta {
  font-size: 0.6rem;
  letter-spacing: -0.02em;
}
body.compact .spark { height: 46px; }
body.compact .cell.pred .title { font-size: 0.7rem; min-height: 1.8em; }
body.compact main { padding: 0.65rem 1rem 1.5rem; }
body.compact .section-title { margin: 0.85rem 0 0.5rem; }

.sym-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
}

.sym-icon,
.coin-wl-icon {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.sym-icon.is-miss,
.coin-wl-icon.is-miss {
  display: none !important;
}

.coin-wl-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.1rem;
}

.cell .sym-row > .sym {
  margin-right: auto;
}

.cell .sym {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  letter-spacing: 0.04em;
  font-weight: 600;
  text-decoration: none;
}

a.sym:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.copy-mint {
  appearance: none;
  position: absolute;
  top: -0.15rem;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cell:hover .copy-mint,
.cell:focus-within .copy-mint {
  opacity: 1;
  pointer-events: auto;
}

.copy-mint:hover {
  color: var(--text);
  border-color: var(--muted);
}

.copy-mint.copied {
  color: var(--up);
  border-color: var(--up);
  opacity: 1;
  pointer-events: auto;
}

.cell[data-has-copy="1"] .venue-tag {
  margin-right: 1.5rem;
}

.venue-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.venue-tag.flash {
  animation: venueFlash 0.7s ease;
}

@keyframes venueFlash {
  0% { opacity: 1; }
  40% { opacity: 0.72; }
  100% { opacity: 1; }
}

.cell .price {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cell .meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.25rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.cell .meta span { display: block; }
.cell .meta b {
  color: var(--text);
  font-weight: 500;
}

.cell .meta b.chg.up { color: var(--up); }
.cell .meta b.chg.down { color: var(--down); }

.spark {
  width: 100%;
  height: 68px;
  margin-top: 0.15rem;
}

.spark polyline {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.spark.up polyline { stroke: var(--up); }
.spark.down polyline { stroke: var(--down); }

/* —— tabs + inputs + buttons —— */
.add-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.tab {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  border-radius: 2px;
}
.tab.on { color: var(--text); border-color: var(--muted); }

.add-label {
  display: block;
  margin: 0.15rem 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.add-label.add-section {
  color: var(--accent);
  letter-spacing: 0.04em;
  font-weight: 600;
}

.add-jup {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}

.jup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: start;
}

.jup-row .add-input {
  margin-bottom: 0;
}

.add-input {
  width: 100%;
  margin-bottom: 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.5rem 0.6rem;
  border-radius: 2px;
}
.add-input:focus {
  outline: none;
  border-color: var(--accent);
}

.add-btn {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  border-radius: 2px;
}
.add-btn:hover { border-color: var(--muted); }
.add-btn.apply {
  border-color: var(--accent);
  color: var(--accent);
}
.add-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* —— range combobox —— */
/* Range picker: period (primary) vs point sampling (secondary) */
.compare-range-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.12rem;
  line-height: 1.15;
  padding: 0.4rem 0.65rem;
  min-height: auto;
  text-align: left;
}

.compare-range-main {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.compare-range-panel {
  min-width: min(18rem, calc(100vw - 1.5rem));
  padding: 0.25rem;
}

.compare-range-panel .compare-range-option {
  align-items: flex-start;
  white-space: normal;
  width: 100%;
  padding: 0.55rem 0.65rem;
  line-height: 1.2;
}

.compare-range-opt-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.compare-range-opt-main {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.compare-range-opt-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
}

.compare-range-panel .compare-range-option.on .compare-range-opt-main {
  color: var(--accent);
}

.compare-range-panel .compare-range-option.on .compare-range-opt-sub {
  color: rgba(110, 176, 255, 0.75);
}

/* —— chart watchlist row —— */
.coin-wl {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0.15rem 0.55rem 0.35rem 0;
  border-right: 1px solid var(--border);
  max-height: calc(100vh - 8.5rem);
  align-self: start;
  position: sticky;
  top: 0.5rem;
}

.coin-wl[hidden] {
  display: none !important;
}

.coin-wl-btn {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.45rem;
  align-items: start;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.45rem;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  line-height: 1.2;
}

.coin-wl-btn:hover {
  border-color: var(--border);
  background: rgba(110, 176, 255, 0.06);
}

.coin-wl-btn.on {
  border-color: rgba(110, 176, 255, 0.45);
  background: rgba(110, 176, 255, 0.1);
}

.coin-wl-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  min-width: 0;
}

.coin-wl-sym {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.15;
}

.coin-wl-venue {
  opacity: 0.5;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-wl-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.coin-wl-quote {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.15;
  padding-top: 0;
}

.coin-wl-price {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.15;
}

.coin-wl-chg {
  font-size: 0.58rem;
  color: var(--muted);
  line-height: 1.1;
}

.coin-wl-chg.up { color: var(--up); }
.coin-wl-chg.down { color: var(--down); }

.venue-tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.1rem 0.35rem;
}

.menu-btn {
  /* trigger inside .menu — uses .toggle */
}

/* —— v3.0 unified primitives (buttons, inputs, badges, stats-bar, tables) —— */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ctrl-h);
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}
.btn:hover { border-color: var(--border-strong); background: var(--surface); }
.btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.btn-primary {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn-primary:hover { background: rgba(110, 176, 255, 0.18); border-color: var(--accent); }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface); border-color: transparent; }
.btn-danger {
  border-color: rgba(240, 113, 120, 0.45);
  color: var(--down);
}
.btn-danger:hover { background: var(--down-soft); border-color: var(--down); }

.field,
.select {
  appearance: none;
  height: var(--ctrl-h);
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  transition: border-color 0.14s ease;
}
.field::placeholder { color: var(--subtle); }
.field:hover, .select:hover { border-color: var(--border-strong); }
.field:focus, .select:focus { outline: none; border-color: var(--accent); }
.select {
  padding-right: 1.8rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238893a7' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}
.badge.up { color: var(--up); border-color: rgba(61, 214, 140, 0.4); background: var(--up-soft); }
.badge.down { color: var(--down); border-color: rgba(240, 113, 120, 0.4); background: var(--down-soft); }
.badge.accent { color: var(--accent); border-color: rgba(110, 176, 255, 0.45); background: var(--accent-soft); }
.badge.warn { color: var(--warn); border-color: rgba(224, 179, 65, 0.42); background: var(--warn-soft); }

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1.1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-bar .stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}
.stats-bar .stat-k {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats-bar .stat-v {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stats-bar .stat-v.up { color: var(--up); }
.stats-bar .stat-v.down { color: var(--down); }
.stats-bar .stat-sep {
  align-self: stretch;
  width: 1px;
  min-height: 0.9em;
  background: var(--border);
}

.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.table-card table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.table-card th,
.table-card td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.table-card th {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(11, 13, 17, 0.55);
  font-weight: 600;
}
.table-card tbody tr:hover { background: var(--surface-2); }
.table-card tbody tr.is-selected { background: var(--accent-soft); }
.table-card tbody tr:last-child td { border-bottom: 0; }
