:root,
[data-theme="dark"] {
  --bg: #080d18;
  --surface-1: #0f1624;
  --surface-2: #162033;
  --surface-3: #1d2940;
  --border: rgba(148, 163, 184, 0.13);
  --border-strong: rgba(148, 163, 184, 0.24);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #14b8a6;
  --primary-ink: #042f2e;
  --primary-soft: rgba(20, 184, 166, 0.14);
  --profit: #22c55e;
  --profit-soft: rgba(34, 197, 94, 0.13);
  --loss: #ef4444;
  --loss-soft: rgba(239, 68, 68, 0.13);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.13);
  --neutral-soft: rgba(148, 163, 184, 0.12);
  --topbar-bg: rgba(8, 13, 24, 0.92);
  --nav-bg: rgba(11, 17, 30, 0.96);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f3f6fa;
  --surface-1: #ffffff;
  --surface-2: #edf2f7;
  --surface-3: #e2e8f0;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #0d9488;
  --primary-ink: #ffffff;
  --primary-soft: rgba(13, 148, 136, 0.12);
  --profit: #16a34a;
  --profit-soft: rgba(22, 163, 74, 0.12);
  --loss: #dc2626;
  --loss-soft: rgba(220, 38, 38, 0.11);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.12);
  --neutral-soft: rgba(71, 85, 105, 0.10);
  --topbar-bg: rgba(243, 246, 250, 0.94);
  --nav-bg: rgba(255, 255, 255, 0.96);
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.48;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

body.compact {
  font-size: 13px;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding-top: var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px));
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
}

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}

.brand-title-wrap {
  min-width: 0;
  flex: 1;
}

.brand-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text);
}

.ver-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 1px 6px;
  border-radius: 5px;
  letter-spacing: 0.2px;
}

.status-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.status-dot-pill,
.conn-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: var(--text-muted);
}

.status-online { color: var(--profit); }
.status-online .dot { background: var(--profit); }
.status-warn { color: var(--warning); }
.status-warn .dot { background: var(--warning); }
.status-off { color: var(--loss); }
.status-off .dot { background: var(--loss); }
.status-neutral .dot { background: var(--text-muted); }

.conn-ok .dot { background: var(--primary); }
.conn-ok { color: var(--primary); }
.conn-warn .dot { background: var(--warning); }
.conn-err .dot { background: var(--loss); }

.mode-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--warning-soft);
  color: var(--warning);
  letter-spacing: 0.3px;
}

.mode-tag.live {
  background: var(--profit-soft);
  color: var(--profit);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.icon-btn:active { transform: scale(0.95); }
.icon-btn.spinning { animation: spin 0.8s linear infinite; }
.icon-btn-sm { min-width: 34px; min-height: 34px; font-size: 14px; }

@keyframes spin { to { transform: rotate(360deg); } }

.notice-strip {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notice-amber {
  background: var(--warning-soft);
  color: var(--warning);
  border-left-color: var(--warning);
}
.notice-danger {
  background: var(--loss-soft);
  color: var(--loss);
  border-left-color: var(--loss);
}

.pull-indicator {
  text-align: center;
  padding: 8px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

.hidden { display: none !important; }

/* ---------------- Page & Layout ---------------- */
.page-content {
  padding: 14px;
  flex: 1;
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}

.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.page-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.desktop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 720px) {
  .desktop-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------- Segmented Sub-tabs ---------------- */
.subtabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}

.subtab-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 6px;
  min-height: 38px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.subtab-btn.active {
  background: var(--surface-3);
  color: var(--text);
}

/* ---------------- Cards & Surfaces ---------------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  min-width: 0;
}

.card-flush {
  padding: 12px 14px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.card-caption {
  font-size: 11px;
  color: var(--text-muted);
}

.hero-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-amount {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 4px 0 2px;
  line-height: 1.2;
  word-break: break-word;
}

.kpi-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.kpi-grid-3 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 520px) {
  .kpi-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.metric-well {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 11px;
  min-width: 0;
}

.metric-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.metric-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------------- Key-Value Rows ---------------- */
.kv-list {
  display: flex;
  flex-direction: column;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.kv-row:last-child { border-bottom: none; padding-bottom: 2px; }
.kv-row:first-child { padding-top: 2px; }

.kv-k {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 0;
  flex: 1 1 auto;
}

.kv-v {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  flex: 0 1 auto;
  max-width: 60%;
  word-break: break-word;
}

/* ---------------- Badges & Pills ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-profit { background: var(--profit-soft); color: var(--profit); }
.badge-loss { background: var(--loss-soft); color: var(--loss); }
.badge-warn { background: var(--warning-soft); color: var(--warning); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-neutral { background: var(--neutral-soft); color: var(--text-secondary); }

.text-profit { color: var(--profit); }
.text-loss { color: var(--loss); }
.text-warn { color: var(--warning); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-secondary); }

/* ---------------- Buttons & Chips ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-danger { background: var(--loss-soft); color: var(--loss); border-color: rgba(239, 68, 68, 0.35); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-row > .btn { flex: 1 1 140px; }

.link-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
}

.chip-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.chip-bar::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 7px 12px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(20, 184, 166, 0.45);
}

/* ---------------- Inputs & Filters ---------------- */
.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.input,
.select {
  width: 100%;
  min-height: 40px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}

/* ---------------- Progress Track ---------------- */
.bar-row { margin-bottom: 10px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
  gap: 8px;
}
.progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* ---------------- Charts ---------------- */
.chart-box {
  position: relative;
  width: 100%;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 6px;
}
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  touch-action: pan-y;
}
.chart-readout {
  font-size: 11px;
  color: var(--text-secondary);
  min-height: 16px;
  margin-top: 4px;
}

/* ---------------- Tables ---------------- */
.table-scroll {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.data-table th,
table.data-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
table.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
}

/* ---------------- Clickable Trade / Signal Rows ---------------- */
.list-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.list-card:hover { border-color: var(--border-strong); }

.alert-banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid;
  font-size: 13px;
}
.alert-banner.loss {
  background: var(--loss-soft);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--loss);
}
.alert-banner.warn {
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--warning);
}

/* ---------------- Toggle Switch ---------------- */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border-radius: 999px;
  transition: 0.2s;
  cursor: pointer;
}
.switch-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* ---------------- Fixed 5-Tab Bottom Navigation ---------------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 35;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  max-width: 960px;
  margin: 0 auto;
  padding: 6px 6px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 50px;
  padding: 5px 2px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  min-width: 0;
}

.nav-item .nav-ic {
  font-size: 17px;
  line-height: 1;
}

.nav-item .nav-lbl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 359px) {
  .nav-item {
    font-size: 9.5px;
    padding: 5px 1px;
  }
  .subtab-btn {
    font-size: 11px;
    padding: 8px 4px;
  }
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-soft);
}

/* ---------------- Modals & Bottom Sheets ---------------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sheet-backdrop.sheet-bottom {
  align-items: flex-end;
  padding: 0;
}
.modal-card {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 18px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}
.modal-desc {
  margin: 8px 0 18px;
  font-size: 13px;
  color: var(--text-secondary);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.sheet-card {
  background: var(--surface-1);
  border-top: 1px solid var(--border-strong);
  border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 0 auto 10px;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sheet-title { margin: 0; font-size: 16px; font-weight: 700; }
.sheet-body { overflow-y: auto; flex: 1; }

.ext-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ext-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-height: 52px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.ext-menu-item:active { background: var(--surface-3); }

/* ---------------- States & Toast ---------------- */
.empty-state,
.error-state {
  text-align: center;
  padding: 26px 14px;
  color: var(--text-secondary);
}
.empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0 4px;
}
.empty-sub { font-size: 12px; color: var(--text-muted); margin: 0; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 50%, var(--surface-1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 14px;
}
.skeleton-stack { display: flex; flex-direction: column; gap: 12px; }
.skeleton-card { height: 140px; }
.skeleton-grid { height: 96px; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.toast-root {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: calc(100% - 28px);
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.toast {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.toast.ok { border-left: 4px solid var(--profit); }
.toast.err { border-left: 4px solid var(--loss); }
.toast.warn { border-left: 4px solid var(--warning); }

.ext-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

/* Real-time price flash animations */
@keyframes flash-green { 0% { background: rgba(34, 197, 94, 0.25); } 100% { background: transparent; } }
@keyframes flash-red   { 0% { background: rgba(239, 68, 68, 0.25); } 100% { background: transparent; } }
.flash-up   { animation: flash-green 0.8s ease-out; border-radius: 4px; }
.flash-down { animation: flash-red   0.8s ease-out; border-radius: 4px; }

/* Market WS status indicator */
.ws-status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--neutral-soft); color: var(--text-secondary); }
.ws-status-pill .ws-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ws-status-pill.ws-live .ws-dot { background: var(--profit); }
.ws-status-pill.ws-stale .ws-dot { background: var(--warning); }
.ws-status-pill.ws-off .ws-dot { background: var(--loss); }
.ws-status-pill.ws-disabled .ws-dot { background: var(--text-muted); }

/* Live price card */
.live-price-card { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 6px; }
.live-price-card .lpc-sym { font-weight: 700; font-size: 14px; color: var(--text); }
.live-price-card .lpc-price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.live-price-card .lpc-chg { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 5px; }
.live-price-card .lpc-chg.up { color: var(--profit); background: var(--profit-soft); }
.live-price-card .lpc-chg.down { color: var(--loss); background: var(--loss-soft); }
.live-price-card .lpc-vol { font-size: 11px; color: var(--text-muted); }

/* Candlestick chart */
.candle-chart-wrap { position: relative; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.candle-chart-wrap svg { display: block; }
.tf-selector { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tf-selector .chip { min-width: 36px; }
