:root {
  color-scheme: dark;
  --bg: #080b0f;
  --panel: #0d1117;
  --line: rgba(133, 148, 168, 0.16);
  --line-strong: rgba(133, 148, 168, 0.28);
  --text: #e7edf5;
  --muted: #7d8998;
  --up: #00b985;
  --down: #ef4d5a;
  --gold: #e7b85a;
  --blue: #3688ff;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: linear-gradient(180deg, rgba(21, 32, 45, 0.52), rgba(8, 11, 15, 0.2) 260px), var(--bg);
}

button {
  color: inherit;
  font: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: calc(96px + var(--safe-bottom));
}

.market-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 14px 10px;
  background: rgba(8, 11, 15, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.market-header__top,
.quote-strip,
.section-head,
.market-symbol,
.market-price,
.ticker-title {
  display: flex;
  align-items: center;
}

.market-header__top {
  gap: 10px;
}

.pair-tab {
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.header-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.add-pair-button,
.unit-button {
  display: grid;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 33, 0.86);
  color: #b8c1ce;
}

.add-pair-button {
  width: 34px;
  color: var(--gold);
  font-size: 20px;
}

.unit-button {
  min-width: 42px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 760;
}

.user-button {
  display: grid;
  max-width: 96px;
  min-width: 48px;
  height: 36px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(54, 136, 255, 0.14);
  color: #dce8ff;
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 33, 0.86);
  color: #b8c1ce;
}

.pair-title {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: #f3f7fb;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.1;
}

.pair-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.quote-strip {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto auto auto;
  gap: 10px;
  margin-top: 13px;
  overflow: hidden;
}

.quote-price {
  color: var(--text);
  font-size: clamp(24px, 8vw, 34px);
  font-weight: 780;
  line-height: 1;
}

.quote-fiat {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.quote-change {
  align-self: end;
  min-width: 72px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 760;
  text-align: center;
}

.quote-change.up {
  background: rgba(0, 185, 133, 0.16);
}

.quote-change.down {
  background: rgba(239, 77, 90, 0.16);
}

.quote-stat {
  align-self: end;
  min-width: 58px;
}

.quote-stat span,
.quote-stat strong {
  display: block;
  white-space: nowrap;
}

.quote-stat span {
  color: var(--muted);
  font-size: 11px;
}

.quote-stat strong {
  margin-top: 3px;
  color: #cfd7e2;
  font-size: 12px;
}

.desktop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 10px;
}

.home-tabs {
  position: sticky;
  top: 118px;
  z-index: 19;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 15, 0.95);
  scrollbar-width: none;
}

.hidden {
  display: none !important;
}

.app-rail-nav {
  position: sticky;
  top: 118px;
  z-index: 30;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 15, 0.96);
  scrollbar-width: none;
}

.app-rail-nav::-webkit-scrollbar {
  display: none;
}

.app-rail-nav button {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  color: #9aa6b6;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
}

.app-rail-nav button span {
  font-size: 12px;
}

.app-rail-nav button.active {
  color: #f04b36;
  background: rgba(255, 255, 255, 0.09);
}

.app-page {
  display: none;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 10px;
}

.app-page.active {
  display: block;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
}

.page-head h2 {
  margin: 0;
  font-size: 20px;
}

.page-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.page-head > div:last-child {
  display: flex;
  gap: 7px;
  overflow-x: auto;
}

.page-head button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: #b7c1cf;
  font-size: 12px;
}

.page-head button.active {
  background: rgba(54, 136, 255, 0.18);
  color: #e8f1ff;
}

.news-layout,
.trade-layout,
.onchain-grid,
.data-dashboard,
.strategy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.news-feed,
.news-side article,
.order-ticket,
.trade-book,
.positions-card,
.strategy-card,
.onchain-grid article,
.data-dashboard article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
}

.news-feed {
  overflow: hidden;
}

.news-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.news-item > span {
  color: var(--muted);
  font-size: 11px;
}

.news-item b {
  margin-right: 8px;
  color: var(--gold);
}

.news-item strong {
  color: #eef3fb;
  font-size: 14px;
}

.news-item p {
  margin: 6px 0 0;
  color: #96a2b2;
  font-size: 12px;
}

.news-item button,
.strategy-card button {
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #c8d2df;
}

.news-side {
  display: grid;
  gap: 12px;
}

.news-side article,
.order-ticket,
.trade-book,
.positions-card,
.strategy-card,
.onchain-grid article,
.data-dashboard article {
  padding: 14px;
}

.news-side strong,
.trade-book strong,
.positions-card strong,
.onchain-grid strong,
.data-dashboard strong {
  color: #eef3fb;
}

#newsCalendar,
#newsTags,
#stableRows,
#fundingRows,
#interestRows,
#liquidationRows,
#etfRows {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

#newsCalendar div,
#stableRows div,
#fundingRows div,
#interestRows div,
#liquidationRows div,
#etfRows div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(133, 148, 168, 0.08);
  color: #cdd6e2;
  font-size: 12px;
}

#newsTags {
  display: flex;
  flex-wrap: wrap;
}

#newsTags button {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
  color: #c8d2df;
}

.order-ticket {
  display: grid;
  gap: 12px;
}

.order-ticket header,
.trade-book header,
.positions-card header,
.onchain-grid header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.side-switch button,
.submit-order {
  height: 34px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #c8d2df;
}

.side-switch button.active,
.submit-order {
  background: rgba(0, 185, 133, 0.24);
  color: #d8fff4;
}

.order-ticket label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.order-ticket input,
.order-ticket select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: #edf3fb;
}

.amount-slider {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.amount-slider span {
  height: 4px;
  border-radius: 4px;
  background: rgba(0, 185, 133, 0.42);
}

#tradeBookRows,
#positionRows,
#flowBars,
#whaleRows {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

#tradeBookRows div,
#positionRows div,
#whaleRows div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  color: #ccd5e1;
  font-size: 12px;
}

#tradeBookRows strong {
  padding: 8px 0;
  color: #f4f8fd;
  font-size: 22px;
}

.strategy-card p {
  margin: 10px 0 12px;
  color: #a4afbd;
  font-size: 12px;
}

.strategy-card header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.strategy-card header code {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: #c7d0dc;
  font-size: 12px;
  white-space: normal;
  word-break: break-all;
}

.strategy-card header span {
  color: var(--gold);
  font-size: 11px;
}

.strategy-card > div {
  display: flex;
  gap: 8px;
}

.strategy-loading {
  color: #aeb9c7;
  font-size: 13px;
}

.strategy-card--exchange {
  display: grid;
  gap: 12px;
}

.strategy-card--exchange header strong {
  display: block;
  color: #eef4fb;
  font-size: 16px;
}

.strategy-card--exchange header > span {
  display: inline-flex;
  min-width: 54px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 780;
}

.strategy-card--exchange header > span.up {
  color: #b6f6df;
  background: rgba(0, 185, 133, 0.16);
}

.strategy-card--exchange header > span.down {
  color: #ffd1d6;
  background: rgba(239, 77, 90, 0.16);
}

.strategy-market {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.strategy-market b,
.strategy-market em {
  color: #9aa6b6;
  font-size: 12px;
  font-style: normal;
}

.strategy-market strong {
  color: #f1f6fb;
  font-size: 18px;
}

.strategy-spark {
  display: flex;
  height: 62px;
  align-items: end;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090d13;
}

.strategy-spark i {
  flex: 1;
  min-width: 4px;
  border-radius: 3px 3px 0 0;
  background: rgba(125, 137, 152, 0.32);
}

.strategy-spark i.up {
  background: rgba(0, 185, 133, 0.74);
}

.strategy-spark i.down {
  background: rgba(239, 77, 90, 0.72);
}

.strategy-rules {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.strategy-rules th,
.strategy-rules td {
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.strategy-rules th {
  color: #f0f5fb;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 780;
}

.strategy-rules tr:last-child td {
  border-bottom: 0;
}

.strategy-rules th:last-child,
.strategy-rules td:last-child {
  border-right: 0;
}

.strategy-indicators,
.strategy-exits {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.strategy-indicators span,
.strategy-exits li,
.strategy-card--exchange footer span {
  color: #9eabb9;
  font-size: 12px;
  line-height: 1.5;
}

.strategy-exits {
  margin: 0;
  padding-left: 28px;
}

.strategy-card--exchange footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.strategy-card--exchange footer button {
  flex: 0 0 auto;
}

.flow-row {
  display: grid;
  grid-template-columns: 60px 1fr 64px;
  align-items: center;
  gap: 10px;
  color: #cdd6e2;
  font-size: 12px;
}

.flow-row i {
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(0, 185, 133, 0.2), rgba(0, 185, 133, 0.86));
}

.home-tabs::-webkit-scrollbar {
  display: none;
}

.home-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #a4adba;
  font-size: 14px;
  font-weight: 760;
}

.home-tabs button.active {
  border-color: rgba(231, 237, 245, 0.72);
  background: rgba(255, 255, 255, 0.075);
  color: #f2f6fb;
}

.home-panel {
  display: none;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 10px;
}

.home-panel.active {
  display: block;
}

.overview-intel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(13, 17, 23, 0.96), rgba(18, 23, 30, 0.78));
}

.overview-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: min(760px, 100%);
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.16);
  color: #b8c2cf;
}

.overview-search strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.overview-search button {
  height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  background: rgba(54, 136, 255, 0.18);
  color: #b8d0ff;
  font-size: 11px;
}

.quick-entry,
.related-coins {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 12px;
}

.quick-entry button,
.related-coins button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #c5cfdb;
  font-size: 12px;
}

.promo-strip,
.intel-grid,
.overview-lower,
.airdrop-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.promo-strip article {
  min-height: 58px;
  padding: 13px 16px;
  border-radius: 5px;
  background: linear-gradient(90deg, #0865ff, #0aa4ff);
  color: #fff;
  font-weight: 800;
}

.promo-strip article:nth-child(2) {
  background: linear-gradient(90deg, #1d232d, #c7f06d);
}

.promo-strip article:nth-child(3) {
  background: linear-gradient(90deg, #161b22, #1d7f68);
}

.promo-strip span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
}

.intel-grid article,
.overview-lower article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(8, 11, 15, 0.58);
}

.intel-grid header,
.overview-lower header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.intel-grid header strong,
.overview-lower header strong {
  color: #e7edf5;
  font-size: 14px;
}

.intel-grid header button,
.overview-lower header button {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #b8c2cf;
  font-size: 11px;
}

.intel-grid header button.active,
.overview-lower header button.active {
  background: rgba(255, 255, 255, 0.9);
  color: #111821;
}

.brief-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  color: #ccd5e1;
  font-size: 12px;
}

.brief-row em {
  color: #dce4ef;
  font-style: normal;
}

.brief-row button {
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(0, 185, 133, 0.13);
  color: var(--up);
  font-size: 11px;
}

.market-opportunity ol,
.today-hot ol {
  display: grid;
  gap: 11px;
  margin: 0;
  padding-left: 20px;
  color: #d1dae5;
  font-size: 12px;
}

.related-coins {
  margin-top: 12px;
}

.word-cloud {
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 170px;
  text-align: center;
}

.word-cloud span {
  color: #9c8cff;
  font-weight: 800;
}

.word-cloud .word-1 { font-size: 46px; }
.word-cloud .word-2 { color: #57b8ff; font-size: 30px; }
.word-cloud .word-3 { color: #b98dff; font-size: 24px; }
.word-cloud .word-4 { color: #76d7ff; font-size: 20px; }
.word-cloud .word-5 { color: #857cff; font-size: 16px; }

.mini-heatmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  min-height: 190px;
}

.mini-heatmap button {
  display: grid;
  place-content: center;
  color: #eaf4f2;
  text-align: center;
}

.mini-heatmap .size-1 { grid-row: span 2; }
.mini-heatmap .size-2 { grid-column: span 2; }
.mini-heatmap .size-3 { grid-column: span 2; grid-row: span 2; }

.mini-heatmap strong,
.mini-heatmap span {
  display: block;
}

.mini-heatmap strong {
  font-size: 17px;
}

.mini-heatmap span {
  margin-top: 4px;
  font-size: 12px;
}

.airdrop-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.airdrop-card > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(54, 136, 255, 0.2);
  color: #98bdff;
}

.airdrop-card strong {
  color: #eef3fb;
  font-size: 13px;
}

.airdrop-card em {
  margin-left: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.airdrop-card p {
  margin: 5px 0 0;
  color: #9aa6b6;
  font-size: 12px;
}

.ace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.72);
  overflow: hidden;
}

.ace-sidebar {
  display: none;
}

.ace-main {
  display: grid;
  align-content: center;
  gap: 26px;
  min-height: 580px;
  padding: 24px;
}

.ace-main h1 {
  margin: 0;
  text-align: center;
  color: #e7edf5;
  font-size: clamp(28px, 7vw, 42px);
}

.ace-input {
  width: min(690px, 100%);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid #b23dff;
  border-left-color: #00c8ff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  box-shadow: 0 0 28px rgba(95, 91, 255, 0.18);
}

.ace-input div {
  display: flex;
  justify-content: space-between;
  margin-top: 34px;
}

.ace-input button {
  color: #c3ccda;
  font-size: 12px;
}

.ace-prompts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: min(690px, 100%);
  margin: 0 auto;
}

.ace-prompts article,
.tool-feature-grid article,
.tool-item,
.leader-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.ace-prompts article {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.ace-prompts strong {
  color: #f0f5fb;
}

.ace-prompts span {
  color: #b7c1cf;
  font-size: 12px;
}

.screener-toolbar,
.hot-rank-tabs,
.rank-tabs,
.tool-cats,
.cloud-toolbar,
.radar-toolbar,
.radar-legend {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
  scrollbar-width: none;
}

.screener-toolbar::-webkit-scrollbar,
.hot-rank-tabs::-webkit-scrollbar,
.rank-tabs::-webkit-scrollbar,
.tool-cats::-webkit-scrollbar,
.cloud-toolbar::-webkit-scrollbar,
.radar-toolbar::-webkit-scrollbar,
.radar-legend::-webkit-scrollbar {
  display: none;
}

.screener-toolbar button,
.hot-rank-tabs button,
.rank-tabs button,
.tool-cats button,
.cloud-toolbar button,
.radar-toolbar button,
.radar-legend button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: #b5bfcd;
  font-size: 12px;
}

.screener-toolbar .active,
.rank-tabs .active,
.tool-cats .active,
.cloud-toolbar .active,
.radar-toolbar .active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.screener-toolbar span,
.cloud-toolbar span,
.radar-toolbar span {
  flex: 1 0 30px;
}

.result-count {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.result-count strong {
  color: #f0f5fb;
  font-size: 18px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
}

.data-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(133, 148, 168, 0.08);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: rgba(255, 255, 255, 0.09);
  color: #c8d1dd;
  font-weight: 760;
}

.data-table th button {
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.data-table th button::after {
  content: " ↕";
  color: #6f7a88;
}

.data-table th button.active::after {
  content: " ↓";
  color: var(--gold);
}

.data-table th button.active[data-direction="asc"]::after {
  content: " ↑";
}

.data-table td {
  color: #d8e0ea;
}

.data-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(0, 0, 0, 0.42);
}

.filter-drawer.open {
  display: block;
}

.filter-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100%;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: #0d1117;
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.45);
}

.filter-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.filter-panel header strong {
  color: #eef3fb;
  font-size: 18px;
}

.filter-panel header button {
  color: #9aa6b6;
  font-size: 22px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #b9c3d0;
  font-size: 12px;
}

.filter-panel input {
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: rgba(255, 255, 255, 0.045);
  color: #f0f5fb;
  font: inherit;
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.filter-actions button {
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce5f1;
}

.filter-actions button:last-child {
  background: rgba(54, 136, 255, 0.28);
  color: #fff;
}

.coin-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: #3b4654;
}

.hot-rank-tabs b {
  margin-left: 2px;
  color: var(--down);
  font-size: 9px;
}

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

.leader-card {
  overflow: hidden;
}

.leader-card header,
.leader-head,
.leader-row {
  display: grid;
  grid-template-columns: 34px 1fr 0.9fr 0.8fr;
  gap: 8px;
  align-items: center;
}

.leader-card header {
  grid-template-columns: 1fr auto;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.06);
}

.leader-card header strong {
  color: #e9eef6;
}

.leader-card header button {
  color: #c2ccd9;
  font-size: 12px;
}

.leader-head {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
}

.leader-row {
  min-height: 30px;
  padding: 0 10px;
  color: #d6dee9;
  font-size: 12px;
}

.toolbox-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 28px 10px 22px;
  border-bottom: 1px solid var(--line);
}

.toolbox-head h2 {
  margin: 0;
  color: #19b8ff;
  font-size: 26px;
}

.tool-search {
  min-height: 42px;
  padding: 12px 18px;
  border: 1px solid #2d7bff;
  border-radius: 18px;
  color: var(--muted);
  box-shadow: 0 0 18px rgba(93, 72, 255, 0.22);
}

.tool-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.tool-feature-grid article {
  min-height: 150px;
  padding: 18px;
}

.tool-feature-grid h3 {
  margin: 0 0 26px;
}

.tool-feature-grid b {
  color: var(--down);
  font-size: 9px;
}

.tool-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  color: #d7dfeb;
  text-align: center;
  font-size: 12px;
}

.tool-feature-grid p,
.tool-item p {
  color: #a9b4c2;
  font-size: 12px;
}

.tool-feature-grid button {
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #d9e2ee;
}

.tool-section-title {
  margin: 28px 0 12px;
}

.tool-list-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.tool-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.tool-item > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(54, 136, 255, 0.17);
  color: #78a9ff;
}

.tool-item strong {
  color: #edf3fb;
}

.tool-item p {
  margin: 5px 0 0;
}

.tool-item button {
  color: #707b89;
}

.legend-strip {
  display: flex;
  gap: 3px;
}

.legend-strip i {
  min-width: 38px;
  padding: 6px 8px;
  border-radius: 3px;
  background: #184f3f;
  color: #d8f7ec;
  font-style: normal;
  font-size: 11px;
  text-align: center;
}

.legend-strip i:nth-child(-n + 3) {
  background: #8a2830;
}

.heatmap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 10px;
  min-height: 600px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111418;
}

.heat-group {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 150px;
  background: #0a0d11;
}

.heat-group header {
  padding: 6px 7px;
  color: #c5cfdb;
  font-size: 12px;
}

.heat-cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(54px, 1fr));
  gap: 2px;
}

.heat-cells button {
  display: grid;
  place-content: center;
  min-height: 58px;
  color: #eaf4f2;
  text-align: center;
}

.heat-cells .size-1 {
  grid-row: span 2;
}

.heat-cells .size-2 {
  grid-column: span 2;
}

.heat-cells .size-3 {
  grid-column: span 2;
  grid-row: span 2;
}

.heat-cells strong,
.heat-cells span {
  display: block;
}

.heat-cells strong {
  font-size: 16px;
}

.heat-cells span {
  margin-top: 4px;
  font-size: 12px;
}

.heat-up {
  background: #1d795f;
}

.heat-down {
  background: #7d2b31;
}

.radar-legend .green {
  background: #068c6e;
}

.radar-legend .red {
  background: #a12a38;
}

.radar-grid {
  overflow: auto;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202326;
}

.radar-row {
  display: grid;
  grid-template-columns: 72px repeat(36, 34px);
  min-width: 1300px;
}

.radar-row strong,
.radar-row span {
  display: grid;
  min-height: 27px;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: #ecf1f7;
  font-size: 10px;
}

.radar-row strong {
  justify-content: start;
  padding-left: 6px;
  background: #262a2f;
  color: #dce4ef;
}

.radar-up.soft {
  background: #303936;
}

.radar-up.mid {
  background: #245746;
}

.radar-up.strong {
  background: #0c9a78;
}

.radar-down.soft {
  background: #3b3032;
}

.radar-down.mid {
  background: #6a3036;
}

.radar-down.strong {
  background: #d83547;
}

.desktop-sidebar {
  display: none;
}

.chart-panel,
.market-list,
.depth-panel,
.ticker-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
}

.chart-panel,
.depth-panel {
  overflow: hidden;
}

.depth-panel {
  position: relative;
}

.period-row,
.tool-row,
.indicator-row,
.market-tabs,
.depth-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.period-row::-webkit-scrollbar,
.tool-row::-webkit-scrollbar,
.indicator-row::-webkit-scrollbar,
.market-tabs::-webkit-scrollbar,
.depth-tabs::-webkit-scrollbar {
  display: none;
}

.period-row {
  padding: 9px 9px 6px;
  border-bottom: 1px solid var(--line);
}

.period-row button,
.indicator-row button,
.market-tabs button,
.depth-tabs button,
.tool-row button {
  flex: 0 0 auto;
  min-height: 30px;
  border-radius: 6px;
  color: #9aa6b6;
  font-size: 12px;
  white-space: nowrap;
}

.period-row button,
.indicator-row button,
.market-tabs button,
.depth-tabs button {
  padding: 0 10px;
}

.period-row button.active,
.indicator-row button.active,
.market-tabs button.active,
.depth-tabs button.active {
  background: rgba(54, 136, 255, 0.15);
  color: #dce9ff;
}

.tool-row {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
}

.tool-row button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.035);
}

.tool-row .ai-tool {
  color: #b5d0ff;
  background: rgba(54, 136, 255, 0.16);
}

.tool-row button.active {
  color: #f1f6ff;
  background: rgba(54, 136, 255, 0.22);
}

.chart-insight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(54, 136, 255, 0.18);
  background: rgba(54, 136, 255, 0.08);
  color: #bac8dc;
  font-size: 12px;
}

.chart-insight[hidden] {
  display: none;
}

.chart-insight strong,
.chart-insight span {
  min-width: 0;
}

.chart-insight strong {
  color: #e7efff;
  font-size: 12px;
}

.chart-insight span {
  grid-column: 1 / -1;
  line-height: 1.55;
}

.chart-insight button {
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce9ff;
  font-size: 12px;
}

.chart-canvas {
  display: block;
  width: 100%;
  height: 360px;
  background: #0a0d11;
}

.chart-stage {
  position: relative;
  overflow: hidden;
  background: #0a0d11;
}

.chart-float-tools {
  position: absolute;
  top: 28px;
  left: 10px;
  z-index: 2;
  display: flex;
  gap: 1px;
  padding: 4px;
  border: 1px solid rgba(133, 148, 168, 0.22);
  border-radius: 4px;
  background: rgba(18, 23, 31, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.chart-float-tools button {
  display: grid;
  width: 28px;
  height: 26px;
  place-items: center;
  border-radius: 3px;
  color: #9aa6b6;
  font-size: 12px;
}

.chart-float-tools button:hover {
  color: #eff5fb;
  background: rgba(255, 255, 255, 0.08);
}

.indicator-row {
  padding: 8px 9px 9px;
  border-top: 1px solid var(--line);
}

.section-head {
  justify-content: space-between;
  padding: 13px 13px 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.section-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  color: #9fbfff;
  font-size: 13px;
}

.market-tabs {
  padding: 0 10px 10px;
}

.primary-tabs {
  padding-bottom: 6px;
}

.sub-tabs {
  padding-bottom: 8px;
}

.sub-tabs button {
  min-height: 26px;
  color: #7f8a99;
  background: rgba(255, 255, 255, 0.025);
}

.market-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin: 0 12px 10px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.market-notice {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 0 12px 10px;
  padding: 16px 12px 14px;
  border: 1px solid rgba(231, 184, 90, 0.12);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(231, 184, 90, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--muted);
  font-size: 12px;
}

.market-notice strong {
  color: #cfd7e2;
  font-size: 13px;
}

.notice-icon {
  display: grid;
  width: 42px;
  height: 32px;
  place-items: center;
  color: #313a45;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.notice-close {
  position: absolute;
  top: 6px;
  right: 7px;
  color: #7f8a99;
  font-size: 15px;
}

.market-sort {
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.8fr;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.market-sort span:nth-child(2),
.market-sort span:nth-child(3) {
  text-align: right;
}

.market-items {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.market-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 12px;
  background: rgba(9, 13, 18, 0.55);
  text-align: left;
}

.market-item.selected {
  background: rgba(54, 136, 255, 0.1);
}

.market-symbol {
  gap: 9px;
  min-width: 0;
}

.star {
  color: var(--gold);
}

.market-symbol strong,
.market-symbol span,
.market-price strong,
.market-price span {
  display: block;
}

.market-symbol strong,
.market-price strong {
  color: var(--text);
  font-size: 14px;
}

.market-symbol span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.market-price {
  flex-direction: column;
  align-items: flex-end;
}

.market-price span {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 720;
}

.loading-row {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
}

.loading-row.error {
  color: var(--down);
}

.hot-market-block {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.hot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.hot-head strong {
  color: #d7dee9;
  font-size: 13px;
}

.hot-head span {
  margin-left: 12px;
  color: var(--muted);
  font-size: 12px;
}

.hot-head button {
  color: #d7dee9;
  font-size: 12px;
}

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

.hot-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
}

.hot-card strong,
.hot-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-card strong {
  color: #e7edf5;
  font-size: 12px;
}

.hot-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.add-watch-button {
  display: block;
  width: min(170px, 100%);
  height: 34px;
  margin: 12px auto 0;
  border-radius: 6px;
  background: #f4f6f8;
  color: #161b22;
  font-size: 12px;
  font-weight: 760;
}

.pair-tabs-row {
  display: flex;
  align-items: stretch;
  gap: 7px;
  overflow-x: auto;
  padding: 0 1px;
  scrollbar-width: none;
}

.pair-tabs-row::-webkit-scrollbar {
  display: none;
}

.pair-tabs-row button {
  flex: 0 0 auto;
  min-width: 108px;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px 7px 0 0;
  background: rgba(255, 255, 255, 0.025);
  color: #a7b2c1;
  text-align: left;
}

.pair-tabs-row button.active {
  color: #f0f5fb;
  background: rgba(54, 136, 255, 0.12);
}

.pair-tabs-row strong,
.pair-tabs-row span {
  display: block;
}

.pair-tabs-row strong {
  font-size: 12px;
}

.pair-tabs-row span {
  margin-top: 4px;
  color: var(--up);
  font-size: 11px;
}

.pair-tabs-row .new-tab {
  display: grid;
  min-width: 42px;
  place-items: center;
  color: var(--gold);
  font-size: 18px;
  text-align: center;
}

.pair-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: end;
  justify-content: center;
  padding: 14px;
  background: rgba(2, 4, 8, 0.68);
  backdrop-filter: blur(10px);
}

.pair-modal.open {
  display: flex;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: end;
  justify-content: center;
  padding: 14px;
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(10px);
}

.auth-modal.open {
  display: flex;
}

.auth-panel {
  width: min(430px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0b0f15;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.auth-panel header,
.auth-profile,
.auth-actions,
.auth-tabs {
  display: flex;
  align-items: center;
}

.auth-panel header {
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.auth-panel header strong,
.auth-profile strong {
  display: block;
  color: #edf3fa;
  font-size: 15px;
}

.auth-panel header span,
.auth-profile em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.auth-panel header button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: #9aa6b6;
  font-size: 18px;
}

.auth-forms,
.auth-signed-in {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.auth-tabs {
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.auth-tabs button {
  flex: 1;
  min-height: 32px;
  border-radius: 6px;
  color: #93a0b1;
  font-size: 13px;
  font-weight: 720;
}

.auth-tabs button.active {
  color: #f4f8ff;
  background: rgba(54, 136, 255, 0.2);
}

.auth-forms label {
  display: grid;
  gap: 7px;
  color: #cdd7e4;
  font-size: 12px;
}

.auth-forms input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #080c12;
  color: var(--text);
  font: inherit;
}

.auth-submit,
.auth-actions button,
.admin-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.auth-submit {
  width: 100%;
  background: var(--blue);
}

.auth-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.auth-message.error {
  color: #ffb7bf;
}

.auth-message.success {
  color: #b8f6dd;
}

.auth-profile {
  gap: 11px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.auth-profile span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(54, 136, 255, 0.22);
  color: #dce8ff;
  font-weight: 820;
}

.auth-actions {
  gap: 9px;
}

.auth-actions button {
  background: rgba(239, 77, 90, 0.86);
}

.admin-link {
  background: rgba(231, 184, 90, 0.18);
  color: #ffe5ad;
}

.pair-picker {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  width: min(560px, 100%);
  max-height: min(76vh, 680px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0b0f15;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.pair-picker header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.pair-picker header strong {
  color: #edf3fa;
  font-size: 15px;
}

.pair-picker header button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: #9aa6b6;
  font-size: 18px;
}

.pair-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.pair-search-box span {
  color: #7f8a99;
}

.pair-search-box input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #edf3fa;
  font-size: 14px;
}

.pair-search-box input::placeholder {
  color: #687485;
}

.pair-picker-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 12px 10px;
  scrollbar-width: none;
}

.pair-picker-tabs::-webkit-scrollbar {
  display: none;
}

.pair-picker-tabs button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: #95a1b1;
  font-size: 12px;
}

.pair-picker-tabs button.active {
  background: rgba(54, 136, 255, 0.18);
  color: #dce9ff;
}

.pair-picker-head,
.pair-result {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(86px, 0.75fr) minmax(58px, 0.55fr);
  gap: 8px;
  align-items: center;
}

.pair-picker-head {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #697687;
  font-size: 11px;
}

.pair-picker-head span:nth-child(2),
.pair-picker-head span:nth-child(3) {
  text-align: right;
}

.pair-search-results {
  overflow-y: auto;
  min-height: 210px;
}

.pair-result {
  width: 100%;
  min-height: 55px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(133, 148, 168, 0.08);
  background: rgba(9, 13, 18, 0.45);
  text-align: left;
}

.pair-result.selected {
  background: rgba(54, 136, 255, 0.11);
}

.pair-result div,
.pair-result strong,
.pair-result span {
  min-width: 0;
}

.pair-result strong,
.pair-result span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pair-result strong {
  color: #e8eef7;
  font-size: 14px;
}

.pair-result span {
  margin-top: 4px;
  color: #788596;
  font-size: 11px;
}

.pair-result b,
.pair-result em {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pair-result b {
  color: #d9e1ec;
  font-size: 13px;
}

.pair-result em {
  font-style: normal;
  font-size: 12px;
  font-weight: 740;
}

.empty-result {
  padding: 24px 12px;
  color: #7f8a99;
  font-size: 13px;
  text-align: center;
}

.depth-tabs {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--line);
}

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

.depth-control-row div {
  display: flex;
  gap: 4px;
}

.depth-control-row button {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
  color: #8f9bab;
  font-size: 11px;
}

.depth-control-row button.active {
  background: rgba(54, 136, 255, 0.16);
  color: #dce9ff;
}

.ohlc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 5px 9px 6px;
  border-bottom: 1px solid rgba(133, 148, 168, 0.1);
  color: #7f8a99;
  font-size: 11px;
  white-space: nowrap;
  scrollbar-width: none;
}

.ohlc-row::-webkit-scrollbar {
  display: none;
}

.ohlc-row .up {
  color: var(--up);
}

.ohlc-row .down {
  color: var(--down);
}

.strategy-row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 7px 9px;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
}

.strategy-row::-webkit-scrollbar {
  display: none;
}

.strategy-row button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  color: #9aa6b6;
  background: rgba(255, 255, 255, 0.028);
  font-size: 12px;
}

.strategy-row button.active {
  color: #dce9ff;
  background: rgba(54, 136, 255, 0.14);
}

.depth-summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--line);
}

.depth-symbol {
  display: block;
  padding: 0;
  color: #f1f5fb;
  font-size: 14px;
  font-weight: 760;
}

.depth-summary span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.depth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.depth-stats span {
  color: var(--muted);
  font-size: 11px;
}

.depth-stats strong {
  display: block;
  margin-top: 3px;
  color: #cfd7e2;
  font-size: 12px;
}

.depth-stats strong.up {
  color: var(--up);
}

.depth-stats strong.down {
  color: var(--down);
}

.depth-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.depth-actions button {
  min-height: 28px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: #b5c0cf;
  font-size: 12px;
}

.order-signal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: #cfd7e2;
  font-size: 12px;
}

.order-signal span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.signal-switch {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: rgba(104, 116, 132, 0.35);
}

.signal-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9aa6b6;
  transition: transform 0.16s ease, background 0.16s ease;
}

.signal-switch.active {
  background: rgba(0, 185, 133, 0.24);
}

.signal-switch.active::after {
  transform: translateX(14px);
  background: var(--up);
}

.book-head,
.book-row,
.trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr;
  gap: 8px;
  align-items: center;
}

.book-head {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 11px;
}

.book-head span:nth-child(2),
.book-row span:nth-child(2),
.trade-row span:nth-child(2),
.book-head span:nth-child(3),
.book-row span:nth-child(3),
.trade-row span:nth-child(3) {
  text-align: right;
}

.book-table,
.trade-table {
  display: grid;
}

.trade-mode-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 10px 6px;
  scrollbar-width: none;
}

.trade-mode-tabs::-webkit-scrollbar {
  display: none;
}

.trade-mode-tabs button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: #8f9bab;
  font-size: 11px;
}

.trade-mode-tabs button.active {
  color: #dce9ff;
  background: rgba(54, 136, 255, 0.16);
}

.book-row,
.trade-row {
  position: relative;
  min-height: 25px;
  padding: 0 12px;
  color: #c9d2df;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  overflow: hidden;
}

.book-row i {
  position: absolute;
  inset: 3px 0 3px auto;
  z-index: 0;
  border-radius: 2px 0 0 2px;
  background: rgba(104, 116, 132, 0.14);
}

.book-row span.down ~ i {
  background: rgba(239, 77, 90, 0.14);
}

.book-row span.up ~ i {
  background: rgba(0, 185, 133, 0.13);
}

.book-row span,
.trade-row span {
  position: relative;
  z-index: 1;
}

.mid-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 7px 12px;
  padding: 8px 0;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
}

.mid-price strong {
  color: #f5f8fb;
  font-size: 23px;
  line-height: 1;
}

.mid-price span {
  color: var(--up);
  font-size: 12px;
  font-weight: 760;
}

.ticker-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
}

.ticker-title {
  flex: 0 0 auto;
  gap: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 760;
}

.ticker-copy {
  min-width: 0;
  color: #bac4d1;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.depth-tool-rail {
  display: none;
}

.terminal-status {
  position: fixed;
  right: 0;
  bottom: calc(64px + var(--safe-bottom));
  left: 0;
  z-index: 29;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  min-height: 32px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: rgba(8, 11, 15, 0.96);
  color: #9aa6b6;
  font-size: 11px;
  white-space: nowrap;
  scrollbar-width: none;
}

.terminal-status::-webkit-scrollbar {
  display: none;
}

.terminal-status span:nth-child(2),
.terminal-status span:nth-child(3) {
  color: var(--up);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(64px + var(--safe-bottom));
  padding: 7px 6px calc(7px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(8, 11, 15, 0.96);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  color: #7f8b99;
  font-size: 18px;
}

.bottom-nav button span {
  font-size: 11px;
}

.bottom-nav button.active {
  color: #f0f6ff;
}

.up {
  color: var(--up);
}

.down {
  color: var(--down);
}

@media (max-width: 390px) {
  .quote-strip {
    grid-template-columns: 1fr auto;
  }

  .quote-stat {
    display: none;
  }

  .chart-canvas {
    height: 335px;
  }
}

@media (min-width: 860px) {
  .app-shell {
    padding-bottom: 0;
  }

  .market-header {
    position: static;
  }

  .desktop-grid {
    grid-template-columns: 64px 270px minmax(0, 1fr) 300px;
    align-items: start;
    padding: 12px;
  }

  .home-tabs {
    top: 0;
    padding-left: 58px;
  }

  .app-rail-nav {
    position: fixed;
    top: 34px;
    bottom: 46px;
    left: 0;
    z-index: 31;
    display: grid;
    align-content: start;
    gap: 8px;
    width: 48px;
    padding: 8px 6px;
    border-right: 1px solid var(--line);
    background: rgba(8, 11, 15, 0.98);
  }

  .app-rail-nav button {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-height: 48px;
    border-radius: 6px;
    color: #8b96a5;
    font-size: 16px;
  }

  .app-rail-nav button span {
    font-size: 10px;
  }

  .app-rail-nav button.active {
    color: #f04b36;
    background: rgba(255, 255, 255, 0.08);
  }

  .home-panel {
    padding: 12px 12px 12px 58px;
  }

  .app-page {
    padding: 12px 12px 12px 58px;
  }

  .page-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .news-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .trade-layout {
    grid-template-columns: 340px minmax(0, 1fr) 340px;
  }

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

  .onchain-grid {
    grid-template-columns: 1.1fr 1fr 0.9fr;
  }

  .data-dashboard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .promo-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .intel-grid {
    grid-template-columns: 1fr 1fr 1fr 0.95fr;
  }

  .overview-lower {
    grid-template-columns: 1fr 1fr;
  }

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

  .ace-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .ace-sidebar {
    display: grid;
    align-content: start;
    gap: 1px;
    border-right: 1px solid var(--line);
    background: rgba(9, 13, 18, 0.88);
  }

  .ace-sidebar > * {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .ace-sidebar .ace-title {
    color: #e9eff8;
    font-weight: 760;
  }

  .ace-sidebar button {
    color: #d4dce8;
    font-size: 13px;
  }

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

  .ace-prompts {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .toolbox-head {
    grid-template-columns: 160px minmax(360px, 0.58fr);
  }

  .tool-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-list-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .desktop-sidebar {
    display: block;
    position: sticky;
    top: 12px;
  }

  .rail {
    display: grid;
    gap: 8px;
    min-height: calc(100vh - 112px);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(13, 17, 23, 0.92);
  }

  .rail button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 5px;
    height: 56px;
    border-radius: 7px;
    color: #828f9e;
    font-size: 17px;
  }

  .rail button span {
    font-size: 11px;
  }

  .rail button.active {
    color: #f3f7fb;
    background: rgba(54, 136, 255, 0.16);
  }

  .market-list,
  .depth-panel {
    position: sticky;
    top: 12px;
  }

  .depth-panel {
    padding-right: 38px;
  }

  .depth-tool-rail {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    align-content: start;
    gap: 7px;
    width: 36px;
    padding: 9px 5px;
    border-left: 1px solid var(--line);
    background: rgba(8, 11, 15, 0.78);
  }

  .depth-tool-rail button {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 5px;
    color: #8d99a8;
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
  }

  .depth-tool-rail button:hover {
    color: #eef4fb;
    background: rgba(54, 136, 255, 0.16);
  }

  .chart-canvas {
    height: min(520px, calc(100vh - 260px));
    min-height: 390px;
  }

  .main-column {
    display: grid;
    gap: 10px;
  }

  .pair-modal {
    align-items: center;
  }

  .bottom-nav {
    display: none;
  }

  .terminal-status {
    position: sticky;
    bottom: 0;
    width: min(1440px, calc(100% - 24px));
    margin: 0 auto 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
  }
}
