:root {
  --bg: #0d1110;
  --panel: #151a18;
  --panel-2: #1b211f;
  --line: rgba(232, 238, 228, 0.12);
  --text: #ecf2ea;
  --muted: #91a096;
  --green: #54f0a2;
  --cyan: #64d9ff;
  --gold: #ffd166;
  --red: #ff5c7a;
  --orange: #ff9866;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --panel-row-min-h: 520px;
  --panel-row-min-h-tall: 680px;
  --panel-body-scroll-h: 380px;
  --panel-body-scroll-h-compact: 260px;
  --panel-body-scroll-h-tall: 460px;
  --nav-top-item-height: 27px;
  --nav-top-item-padding-x: 9px;
  --nav-top-item-min-width: 0;
  --nav-top-item-font-size: 12px;
  --nav-top-item-gap: 6px;
  --nav-top-item-radius: 6px;
}

/* Desktop browsers must never receive the phone-app layout, even in a narrow window. */
@media (max-width: 760px) and (hover: hover) and (pointer: fine) {
  html,
  body {
    height: auto;
    overflow: auto;
    background:
      radial-gradient(circle at 72% 12%, rgba(84, 240, 162, 0.13), transparent 28rem),
      radial-gradient(circle at 12% 80%, rgba(100, 217, 255, 0.08), transparent 22rem),
      linear-gradient(135deg, #0b0d0d 0%, #111615 42%, #16120d 100%);
    color: var(--text);
  }

  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    height: 100vh;
    background: transparent;
  }

  .sidebar {
    display: none;
  }

  .dashboard {
    width: auto;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: transparent;
    color: var(--text);
    border: 0;
  }

  .mobile-back-home,
  .mobile-home-actions,
  .mobile-only {
    display: none !important;
  }

  .desktop-only {
    display: inline-flex !important;
  }

  .dashboard-top {
    position: static;
    inset: auto;
    transform: none;
    width: 100%;
    margin: 0 0 16px;
    padding: 0 0 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .dashboard-top .nav-top {
    display: flex !important;
    grid-template-columns: none;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    min-width: 0;
    gap: 4px;
    padding: 3px;
    border: 1px solid rgba(232, 238, 228, 0.1);
    border-radius: var(--nav-top-item-radius);
    background: rgba(255, 255, 255, 0.035);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .dashboard-top .nav-top::-webkit-scrollbar {
    display: none;
  }

  .dashboard-top .top-actions {
    position: static;
    display: flex !important;
    width: auto;
    padding: 0;
    transform: none;
    pointer-events: auto;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .dashboard-top-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .chain-search-field--nav {
    width: 132px;
    flex: 0 0 132px;
  }

  .chain-search-field--nav .chain-search-pill {
    min-height: 27px;
    padding: 0 8px 0 7px;
    border-color: rgba(232, 238, 228, 0.14);
    background: rgba(255, 255, 255, 0.04);
  }

  .chain-search-field--nav .chain-search-icon {
    font-size: 13px;
  }

  .chain-search-field--nav .chain-search-input {
    font-size: 11px;
  }

  .chain-search-field--nav .chain-search-dropdown {
    right: 0;
    left: auto;
    width: 280px;
  }

  .dashboard-top .nav-top .nav-item {
    display: inline-flex !important;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: var(--nav-top-item-height);
    height: auto;
    padding: 0 var(--nav-top-item-padding-x);
    border-radius: var(--nav-top-item-radius);
    color: var(--text);
    background: transparent;
    font-size: var(--nav-top-item-font-size);
    font-weight: 700;
    white-space: nowrap;
  }

  .dashboard-top .nav-top .nav-item.active {
    border-color: rgba(84, 240, 162, 0.42);
    background: rgba(84, 240, 162, 0.12);
    color: var(--green);
  }

  .topbar {
    display: flex;
    padding: 0;
    margin-bottom: 14px;
  }

  .topbar h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(20px, 2vw, 30px);
  }

  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
    padding: 0;
    overflow: visible;
  }

  .metric,
  .radar-panel,
  .funnel-panel,
  .table-panel,
  .alerts-panel {
    background: rgba(21, 26, 24, 0.88);
    color: var(--text);
  }

  body[data-view="radar"] .view-panel[data-panel="radar"] {
    display: block !important;
  }
}

/* Mobile polish: homepage one-screen fit (overridden by final block below). */
@media (max-width: 760px) {
  body[data-view="radar"] .dashboard {
    height: 100dvh;
    max-height: 100dvh;
    padding: max(8px, env(safe-area-inset-top)) 16px calc(62px + max(8px, env(safe-area-inset-bottom)));
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body[data-view="radar"] .topbar {
    flex: 5 5 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  body[data-view="radar"] .topbar > div {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body[data-view="radar"] .topbar h2 {
    flex: 0 0 auto;
    margin: 0 0 clamp(6px, 1.2dvh, 10px);
    font-size: clamp(20px, 5.2vw, 26px);
    line-height: 1.08;
  }

  body[data-view="radar"] .mobile-home-actions {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(5px, 1dvh, 8px);
  }

  body[data-view="radar"] .mobile-home-shortcut {
    min-height: 0;
    border-radius: clamp(12px, 3vw, 16px);
    font-size: clamp(10px, 2.8vw, 12px);
    line-height: 1.15;
  }

  body[data-view="radar"] .metrics-grid {
    flex: 4 4 0;
    min-height: 0;
    align-content: stretch;
    gap: clamp(5px, 1dvh, 8px);
    margin-top: clamp(6px, 1.2dvh, 10px);
    padding-bottom: 0;
  }

  body[data-view="radar"] .metric {
    min-height: 0;
    padding: clamp(8px, 1.5dvh, 12px);
    border-radius: clamp(14px, 3.5vw, 18px);
  }

  body[data-view="radar"] .metric strong,
  body[data-view="radar"] .metric.danger strong,
  body[data-view="radar"] .metric.anomaly-metric strong {
    font-size: clamp(18px, 5vw, 24px);
  }

  .dashboard-top {
    width: min(calc(100% - 32px), 408px);
    padding: 8px;
  }

  .dashboard-top .nav-top {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    justify-items: stretch;
    gap: 6px;
  }

  .dashboard-top .nav-top .nav-item {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 52px;
    min-height: 52px;
    padding: 0;
    text-align: center;
    white-space: nowrap;
  }
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 12%, rgba(84, 240, 162, 0.13), transparent 28rem),
    radial-gradient(circle at 12% 80%, rgba(100, 217, 255, 0.08), transparent 22rem),
    linear-gradient(135deg, #0b0d0d 0%, #111615 42%, #16120d 100%);
  color: var(--text);
  font-family: var(--font-body);
}

button,
a {
  font: inherit;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.app-shell > .dashboard {
  min-height: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(11, 14, 13, 0.78);
  padding: 24px;
  overflow: hidden;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(84, 240, 162, 0.42);
  background: #102019;
  color: var(--green);
  font-family: var(--font-display);
  font-weight: 800;
  border-radius: 8px;
}

.brand h1,
.brand p,
.topbar h2,
.eyebrow,
.panel-head h3 {
  margin: 0;
}

.brand h1,
.topbar h2,
.panel-head h3,
.metric strong {
  font-family: var(--font-display);
}

.brand h1 {
  font-size: 20px;
}

.brand p,
.eyebrow,
.metric small,
.pool-meta,
.alert-feed p,
.panel-source,
.source-note,
.alert-source {
  color: var(--muted);
}

.brand p {
  font-size: 12px;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 8px;
  flex-shrink: 0;
}

.nav-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nav-top-item-gap);
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.nav-top .nav-item {
  width: auto;
  min-height: var(--nav-top-item-height);
  min-width: var(--nav-top-item-min-width);
  padding: 0 var(--nav-top-item-padding-x);
  font-size: var(--nav-top-item-font-size);
  border-radius: var(--nav-top-item-radius);
  text-align: center;
  white-space: nowrap;
}

.nav-item,
.segmented button,
.icon-btn,
.primary-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  text-align: left;
  padding: 0 14px;
  border-radius: 8px;
}

.nav-item.active,
.segmented .active {
  border-color: rgba(84, 240, 162, 0.42);
  background: rgba(84, 240, 162, 0.12);
  color: var(--green);
}

.section-title,
.chain-row,
.panel-head,
.pool-row,
.alert-row,
.topbar,
.top-actions,
.detail-row,
.source-card-top,
.source-mini-row {
  display: flex;
  align-items: center;
}

.section-title {
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.sidebar-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.upcoming-badge {
  flex-shrink: 0;
  min-width: 36px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.upcoming-badge.fresh {
  border-color: rgba(100, 217, 255, 0.45);
  color: #9be8ff;
  background: rgba(100, 217, 255, 0.08);
}

.upcoming-sidebar-row:hover .upcoming-badge.fresh {
  border-color: rgba(100, 217, 255, 0.75);
}

.chain-list,
.source-mini {
  display: grid;
  gap: 10px;
}

.watchlist {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin-top: 4px;
}

.watchlist .chain-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 2px;
}

.chain-row,
.detail-row,
.pool-row.linkish,
.alert-row.linkish {
  color: inherit;
  text-decoration: none;
}

.chain-row:hover,
.detail-row:hover,
.pool-row:hover {
  border-color: rgba(84, 240, 162, 0.35);
  text-decoration: none;
}

.chain-row {
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chain-row strong,
.detail-row strong {
  display: block;
  font-size: 14px;
}

.chain-row span,
.detail-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.score {
  color: var(--green);
  font-weight: 800;
}

.source-aside {
  margin-top: 24px;
}

.source-mini-row {
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.source-mini-row strong {
  display: block;
  font-size: 13px;
}

.source-mini-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.4;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dot.up {
  background: var(--green);
  box-shadow: 0 0 10px rgba(84, 240, 162, 0.7);
}

.dot.down {
  background: var(--red);
}

.dashboard {
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.dashboard > .dashboard-top,
.dashboard > .topbar,
.dashboard > .metrics-grid,
.dashboard > .mobile-home-body {
  flex-shrink: 0;
}

.dashboard > .view-panel:not(.hidden) {
  flex: 0 0 auto;
  overflow: visible;
  display: block;
  margin-bottom: 14px;
}

.dashboard > .view-panel:not(.hidden):last-child {
  margin-bottom: 0;
}

.dashboard::-webkit-scrollbar {
  width: 8px;
}

.dashboard::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.dashboard-top .top-actions {
  flex-shrink: 0;
}

.dashboard-top-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.eyebrow {
  color: var(--cyan);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}

.topbar h2 {
  font-size: clamp(24px, 3vw, 38px);
  margin-top: 5px;
}

.top-actions {
  gap: 10px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.primary-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--green);
  color: #08100c;
  border: 0;
  font-weight: 800;
}

.boost-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.05;
  white-space: nowrap;
}

.boost-btn .boost-btn-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.boost-btn .boost-btn-time {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric,
.radar-panel,
.funnel-panel,
.table-panel,
.alerts-panel,
.source-banner {
  background: rgba(21, 26, 24, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 16px;
}

.metric span,
.metric small {
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 28px;
  color: var(--green);
}

.metric.danger strong {
  color: var(--red);
}

.metric.anomaly-metric {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  appearance: none;
  background: rgba(21, 26, 24, 0.88);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.metric.metric-link {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  appearance: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.metric.metric-link:hover {
  transform: translateY(-1px);
  border-color: rgba(84, 240, 162, 0.35);
}

.metric.metric-link:focus-visible {
  outline: 2px solid rgba(84, 240, 162, 0.55);
  outline-offset: 2px;
}

.metric.anomaly-metric:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 92, 122, 0.55);
}

.metric.anomaly-metric:focus-visible {
  outline: 2px solid rgba(255, 92, 122, 0.8);
  outline-offset: 2px;
}

.metric.anomaly-metric strong {
  color: #ff6b6b;
}

.metric.anomaly-metric.alarm {
  border-color: rgba(255, 77, 79, 0.85);
  background: rgba(18, 18, 18, 0.96);
  box-shadow: 0 0 8px rgba(255, 77, 79, 0.45);
  animation: alert-highlight-pulse 2s ease-in-out infinite;
}

.metric.anomaly-metric.alarm strong {
  color: #4ade80;
}

.metric.anomaly-metric.alarm small {
  color: var(--muted);
}

@keyframes alert-highlight-pulse {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(255, 77, 79, 0.35);
    border-color: rgba(255, 77, 79, 0.75);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 77, 79, 0.55);
    border-color: rgba(255, 77, 79, 0.95);
  }
}

.bridge-panel .bridge-board-wrap {
  flex: 1;
  min-height: 0;
}

.bridge-panel .bridge-board {
  max-height: none;
}

.alert-highlight {
  position: relative;
  border: 1px solid rgba(255, 77, 79, 0.75);
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.96);
  box-shadow: 0 0 8px rgba(255, 77, 79, 0.35);
  animation: alert-highlight-pulse 2s ease-in-out infinite;
}

.alert-highlight::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 4px;
  border-radius: 0 2px 2px 0;
  background: #ff4d4f;
  pointer-events: none;
}

.watchlist.alert-highlight {
  margin-top: 4px;
  padding: 12px 12px 8px 14px;
  overflow: hidden;
}

.watchlist.alert-highlight .section-title strong {
  color: #4ade80;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.anomaly-panel.alert-highlight {
  border-color: rgba(255, 77, 79, 0.75);
  overflow: hidden;
}

.anomaly-panel.alert-highlight .anomaly-panel-count {
  color: #4ade80;
  font-size: 18px;
  font-weight: 800;
}

.metric.anomaly-metric.alarm::before {
  width: 4px;
  opacity: 1;
}

.mobile-meme-panel.alert-highlight .queue-count {
  color: #4ade80;
  border-color: rgba(255, 77, 79, 0.45);
  background: rgba(255, 77, 79, 0.08);
}

.source-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.source-card {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
}

.source-card.up {
  border-color: rgba(84, 240, 162, 0.28);
}

.source-card.down {
  border-color: rgba(255, 92, 122, 0.35);
}

.source-card-top {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.source-card-top span {
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
}

.source-card.down .source-card-top span {
  color: var(--red);
}

.source-card p,
.source-card small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.source-card small {
  display: block;
  margin-top: 8px;
  color: var(--cyan);
}

.source-note,
.panel-source {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.workbench,
.split-grid,
.lower-grid,
.discover-grid,
.pools-layout,
.watch-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 0;
  align-items: stretch;
}

.discover-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: var(--panel-row-min-h);
}

.workbench {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.9fr);
  min-height: var(--panel-row-min-h-tall);
}

.split-grid,
.lower-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  min-height: var(--panel-row-min-h);
}

.pools-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  min-height: var(--panel-row-min-h);
}

.watch-layout {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
  min-height: var(--panel-row-min-h);
}

.view-panel > .full-panel {
  margin-bottom: 0;
  min-height: var(--panel-row-min-h);
}

.view-panel[data-panel="watch"] > .watch-layout {
  margin-bottom: 14px;
}

.view-panel[data-panel="watch"] > .watch-snapshot-grid {
  overflow: visible;
}

.workbench > .radar-panel,
.workbench > .funnel-panel {
  min-height: var(--panel-row-min-h-tall);
}

.discover-grid > .table-panel,
.split-grid > .table-panel,
.lower-grid > .table-panel,
.lower-grid > .alerts-panel,
.pools-layout > .table-panel,
.pools-layout > .alerts-panel,
.watch-layout > .table-panel,
.watch-layout > .watch-feed-panel {
  min-height: var(--panel-row-min-h);
  overflow: hidden;
}

.radar-panel,
.funnel-panel,
.table-panel,
.alerts-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.panel-head--with-search h3 {
  flex: 0 0 auto;
  margin: 0;
}

.panel-head--with-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chain-search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 160px;
  max-width: 320px;
}

.chain-search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: text;
}

.chain-search-icon {
  font-size: 15px;
  line-height: 1;
  color: var(--muted);
}

.chain-search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.chain-search-input::placeholder {
  color: var(--muted);
}

.chain-search-dropdown {
  position: absolute;
  z-index: 200;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.chain-search-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.chain-search-option:hover,
.chain-search-option:focus-visible {
  background: rgba(84, 240, 162, 0.06);
}

.chain-search-option:last-child {
  border-bottom: 0;
}

.chain-search-option strong {
  font-size: 14px;
}

.chain-search-option span {
  font-size: 12px;
  color: var(--muted);
}

.chain-search-empty {
  padding: 14px;
  font-size: 13px;
  color: var(--muted);
}

.panel-head h3 {
  font-size: 18px;
  margin-top: 4px;
}

.full-panel {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  min-height: var(--panel-row-min-h);
}

.full-panel > .panel-head {
  flex-shrink: 0;
}

.panel-scroll,
.table-panel > .detail-table,
.table-panel > .chain-dex-board,
.alerts-panel > .alert-feed,
.full-panel > .detail-table,
.full-panel > .anomaly-board,
.watch-feed-panel > .alert-feed,
.watch-preview-panel > .alert-feed {
  flex: 1 1 auto;
  min-height: var(--panel-body-scroll-h);
  max-height: var(--panel-body-scroll-h);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.funnel-panel > .new-chain-list {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.inflow-pie-card > .compact-table,
.inflow-surge-card > .compact-table {
  flex: 1 1 auto;
  min-height: var(--panel-body-scroll-h-compact);
  max-height: var(--panel-body-scroll-h-compact);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 2px;
}

.live-pill,
.time-badge,
.queue-count,
.source-chip,
.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(84, 240, 162, 0.12);
  border: 1px solid rgba(84, 240, 162, 0.24);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.source-chip {
  background: rgba(100, 217, 255, 0.1);
  border-color: rgba(100, 217, 255, 0.24);
  color: var(--cyan);
  white-space: nowrap;
}

.mini-badge {
  min-height: 20px;
  margin-right: 6px;
  padding: 0 7px;
  font-size: 11px;
}

.radar-panel {
  display: flex;
  flex-direction: column;
  min-height: var(--panel-row-min-h-tall);
  overflow: hidden;
}

.heat-board-wrap {
  flex: 1 1 auto;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0f0d;
  overflow: hidden;
}

.heat-legend-bar {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.heat-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.heat-legend-chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.heat-legend-chip.tvl::before {
  background: rgba(84, 240, 162, 0.85);
}

.heat-legend-chip.dex::before {
  background: rgba(100, 217, 255, 0.85);
}

.heat-legend-chip.score::before {
  background: linear-gradient(180deg, #ff5c7a, #ffd166);
}

.heat-board {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 220px;
  max-height: var(--panel-body-scroll-h);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 2px;
}

.heat-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.heat-row:hover {
  border-color: rgba(84, 240, 162, 0.35);
  text-decoration: none;
}

.heat-row.hot {
  border-color: rgba(255, 92, 122, 0.28);
  background: rgba(255, 92, 122, 0.06);
}

.heat-row.bridge-empty {
  opacity: 0.78;
  border-style: dashed;
}

.heat-row.bridge-empty .heat-rank {
  color: var(--muted);
}

.heat-row.warm {
  border-color: rgba(255, 209, 102, 0.22);
}

.heat-rank {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.heat-row:nth-child(1) .heat-rank,
.heat-row:nth-child(2) .heat-rank,
.heat-row:nth-child(3) .heat-rank {
  color: var(--green);
}

.heat-main {
  min-width: 0;
}

.heat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.heat-top strong {
  font-size: 14px;
}

.heat-top span {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat-bars {
  display: grid;
  gap: 4px;
}

.heat-bar-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
}

.heat-bar-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.heat-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.heat-bar-fill {
  height: 100%;
  border-radius: inherit;
  min-width: 2px;
  transition: width 0.35s ease;
}

.heat-bar-fill.tvl {
  background: linear-gradient(90deg, rgba(84, 240, 162, 0.55), rgba(84, 240, 162, 0.95));
}

.heat-bar-fill.dex {
  background: linear-gradient(90deg, rgba(100, 217, 255, 0.45), rgba(100, 217, 255, 0.92));
}

.heat-bar-val {
  color: #d5e0d2;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.heat-raw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  margin-top: 6px;
  font-size: 11px;
  color: #91a096;
}

.heat-raw-grid b {
  color: #ecf2ea;
  font-weight: 600;
  margin-left: 4px;
}

.heat-score {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.heat-row.hot .heat-score {
  color: #ff5c7a;
  border-color: rgba(255, 92, 122, 0.35);
  background: rgba(255, 92, 122, 0.1);
}

.heat-row.warm .heat-score {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.3);
}

.heat-row.cool .heat-score {
  color: #64d9ff;
}

.inflow-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
  flex: 0 0 auto;
  min-height: 240px;
  align-items: stretch;
}

@media (min-width: 1280px) {
  .inflow-board {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

.inflow-pie-card,
.inflow-surge-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 15, 13, 0.55);
}

.panel-head.compact {
  margin-bottom: 8px;
}

.panel-head.compact h3 {
  font-size: 14px;
}

.pie-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.pie-chart-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex: 0 0 auto;
}

#inflow-pie {
  display: block;
  width: clamp(108px, 42%, 148px);
  height: auto;
  aspect-ratio: 1;
}

.inflow-legend {
  display: grid;
  gap: 5px;
  min-width: 0;
  width: 100%;
}

.legend-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.legend-row:hover {
  border-color: rgba(84, 240, 162, 0.35);
  text-decoration: none;
}

.legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.legend-copy {
  min-width: 0;
}

.legend-row strong {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-row span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-row b {
  justify-self: end;
  color: var(--green);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.surge-list {
  display: grid;
  gap: 6px;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
  max-height: min(280px, 36vh);
  padding-right: 2px;
}

.surge-row {
  display: grid;
  grid-template-columns: minmax(52px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
}

.surge-row:hover {
  border-color: rgba(255, 92, 122, 0.35);
  text-decoration: none;
}

.surge-pct {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  min-width: 52px;
  max-width: 84px;
  padding: 5px 4px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
  background: rgba(255, 209, 102, 0.14);
  color: var(--gold);
  border: 1px solid rgba(255, 209, 102, 0.28);
}

.surge-pct.high {
  background: rgba(255, 152, 102, 0.16);
  color: var(--orange);
  border-color: rgba(255, 152, 102, 0.3);
}

.surge-pct.extreme {
  background: rgba(255, 92, 122, 0.16);
  color: var(--red);
  border-color: rgba(255, 92, 122, 0.32);
}

.surge-row strong {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surge-copy {
  min-width: 0;
}

.surge-row p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

.chain-dex-board {
  display: grid;
  gap: 10px;
  padding-right: 2px;
}

.chain-dex-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.chain-dex-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.chain-dex-head strong {
  display: block;
  font-size: 14px;
}

.chain-dex-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.mini-badge.fresh {
  border-color: rgba(100, 217, 255, 0.35);
  color: var(--cyan);
}

.chain-dex-list {
  display: grid;
  gap: 6px;
}

.chain-dex-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
}

.chain-dex-rank {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chain-dex-copy {
  min-width: 0;
}

.chain-dex-copy strong {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-dex-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.chain-dex-share {
  color: var(--green);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chain-dex-delta {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.chain-dex-delta.up {
  color: var(--green);
}

.chain-dex-delta.down {
  color: var(--red);
}

.chain-dex-delta.flat {
  color: var(--muted);
}

.pool-table,
.alert-feed,
.new-chain-list,
.detail-table {
  display: grid;
  gap: 10px;
}

.new-chain-list,
.detail-table,
.alert-feed {
  padding-right: 4px;
}

@media (max-width: 1100px) {
  .discover-grid {
    grid-template-columns: 1fr;
  }
}

.upcoming-row .mini-badge.fresh {
  border-color: rgba(100, 217, 255, 0.45);
  color: #9be8ff;
}

.upcoming-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
}

.upcoming-row-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.upcoming-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.upcoming-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upcoming-row-head strong {
  margin: 0;
  min-width: 0;
}

.upcoming-row-head .mini-badge {
  flex-shrink: 0;
  margin: 0;
}

.upcoming-row-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.upcoming-row-desc {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.upcoming-row-date {
  flex: 0 0 auto;
  max-width: 42%;
  text-align: right;
}

.upcoming-row-date strong {
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.upcoming-subscribe-btn {
  align-self: center;
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.upcoming-subscribe-btn.active {
  border-color: rgba(84, 240, 162, 0.45);
  background: rgba(84, 240, 162, 0.12);
  color: var(--green);
}

.watch-upcoming-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.watch-upcoming-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.compact-table {
  padding-right: 2px;
}

.new-chain-row,
.detail-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.detail-row {
  justify-content: space-between;
  gap: 12px;
}

.detail-right {
  text-align: right;
}

.detail-right strong {
  color: var(--green);
}

.detail-right .detail-change {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.detail-right .detail-change.up {
  color: var(--green);
}

.detail-right .detail-change.down {
  color: var(--red);
}

.detail-right .detail-change.flat {
  color: var(--muted);
}

.new-chain-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.new-chain-top strong {
  font-size: 15px;
}

.new-chain-top span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.16);
  border: 1px solid rgba(255, 209, 102, 0.26);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.new-chain-row p,
.new-chain-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 12px;
}

.new-chain-meta-text {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.new-chain-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.add-chain-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.new-chain-link:hover {
  text-decoration: underline;
}

.new-chain-link.disabled {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
}

.new-chain-row dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
}

.new-chain-row dt {
  color: var(--muted);
  font-size: 12px;
}

.new-chain-row dd {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.pool-row {
  display: grid;
  grid-template-columns: 1.2fr 0.75fr 0.75fr 0.75fr 92px;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
}

.pool-name {
  min-width: 0;
}

.pool-name strong,
.pool-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-meta {
  font-size: 12px;
  margin-top: 3px;
}

.pool-stat {
  font-weight: 800;
}

.tag {
  justify-self: end;
  align-self: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #07110c;
}

.safe {
  background: var(--green);
}

.watch {
  background: var(--gold);
}

.risk {
  background: var(--red);
  color: #fff;
}

.alert-row {
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-decoration: none;
}

.feed-row {
  justify-content: space-between;
  align-items: center;
}

.feed-row:hover {
  border-color: rgba(84, 240, 162, 0.35);
  text-decoration: none;
}

.feed-main {
  flex: 1;
  min-width: 0;
}

.feed-main strong {
  display: block;
  font-size: 14px;
}

.feed-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.feed-row .detail-change {
  flex-shrink: 0;
  margin-top: 0;
  margin-left: 8px;
  text-align: right;
}

.alert-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 92, 122, 0.8);
}

.alert-dot.cyan {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(100, 217, 255, 0.8);
}

.alert-dot.gold {
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.55);
}

.alert-feed strong,
.alert-feed p {
  display: block;
}

.alert-feed p {
  margin: 4px 0 0;
  font-size: 12px;
}

.alert-source {
  margin-top: 6px !important;
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  body:not(.is-mobile-layout) .dashboard-top {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
  }

  body:not(.is-mobile-layout) .dashboard-top .nav-top {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
  }

  body:not(.is-mobile-layout) .dashboard-top-tools {
    flex: 0 0 auto;
  }

  .source-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .dashboard {
    padding: 16px;
  }

  .dashboard-top,
  .topbar,
  .workbench,
  .lower-grid,
  .split-grid,
  .pools-layout,
  .inflow-board,
  .pie-layout,
  .watch-layout {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pool-row {
    grid-template-columns: 1fr 1fr;
  }

  .tag {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .dashboard-top {
    align-items: stretch;
  }

  .nav-top .nav-item {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
    padding: 0 8px;
    font-size: 11px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.full-panel > .detail-table,
.full-panel > .anomaly-board {
  min-height: var(--panel-body-scroll-h-tall);
  max-height: var(--panel-body-scroll-h-tall);
}

.watch-config-panel {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  max-height: var(--panel-body-scroll-h-tall);
}

.watch-config-panel,
.watch-feed-panel {
  min-height: var(--panel-row-min-h);
}

.watch-tier-row,
.watch-picker {
  margin-bottom: 16px;
}

.watch-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.watch-select,
.watch-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color-scheme: dark;
}

.watch-select option {
  background: var(--panel-2);
  color: var(--text);
}

.watch-select:focus,
.watch-input:focus {
  outline: none;
  border-color: rgba(84, 240, 162, 0.45);
  box-shadow: 0 0 0 2px rgba(84, 240, 162, 0.12);
}

.watch-tg-bot-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid rgba(84, 240, 162, 0.35);
  background: rgba(84, 240, 162, 0.08);
  color: var(--green);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 0;
}

.watch-tg-bot-link:hover {
  background: rgba(84, 240, 162, 0.14);
}

.watch-tg-bot-link.is-disabled {
  pointer-events: none;
  opacity: 0.55;
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--muted);
}

.watch-push-card .watch-tg-bot-link + .watch-input {
  margin-top: 8px;
}

.watch-custom-import {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.watch-link-btn {
  border: 0;
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.watch-link-btn:hover {
  text-decoration: underline;
}

.watch-custom-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.watch-custom-form.hidden {
  display: none;
}

.watch-custom-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.watch-custom-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.watch-custom-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.watch-custom-hint.error {
  color: var(--red);
}

.watch-custom-preview {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(84, 240, 162, 0.22);
  background: rgba(84, 240, 162, 0.06);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

.watch-custom-preview.hidden {
  display: none;
}

.watch-custom-preview strong {
  display: block;
  margin-bottom: 6px;
}

.watch-custom-preview span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.watch-import-panel {
  width: min(520px, calc(100vw - 32px));
}

.watch-import-body {
  display: grid;
  gap: 10px;
}

.watch-chip .chip-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--cyan);
}

.watch-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.primary-btn.compact {
  padding: 10px 14px;
  white-space: nowrap;
}

.watch-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.watch-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.watch-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.watch-push-grid {
  display: grid;
  gap: 12px;
}

.watch-push-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.watch-push-card.reserved {
  opacity: 0.88;
}

.watch-push-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.watch-push-card .watch-input + .watch-input {
  margin-top: 8px;
}

.watch-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.watch-snapshot-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.watch-snapshot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.watch-snapshot-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.watch-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.watch-metric-grid > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.watch-metric-grid span,
.watch-metric-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.watch-metric-grid strong {
  display: block;
  margin: 4px 0;
  font-size: 18px;
}

.watch-subsection h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.watch-bridge-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}

.watch-token-list {
  display: grid;
  gap: 8px;
}

.watch-token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.watch-token-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.watch-preview-panel {
  min-height: 0;
}

.anomaly-board .detail-row.severe .mini-badge {
  background: rgba(255, 60, 90, 0.2);
  color: #ff6b6b;
}

.anomaly-reason {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.anomaly-board .detail-row.severe .anomaly-reason {
  color: #d8b4bc;
}

.anomaly-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.panel-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.anomaly-panel-head {
  display: block;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.anomaly-panel-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.anomaly-panel-title-main {
  font-weight: 800;
}

.anomaly-panel-count {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.anomaly-panel .anomaly-subtitle {
  margin-top: 6px;
  font-size: 11px;
  color: color-mix(in srgb, var(--muted) 88%, transparent);
}

.anomaly-board .anomaly-card {
  display: block;
  flex-direction: unset;
  justify-content: unset;
  align-items: unset;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: var(--text);
}

.anomaly-board .anomaly-card-row {
  display: grid;
  align-items: center;
  gap: 8px;
}

.anomaly-board .anomaly-card-row-top {
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-bottom: 6px;
}

.anomaly-board .anomaly-card-row-bottom {
  grid-template-columns: minmax(0, 1fr) auto;
}

.anomaly-board .anomaly-card-chain {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.anomaly-board .anomaly-metric-pill {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.anomaly-board .anomaly-card-pct {
  text-align: right;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.anomaly-board .anomaly-card-pct.is-up {
  color: var(--green);
}

.anomaly-board .anomaly-card-pct.is-down {
  color: var(--red);
}

.anomaly-board .anomaly-card-pct.is-severe {
  color: #ff6b6b;
}

.anomaly-board .anomaly-card-pct.is-flat {
  color: var(--muted);
}

.anomaly-board .anomaly-card-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.anomaly-board .anomaly-card-meta.meta-cold {
  color: #9be8ff;
}

.anomaly-board .anomaly-card-meta.meta-emerging {
  color: #ffd68a;
}

.anomaly-board .anomaly-card-meta.meta-dual {
  color: #9ef0c4;
}

.anomaly-board .anomaly-card-value {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

.anomaly-board .anomaly-card.dual {
  border-color: rgba(84, 240, 162, 0.28);
  background: rgba(84, 240, 162, 0.04);
}

.anomaly-board .anomaly-card.dual .anomaly-metric-pill {
  border-color: rgba(84, 240, 162, 0.35);
  color: var(--green);
  background: rgba(84, 240, 162, 0.08);
}

.anomaly-board .anomaly-card.severe {
  border-color: rgba(255, 92, 122, 0.28);
  background: rgba(255, 92, 122, 0.04);
}

.anomaly-board .anomaly-card.severe .anomaly-metric-pill {
  border-color: rgba(255, 92, 122, 0.35);
  color: #ffb3c0;
  background: rgba(255, 92, 122, 0.08);
}

.anomaly-board .detail-row.dual {
  border-color: rgba(84, 240, 162, 0.35);
  background: rgba(84, 240, 162, 0.05);
}

.anomaly-board .detail-row.dual .mini-badge {
  border-color: rgba(84, 240, 162, 0.45);
  color: var(--green);
  background: rgba(84, 240, 162, 0.12);
}

.watchlist .chain-list,
.table-panel > .detail-table,
.table-panel > .chain-dex-board,
.alerts-panel > .alert-feed,
.funnel-panel > .new-chain-list,
.full-panel > .detail-table,
.full-panel > .anomaly-board,
.watch-feed-panel > .alert-feed,
.watch-preview-panel > .alert-feed,
.watch-config-panel,
.inflow-pie-card > .compact-table,
.inflow-surge-card > .compact-table,
.heat-board,
.view-panel[data-panel="watch"] > .watch-snapshot-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.watchlist .chain-list::-webkit-scrollbar,
.table-panel > .detail-table::-webkit-scrollbar,
.table-panel > .chain-dex-board::-webkit-scrollbar,
.alerts-panel > .alert-feed::-webkit-scrollbar,
.funnel-panel > .new-chain-list::-webkit-scrollbar,
.full-panel > .detail-table::-webkit-scrollbar,
.full-panel > .anomaly-board::-webkit-scrollbar,
.watch-feed-panel > .alert-feed::-webkit-scrollbar,
.watch-preview-panel > .alert-feed::-webkit-scrollbar,
.watch-config-panel::-webkit-scrollbar,
.inflow-pie-card > .compact-table::-webkit-scrollbar,
.inflow-surge-card > .compact-table::-webkit-scrollbar,
.heat-board::-webkit-scrollbar,
.view-panel[data-panel="watch"] > .watch-snapshot-grid::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.watchlist .chain-list::-webkit-scrollbar-thumb,
.table-panel > .detail-table::-webkit-scrollbar-thumb,
.table-panel > .chain-dex-board::-webkit-scrollbar-thumb,
.alerts-panel > .alert-feed::-webkit-scrollbar-thumb,
.funnel-panel > .new-chain-list::-webkit-scrollbar-thumb,
.full-panel > .detail-table::-webkit-scrollbar-thumb,
.full-panel > .anomaly-board::-webkit-scrollbar-thumb,
.watch-feed-panel > .alert-feed::-webkit-scrollbar-thumb,
.watch-preview-panel > .alert-feed::-webkit-scrollbar-thumb,
.watch-config-panel::-webkit-scrollbar-thumb,
.inflow-pie-card > .compact-table::-webkit-scrollbar-thumb,
.inflow-surge-card > .compact-table::-webkit-scrollbar-thumb,
.heat-board::-webkit-scrollbar-thumb,
.view-panel[data-panel="watch"] > .watch-snapshot-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

/* Layout refinement: keep the same modules, improve scan density and responsiveness. */
:root {
  --page-pad: clamp(16px, 2vw, 24px);
  --gap-sm: 10px;
  --gap: 14px;
  --gap-lg: 18px;
  --panel-row-min-h: clamp(420px, 52vh, 560px);
  --panel-row-min-h-tall: clamp(560px, 72vh, 760px);
  --panel-body-scroll-h: clamp(300px, 42vh, 520px);
  --panel-body-scroll-h-compact: clamp(220px, 30vh, 340px);
  --panel-body-scroll-h-tall: clamp(420px, 58vh, 640px);
}

.app-shell {
  grid-template-columns: clamp(248px, 19vw, 288px) minmax(0, 1fr);
}

.sidebar {
  padding: var(--page-pad) 18px;
  background: rgba(11, 14, 13, 0.9);
}

.brand {
  margin-bottom: var(--gap-lg);
}

.brand-mark,
.nav-item,
.metric,
.radar-panel,
.funnel-panel,
.table-panel,
.alerts-panel,
.source-banner,
.chain-row,
.detail-row,
.new-chain-row,
.pool-row,
.alert-row,
.chain-dex-card,
.watch-select,
.watch-input,
.watch-push-card,
.watch-snapshot-card,
.watch-metric-grid > div,
.watch-token-row {
  border-radius: 8px;
}

.dashboard {
  padding: var(--page-pad);
  gap: var(--gap);
}

.dashboard > .view-panel:not(.hidden) {
  margin-bottom: 0;
}

.dashboard-top {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: calc(var(--page-pad) * -1) calc(var(--page-pad) * -1) 0;
  padding: 14px var(--page-pad);
  border-bottom: 1px solid rgba(232, 238, 228, 0.14);
  background: rgba(13, 17, 16, 0.88);
  backdrop-filter: blur(14px);
}

.nav-top {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.nav-top::-webkit-scrollbar {
  display: none;
}

.nav-top .nav-item {
  flex: 0 0 auto;
  min-height: var(--nav-top-item-height);
  min-width: var(--nav-top-item-min-width);
  padding: 0 var(--nav-top-item-padding-x);
  font-size: var(--nav-top-item-font-size);
}

.topbar {
  margin-bottom: 0;
  min-height: 32px;
}

.topbar h2 {
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.15;
}

.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap);
  margin-bottom: 0;
}

.metric {
  min-height: 112px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(25, 32, 29, 0.92), rgba(17, 22, 20, 0.9));
}

.metric strong {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.1;
}

.workbench,
.split-grid,
.lower-grid,
.discover-grid,
.pools-layout,
.watch-layout {
  gap: var(--gap);
}

.workbench {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
}

.split-grid,
.lower-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.pools-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
}

.watch-layout {
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
}

.radar-panel,
.funnel-panel,
.table-panel,
.alerts-panel {
  padding: clamp(14px, 1.4vw, 18px);
  background: linear-gradient(180deg, rgba(22, 28, 25, 0.92), rgba(15, 19, 18, 0.9));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.panel-head {
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-head h3 {
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.25;
}

.heat-board-wrap,
.inflow-pie-card,
.inflow-surge-card {
  background: rgba(8, 12, 10, 0.62);
}

.heat-board-wrap {
  min-height: 300px;
}

.heat-legend-bar {
  grid-template-columns: minmax(90px, 1.1fr) repeat(4, minmax(54px, auto));
  gap: 8px;
  overflow-x: auto;
}

.heat-row {
  grid-template-columns: 34px minmax(0, 1fr) 52px;
}

.detail-row,
.pool-row,
.alert-row,
.chain-row,
.new-chain-row {
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.detail-row:hover,
.pool-row:hover,
.alert-row:hover,
.chain-row:hover,
.new-chain-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.segmented {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.segmented button,
.primary-btn,
.icon-btn,
.live-pill,
.time-badge,
.queue-count,
.source-chip,
.mini-badge {
  white-space: nowrap;
}

.pool-row {
  grid-template-columns: minmax(160px, 1.35fr) repeat(3, minmax(86px, 0.72fr)) minmax(72px, auto);
}

.watch-config-panel {
  max-height: none;
}

.watch-snapshot-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--gap);
}

@media (min-width: 1500px) {
  .dashboard {
    max-width: 1640px;
  }

  .inflow-board {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .dashboard-top {
    margin-left: calc(var(--page-pad) * -1);
    margin-right: calc(var(--page-pad) * -1);
  }
}

@media (max-width: 960px) {
  .workbench,
  .lower-grid,
  .split-grid,
  .pools-layout,
  .watch-layout,
  .discover-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .workbench > .radar-panel,
  .workbench > .funnel-panel,
  .discover-grid > .table-panel,
  .split-grid > .table-panel,
  .lower-grid > .table-panel,
  .lower-grid > .alerts-panel,
  .pools-layout > .table-panel,
  .pools-layout > .alerts-panel,
  .watch-layout > .table-panel,
  .watch-layout > .watch-feed-panel {
    min-height: 420px;
  }

  .dashboard-top {
    align-items: stretch;
    gap: 10px;
  }

  .dashboard-top .top-actions {
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .dashboard {
    padding: 14px;
  }

  .dashboard-top {
    margin: -14px -14px 0;
    padding: 12px 14px;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .live-pill {
    flex: 1 1 auto;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 104px;
  }

  .pool-row {
    grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
  }

  .pool-stat {
    text-align: right;
  }

  .watch-custom-form-row,
  .watch-picker-row {
    grid-template-columns: 1fr;
  }

  .primary-btn.compact {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .nav-top .nav-item {
    flex-basis: auto;
  }

  .detail-row,
  .chain-dex-head,
  .watch-snapshot-head,
  .watch-custom-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-right {
    text-align: left;
  }

  .heat-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .heat-score {
    grid-column: 2;
    justify-self: start;
    min-width: 52px;
    min-height: 30px;
    font-size: 15px;
  }

  .heat-raw-grid,
  .watch-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* Visible pass: stronger hierarchy and clearer module separation. */
.app-shell {
  background:
    linear-gradient(90deg, rgba(84, 240, 162, 0.045), transparent 34%),
    rgba(4, 7, 6, 0.42);
}

.sidebar {
  border-right-color: rgba(84, 240, 162, 0.18);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.brand {
  padding: 12px;
  border: 1px solid rgba(84, 240, 162, 0.16);
  border-radius: 8px;
  background: rgba(84, 240, 162, 0.045);
}

.dashboard-top {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.nav-top {
  padding: 3px;
  border: 1px solid rgba(232, 238, 228, 0.1);
  border-radius: var(--nav-top-item-radius);
  background: rgba(255, 255, 255, 0.035);
}

.nav-top .nav-item {
  border-color: transparent;
  background: transparent;
}

.nav-top .nav-item.active {
  background: rgba(84, 240, 162, 0.18);
  box-shadow: 0 0 0 1px rgba(84, 240, 162, 0.28) inset;
}

.topbar {
  padding: 4px 2px 2px;
}

.topbar h2 {
  max-width: 900px;
}

.metrics-grid {
  align-items: stretch;
}

.metric {
  position: relative;
  overflow: hidden;
  border-color: rgba(232, 238, 228, 0.14);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--green);
  opacity: 0.8;
}

.metric.danger::before,
.metric.anomaly-metric::before {
  background: var(--red);
}

.metric span,
.metric strong,
.metric small {
  position: relative;
}

.metric small {
  min-height: 18px;
}

.workbench {
  grid-template-columns: minmax(0, 1.68fr) minmax(300px, 0.82fr);
}

.radar-panel {
  border-color: rgba(84, 240, 162, 0.18);
}

.funnel-panel {
  border-color: rgba(255, 209, 102, 0.18);
}

.table-panel,
.alerts-panel {
  border-color: rgba(232, 238, 228, 0.13);
}

.panel-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(232, 238, 228, 0.1);
}

.panel-head.compact {
  padding-bottom: 8px;
}

.heat-board-wrap {
  border-color: rgba(84, 240, 162, 0.16);
}

.heat-row,
.detail-row,
.pool-row,
.alert-row,
.chain-row,
.new-chain-row,
.chain-dex-card {
  background: rgba(255, 255, 255, 0.04);
}

.heat-row:hover,
.detail-row:hover,
.pool-row:hover,
.alert-row:hover,
.chain-row:hover,
.new-chain-row:hover,
.chain-dex-card:hover {
  transform: translateY(-1px);
}

.inflow-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inflow-pie-card,
.inflow-surge-card {
  min-height: 260px;
}

.watch-layout,
.split-grid,
.lower-grid,
.pools-layout,
.discover-grid {
  align-items: stretch;
}

.watch-snapshot-card {
  background: rgba(21, 26, 24, 0.86);
  border-color: rgba(100, 217, 255, 0.14);
}

@media (max-width: 1180px) {
  .brand {
    padding: 0;
    border: 0;
    background: transparent;
  }
}

@media (max-width: 960px) {
  .workbench,
  .inflow-board {
    grid-template-columns: 1fr;
  }

  .panel-head {
    gap: 8px;
  }
}

/* Layout polish: denser dashboard rhythm without changing module structure. */
:root {
  --surface-soft: rgba(255, 255, 255, 0.032);
  --surface-lift: rgba(255, 255, 255, 0.055);
  --shadow-panel: 0 18px 48px rgba(0, 0, 0, 0.22);
  --panel-row-min-h: 460px;
  --panel-row-min-h-tall: 610px;
  --panel-body-scroll-h: 332px;
  --panel-body-scroll-h-compact: 224px;
  --panel-body-scroll-h-tall: 410px;
}

body {
  background:
    radial-gradient(circle at 70% 8%, rgba(84, 240, 162, 0.1), transparent 26rem),
    radial-gradient(circle at 18% 86%, rgba(100, 217, 255, 0.06), transparent 24rem),
    linear-gradient(135deg, #080c0b 0%, #101514 50%, #12100c 100%);
}

.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  padding: 18px;
  background: rgba(8, 12, 11, 0.86);
}

.brand {
  margin-bottom: 18px;
}

.chain-row {
  gap: 10px;
  min-height: 78px;
}

.dashboard {
  width: 100%;
  padding: 20px 24px 24px;
}

.dashboard-top {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -20px -24px 18px;
  padding: 14px 24px;
  background: rgba(8, 12, 11, 0.86);
  backdrop-filter: blur(18px);
}

.nav-top {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-top::-webkit-scrollbar {
  display: none;
}

.nav-top .nav-item {
  flex: 0 0 auto;
  min-width: var(--nav-top-item-min-width);
  min-height: var(--nav-top-item-height);
  font-size: var(--nav-top-item-font-size);
}

.topbar {
  margin-bottom: 16px;
}

.topbar h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.08;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  min-height: 112px;
  padding: 15px 16px;
  background: linear-gradient(180deg, rgba(23, 30, 27, 0.92), rgba(17, 22, 20, 0.9));
  box-shadow: var(--shadow-panel);
}

.metric strong {
  margin: 7px 0 4px;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1;
}

.radar-panel,
.funnel-panel,
.table-panel,
.alerts-panel,
.source-banner {
  background: linear-gradient(180deg, rgba(21, 27, 24, 0.92), rgba(14, 19, 17, 0.9));
  box-shadow: var(--shadow-panel);
}

.workbench,
.split-grid,
.lower-grid,
.discover-grid,
.pools-layout,
.watch-layout {
  gap: 14px;
}

.workbench {
  grid-template-columns: minmax(0, 1.58fr) minmax(280px, 0.76fr);
}

.split-grid,
.lower-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.pools-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.72fr);
}

.panel-head {
  min-height: 38px;
  margin-bottom: 12px;
}

.panel-head h3 {
  font-size: 17px;
  line-height: 1.2;
}

.heat-board-wrap {
  min-height: 250px;
}

.heat-board {
  max-height: 330px;
}

.heat-row {
  grid-template-columns: 34px minmax(0, 1fr) 46px;
  padding: 8px 10px;
}

.heat-top {
  margin-bottom: 5px;
}

.heat-raw-grid {
  margin-top: 5px;
}

.inflow-board {
  gap: 12px;
  min-height: 216px;
  margin-top: 12px;
}

.inflow-pie-card,
.inflow-surge-card {
  min-height: 218px;
}

.new-chain-row,
.detail-row,
.pool-row,
.alert-row,
.chain-dex-card,
.watch-snapshot-card,
.watch-push-card {
  background: var(--surface-soft);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.new-chain-row:hover,
.detail-row:hover,
.pool-row:hover,
.alert-row:hover,
.chain-dex-card:hover,
.watch-snapshot-card:hover {
  background: var(--surface-lift);
}

.detail-row,
.pool-row,
.alert-row {
  min-height: 58px;
}

.funnel-panel {
  min-height: var(--panel-row-min-h-tall);
  overflow: hidden;
}

.funnel-panel > .panel-head {
  flex-shrink: 0;
}

.table-panel > .detail-table,
.table-panel > .chain-dex-board,
.alerts-panel > .alert-feed,
.watch-feed-panel > .alert-feed,
.watch-preview-panel > .alert-feed {
  min-height: 0;
}

.watch-layout {
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
}

.watch-config-panel {
  max-height: none;
}

.watch-push-card,
.watch-snapshot-card,
.watch-metric-grid > div {
  border-radius: 8px;
}

@media (min-width: 1500px) {
  :root {
    --panel-row-min-h: 500px;
    --panel-row-min-h-tall: 650px;
    --panel-body-scroll-h: 370px;
    --panel-body-scroll-h-tall: 450px;
  }

  .dashboard {
    padding-inline: 28px;
  }

  .dashboard-top {
    margin-inline: -28px;
    padding-inline: 28px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard {
    min-width: 0;
  }

  .dashboard-top {
    align-items: stretch;
  }

  .nav-top {
    width: 100%;
  }

  .dashboard-top .top-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  :root {
    --panel-row-min-h: auto;
    --panel-row-min-h-tall: auto;
    --panel-body-scroll-h: 360px;
    --panel-body-scroll-h-compact: 230px;
    --panel-body-scroll-h-tall: 420px;
  }

  .dashboard {
    padding: 16px;
  }

  .dashboard-top {
    margin: -16px -16px 16px;
    padding: 12px 16px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbench,
  .split-grid,
  .lower-grid,
  .discover-grid,
  .pools-layout,
  .watch-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .workbench > .radar-panel,
  .workbench > .funnel-panel,
  .discover-grid > .table-panel,
  .split-grid > .table-panel,
  .lower-grid > .table-panel,
  .lower-grid > .alerts-panel,
  .pools-layout > .table-panel,
  .pools-layout > .alerts-panel,
  .watch-layout > .table-panel,
  .watch-layout > .watch-feed-panel {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .dashboard {
    padding: 14px;
  }

  .dashboard-top {
    margin: -14px -14px 14px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .dashboard-top > * {
    min-width: 0;
    max-width: 100%;
  }

  .dashboard-top .nav-top,
  .dashboard-top .top-actions {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .top-actions {
    display: block;
    position: relative;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding-right: 58px;
  }

  .top-actions .primary-btn {
    margin-top: 10px;
  }

  .top-actions .live-pill {
    width: 100%;
    min-width: 0;
  }

  .top-actions .icon-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    min-width: 48px;
    justify-self: end;
  }

  .live-pill,
  .icon-btn {
    min-height: 38px;
  }

  .topbar h2 {
    font-size: 23px;
  }

  .metrics-grid {
    gap: 10px;
  }

  .metric {
    min-height: 100px;
    padding: 14px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .panel-head .segmented {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .heat-legend-bar {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .heat-legend-bar > span:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .dashboard {
    width: 100vw;
    max-width: 100vw;
  }

  .nav-top {
    padding: 4px;
  }

  .nav-top .nav-item {
    min-width: 67px;
    min-height: var(--nav-top-item-height);
    padding: 0 8px;
    font-size: 11px;
  }

  .top-actions {
    padding-right: 56px;
  }

  .top-actions .icon-btn {
    width: 46px;
    min-width: 46px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 94px;
  }

  .radar-panel,
  .funnel-panel,
  .table-panel,
  .alerts-panel {
    padding: 14px;
  }

  .heat-board-wrap {
    padding: 10px;
  }

  .heat-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .heat-score {
    grid-column: 2;
  }
}

.meme-monitor-row {
  align-items: flex-start;
  gap: 10px;
  min-height: auto;
  padding: 10px 12px;
}

.meme-monitor-link {
  flex: 1;
  min-width: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.meme-monitor-link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.meme-monitor-link:focus-visible {
  outline: 2px solid rgba(84, 240, 162, 0.45);
  outline-offset: 2px;
}

.meme-monitor-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.meme-monitor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.meme-monitor-head .meme-token {
  display: inline;
  font-size: 14px;
  margin: 0;
}

.meme-monitor-head .meme-chain {
  display: inline;
  margin: 0;
  color: var(--cyan);
  font-size: 11px;
}

.meme-monitor-row .meme-metrics {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
}

.meme-monitor-row .meme-surge-tag {
  display: block;
  margin: 0;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.meme-monitor-row .meme-tier-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.meme-copy-btn {
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.meme-tier-badge.new {
  color: var(--gold);
  border-color: rgba(255, 209, 102, 0.45);
  background: rgba(255, 209, 102, 0.1);
}

.meme-tier-badge.cold,
.meme-tier-badge.emerging {
  color: var(--green);
  border-color: rgba(84, 240, 162, 0.35);
  background: rgba(84, 240, 162, 0.08);
}

.meme-tier-badge.upcoming {
  color: var(--cyan);
  border-color: rgba(100, 217, 255, 0.35);
  background: rgba(100, 217, 255, 0.08);
}

.copy-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
}

.copy-modal-panel {
  width: min(420px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 92, 122, 0.72);
  border-radius: 8px;
  background: #13090c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.copy-modal-panel h3 {
  margin: 0 0 10px;
  color: var(--red);
  font-family: var(--font-display);
}

.copy-modal-panel p {
  margin: 0;
  color: #ff6b82;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

.copy-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--nav-top-item-height, 27px);
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(84, 240, 162, 0.35);
  background: rgba(84, 240, 162, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  max-width: min(100%, 240px);
}

.auth-pill .auth-tier-tag {
  font-weight: 800;
  flex-shrink: 0;
}

.auth-pill .auth-tier-meta {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.92;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-pill.tier-free {
  border-color: rgba(84, 240, 162, 0.35);
  background: rgba(84, 240, 162, 0.08);
  color: var(--green);
}

.auth-pill.tier-free .auth-tier-meta {
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}

.auth-pill.member {
  border-color: rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.1);
  color: var(--gold);
}

.auth-pill.tier-annual {
  border-color: rgba(255, 184, 77, 0.45);
  background: rgba(255, 184, 77, 0.12);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: safe center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  /* 不要用 backdrop-filter：会裁切原生 select 下拉 */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
}

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

.auth-modal-panel {
  width: min(460px, 100%);
  max-height: none;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24, 30, 27, 0.98), rgba(16, 20, 18, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  flex: 0 0 auto;
  margin: auto;
  transform: none;
  filter: none;
}

.auth-modal-panel.membership-panel {
  width: min(620px, 100%);
  overflow: visible;
  max-height: none;
  position: relative;
  z-index: 2;
}

.membership-field {
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 5;
  isolation: auto;
}

.membership-field:focus-within {
  z-index: 40;
}

.membership-dd {
  position: relative;
  width: 100%;
  z-index: 6;
}

.membership-dd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: #0d1210;
  color: #f3f7f2;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(84, 240, 162, 0.06);
}

.membership-dd-trigger:hover,
.membership-dd.is-open .membership-dd-trigger {
  border-color: rgba(84, 240, 162, 0.45);
}

.membership-dd-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membership-dd-chevron {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 2px solid rgba(236, 242, 234, 0.72);
  border-bottom: 2px solid rgba(236, 242, 234, 0.72);
  transform: rotate(45deg) translateY(-2px);
}

.membership-dd.is-open .membership-dd-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.membership-dd-menu {
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #121815;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  color: #ecf2ea;
}

.membership-dd-option {
  padding: 10px 12px;
  border-radius: 8px;
  color: #ecf2ea;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.membership-dd-option:hover,
.membership-dd-option:focus {
  outline: none;
  background: rgba(84, 240, 162, 0.12);
}

.membership-dd-option.is-active {
  background: rgba(84, 240, 162, 0.18);
  color: #54f0a2;
  font-weight: 600;
}

.membership-benefits-card {
  padding: 14px 14px 12px;
  border: 1px solid rgba(84, 240, 162, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(84, 240, 162, 0.08), transparent 55%),
    rgba(255, 255, 255, 0.03);
}

.membership-benefits-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.membership-benefits-card-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.membership-benefits-card-head span {
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.membership-benefits-list.membership-benefits-sell {
  margin: 0;
  padding-left: 18px;
  color: #d7e2d9;
  font-size: 13px;
  line-height: 1.55;
}

.membership-benefits-list.membership-benefits-sell li + li {
  margin-top: 7px;
}

.membership-benefits-list.membership-benefits-sell li::marker {
  color: var(--green);
}

.auth-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}

.auth-modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.auth-modal-body {
  padding: 14px 18px 18px;
  display: grid;
  gap: 12px;
}

.auth-hint,
.auth-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-status.error {
  color: var(--red);
}

.auth-label {
  color: var(--muted);
  font-size: 12px;
}

.auth-input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.auth-action {
  width: 100%;
}

.membership-dd-trigger:focus {
  outline: none;
  border-color: rgba(84, 240, 162, 0.45);
  box-shadow: 0 0 0 2px rgba(84, 240, 162, 0.12);
}

.membership-pay-actions {
  display: grid;
  grid-template-columns: minmax(96px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.membership-pay-actions .auth-action {
  width: auto;
}

.membership-cancel-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.membership-cancel-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.auth-method-grid {
  display: grid;
  gap: 10px;
}

.auth-method-btn,
.auth-link-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  min-height: 40px;
  cursor: pointer;
}

.auth-link-btn {
  background: transparent;
  color: var(--muted);
}

.membership-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.membership-plan {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
    text-align: left;
}

.membership-plan.active {
  border-color: rgba(84, 240, 162, 0.45);
  background: rgba(84, 240, 162, 0.1);
}

.membership-plan strong {
  font-size: 14px;
}

.membership-plan span {
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
}

.membership-plan small {
  color: var(--muted);
  font-size: 11px;
}

.membership-pay-methods,
.membership-networks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.membership-pay-method,
.membership-network {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.membership-pay-method.active,
.membership-network.active {
  border-color: rgba(84, 240, 162, 0.42);
  color: var(--green);
}

.membership-pay-method.reserved {
  opacity: 0.72;
}

.membership-pay-summary {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.watch-membership-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 13px;
}

.watch-login-gate {
  display: grid;
  place-items: center;
  min-height: 320px;
  margin-bottom: 14px;
}

.watch-login-gate.hidden {
  display: none;
}

.watch-login-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.watch-login-card h3 {
  margin: 0 0 8px;
}

.watch-login-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.membership-benefits-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.membership-benefits-list.compact {
  margin-bottom: 12px;
  font-size: 12px;
}

.membership-benefits-list li + li {
  margin-top: 4px;
}

.member-feature-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(84, 240, 162, 0.28);
  border-radius: 10px;
  background: rgba(84, 240, 162, 0.08);
  color: var(--green);
  font-size: 12px;
  line-height: 1.5;
}

.pro-membership-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 184, 77, 0.22), rgba(255, 120, 80, 0.18));
  border: 1px solid rgba(255, 184, 77, 0.45);
  color: #ffb84d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.pro-membership-card {
  margin: 0 12px 12px;
  padding: 14px;
  border: 1px solid rgba(255, 184, 77, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 184, 77, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.02);
}

.pro-membership-card.is-active {
  border-color: rgba(255, 184, 77, 0.42);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 184, 77, 0.14), transparent 42%),
    rgba(255, 184, 77, 0.05);
}

.pro-membership-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.pro-membership-title {
  display: block;
  margin: 0 0 4px;
  font-size: 15px;
}

.pro-membership-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pro-membership-benefits {
  margin-bottom: 12px;
}

.pro-membership-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 184, 77, 0.35);
  border-radius: 999px;
  background: rgba(255, 184, 77, 0.08);
  color: #ffb84d;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.pro-membership-contact.compact {
  min-height: 36px;
  font-size: 12px;
}

.pro-membership-contact:hover {
  background: rgba(255, 184, 77, 0.14);
}

.membership-pro-teaser {
  padding: 12px;
  border: 1px dashed rgba(255, 184, 77, 0.28);
  border-radius: 10px;
  background: rgba(255, 184, 77, 0.04);
}

.membership-pro-teaser-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.membership-pro-teaser-head strong {
  font-size: 13px;
}

.membership-pro-teaser-copy {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.membership-stablecoin-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.watch-push-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.watch-push-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.watch-pro-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 196, 86, 0.28);
  border-radius: 12px;
  background: rgba(255, 196, 86, 0.05);
}

.watch-pro-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.watch-pro-block + .watch-pro-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.watch-pro-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.watch-pro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
}

.watch-pro-row strong {
  display: block;
  font-size: 13px;
}

.watch-pro-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  word-break: break-all;
}

.auth-method-btn.danger {
  border-color: rgba(255, 92, 122, 0.35);
  color: var(--red);
}

.account-menu-body {
  gap: 10px;
}

.account-menu-panel {
  width: min(380px, 100%);
}

.mobile-home-actions {
  display: none;
}

.mobile-only {
  display: none !important;
}

/* Desktop: keep original metrics row; mobile-metric-link is inert on PC. */
@media (min-width: 761px) {
  .metrics-grid.mobile-home-body {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
  }

  .mobile-metric-link {
    cursor: default;
    pointer-events: none;
  }

  body:not(.is-mobile-layout) .mobile-metric-link[data-view="core"],
  body:not(.is-mobile-layout) .mobile-metric-link[data-view="discover"] {
    cursor: pointer;
    pointer-events: auto;
  }

  body:not(.is-mobile-layout) .dashboard {
    background: transparent;
    color: var(--text);
  }

  body:not(.is-mobile-layout)[data-view="radar"] .metric {
    background: rgba(21, 26, 24, 0.88);
    border-color: var(--line);
    color: var(--text);
  }

  body:not(.is-mobile-layout)[data-view="radar"] .metric span,
  body:not(.is-mobile-layout)[data-view="radar"] .metric small {
    color: var(--muted);
  }

  body:not(.is-mobile-layout)[data-view="radar"] .metric strong {
    color: var(--green);
  }

  body:not(.is-mobile-layout)[data-view="radar"] .metric.danger strong {
    color: var(--red);
  }

  body:not(.is-mobile-layout) .topbar {
    display: none;
  }

  body:not(.is-mobile-layout) .dashboard-top .nav-top {
    flex-wrap: nowrap;
    row-gap: 0;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="radar"] .inflow-board {
    display: none;
  }

  body:not(.is-mobile-layout)[data-view="core"] .view-panel[data-panel="radar"] .funnel-panel {
    display: none;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="meme"] {
    display: none !important;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-menu-panel {
    max-width: 860px;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-guest,
  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .pro-membership-card {
    margin-bottom: 14px;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-profile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-section {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-section:last-of-type,
  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-actions {
    grid-column: 1 / -1;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-btn {
    flex: 1 1 180px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-btn.accent {
    border-color: rgba(84, 240, 162, 0.45);
    background: rgba(84, 240, 162, 0.12);
    color: var(--green);
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-meta {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-watch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body:not(.is-mobile-layout) .view-panel[data-panel="account"] .mobile-account-watch-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
  }

  body:not(.is-mobile-layout) .desktop-radar-title-hot {
    display: none;
  }

  body:not(.is-mobile-layout)[data-view="core"] .desktop-radar-title-default {
    display: none;
  }

  body:not(.is-mobile-layout)[data-view="core"] .desktop-radar-title-hot {
    display: inline;
  }

  body.is-mobile-layout .desktop-radar-title-default,
  body.is-mobile-layout .desktop-radar-title-hot {
    display: none;
  }
}

@media (max-width: 640px) {
  .membership-plans {
    grid-template-columns: 1fr;
  }
}

/* Mobile only: iPhone-style horizontal pages. PC layout is untouched. */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body {
    background:
      radial-gradient(circle at 50% -12%, rgba(84, 240, 162, 0.14), transparent 18rem),
      linear-gradient(180deg, #07100d 0%, #0b100e 100%);
  }

  .app-shell {
    display: block;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  .dashboard {
    height: 100dvh;
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-padding-top: 132px;
    scrollbar-gutter: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-top {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: -12px -12px 0;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 12, 10, 0.9);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  }

  .nav-top {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0;
    padding: 5px;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(232, 238, 228, 0.11);
    background: rgba(255, 255, 255, 0.04);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .nav-top .nav-item {
    flex: 0 0 auto;
    min-width: 82px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    scroll-snap-align: start;
    font-size: 14px;
    font-weight: 700;
  }

  .dashboard-top .top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    padding: 0 2px;
    scrollbar-width: none;
  }

  .dashboard-top .top-actions::-webkit-scrollbar,
  .ios-page-row::-webkit-scrollbar,
  .metrics-grid::-webkit-scrollbar,
  .workbench::-webkit-scrollbar,
  .discover-grid::-webkit-scrollbar,
  .split-grid::-webkit-scrollbar,
  .lower-grid::-webkit-scrollbar,
  .pools-layout::-webkit-scrollbar,
  .watch-layout::-webkit-scrollbar,
  .watch-snapshot-grid::-webkit-scrollbar {
    display: none;
  }

  .live-pill,
  .auth-pill,
  .icon-btn,
  .primary-btn {
    min-height: 40px;
    border-radius: 999px;
  }

  .live-pill,
  .auth-pill {
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .primary-btn {
    flex: 1 0 auto;
    min-width: 136px;
    padding: 0 18px;
  }

  .icon-btn {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  .topbar {
    padding: 18px 2px 4px;
    margin: 0;
  }

  .topbar h2 {
    font-size: 25px;
    line-height: 1.18;
    letter-spacing: 0;
  }

  .dashboard > .view-panel:not(.hidden) {
    margin-bottom: 16px;
  }

  .metrics-grid,
  .workbench,
  .discover-grid,
  .split-grid,
  .lower-grid,
  .pools-layout,
  .watch-layout,
  .watch-snapshot-grid {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    min-height: 0;
    margin-left: -12px;
    margin-right: -12px;
    padding: 0 12px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .metrics-grid {
    margin-bottom: 2px;
  }

  .metric,
  .workbench > .radar-panel,
  .workbench > .funnel-panel,
  .discover-grid > .table-panel,
  .split-grid > .table-panel,
  .lower-grid > .table-panel,
  .lower-grid > .alerts-panel,
  .pools-layout > .table-panel,
  .pools-layout > .alerts-panel,
  .watch-layout > .table-panel,
  .watch-layout > .watch-feed-panel,
  .watch-snapshot-grid > .watch-snapshot-card,
  .view-panel > .full-panel {
    flex: 0 0 calc(100vw - 36px);
    width: calc(100vw - 36px);
    min-width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    border-radius: 18px;
  }

  .metric {
    min-height: 132px;
    padding: 20px;
  }

  .metric strong {
    margin-top: 10px;
    font-size: 36px;
  }

  .radar-panel,
  .funnel-panel,
  .table-panel,
  .alerts-panel,
  .watch-snapshot-card {
    padding: 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  }

  .workbench > .radar-panel,
  .workbench > .funnel-panel,
  .discover-grid > .table-panel,
  .split-grid > .table-panel,
  .lower-grid > .table-panel,
  .lower-grid > .alerts-panel,
  .pools-layout > .table-panel,
  .pools-layout > .alerts-panel,
  .watch-layout > .table-panel,
  .watch-layout > .watch-feed-panel {
    min-height: min(660px, calc(100dvh - 178px));
    max-height: none;
    overflow: hidden;
  }

  .view-panel > .full-panel {
    min-height: min(680px, calc(100dvh - 170px));
    margin: 0;
  }

  .panel-head {
    align-items: center;
    flex-wrap: nowrap;
    min-height: 42px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .panel-head h3 {
    font-size: 16px;
  }

  .panel-head .segmented {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .heat-board-wrap {
    min-height: 320px;
    padding: 10px;
    border-radius: 14px;
  }

  .heat-legend-bar {
    grid-template-columns: minmax(78px, 1fr) repeat(4, max-content);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .heat-board {
    max-height: 330px;
  }

  .heat-row {
    grid-template-columns: 30px minmax(0, 1fr) 48px;
    padding: 10px;
  }

  .heat-raw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inflow-board {
    display: flex;
    gap: 10px;
    margin: 12px -2px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .inflow-board::-webkit-scrollbar {
    display: none;
  }

  .inflow-pie-card,
  .inflow-surge-card {
    flex: 0 0 88%;
    min-height: 240px;
    border-radius: 14px;
    scroll-snap-align: start;
  }

  .table-panel > .detail-table,
  .table-panel > .chain-dex-board,
  .alerts-panel > .alert-feed,
  .funnel-panel > .new-chain-list,
  .full-panel > .detail-table,
  .full-panel > .anomaly-board,
  .watch-feed-panel > .alert-feed,
  .watch-preview-panel > .alert-feed {
    min-height: 0;
    max-height: calc(100dvh - 270px);
  }

  .inflow-pie-card > .compact-table,
  .inflow-surge-card > .compact-table {
    min-height: 0;
    max-height: 190px;
  }

  .detail-row,
  .pool-row,
  .alert-row,
  .chain-row,
  .new-chain-row,
  .chain-dex-card,
  .watch-token-row {
    border-radius: 14px;
  }

  .pool-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pool-stat,
  .tag {
    justify-self: end;
  }

  .watch-config-panel {
    overflow: auto;
  }

  .watch-picker-row,
  .watch-custom-form-row {
    grid-template-columns: 1fr;
  }

  .primary-btn.compact {
    width: 100%;
  }

  .watch-snapshot-grid {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .auth-modal {
    padding: 12px;
  }

  .auth-modal-panel {
    border-radius: 20px;
  }
}

/* Mobile app layout v2: black/white cards with a frosted top bar. */
@media (max-width: 760px) {
  :root {
    --mobile-bg: transparent;
    --mobile-card: rgba(21, 26, 24, 0.88);
    --mobile-ink: var(--text);
    --mobile-muted: var(--muted);
    --mobile-line: var(--line);
    --mobile-soft: rgba(255, 255, 255, 0.035);
  }

  html,
  body {
    overflow: hidden;
    background: #0b0b0b;
    color: var(--mobile-ink);
  }

  .app-shell {
    background: #0b0b0b;
  }

  .dashboard {
    width: min(100%, 430px);
    height: 100dvh;
    margin: 0 auto;
    padding: 14px 14px max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--mobile-bg);
    color: var(--mobile-ink);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: none;
  }

  .dashboard::-webkit-scrollbar {
    display: none;
  }

  .dashboard-top {
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: -14px -14px 0;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(244, 244, 242, 0.74);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  }

  .nav-top {
    display: flex;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    scroll-snap-type: x proximity;
  }

  .nav-top .nav-item {
    flex: 0 0 auto;
    min-width: auto;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--mobile-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    color: var(--mobile-ink);
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
  }

  .nav-top .nav-item.active {
    border-color: #101010;
    background: #101010;
    color: #ffffff;
    box-shadow: none;
  }

  .dashboard-top .top-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 0;
    overflow: visible;
  }

  .auth-pill,
  .live-pill,
  .primary-btn,
  .icon-btn {
    min-height: 42px;
    border-radius: 999px;
    border: 1px solid var(--mobile-line);
    box-shadow: none;
  }

  .auth-pill,
  .live-pill,
  .icon-btn {
    background: rgba(255, 255, 255, 0.7);
    color: var(--mobile-ink);
  }

  .primary-btn {
    min-width: 0;
    width: 100%;
    background: #101010;
    color: #ffffff;
    font-weight: 800;
  }

  .topbar {
    margin: 0;
    padding: 18px 2px 4px;
  }

  .topbar h2 {
    color: var(--mobile-ink);
    font-size: 24px;
    line-height: 1.14;
    font-weight: 800;
  }

  .dashboard > .view-panel:not(.hidden) {
    margin: 0 0 14px;
  }

  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    overflow: visible;
  }

  .metric {
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 112px;
    padding: 14px;
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: var(--mobile-card);
    color: var(--mobile-ink);
    scroll-snap-align: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.045);
  }

  .metric::before {
    display: none;
  }

  .metric span,
  .metric small,
  .metric.anomaly-metric small {
    color: var(--mobile-muted);
  }

  .metric strong,
  .metric.danger strong,
  .metric.anomaly-metric strong {
    margin: 8px 0 4px;
    color: var(--mobile-ink);
    font-size: 26px;
    line-height: 1;
  }

  .workbench,
  .discover-grid,
  .split-grid,
  .lower-grid,
  .pools-layout,
  .watch-layout,
  .watch-snapshot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .metric,
  .workbench > .radar-panel,
  .workbench > .funnel-panel,
  .discover-grid > .table-panel,
  .split-grid > .table-panel,
  .lower-grid > .table-panel,
  .lower-grid > .alerts-panel,
  .pools-layout > .table-panel,
  .pools-layout > .alerts-panel,
  .watch-layout > .table-panel,
  .watch-layout > .watch-feed-panel,
  .watch-snapshot-grid > .watch-snapshot-card,
  .view-panel > .full-panel {
    flex: initial;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .radar-panel,
  .funnel-panel,
  .table-panel,
  .alerts-panel,
  .watch-snapshot-card,
  .view-panel > .full-panel {
    min-height: auto;
    max-height: none;
    padding: 14px;
    border: 1px solid var(--mobile-line);
    border-radius: 20px;
    background: var(--mobile-card);
    color: var(--mobile-ink);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.055);
    overflow: hidden;
  }

  .panel-head {
    min-height: 0;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mobile-line);
    color: var(--mobile-ink);
  }

  .panel-head h3 {
    color: var(--mobile-ink);
    font-size: 16px;
    font-weight: 800;
  }

  .time-badge,
  .queue-count,
  .mini-badge,
  .source-chip {
    border: 1px solid var(--mobile-line);
    background: var(--mobile-soft);
    color: var(--mobile-ink);
  }

  .heat-board-wrap,
  .inflow-pie-card,
  .inflow-surge-card,
  .chain-dex-card,
  .watch-push-card,
  .watch-metric-grid > div {
    border-color: var(--mobile-line);
    border-radius: 16px;
    background: #fafafa;
    color: var(--mobile-ink);
  }

  .heat-board-wrap {
    min-height: 0;
    padding: 10px;
  }

  .heat-legend-bar {
    color: var(--mobile-muted);
    border-bottom-color: var(--mobile-line);
  }

  .heat-legend-chip.tvl::before,
  .heat-legend-chip.dex::before,
  .heat-legend-chip.score::before {
    background: #101010;
  }

  .heat-board {
    max-height: 360px;
  }

  body:not(.is-mobile-layout) .heat-row,
  body:not(.is-mobile-layout) .detail-row,
  body:not(.is-mobile-layout) .pool-row,
  body:not(.is-mobile-layout) .alert-row,
  body:not(.is-mobile-layout) .chain-row,
  body:not(.is-mobile-layout) .new-chain-row,
  body:not(.is-mobile-layout) .watch-token-row {
    border: 1px solid var(--mobile-line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--mobile-ink);
    box-shadow: none;
  }

  body:not(.is-mobile-layout) .heat-row.hot,
  body:not(.is-mobile-layout) .heat-row.warm,
  body:not(.is-mobile-layout) .anomaly-board .detail-row.dual,
  body:not(.is-mobile-layout) .anomaly-board .detail-row.severe {
    border-color: var(--mobile-line);
    background: #ffffff;
  }

  .heat-rank,
  .heat-top span,
  .heat-bar-label,
  .heat-raw-grid,
  .detail-row span,
  .chain-row span,
  .new-chain-row dt,
  .new-chain-meta-text,
  .pool-meta,
  .alert-feed p,
  .feed-main span,
  .watch-label,
  .watch-custom-hint,
  .watch-snapshot-head span,
  .watch-metric-grid span,
  .watch-metric-grid small,
  .watch-token-row span,
  .anomaly-subtitle,
  .anomaly-reason {
    color: var(--mobile-muted);
  }

  .heat-row:nth-child(1) .heat-rank,
  .heat-row:nth-child(2) .heat-rank,
  .heat-row:nth-child(3) .heat-rank,
  .score,
  .detail-right strong,
  .legend-row b,
  .chain-dex-share,
  .chain-dex-delta.up,
  .detail-right .detail-change.up,
  .safe,
  .new-chain-link,
  .watch-link-btn {
    color: var(--mobile-ink);
  }

  .heat-bar-track {
    background: rgba(0, 0, 0, 0.08);
  }

  .heat-bar-fill.tvl,
  .heat-bar-fill.dex {
    background: #101010;
  }

  .heat-score {
    border-color: var(--mobile-line);
    background: var(--mobile-soft);
    color: var(--mobile-ink) !important;
  }

  .inflow-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 12px 0 0;
    overflow: visible;
  }

  .inflow-pie-card,
  .inflow-surge-card {
    flex: initial;
    min-height: 0;
  }

  .table-panel > .detail-table,
  .table-panel > .chain-dex-board,
  .alerts-panel > .alert-feed,
  .funnel-panel > .new-chain-list,
  .full-panel > .detail-table,
  .full-panel > .anomaly-board,
  .watch-feed-panel > .alert-feed,
  .watch-preview-panel > .alert-feed,
  .inflow-pie-card > .compact-table,
  .inflow-surge-card > .compact-table {
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .segmented {
    border-color: var(--mobile-line);
    background: var(--mobile-soft);
  }

  .segmented button {
    border-color: transparent;
    color: var(--mobile-ink);
    background: transparent;
  }

  .segmented .active {
    border-color: #101010;
    background: #101010;
    color: #ffffff;
  }

  .watch-select,
  .watch-input,
  .auth-input {
    border-color: var(--mobile-line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--mobile-ink);
    color-scheme: light;
  }

  .watch-select option {
    background: #ffffff;
    color: var(--mobile-ink);
  }

  .empty-state {
    border-color: var(--mobile-line);
    border-radius: 14px;
    background: #fafafa;
    color: var(--mobile-muted);
  }

  .tag,
  .safe,
  .watch,
  .risk {
    background: #101010;
    color: #ffffff;
  }

  .alert-dot,
  .alert-dot.cyan,
  .alert-dot.gold,
  .dot.up,
  .dot.down {
    background: #101010;
    box-shadow: none;
  }

  .auth-modal {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .auth-modal-panel:not(.membership-panel),
  .copy-modal-panel {
    border-color: var(--mobile-line);
    border-radius: 24px;
    background: #ffffff;
    color: var(--mobile-ink);
  }

  .auth-modal-panel.membership-panel {
    background: linear-gradient(180deg, rgba(24, 30, 27, 0.98), rgba(16, 20, 18, 0.98));
    color: var(--text);
    border-color: var(--line);
  }

  .membership-plan,
  .auth-method-btn,
  .auth-link-btn,
  .membership-pay-summary,
  .watch-membership-status,
  .watch-login-card {
    border-color: var(--mobile-line);
    background: #ffffff;
    color: var(--mobile-ink);
  }

  .membership-plan.active,
  .membership-pay-method.active,
  .membership-network.active {
    border-color: #101010;
    background: #101010;
    color: #ffffff;
  }
}

/* Mobile requested layout: frosted top actions, bottom menu, homepage shortcuts. */
@media (max-width: 760px) {
  .dashboard {
    padding-top: 76px;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  body:not([data-view="radar"]) .topbar,
  body:not([data-view="radar"]) .mobile-home-body,
  body:not([data-view="radar"]) .metrics-grid {
    display: none;
  }

  body[data-view="radar"] .mobile-home-actions {
    display: grid;
  }

  .dashboard-top {
    position: fixed;
    inset: auto 0 0;
    z-index: 80;
    display: block;
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 8px 12px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 0;
    background: rgba(244, 244, 242, 0.78);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12);
  }

  .dashboard-top .top-actions {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 90;
    width: min(100%, 430px);
    transform: translateX(-50%);
    display: flex;
    justify-content: flex-start;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(244, 244, 242, 0.76);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  }

  #boost-btn {
    display: none;
  }

  .auth-pill,
  .live-pill {
    min-width: 78px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #101010;
    font-weight: 800;
  }

  .nav-top {
    justify-content: space-between;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    overflow-x: auto;
  }

  .nav-top .nav-item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 0 6px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #101010;
    font-size: 13px;
    font-weight: 800;
  }

  .nav-top .nav-item.active {
    background: #101010;
    color: #ffffff;
  }

  .topbar {
    padding: 8px 2px 8px;
  }

  .topbar h2 {
    margin-bottom: 14px;
    font-size: 24px;
  }

  .mobile-home-actions {
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 8px;
  }

  .mobile-home-shortcut {
    width: 100%;
    min-height: 72px;
    padding: 8px 5px;
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: #ffffff;
    color: #101010;
    text-align: center;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.045);
  }

  .mobile-home-shortcut.active {
    background: #101010;
    color: #ffffff;
  }

  .metrics-grid {
    margin-top: 4px;
  }

  .metric {
    min-height: 128px;
  }

  .mobile-menu-panel {
    min-height: calc(100dvh - 180px);
  }

  .mobile-menu-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: #ffffff;
  }

  .mobile-menu-card strong {
    color: #101010;
    font-size: 18px;
  }

  .mobile-menu-card span {
    color: var(--mobile-muted);
    font-size: 13px;
    line-height: 1.5;
  }
}

/* Mobile bottom tab bar: keep it always visible and separate from top actions. */
@media (max-width: 760px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .dashboard {
    padding-bottom: calc(106px + env(safe-area-inset-bottom));
  }

  .mobile-back-home {
    display: none;
  }

  .view-panel[data-panel="radar"] {
    display: none !important;
  }

  .dashboard-top .top-actions {
    display: none !important;
    pointer-events: none;
  }

  .dashboard-top {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    top: auto;
    z-index: 120;
    width: min(calc(100% - 24px), 406px);
    margin: 0;
    padding: 7px;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: rgba(12, 12, 12, 0.84);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
  }

  .dashboard-top .nav-top {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: transparent;
    overflow: visible;
  }

  .dashboard-top .nav-top .nav-item {
    min-width: 0;
    min-height: 48px;
    padding: 0 4px;
    border-radius: 20px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    pointer-events: auto;
  }

  .dashboard-top .nav-top .nav-item.active {
    background: #ffffff;
    color: #101010;
  }
}

/* Mobile home should fit one screen; sub pages get a fixed back button. */
@media (max-width: 760px) {
  body[data-view="radar"] .dashboard {
    padding-top: max(8px, env(safe-area-inset-top));
    overflow: hidden;
  }

  body:not([data-view="radar"]) .dashboard {
    padding-top: 76px;
    overflow-y: auto;
  }

  body[data-view="radar"] .topbar {
    padding: 0 2px 10px;
  }

  body[data-view="radar"] .topbar h2 {
    margin-bottom: clamp(6px, 1.2dvh, 10px);
    font-size: clamp(20px, 5.2vw, 26px);
    line-height: 1.08;
  }

  body[data-view="radar"] .mobile-home-actions {
    gap: clamp(5px, 1dvh, 8px);
  }

  body[data-view="radar"] .mobile-home-shortcut {
    min-height: 0;
    padding: clamp(4px, 0.8dvh, 8px) 3px;
    border-radius: clamp(12px, 3vw, 16px);
    font-size: clamp(10px, 2.8vw, 12px);
  }

  body[data-view="radar"] .metrics-grid {
    gap: clamp(5px, 1dvh, 8px);
    margin-top: clamp(6px, 1.2dvh, 10px);
  }

  body[data-view="radar"] .metric {
    min-height: 0;
    padding: clamp(8px, 1.5dvh, 12px);
    border-radius: clamp(14px, 3.5vw, 18px);
  }

  body[data-view="radar"] .metric strong,
  body[data-view="radar"] .metric.danger strong,
  body[data-view="radar"] .metric.anomaly-metric strong {
    margin: clamp(2px, 0.5dvh, 5px) 0 2px;
    font-size: clamp(18px, 5vw, 24px);
  }

  body[data-view="radar"] .metric span,
  body[data-view="radar"] .metric small {
    font-size: 12px;
  }

  body:not([data-view="radar"]) .mobile-back-home {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    left: max(14px, calc((100vw - 430px) / 2 + 14px));
    z-index: 140;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #101010;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
}

/* Fix mobile back button: small native-style control, never a full-width bar. */
.mobile-back-home {
  display: none;
}

@media (max-width: 760px) {
  body[data-view="radar"] .mobile-back-home {
    display: none !important;
  }

  body:not([data-view="radar"]) .mobile-back-home {
    all: unset;
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, calc((100vw - 430px) / 2 + 12px));
    z-index: 200;
    display: grid !important;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #111111;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    cursor: pointer;
  }
}

/* Keep desktop restored; only mobile sub-pages slice the radar workbench. */
@media (max-width: 760px) {
  body[data-view="core"] .view-panel[data-panel="radar"] {
    display: none !important;
  }

  body[data-view="core"] .view-panel[data-panel="core"]:not(.hidden) {
    display: block !important;
  }

  body[data-view="dex-chains"] .view-panel[data-panel="radar"],
  body[data-view="dex-protocols"] .view-panel[data-panel="radar"] {
    display: block !important;
  }

  body[data-view="dex-chains"] .view-panel[data-panel="radar"] .heat-board-wrap,
  body[data-view="dex-chains"] .view-panel[data-panel="radar"] .funnel-panel,
  body[data-view="dex-chains"] .view-panel[data-panel="radar"] .inflow-surge-card {
    display: none !important;
  }

  body[data-view="dex-protocols"] .view-panel[data-panel="radar"] .heat-board-wrap,
  body[data-view="dex-protocols"] .view-panel[data-panel="radar"] .funnel-panel,
  body[data-view="dex-protocols"] .view-panel[data-panel="radar"] .inflow-pie-card {
    display: none !important;
  }

  body[data-view="dex-chains"] .view-panel[data-panel="radar"] .inflow-board,
  body[data-view="dex-protocols"] .view-panel[data-panel="radar"] .inflow-board {
    display: grid;
    margin-top: 0;
  }

  body[data-view="dex-top3"] .view-panel[data-panel="home-lower"] {
    display: block !important;
  }

  body[data-view="dex-top3"] .view-panel[data-panel="home-lower"] .watch-preview-panel {
    display: none !important;
  }

  body.is-mobile-layout[data-view="radar"] .metric.metric-link,
  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric,
  body[data-view="radar"] .metric.metric-link,
  body[data-view="radar"] .metric.anomaly-metric {
    border: 1px solid var(--line);
    background: rgba(21, 26, 24, 0.88);
    color: var(--text);
  }
}

/* Final layout boundary: the phone UI is enabled only on a touch device. */
@media (max-width: 760px) {
  body.is-mobile-layout {
    background: #f4f4f2;
    color: #101010;
  }

  body.is-mobile-layout .app-shell {
    display: block;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  body.is-mobile-layout .sidebar,
  body.is-mobile-layout .desktop-only,
  body.is-mobile-layout .dashboard-top .top-actions {
    display: none !important;
  }

  body.is-mobile-layout .dashboard {
    display: block;
    width: 100%;
    height: 100dvh;
    margin: 0;
    padding: max(8px, env(safe-area-inset-top)) 16px calc(62px + max(8px, env(safe-area-inset-bottom)));
    overflow-x: hidden;
    overflow-y: auto;
    background: #f4f4f2;
    color: #101010;
  }

  body.is-mobile-layout[data-view="radar"] .dashboard {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.is-mobile-layout[data-view="radar"] .topbar {
    flex: 5 5 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body.is-mobile-layout[data-view="radar"] .topbar > div {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body.is-mobile-layout[data-view="radar"] .topbar h2 {
    flex: 0 0 auto;
  }

  body.is-mobile-layout[data-view="radar"] .mobile-home-actions {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.is-mobile-layout[data-view="radar"] .metrics-grid {
    flex: 4 4 0;
    min-height: 0;
  }

  body.is-mobile-layout .dashboard-top {
    position: fixed;
    z-index: 200;
    left: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(calc(100% - 24px), 406px);
    margin: 0;
    padding: 7px;
    transform: translateX(-50%);
    border: 0;
    border-radius: 26px;
    background: rgba(18, 18, 18, 0.92);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  body.is-mobile-layout .dashboard-top .nav-top {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  body.is-mobile-layout .dashboard-top .nav-top .nav-item {
    display: none !important;
    min-width: 0;
    min-height: 50px;
    padding: 0 3px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
  }

  body.is-mobile-layout .dashboard-top .nav-top .nav-item[data-view="radar"],
  body.is-mobile-layout .dashboard-top .nav-top .nav-item[data-view="watch"],
  body.is-mobile-layout .dashboard-top .nav-top .nav-item[data-view="membership"],
  body.is-mobile-layout .dashboard-top .nav-top .nav-item[data-view="account"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  body.is-mobile-layout .dashboard-top .nav-top .nav-item.active {
    background: #ffffff;
    color: #111111;
  }

  body.is-mobile-layout .topbar {
    display: block;
    margin: 0;
    padding: 0 2px;
  }

  body.is-mobile-layout .topbar h2 {
    margin: 0 0 clamp(6px, 1.2dvh, 10px);
    color: #111111;
    font-size: clamp(20px, 5.2vw, 26px);
    line-height: 1.08;
  }

  body.is-mobile-layout .mobile-home-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(5px, 1dvh, 8px);
  }

  body.is-mobile-layout .mobile-home-shortcut {
    display: grid !important;
    place-items: center;
    min-width: 0;
    min-height: 0;
    padding: clamp(4px, 0.8dvh, 8px) 3px;
    border: 1px solid #e5e5e3;
    border-radius: clamp(12px, 3vw, 16px);
    background: #ffffff;
    color: #111111;
    font-size: clamp(10px, 2.8vw, 12px);
    font-weight: 800;
    line-height: 1.15;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
  }

  body.is-mobile-layout .metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(5px, 1dvh, 8px);
    width: 100%;
    margin: clamp(6px, 1.2dvh, 10px) 0 0;
    padding: 0;
    overflow: visible;
  }

  body.is-mobile-layout .metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: clamp(8px, 1.5dvh, 12px);
    border: 1px solid #e7e7e5;
    border-radius: clamp(14px, 3.5vw, 18px);
    background: #ffffff;
    color: #111111;
    box-shadow: none;
  }

  body.is-mobile-layout .metric span,
  body.is-mobile-layout .metric small {
    color: #7c7c7c;
    font-size: 12px;
  }

  body.is-mobile-layout .metric strong,
  body.is-mobile-layout .metric.danger strong,
  body.is-mobile-layout .metric.anomaly-metric strong {
    margin: clamp(2px, 0.5dvh, 5px) 0 2px;
    color: #111111;
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1;
  }

  body.is-mobile-layout .metric.anomaly-metric {
    border-color: #ff6f86;
    background: #fff0f2;
  }

  body.is-mobile-layout .metric.anomaly-metric strong {
    color: #ff4667;
  }

  body.is-mobile-layout[data-view="radar"] .view-panel {
    display: none !important;
  }

  body.is-mobile-layout:not([data-view="radar"]) .topbar,
  body.is-mobile-layout:not([data-view="radar"]) .mobile-home-body,
  body.is-mobile-layout:not([data-view="radar"]) .metrics-grid {
    display: none;
  }

  body.is-mobile-layout:not([data-view="radar"]) .dashboard {
    padding-top: 74px;
  }

  body.is-mobile-layout:not([data-view="radar"]) .view-panel:not(.hidden) {
    display: block !important;
    margin: 0;
  }

  body.is-mobile-layout[data-view="core"] .view-panel[data-panel="radar"] {
    display: none !important;
  }

  body.is-mobile-layout[data-view="dex-chains"] .view-panel[data-panel="radar"],
  body.is-mobile-layout[data-view="dex-protocols"] .view-panel[data-panel="radar"] {
    display: block !important;
  }

  body.is-mobile-layout[data-view="dex-chains"] .view-panel[data-panel="radar"] .workbench,
  body.is-mobile-layout[data-view="dex-protocols"] .view-panel[data-panel="radar"] .workbench {
    display: block;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  body.is-mobile-layout:not([data-view="radar"]) .mobile-back-home {
    all: unset;
    position: fixed;
    z-index: 250;
    top: max(12px, env(safe-area-inset-top));
    left: 16px;
    display: grid !important;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    color: #111111;
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(16px);
  }
}

/* A narrow desktop window remains the regular desktop dashboard. */
@media (max-width: 760px) {
  body:not(.is-mobile-layout) .mobile-back-home,
  body:not(.is-mobile-layout) .mobile-home-actions,
  body:not(.is-mobile-layout) .mobile-only {
    display: none !important;
  }

  body:not(.is-mobile-layout) .desktop-only {
    display: inline-flex !important;
  }

  body:not(.is-mobile-layout) .dashboard {
    height: 100vh;
    padding: 16px;
    overflow: auto;
    background: transparent;
  }

  body:not(.is-mobile-layout) .dashboard-top {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
    margin: 0 0 16px;
    padding: 0 0 16px;
    transform: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:not(.is-mobile-layout) .dashboard-top-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }

  body:not(.is-mobile-layout) .dashboard-top .top-actions {
    position: static;
    display: flex !important;
    width: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  body:not(.is-mobile-layout) .dashboard-top .nav-top {
    display: flex !important;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    width: auto;
    min-width: 0;
    padding: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(255, 255, 255, 0.035);
  }

  body:not(.is-mobile-layout) .dashboard-top .nav-top .nav-item {
    display: inline-flex !important;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 27px;
    padding: 0 9px;
    border-radius: 6px;
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
  }

  body:not(.is-mobile-layout) .topbar {
    display: flex;
    margin-bottom: 14px;
    padding: 0;
  }

  body:not(.is-mobile-layout) .topbar h2 {
    margin: 0;
    color: var(--text);
    font-size: 26px;
  }

  body:not(.is-mobile-layout) .metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
    padding: 0;
    overflow: visible;
  }

  body:not(.is-mobile-layout) .workbench {
    display: grid;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}

/* Mobile homepage: reference layout 鈥?4x2 shortcuts + 2x2 metrics, one screen. */
@media (max-width: 760px) {
  body.is-mobile-layout[data-view="radar"] .dashboard {
    height: 100dvh;
    max-height: 100dvh;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px
      calc(56px + 1em + max(8px, env(safe-area-inset-bottom)));
    background: #f4f4f2;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    gap: 0;
  }

  body.is-mobile-layout[data-view="radar"] .dashboard > .topbar,
  body.is-mobile-layout[data-view="radar"] .dashboard > .metrics-grid.mobile-home-body {
    flex-shrink: 1;
    min-height: 0;
  }

  body.is-mobile-layout[data-view="radar"] .topbar {
    display: flex;
    flex: 11 11 0;
    flex-direction: column;
    margin: 0;
    min-height: 0;
    padding: 0;
  }

  body.is-mobile-layout[data-view="radar"] .topbar > div {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }

  body.is-mobile-layout[data-view="radar"] .topbar h2 {
    flex: 0 0 auto;
    margin: 0 0 12px;
    color: #111111;
    font-size: clamp(22px, 5.6vw, 28px);
    line-height: 1.08;
    font-weight: 700;
  }

  body.is-mobile-layout[data-view="radar"] .mobile-home-actions {
    display: grid !important;
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(7px, 1.4dvh, 10px);
  }

  body.is-mobile-layout[data-view="radar"] .mobile-home-shortcut {
    display: grid !important;
    place-items: center;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    padding: 4px 3px;
    border: 1px solid #e8e8e6;
    border-radius: clamp(16px, 4vw, 20px);
    background: #ffffff;
    color: #111111;
    font-size: clamp(10px, 2.65vw, 12px);
    font-weight: 800;
    line-height: 1.18;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  }

  body.is-mobile-layout[data-view="radar"] .metrics-grid.mobile-home-body {
    display: grid !important;
    flex: 9 9 0;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1.5dvh, 11px);
    margin-top: clamp(10px, 2dvh, 14px);
    margin-bottom: 0;
    padding: 0;
    overflow: visible;
  }

  body.is-mobile-layout[data-view="radar"] .metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: clamp(10px, 1.8dvh, 14px);
    border: 1px solid #e7e7e5;
    border-radius: clamp(16px, 4vw, 20px);
    background: #ffffff;
    color: #111111;
    box-shadow: none;
  }

  body.is-mobile-layout[data-view="radar"] .mobile-metric-link {
    cursor: pointer;
    pointer-events: auto;
  }

  body.is-mobile-layout[data-view="radar"] .metric span,
  body.is-mobile-layout[data-view="radar"] .metric small {
    color: #8a8a8a;
    font-size: clamp(10px, 2.5vw, 12px);
    line-height: 1.25;
  }

  body.is-mobile-layout[data-view="radar"] .metric strong,
  body.is-mobile-layout[data-view="radar"] .metric.danger strong,
  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric strong {
    margin: clamp(4px, 0.8dvh, 8px) 0 clamp(2px, 0.4dvh, 4px);
    color: #111111;
    font-size: clamp(20px, 5.5vw, 28px);
    line-height: 1;
    font-weight: 700;
  }

  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric {
    border-color: #ff8a9a;
    background: #fff1f3;
    box-shadow: 0 0 0 1px rgba(255, 100, 120, 0.15), 0 4px 16px rgba(255, 80, 100, 0.12);
  }

  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric strong,
  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric small {
    color: #ff4667;
  }

  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric.alarm {
    border-color: rgba(255, 77, 79, 0.85) !important;
    background: #121212 !important;
    box-shadow: 0 0 8px rgba(255, 77, 79, 0.45) !important;
  }

  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric.alarm strong {
    color: #4ade80 !important;
  }

  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric.alarm small {
    color: #888 !important;
  }

  body.is-mobile-layout[data-view="radar"] .view-panel {
    display: none !important;
  }

  body.is-mobile-layout:not([data-view="radar"]) .metrics-grid.mobile-home-body {
    display: none !important;
  }

  body.is-mobile-layout:not([data-view="radar"]) .topbar,
  body.is-mobile-layout:not([data-view="radar"]) .metrics-grid,
  body:not([data-view="radar"]) .topbar,
  body:not([data-view="radar"]) .mobile-home-body,
  body:not([data-view="radar"]) .metrics-grid {
    display: none;
  }
}

/* Mobile secondary pages: fixed back + vertical scroll content. Homepage layout untouched. */
@media (max-width: 760px) {
  body.is-mobile-layout .mobile-back-home {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 16px;
    z-index: 400;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111111;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    cursor: pointer;
    appearance: none;
    font-family: inherit;
  }

  body.is-mobile-layout .mobile-back-home[hidden] {
    display: none !important;
  }

  body.is-mobile-layout:not([data-view="radar"]) .dashboard {
    padding-top: calc(54px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(72px + max(8px, env(safe-area-inset-bottom)));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.is-mobile-layout:not([data-view="radar"]) .view-panel:not(.hidden) {
    display: block !important;
    width: 100%;
    margin: 0 0 14px;
    overflow: visible;
  }

  body.is-mobile-layout:not([data-view="radar"]) .workbench,
  body.is-mobile-layout:not([data-view="radar"]) .discover-grid,
  body.is-mobile-layout:not([data-view="radar"]) .split-grid,
  body.is-mobile-layout:not([data-view="radar"]) .lower-grid,
  body.is-mobile-layout:not([data-view="radar"]) .pools-layout,
  body.is-mobile-layout:not([data-view="radar"]) .watch-layout,
  body.is-mobile-layout:not([data-view="radar"]) .watch-snapshot-grid {
    display: block;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  body.is-mobile-layout:not([data-view="radar"]) .workbench > .radar-panel,
  body.is-mobile-layout:not([data-view="radar"]) .workbench > .funnel-panel,
  body.is-mobile-layout:not([data-view="radar"]) .discover-grid > .table-panel,
  body.is-mobile-layout:not([data-view="radar"]) .split-grid > .table-panel,
  body.is-mobile-layout:not([data-view="radar"]) .lower-grid > .table-panel,
  body.is-mobile-layout:not([data-view="radar"]) .lower-grid > .alerts-panel,
  body.is-mobile-layout:not([data-view="radar"]) .pools-layout > .table-panel,
  body.is-mobile-layout:not([data-view="radar"]) .pools-layout > .alerts-panel,
  body.is-mobile-layout:not([data-view="radar"]) .watch-layout > .table-panel,
  body.is-mobile-layout:not([data-view="radar"]) .watch-layout > .watch-feed-panel,
  body.is-mobile-layout:not([data-view="radar"]) .view-panel > .full-panel,
  body.is-mobile-layout:not([data-view="radar"]) .watch-snapshot-grid > .watch-snapshot-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
    margin: 0 0 12px;
    scroll-snap-align: none;
  }

}

/* Mobile touch UI 鈥?dark theme aligned with desktop palette. */
@media (max-width: 760px) {
  body.is-mobile-layout {
    background:
      radial-gradient(circle at 72% 12%, rgba(84, 240, 162, 0.13), transparent 28rem),
      radial-gradient(circle at 12% 80%, rgba(100, 217, 255, 0.08), transparent 22rem),
      linear-gradient(135deg, #0b0d0d 0%, #111615 42%, #16120d 100%);
    color: var(--text);
  }

  body.is-mobile-layout .app-shell {
    background: transparent;
  }

  body.is-mobile-layout .dashboard,
  body.is-mobile-layout[data-view="radar"] .dashboard {
    background: transparent;
    color: var(--text);
    border-left: 0;
    border-right: 0;
  }

  body.is-mobile-layout .dashboard-top {
    background: rgba(11, 14, 13, 0.92);
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  }

  body.is-mobile-layout .dashboard-top .nav-top .nav-item {
    color: var(--muted);
  }

  body.is-mobile-layout .dashboard-top .nav-top .nav-item.active {
    border: 1px solid rgba(84, 240, 162, 0.42);
    background: rgba(84, 240, 162, 0.12);
    color: var(--green);
  }

  body.is-mobile-layout .topbar h2,
  body.is-mobile-layout[data-view="radar"] .topbar h2 {
    color: var(--text);
  }

  body.is-mobile-layout .mobile-home-shortcut,
  body.is-mobile-layout[data-view="radar"] .mobile-home-shortcut {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: none;
  }

  body.is-mobile-layout .metric,
  body.is-mobile-layout[data-view="radar"] .metric,
  body.is-mobile-layout[data-view="radar"] .metric.metric-link,
  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric {
    background: rgba(21, 26, 24, 0.88);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: none;
  }

  body.is-mobile-layout .metric span,
  body.is-mobile-layout .metric small,
  body.is-mobile-layout[data-view="radar"] .metric span,
  body.is-mobile-layout[data-view="radar"] .metric small {
    color: var(--muted);
  }

  body.is-mobile-layout .metric strong,
  body.is-mobile-layout[data-view="radar"] .metric strong {
    color: var(--green);
  }

  body.is-mobile-layout .metric.danger strong,
  body.is-mobile-layout[data-view="radar"] .metric.danger strong {
    color: var(--red);
  }

  body.is-mobile-layout .metric.anomaly-metric,
  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric {
    border-color: rgba(255, 92, 122, 0.55);
    background: rgba(21, 26, 24, 0.88);
    box-shadow: none;
  }

  body.is-mobile-layout .metric.anomaly-metric strong,
  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric strong {
    color: #ff6b6b;
  }

  body.is-mobile-layout .metric.anomaly-metric small,
  body.is-mobile-layout[data-view="radar"] .metric.anomaly-metric small {
    color: #ffb3c0;
  }

  body.is-mobile-layout .mobile-back-home {
    background: rgba(21, 26, 24, 0.92);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  }

  body.is-mobile-layout:not([data-view="radar"]) .radar-panel,
  body.is-mobile-layout:not([data-view="radar"]) .funnel-panel,
  body.is-mobile-layout:not([data-view="radar"]) .table-panel,
  body.is-mobile-layout:not([data-view="radar"]) .alerts-panel,
  body.is-mobile-layout:not([data-view="radar"]) .mobile-menu-panel,
  body.is-mobile-layout:not([data-view="radar"]) .watch-snapshot-card,
  body.is-mobile-layout:not([data-view="radar"]) .view-panel > .full-panel {
    background: rgba(21, 26, 24, 0.88);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: none;
  }

  body.is-mobile-layout:not([data-view="radar"]) .panel-head {
    border-bottom-color: var(--line);
    color: var(--text);
  }

  body.is-mobile-layout:not([data-view="radar"]) .panel-head h3,
  body.is-mobile-layout:not([data-view="radar"]) .detail-row,
  body.is-mobile-layout:not([data-view="radar"]) .chain-row,
  body.is-mobile-layout:not([data-view="radar"]) .heat-row {
    color: var(--text);
  }

  body.is-mobile-layout .heat-board-wrap,
  body.is-mobile-layout .inflow-pie-card,
  body.is-mobile-layout .inflow-surge-card,
  body.is-mobile-layout .chain-dex-card,
  body.is-mobile-layout .watch-push-card,
  body.is-mobile-layout .watch-metric-grid > div,
  body.is-mobile-layout .heat-row,
  body.is-mobile-layout .detail-row,
  body.is-mobile-layout .pool-row,
  body.is-mobile-layout .alert-row,
  body.is-mobile-layout .chain-row,
  body.is-mobile-layout .new-chain-row,
  body.is-mobile-layout .watch-token-row,
  body.is-mobile-layout .mobile-menu-card,
  body.is-mobile-layout .empty-state,
  body.is-mobile-layout .auth-modal-panel:not(.membership-panel),
  body.is-mobile-layout .copy-modal-panel,
  body.is-mobile-layout .membership-plan,
  body.is-mobile-layout .auth-method-btn,
  body.is-mobile-layout .auth-link-btn,
  body.is-mobile-layout .membership-pay-summary,
  body.is-mobile-layout .watch-membership-status,
  body.is-mobile-layout .watch-login-card,
  body.is-mobile-layout .watch-select,
  body.is-mobile-layout .watch-input,
  body.is-mobile-layout .auth-input {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line);
    color: var(--text);
    color-scheme: dark;
  }

  body.is-mobile-layout .heat-rank,
  body.is-mobile-layout .heat-top span,
  body.is-mobile-layout .heat-bar-label,
  body.is-mobile-layout .heat-raw-grid,
  body.is-mobile-layout .detail-row span,
  body.is-mobile-layout .chain-row span,
  body.is-mobile-layout .new-chain-meta-text,
  body.is-mobile-layout .pool-meta,
  body.is-mobile-layout .alert-feed p,
  body.is-mobile-layout .feed-main span,
  body.is-mobile-layout .watch-label,
  body.is-mobile-layout .watch-custom-hint,
  body.is-mobile-layout .watch-snapshot-head span,
  body.is-mobile-layout .watch-metric-grid span,
  body.is-mobile-layout .watch-metric-grid small,
  body.is-mobile-layout .watch-token-row span,
  body.is-mobile-layout .anomaly-subtitle,
  body.is-mobile-layout .anomaly-reason,
  body.is-mobile-layout .mobile-menu-card span,
  body.is-mobile-layout .empty-state {
    color: var(--muted);
  }

  body.is-mobile-layout .mobile-menu-card strong,
  body.is-mobile-layout .score,
  body.is-mobile-layout .detail-right strong,
  body.is-mobile-layout .legend-row b,
  body.is-mobile-layout .chain-dex-share,
  body.is-mobile-layout .chain-dex-delta.up,
  body.is-mobile-layout .detail-right .detail-change.up,
  body.is-mobile-layout .new-chain-link,
  body.is-mobile-layout .watch-link-btn {
    color: var(--text);
  }

  body.is-mobile-layout .heat-bar-track {
    background: rgba(255, 255, 255, 0.08);
  }

  body.is-mobile-layout .heat-bar-fill.tvl,
  body.is-mobile-layout .heat-bar-fill.dex,
  body.is-mobile-layout .heat-legend-chip.tvl::before,
  body.is-mobile-layout .heat-legend-chip.dex::before,
  body.is-mobile-layout .heat-legend-chip.score::before {
    background: var(--green);
  }

  body.is-mobile-layout .heat-score {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    color: var(--text) !important;
  }

  body.is-mobile-layout .segmented {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--line);
  }

  body.is-mobile-layout .segmented button {
    color: var(--text);
  }

  body.is-mobile-layout .segmented .active {
    border-color: rgba(84, 240, 162, 0.42);
    background: rgba(84, 240, 162, 0.12);
    color: var(--green);
  }

  body.is-mobile-layout .time-badge,
  body.is-mobile-layout .queue-count,
  body.is-mobile-layout .mini-badge,
  body.is-mobile-layout .source-chip {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    color: var(--text);
  }

  body.is-mobile-layout .tag,
  body.is-mobile-layout .safe,
  body.is-mobile-layout .watch,
  body.is-mobile-layout .risk {
    background: rgba(84, 240, 162, 0.12);
    color: var(--green);
  }

  body.is-mobile-layout .membership-plan.active,
  body.is-mobile-layout .membership-pay-method.active,
  body.is-mobile-layout .membership-network.active {
    border-color: rgba(84, 240, 162, 0.42);
    background: rgba(84, 240, 162, 0.12);
    color: var(--green);
  }

  body.is-mobile-layout .primary-btn {
    background: var(--green);
    border-color: rgba(84, 240, 162, 0.42);
    color: #08100c;
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
  }

  body.is-mobile-layout .watch-login-card .primary-btn {
    width: 100%;
    min-width: 0;
    padding: 0 20px;
  }

  body.is-mobile-layout .auth-pill,
  body.is-mobile-layout .live-pill,
  body.is-mobile-layout .icon-btn {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line);
    color: var(--text);
  }

  body.is-mobile-layout .watch-select option {
    background: var(--panel);
    color: var(--text);
  }
}

/* Mobile homepage: four equal 2x2 shortcut buttons aligned like metric cards. */
@media (max-width: 760px) {
  body.is-mobile-layout[data-view="radar"] .dashboard > .metrics-grid.mobile-home-body {
    display: none !important;
  }

  body.is-mobile-layout[data-view="radar"] .topbar {
    flex: 0 0 auto !important;
    min-height: 0;
    margin: 0;
    padding: 0 2px;
  }

  body.is-mobile-layout[data-view="radar"] .topbar > div {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
  }

  body.is-mobile-layout[data-view="radar"] .topbar h2 {
    margin: 0 0 clamp(10px, 2dvh, 14px);
  }

  body.is-mobile-layout[data-view="radar"] .mobile-home-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    gap: clamp(8px, 1.5dvh, 11px) !important;
    width: 100%;
    flex: 0 0 auto !important;
    min-height: clamp(172px, 34dvh, 248px);
    margin: 0;
    padding: 0;
  }

  body.is-mobile-layout[data-view="radar"] .mobile-home-shortcut {
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: clamp(10px, 1.8dvh, 14px);
    border: 1px solid var(--line);
    border-radius: clamp(16px, 4vw, 20px);
    background: rgba(21, 26, 24, 0.88);
    color: var(--text);
    font-size: clamp(14px, 3.8vw, 16px);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    box-shadow: none;
    appearance: none;
    font-family: inherit;
    cursor: pointer;
  }

  body.is-mobile-layout[data-view="radar"] .mobile-home-shortcut.mobile-home-shortcut--anomaly {
    border-color: rgba(255, 92, 122, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 92, 122, 0.12);
  }

  body.is-mobile-layout[data-view="radar"] .mobile-home-shortcut.active {
    border-color: rgba(84, 240, 162, 0.42);
    background: rgba(84, 240, 162, 0.1);
    color: var(--green);
  }

  body.is-mobile-layout[data-view="radar"] .mobile-home-shortcut.mobile-home-shortcut--anomaly.active {
    border-color: rgba(255, 92, 122, 0.75);
    background: rgba(255, 92, 122, 0.12);
    color: #ff6b6b;
  }
}

/* Mobile watch page: vertical stack, full content visible. */
@media (max-width: 760px) {
  body.is-mobile-layout[data-view="watch"] .dashboard {
    padding: max(10px, env(safe-area-inset-top)) 12px calc(72px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.is-mobile-layout[data-view="watch"] .mobile-back-home {
    display: none !important;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"]:not(.hidden) {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-login-gate:not(.hidden) {
    display: block !important;
    margin: 0 0 12px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-layout.hidden,
  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-snapshot-grid.hidden {
    display: none !important;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-login-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(21, 26, 24, 0.88);
    padding: 16px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-layout,
  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-snapshot-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-layout > .watch-config-panel,
  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-layout > .watch-feed-panel,
  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-snapshot-grid > .watch-snapshot-card {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    background: rgba(21, 26, 24, 0.88) !important;
    box-shadow: none !important;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .panel-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .panel-head h3 {
    font-size: 16px;
    color: var(--text);
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-tier-row,
  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-picker {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-membership-status {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    line-height: 1.4;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-picker-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-select,
  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-input {
    width: 100%;
    min-height: 40px;
    font-size: 14px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-custom-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-push-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-push-card {
    padding: 12px;
    border-radius: 12px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-metric-grid > div {
    padding: 10px;
    border-radius: 10px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-token-row {
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .alert-feed .alert-row,
  body.is-mobile-layout .view-panel[data-panel="watch"] .empty-state {
    border-radius: 10px;
    font-size: 13px;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] #watch-upgrade-btn,
  body.is-mobile-layout .view-panel[data-panel="watch"] #watch-add-btn,
  body.is-mobile-layout .view-panel[data-panel="watch"] #watch-custom-add-btn {
    min-height: 40px;
    width: 100%;
  }

  body.is-mobile-layout .view-panel[data-panel="watch"] .watch-link-btn {
    width: 100%;
    text-align: left;
    font-size: 12px;
    line-height: 1.4;
    padding: 8px 0;
  }
}

/* Bot / human verification gate */
.bot-guard-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(84, 240, 162, 0.12), transparent 40%),
    rgba(5, 8, 7, 0.86);
  backdrop-filter: blur(10px);
}

.bot-guard-modal[hidden] {
  display: none !important;
}

.bot-guard-panel {
  width: min(100%, 420px);
  padding: 28px 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #121816 0%, #0c110f 100%);
  color: #e8f0ec;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.bot-guard-brand {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #54f0a2;
}

.bot-guard-panel h2 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.bot-guard-copy {
  margin: 0 0 18px;
  color: #9bb0a5;
  font-size: 14px;
  line-height: 1.55;
}

.bot-guard-turnstile {
  min-height: 0;
  margin-bottom: 12px;
}

.bot-guard-math {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-guard-math.hidden {
  display: none !important;
}

.bot-guard-math-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #9bb0a5;
  font-size: 14px;
}

.bot-guard-math-label strong {
  color: #e8f0ec;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bot-guard-answer {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: #e8f0ec;
  font-size: 18px;
  font-weight: 600;
}

.bot-guard-answer:focus {
  outline: none;
  border-color: rgba(84, 240, 162, 0.55);
  box-shadow: 0 0 0 3px rgba(84, 240, 162, 0.12);
}

.bot-guard-click {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  user-select: none;
}

.bot-guard-click.hidden {
  display: none !important;
}

.bot-guard-click input {
  width: 18px;
  height: 18px;
  accent-color: #54f0a2;
}

.bot-guard-status {
  min-height: 1.4em;
  margin: 0 0 14px;
  color: #9bb0a5;
  font-size: 13px;
}

.bot-guard-status.is-error {
  color: #ff8f8f;
}

.bot-guard-submit {
  width: 100%;
  min-height: 44px;
}

.bot-guard-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.member-feature-banner:empty,
.anomaly-subtitle:empty,
.watch-push-note:empty,
.watch-custom-hint:empty,
.membership-stablecoin-hint:empty,
.meme-page-meta:empty,
.pro-membership-status:empty,
.sidebar-meta:empty {
  display: none !important;
}

/* ——— Circle Arc 主网监控面板 ——— */
.circle-arc-panel {
  --ca-bg: rgba(255, 255, 255, 0.03);
  --ca-line: rgba(232, 238, 228, 0.1);
  --ca-muted: #8a9a90;
  --ca-glow: #ffd166;
  box-sizing: border-box;
  border: 1px solid rgba(255, 209, 102, 0.55);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--ca-bg);
  animation: circle-arc-glow-ring 1.8s ease-in-out infinite;
}

@keyframes circle-arc-glow-ring {
  0%,
  100% {
    border-color: rgba(255, 209, 102, 0.28);
    box-shadow:
      0 0 0 1px rgba(255, 209, 102, 0.12),
      0 0 10px 1px rgba(255, 209, 102, 0.18),
      0 0 22px 3px rgba(255, 209, 102, 0.08);
  }
  50% {
    border-color: rgba(255, 209, 102, 0.95);
    box-shadow:
      0 0 0 2px rgba(255, 209, 102, 0.55),
      0 0 16px 3px rgba(255, 209, 102, 0.42),
      0 0 36px 8px rgba(255, 209, 102, 0.22);
  }
}

.circle-arc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.circle-arc-live {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(84, 240, 162, 0.55);
  animation: circle-arc-pulse 2.4s ease-out infinite;
}

@keyframes circle-arc-pulse {
  0% { box-shadow: 0 0 0 0 rgba(84, 240, 162, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(84, 240, 162, 0); }
  100% { box-shadow: 0 0 0 0 rgba(84, 240, 162, 0); }
}

.circle-arc-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.circle-arc-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.circle-arc-kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.circle-arc-kv span {
  color: var(--ca-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.circle-arc-kv strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.circle-arc-kv strong em {
  margin-left: 4px;
  color: var(--ca-muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
}

.circle-arc-tagline {
  margin: 0;
  min-width: 0;
  color: rgba(236, 242, 234, 0.72);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.circle-arc-divider {
  width: 1px;
  height: 22px;
  background: var(--ca-line);
  flex-shrink: 0;
}

.circle-arc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.circle-arc-btn {
  appearance: none;
  border: 1px solid rgba(84, 240, 162, 0.28);
  border-radius: 999px;
  background: rgba(84, 240, 162, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.circle-arc-btn:hover {
  background: rgba(84, 240, 162, 0.16);
  border-color: rgba(84, 240, 162, 0.45);
}

.circle-arc-btn:active {
  transform: scale(0.97);
}

.circle-arc-btn.is-copied {
  border-color: rgba(84, 240, 162, 0.55);
  background: rgba(84, 240, 162, 0.2);
  color: #d8ffe9;
}

.circle-arc-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.circle-arc-link:hover {
  color: var(--text);
  border-bottom-color: rgba(232, 238, 228, 0.35);
}

.circle-arc-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.circle-arc-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.circle-arc-switch-ui {
  position: relative;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.22s ease, border-color 0.22s ease;
}

.circle-arc-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ecefec;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.circle-arc-switch input:checked + .circle-arc-switch-ui {
  background: rgba(84, 240, 162, 0.35);
  border-color: rgba(84, 240, 162, 0.55);
}

.circle-arc-switch input:checked + .circle-arc-switch-ui::after {
  transform: translateX(14px);
  background: var(--green);
}

.circle-arc-switch-label {
  color: var(--ca-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.circle-arc-switch input:checked ~ .circle-arc-switch-label {
  color: var(--text);
}

/* PC：指标卡与核心内容之间的横向监控条 */
.circle-arc-panel--desktop {
  display: none;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 52px;
  margin: 0 0 14px;
  padding: 10px 18px;
  box-sizing: border-box;
  overflow: hidden;
}

body:not(.is-mobile-layout)[data-view="radar"] .circle-arc-panel--desktop {
  display: flex !important;
}

body:not(.is-mobile-layout):not([data-view="radar"]) .circle-arc-panel--desktop {
  display: none !important;
}

body:not(.is-mobile-layout) .circle-arc-panel--desktop .circle-arc-meta {
  flex: 0 1 auto;
}

body:not(.is-mobile-layout) .circle-arc-panel--desktop .circle-arc-tagline {
  flex: 1 1 auto;
  padding: 0 4px;
  color: #dce6de;
  font-size: 13px;
  font-weight: 500;
}

body:not(.is-mobile-layout) .circle-arc-panel--desktop .circle-arc-actions {
  margin-left: auto;
  gap: 14px;
  flex-shrink: 0;
}

body:not(.is-mobile-layout) .circle-arc-panel--desktop .circle-arc-title {
  font-size: 14px;
}

@media (max-width: 1100px) {
  body:not(.is-mobile-layout) .circle-arc-panel--desktop {
    flex-wrap: wrap;
    min-height: 0;
    gap: 12px 16px;
  }

  body:not(.is-mobile-layout) .circle-arc-panel--desktop .circle-arc-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

/* Mobile：默认在 styles 里隐藏，由 mobile-layout 接管 */
.circle-arc-panel--mobile {
  display: none;
}
