:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --surface: #121923;
  --surface-soft: #0f1621;
  --border: #253042;
  --border-soft: rgba(83, 102, 129, 0.28);
  --text: #f3f6fa;
  --muted: #8b96a8;
  --muted-strong: #aeb8c7;
  --blue: #4c8dff;
  --red: #f05252;
  --green: #25b97a;
  --amber: #f4ae32;
  --violet: #8b6ff5;
  --radius: 10px;
  --header-height: 64px;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 78% -20%, rgba(76, 141, 255, 0.06), transparent 34%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.mobile-only {
  display: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(300px, 1fr);
  align-items: stretch;
  min-height: var(--header-height);
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.app-header > *,
.primary-nav,
.header-market,
.overview-shell,
.judgment-copy,
.dashboard-grid > *,
.signal-card > * {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  color: #fff;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 0 18px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 16px;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(76, 141, 255, 0.05);
}

.nav-link.is-active {
  color: #67a0ff;
  font-weight: 700;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
}

.header-market {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 22px;
  color: var(--muted-strong);
}

.market-session {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
}

.session-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(244, 174, 50, 0.08);
}

.market-session.is-open .session-dot,
.market-session.is-ready .session-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 185, 122, 0.08);
}

.market-session.is-error .session-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(240, 82, 82, 0.08);
}

.market-clock {
  min-width: 70px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted-strong);
  background: transparent;
  transition: 160ms ease;
}

.icon-button:hover {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.icon-button.is-loading svg {
  animation: spin 800ms linear infinite;
}

.icon-button svg,
.section-kicker svg,
.kpi-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.overview-shell {
  width: min(1544px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.surface {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 25, 35, 0.98), rgba(14, 21, 31, 0.98));
  box-shadow: var(--shadow);
}

.data-notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(240, 82, 82, 0.38);
  border-radius: var(--radius);
  background: rgba(94, 31, 39, 0.28);
}

.data-notice.is-hidden {
  display: none;
}

.data-notice strong {
  display: block;
  margin-bottom: 3px;
  color: #ffc4c4;
  font-size: 13px;
}

.data-notice p {
  margin: 0;
  color: #dca9ad;
  font-size: 12px;
  line-height: 1.5;
}

.data-notice button {
  flex: none;
  border: 0;
  padding: 4px 8px;
  color: #e8aeb3;
  background: transparent;
  font-size: 12px;
}

.judgment-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 150px;
  padding: 22px 24px;
}

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

.section-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
}

.section-kicker svg {
  width: 18px;
  height: 18px;
}

.judgment-copy h1 {
  margin: 13px 0 8px;
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.judgment-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.65;
}

.freshness-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  border: 1px solid rgba(37, 185, 122, 0.28);
  border-radius: 999px;
  padding: 5px 9px;
  color: #77d6ad;
  background: rgba(37, 185, 122, 0.07);
  font-size: 10px;
}

.freshness-status.is-hidden {
  display: none;
}

.freshness-status.is-stale {
  border-color: rgba(244, 174, 50, 0.34);
  color: #f2bf62;
  background: rgba(244, 174, 50, 0.08);
}

.freshness-status strong {
  font-size: 10px;
  letter-spacing: 0.02em;
}

.freshness-status time {
  color: var(--muted-strong);
  white-space: nowrap;
}

.judgment-tags {
  display: flex;
  flex: none;
  gap: 14px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(76, 141, 255, 0.32);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--blue);
  background: rgba(76, 141, 255, 0.08);
  font-size: 12px;
  font-weight: 750;
}

.status-tag.is-positive {
  color: var(--red);
  border-color: rgba(240, 82, 82, 0.32);
  background: rgba(240, 82, 82, 0.08);
}

.status-tag.is-negative {
  color: var(--green);
  border-color: rgba(37, 185, 122, 0.32);
  background: rgba(37, 185, 122, 0.08);
}

.status-tag.is-neutral {
  color: var(--muted);
  border-color: rgba(139, 150, 168, 0.26);
  background: rgba(139, 150, 168, 0.06);
}

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

.kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 124px;
  padding: 18px 20px;
}

.kpi-icon {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.kpi-icon.is-blue {
  color: var(--blue);
  background: rgba(76, 141, 255, 0.12);
}

.kpi-icon.is-red {
  color: var(--red);
  background: rgba(240, 82, 82, 0.12);
}

.kpi-icon.is-violet {
  color: var(--violet);
  background: rgba(139, 111, 245, 0.12);
}

.kpi-icon.is-amber {
  color: var(--amber);
  background: rgba(244, 174, 50, 0.12);
}

.kpi-content {
  min-width: 0;
}

.kpi-label {
  display: block;
  color: var(--muted-strong);
  font-size: 14px;
}

.kpi-value {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(25px, 2.15vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-value.positive,
.positive {
  color: var(--red);
}

.kpi-value.negative,
.negative {
  color: var(--green);
}

.kpi-value.warning,
.warning {
  color: var(--amber);
}

.kpi-note {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadth-values {
  display: flex;
  align-items: center;
  gap: 14px;
}

.breadth-divider {
  width: 1px;
  height: 35px;
  background: var(--border);
}

.breadth-down {
  display: grid;
  gap: 2px;
}

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

.breadth-down strong {
  color: var(--green);
  font-size: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(330px, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.chart-panel {
  min-width: 0;
  padding: 18px 20px 14px;
}

.panel-heading,
.rank-heading,
.signals-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2,
.rank-heading h2,
.signals-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.sample-count,
.rank-heading span,
.signals-heading span {
  color: var(--muted);
  font-size: 11px;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 35px;
  color: var(--muted-strong);
  font-size: 11px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-line {
  width: 22px;
  height: 2px;
  border-radius: 2px;
}

.legend-line.is-red { background: var(--red); }
.legend-line.is-blue { background: var(--blue); }

.legend-block {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.legend-block.is-red { background: var(--red); }
.legend-block.is-green { background: var(--green); }

.market-chart {
  position: relative;
  min-height: 286px;
}

.market-chart svg {
  display: block;
  width: 100%;
  height: 286px;
  overflow: visible;
}

.snapshot-chart {
  min-height: 286px;
  padding: 4px 16px 0;
}

.snapshot-axis {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 78px 8px 104px;
  color: var(--muted);
  font-size: 10px;
}

.snapshot-axis span:last-child {
  text-align: right;
}

.snapshot-axis strong {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 600;
}

.snapshot-rows {
  display: grid;
  gap: 8px;
}

.snapshot-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: center;
  min-height: 26px;
  font-size: 11px;
}

.snapshot-name {
  overflow: hidden;
  color: #d6deea;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-track {
  position: relative;
  display: block;
  height: 18px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(139, 150, 168, 0.36) calc(50% - 0.5px), rgba(139, 150, 168, 0.36) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    rgba(255, 255, 255, 0.018);
}

.snapshot-bar {
  position: absolute;
  top: 3px;
  height: 12px;
  border-radius: 3px;
}

.snapshot-bar.is-positive {
  left: 50%;
  background: linear-gradient(90deg, rgba(240, 82, 82, 0.45), var(--red));
}

.snapshot-bar.is-negative {
  right: 50%;
  background: linear-gradient(90deg, var(--green), rgba(37, 185, 122, 0.45));
}

.snapshot-row > strong {
  text-align: right;
}

.breadth-snapshot {
  display: grid;
  align-content: center;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
}

.breadth-snapshot-value {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.breadth-snapshot-value strong {
  color: var(--red);
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1;
}

.breadth-snapshot-value span,
.breadth-snapshot p,
.breadth-snapshot-labels {
  color: var(--muted);
  font-size: 11px;
}

.breadth-snapshot-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 185, 122, 0.8);
}

.breadth-snapshot-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d94747, var(--red));
}

.breadth-snapshot-labels {
  display: flex;
  justify-content: space-between;
}

.breadth-snapshot p {
  margin: 0;
  line-height: 1.6;
  text-align: center;
}

.chart-grid-line {
  stroke: rgba(139, 150, 168, 0.16);
  stroke-dasharray: 4 4;
}

.chart-axis-line {
  stroke: rgba(139, 150, 168, 0.35);
}

.chart-axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.chart-line-breadth,
.chart-line-fund {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-breadth { stroke: var(--red); }
.chart-line-fund { stroke: var(--blue); }
.chart-dot-breadth { fill: var(--red); }
.chart-dot-fund { fill: var(--blue); }

.chart-end-label {
  font-size: 12px;
  font-weight: 750;
}

.chart-empty {
  position: absolute;
  inset: 18px 44px 34px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(139, 150, 168, 0.22);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.chart-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.rank-column {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.rank-panel {
  padding: 16px 18px;
}

.rank-list {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  color: #e7eef9;
  background: #364154;
  font-size: 11px;
  font-weight: 800;
}

.rank-list.is-strong .rank-item:nth-child(-n + 3) .rank-number {
  background: rgba(240, 82, 82, 0.55);
}

.rank-list.is-weak .rank-item:nth-child(-n + 3) .rank-number {
  background: rgba(37, 185, 122, 0.45);
}

.rank-name {
  overflow: hidden;
  color: #dbe2ed;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-value {
  font-weight: 750;
}

.rank-empty {
  padding: 32px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.signals-panel {
  margin-top: 14px;
  padding: 14px 18px;
}

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

.signal-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.012);
}

.signal-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--red);
  background: rgba(240, 82, 82, 0.14);
}

.signal-icon.is-negative {
  color: var(--green);
  background: rgba(37, 185, 122, 0.14);
}

.signal-icon.is-blue {
  color: var(--blue);
  background: rgba(76, 141, 255, 0.14);
}

.signal-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.signal-copy strong {
  display: block;
  overflow: hidden;
  color: #dce4ef;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.signal-arrow {
  color: var(--muted);
  font-size: 22px;
  font-weight: 300;
}

.signal-empty {
  grid-column: 1 / -1;
  padding: 22px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  background: #182131;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .primary-nav {
    justify-content: center;
    gap: 4px;
  }

  .nav-link {
    padding-inline: 12px;
    font-size: 14px;
  }

  .header-market {
    gap: 12px;
  }

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

@media (max-width: 900px) {
  .app-header {
    position: relative;
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .brand {
    min-height: 58px;
  }

  .header-market {
    min-height: 58px;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    border-top: 1px solid rgba(83, 102, 129, 0.18);
  }

  .nav-link {
    flex: 0 0 auto;
    min-height: 48px;
  }

  .overview-shell {
    width: min(100% - 28px, 760px);
  }

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

  .judgment-tags {
    flex-direction: column;
    gap: 8px;
  }

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

  .rank-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

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

@media (max-width: 620px) {
  .icon-button {
    width: 44px;
    height: 44px;
  }

  body {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 92% 2%, rgba(76, 141, 255, 0.1), transparent 26%),
      var(--bg);
  }

  .mobile-only {
    display: revert;
  }

  .desktop-only {
    display: none;
  }

  .app-header {
    position: sticky;
    min-height: 56px;
    padding: 0 12px;
    background: rgba(11, 15, 23, 0.94);
    backdrop-filter: blur(16px);
  }

  .brand {
    min-height: 56px;
    font-size: 21px;
  }

  .primary-nav,
  .market-session {
    display: none;
  }

  .market-clock {
    display: none;
  }

  .header-market {
    min-height: 56px;
    gap: 8px;
  }

  .overview-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: calc(100% - 20px);
    padding: 10px 0 8px;
  }

  .overview-shell > .data-notice { order: 0; }
  .overview-shell > .judgment-panel { order: 1; }
  .overview-shell > .kpi-grid { order: 2; }
  .overview-shell > .dashboard-grid { display: contents; }
  .rank-column { order: 3; }
  .chart-panel { order: 4; }
  .overview-shell > .signals-panel { order: 5; }

  .surface,
  .kpi-grid,
  .rank-column {
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  }

  .data-notice {
    margin: 0;
  }

  .judgment-panel {
    display: grid;
    gap: 14px;
    min-height: 0;
    padding: 17px 16px;
    overflow: hidden;
    background:
      radial-gradient(circle at 88% 15%, rgba(76, 141, 255, 0.13), transparent 34%),
      linear-gradient(145deg, rgba(18, 25, 35, 0.98), rgba(14, 21, 31, 0.98));
  }

  .judgment-panel .section-kicker svg {
    display: none;
  }

  .judgment-panel .section-kicker::before {
    content: "01";
    color: #6f7d91;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  .judgment-copy h1 {
    margin: 10px 0 7px;
    font-size: 21px;
    line-height: 1.32;
    word-break: break-word;
  }

  .judgment-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.58;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .freshness-status {
    margin-left: 0;
    padding-block: 4px;
  }

  .judgment-panel .section-kicker {
    flex-wrap: wrap;
  }

  .judgment-tags {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 7px;
  }

  .status-tag {
    min-height: 28px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .mobile-module-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-module-heading > div,
  .signals-heading > div,
  .panel-heading > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
  }

  .mobile-module-heading h2,
  .signals-heading h2,
  .panel-heading h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -0.02em;
  }

  .mobile-module-index {
    color: #6f7d91;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  .mobile-module-heading > strong {
    font-size: 12px;
  }

  .mobile-module-heading > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
  }

  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    border: 1px solid var(--border);
    padding: 15px;
    background: linear-gradient(145deg, rgba(18, 25, 35, 0.98), rgba(14, 21, 31, 0.98));
  }

  .kpi-grid > .mobile-module-heading,
  .temperature-meter {
    grid-column: 1 / -1;
  }

  .temperature-meter {
    display: block;
  }

  .temperature-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    color: var(--muted-strong);
    font-size: 11px;
  }

  .temperature-labels span:first-child { color: #f47777; }
  .temperature-labels span:last-child { color: #55c993; }

  .temperature-track {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(37, 185, 122, 0.72);
  }

  .temperature-track i {
    display: block;
    width: 0;
    height: 100%;
    border-right: 2px solid var(--surface);
    border-radius: 999px 0 0 999px;
    background: linear-gradient(90deg, #d7434b, #f06b67);
    transition: width 360ms ease;
  }

  .kpi-card {
    min-height: 70px;
    border: 1px solid rgba(83, 102, 129, 0.22);
    border-radius: 10px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.018);
    box-shadow: none;
  }

  .kpi-card:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  .kpi-card:nth-of-type(4) {
    display: none;
  }

  .kpi-icon {
    display: none;
  }

  .kpi-content {
    width: 100%;
  }

  .kpi-label {
    font-size: 11px;
  }

  .kpi-value {
    margin-top: 4px;
    font-size: 22px;
  }

  .kpi-note {
    display: none;
  }

  .kpi-note.is-empty-note {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
  }

  .breadth-values {
    justify-content: space-between;
  }

  .breadth-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
  }

  .breadth-down {
    grid-template-columns: auto auto;
    align-items: baseline;
    gap: 6px;
  }

  .breadth-down strong {
    font-size: 20px;
  }

  .rank-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    gap: 9px;
    border: 1px solid var(--border);
    padding: 15px;
    background: linear-gradient(145deg, rgba(18, 25, 35, 0.98), rgba(14, 21, 31, 0.98));
  }

  .rank-column > .mobile-module-heading {
    grid-column: 1 / -1;
  }

  .rank-panel.surface {
    min-width: 0;
    border: 0;
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.018);
    box-shadow: none;
  }

  .rank-heading {
    gap: 5px;
  }

  .rank-heading h2 {
    font-size: 13px;
  }

  .rank-heading span {
    font-size: 9px;
  }

  .rank-list {
    gap: 5px;
    margin-top: 9px;
  }

  .rank-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    min-height: 35px;
    border-radius: 7px;
    padding: 0 8px;
    background: rgba(240, 82, 82, 0.055);
    font-size: 11px;
  }

  .rank-list.is-weak .rank-item {
    background: rgba(37, 185, 122, 0.055);
  }

  .rank-item:nth-child(n + 4) {
    display: none;
  }

  .rank-number {
    display: none;
  }

  .rank-value {
    font-size: 10px;
  }

  .rank-empty {
    padding: 30px 4px;
  }

  .chart-panel {
    padding: 15px 12px 12px;
    scroll-margin-top: 66px;
  }

  .panel-heading {
    align-items: center;
  }

  .panel-heading p {
    display: none;
  }

  .sample-count {
    font-size: 10px;
  }

  .pulse-toggle,
  .action-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 12px;
    border-radius: 9px;
    padding: 3px;
    background: rgba(6, 10, 16, 0.58);
  }

  .pulse-toggle button,
  .action-tabs button {
    min-height: 44px;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
  }

  .pulse-toggle button.is-active,
  .action-tabs button.is-active {
    color: #dfe9fb;
    background: #24334a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  }

  .chart-legend {
    justify-content: flex-start;
    gap: 16px;
    min-height: 30px;
    overflow: hidden;
    padding-top: 7px;
    white-space: nowrap;
  }

  .chart-panel[data-pulse-metric="fund"] .chart-legend span:first-child,
  .chart-panel[data-pulse-metric="breadth"] .chart-legend span:last-child {
    display: none;
  }

  .chart-panel[data-pulse-metric="fund"] .chart-line-breadth,
  .chart-panel[data-pulse-metric="fund"] .chart-dot-breadth,
  .chart-panel[data-pulse-metric="fund"] .chart-axis-label.is-left,
  .chart-panel[data-pulse-metric="fund"] .chart-end-label.is-breadth,
  .chart-panel[data-pulse-metric="breadth"] .chart-line-fund,
  .chart-panel[data-pulse-metric="breadth"] .chart-dot-fund,
  .chart-panel[data-pulse-metric="breadth"] .chart-axis-label.is-right,
  .chart-panel[data-pulse-metric="breadth"] .chart-end-label.is-fund {
    display: none;
  }

  .market-chart,
  .market-chart svg {
    min-height: 205px;
    height: 205px;
  }

  .snapshot-chart {
    min-height: 205px;
    padding: 0;
  }

  .snapshot-axis {
    margin-inline: 74px 64px;
  }

  .snapshot-rows {
    gap: 5px;
  }

  .snapshot-row {
    grid-template-columns: 66px minmax(0, 1fr) 58px;
    gap: 7px;
    min-height: 22px;
    font-size: 9px;
  }

  .chart-note {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .signals-panel {
    margin: 0;
    padding: 15px 12px 12px;
    scroll-margin-top: 66px;
  }

  .signals-heading {
    align-items: center;
  }

  .signals-heading > span {
    display: none;
  }

  .action-view-all {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
  }

  .signal-grid {
    gap: 7px;
    margin-top: 9px;
  }

  .signals-panel[data-action-tab="etfs"] .signal-grid {
    display: none;
  }

  .signal-card {
    grid-template-columns: 34px minmax(0, 1fr) 12px;
    gap: 9px;
    min-height: 54px;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
    padding: 7px 4px;
  }

  .signal-card:last-child {
    border-bottom: 0;
  }

  .signal-icon {
    width: 32px;
    height: 32px;
  }

  .signal-icon svg {
    width: 18px;
    height: 18px;
  }

  .signal-copy strong {
    font-size: 12px;
  }

  .etf-action-list {
    margin-top: 9px;
  }

  .etf-action-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto 10px;
    gap: 8px;
    align-items: center;
    min-height: 58px;
    border-bottom: 1px solid var(--border-soft);
    padding: 7px 4px;
  }

  .etf-action-item:last-child {
    border-bottom: 0;
  }

  .etf-action-code {
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
  }

  .etf-action-copy,
  .etf-action-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .etf-action-copy strong,
  .etf-action-copy small,
  .etf-action-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .etf-action-copy strong {
    font-size: 11px;
  }

  .etf-action-copy small,
  .etf-action-meta small {
    color: var(--muted);
    font-size: 9px;
  }

  .etf-action-meta {
    max-width: 98px;
    text-align: right;
  }

  .etf-action-meta strong {
    color: var(--muted-strong);
    font-size: 9px;
  }

  .etf-action-meta strong.positive { color: var(--red); }
  .etf-action-meta strong.negative { color: var(--green); }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 80;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 68px;
    padding: 6px;
    border: 1px solid rgba(83, 102, 129, 0.5);
    border-radius: 20px;
    background: rgba(12, 17, 25, 0.96);
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav > * {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
  }

  .mobile-bottom-nav > *.is-active {
    color: #6f9fff;
    background: rgba(76, 141, 255, 0.08);
  }

  .mobile-bottom-nav svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .toast {
    right: 10px;
    bottom: 76px;
    max-width: calc(100vw - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
