.indicators-page {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 42px;
  display: grid;
  gap: 16px;
}

.indicator-bubblemap-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.indicator-bubblemap-nav a {
  color: var(--brand);
  text-decoration: none;
}

.indicator-bubblemap-nav a:hover,
.indicator-bubblemap-nav a:focus-visible {
  color: color-mix(in srgb, var(--brand) 78%, var(--text));
}

.indicators-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.indicators-kicker,
.indicators-panel-kicker {
  display: block;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.indicators-hero h1 {
  margin: 5px 0 0;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.05;
}

.indicators-hero p {
  margin: 8px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.indicators-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.indicators-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot--up { background: #24c77a; }
.legend-dot--flat { background: #94a3b8; }
.legend-dot--down { background: #ef5f68; }
.legend-dot--missing {
  background: #536071;
  outline: 1px dashed #8895a8;
  outline-offset: 2px;
}

.indicators-shell {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--brand) 12%, transparent) 0 18%, transparent 34%),
    color-mix(in srgb, var(--panel) 95%, var(--ghost-bg));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .08);
  padding: 18px;
}

.indicators-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.indicators-toolbar h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.indicators-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.indicators-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.indicators-field select {
  min-width: 210px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--ghost-bg);
  color: var(--text);
  padding: 8px 11px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.indicators-field select:focus {
  border-color: color-mix(in srgb, var(--brand) 64%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.indicators-limit,
.indicators-range,
.indicators-universe {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  background: color-mix(in srgb, var(--ghost-bg) 76%, var(--panel));
  flex: 0 0 auto;
}

.indicators-universe .indicators-chip {
  min-width: 68px;
  padding: 0 10px;
}

.indicators-chip,
.indicators-refresh {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.indicators-chip {
  min-width: 42px;
  background: transparent;
}

.indicators-chip.active {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background: color-mix(in srgb, var(--brand) 15%, var(--panel));
  color: var(--brand);
}

.indicators-refresh {
  border-color: color-mix(in srgb, var(--brand) 68%, black 8%);
  background: var(--brand);
  color: #fff;
  padding: 0 13px;
}

.indicators-refresh:disabled {
  cursor: wait;
  opacity: .68;
}

.indicators-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

.indicators-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
}

.indicators-stat strong {
  color: var(--text);
}

.indicators-stat.is-up strong { color: #18aa6e; }
.indicators-stat.is-down strong { color: #dc4e56; }
.indicators-stat.is-muted strong { color: var(--muted); }

.bubble-board-wrap {
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
    color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
  background-size: 56px 56px;
}

.bubble-board {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}

.bubble-loading,
.bubble-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.market-bubble {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--bubble-ring) 72%, white 12%);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .36), transparent 26%),
    color-mix(in srgb, var(--bubble-fill) 82%, var(--panel));
  color: #fff;
  text-decoration: none;
  text-align: center;
  box-shadow:
    inset 0 -12px 26px rgba(0, 0, 0, .12),
    0 12px 26px rgba(0, 0, 0, .14);
  transform: translate3d(var(--bubble-x), var(--bubble-y), 0);
  transition: filter .18s ease, box-shadow .18s ease;
}

.bubble-board.is-animating .market-bubble {
  will-change: transform;
}

.market-bubble:hover,
.market-bubble:focus-visible {
  filter: saturate(1.12) brightness(1.04);
  box-shadow:
    inset 0 -12px 26px rgba(0, 0, 0, .12),
    0 16px 34px rgba(0, 0, 0, .2);
  outline: none;
  z-index: 4;
}

.market-bubble--up {
  --bubble-fill: #1fb872;
  --bubble-ring: #6cf3ad;
}

.market-bubble--down {
  --bubble-fill: #dd4d59;
  --bubble-ring: #ff939c;
}

.market-bubble--flat {
  --bubble-fill: #687386;
  --bubble-ring: #aab4c4;
}

.market-bubble--missing,
.market-bubble.is-missing-change {
  --bubble-fill: #536071;
  --bubble-ring: #8895a8;
}

.market-bubble.is-missing-change {
  border-style: dashed;
}

.bubble-rank {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, .18);
  font-size: 10px;
  font-weight: 900;
}

.bubble-ticker {
  font-size: clamp(12px, calc(var(--bubble-size) * .17), 22px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.bubble-change {
  font-size: clamp(11px, calc(var(--bubble-size) * .13), 16px);
  line-height: 1;
  font-weight: 850;
}

.bubble-cap {
  max-width: 76%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(9px, calc(var(--bubble-size) * .09), 12px);
  line-height: 1.1;
  font-weight: 750;
}

.market-bubble.is-small .bubble-cap,
.market-bubble.is-small .bubble-rank {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .bubble-board.is-animating .market-bubble {
    will-change: auto;
  }
}

@media (max-width: 760px) {
  .indicators-page {
    width: calc(100% - 16px);
    margin-top: 14px;
    padding-bottom: calc(18px + var(--mobile-bottom-nav-height, 0px));
  }

  .indicators-hero,
  .indicators-toolbar,
  .indicators-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .indicators-legend {
    justify-content: flex-start;
  }

  .indicators-shell {
    padding: 12px;
    border-radius: 16px;
  }

  .indicators-field select {
    min-width: 0;
    width: 100%;
  }

  .indicators-limit,
  .indicators-universe {
    width: 100%;
  }

  .indicators-range {
    width: 100%;
  }

  .indicators-chip {
    flex: 1;
  }

  .indicators-refresh {
    width: 100%;
  }

  .bubble-board {
    min-height: 560px;
  }
}
