/* AI 종합주가지수분석 화면 (메뉴 소스: kospi_kosdaq_index/) — style.css 의 색상 변수(:root)를 그대로 사용 */

.mi-blocks {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.mi-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 4px 12px;
  font-family: "Noto Sans KR", sans-serif;
}

.mi-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.mi-name {
  font-family: "Orbitron", sans-serif;
  font-size: 29px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.mi-kr {
  font-size: 25px;
  font-weight: 800;
  color: var(--text);
}

.mi-meta {
  font-size: 17px;
  color: var(--text-dim);
}

.mi-meta b {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mi-quote-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mi-price {
  font-size: 33px;
  color: var(--text);
  text-shadow: 0 0 14px rgba(231, 237, 247, 0.35);
}

.mi-change { font-size: 25px; }
.mi-change.up { color: var(--up); text-shadow: 0 0 12px rgba(255, 59, 78, 0.55); }
.mi-change.down { color: var(--down); text-shadow: 0 0 12px rgba(59, 130, 246, 0.55); }
.mi-change.flat { color: var(--text-dim); }

.mi-alert {
  align-self: center;
  padding: 3px 10px;
  border: 1px solid var(--up);
  border-radius: 999px;
  color: var(--up);
  font-size: 16px;
}

/* 신규매수 허용/보류 배지 (차트 아래 '신규매수' 띠와 같은 색) */
.mi-badge {
  align-self: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 16px;
}

.mi-badge.buy-on {
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.1);
}

.mi-badge.buy-off {
  color: var(--text-dim);
  border: 1px solid var(--border-bright);
  background: rgba(100, 116, 139, 0.12);
}

.mi-forecast {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mi-forecast-label {
  font-size: 21px;
  font-weight: 700;
  color: var(--gold);
}

.mi-phase {
  font-size: 25px;
  font-weight: 800;
}

.mi-phase-icon {
  width: 33px;
  height: 33px;
  overflow: visible;
}

.mi-phase-desc {
  font-size: 17px;
  color: var(--text-dim);
}

/* 차트 틀: 종목 차트 패널(.detail-panel)과 같은 모양 */
.mi-chart-panel {
  padding: 14px 16px 6px;
  background: linear-gradient(135deg, var(--bg-panel), #0a1122);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
}

.mi-chart-panel .chart-canvas {
  height: 560px; /* 캔들 패널만 (종목 차트의 점수·강도·투자자 패널 없음) */
}

/* 지수에는 없는 종목 전용 범례/설명은 숨김 */
.mi-chart-panel .lg:has(.foreign-momentum),
.mi-chart-panel .lg:has(.inst-momentum),
.mi-chart-panel .forecast-note {
  display: none;
}

.mi-empty {
  padding: 40px 12px;
  text-align: center;
  color: var(--text-dim);
  font-family: "Noto Sans KR", sans-serif;
}

@media (max-width: 720px) {
  .mi-name { font-size: 23px; }
  .mi-kr { font-size: 21px; }
  .mi-price { font-size: 27px; }
  .mi-change, .mi-phase { font-size: 21px; }
  .mi-chart-panel .chart-canvas { height: 460px; }
}
