/* 주식 줍줍 — ai_board.css 디자인 시스템 재사용 + 주식 고유 요소만 최소 추가.
   (목록 .ai-board-row / 상세 .ai-post-* / 로딩 .ai-spinner 등은 ai_board.css 그대로 사용) */

/* ── 유형 칩: 종목 뉴스 / 시장 브리핑 (ai_board .ai-row-type / .ai-type-badge 패턴) ── */
.ai-row-type.t-symbol,
.ai-type-badge.ai-type-symbol { background: #fff0f0; color: #c43d3d; }
.ai-row-type.t-market,
.ai-type-badge.ai-type-market { background: #eaeef7; color: #455178; }
[data-theme="dark"] .ai-row-type.t-symbol,
[data-theme="dark"] .ai-type-badge.ai-type-symbol { background: #3a1f1f; color: #ff8888; }
[data-theme="dark"] .ai-row-type.t-market,
[data-theme="dark"] .ai-type-badge.ai-type-market { background: #232931; color: #8ea0c5; }

/* ── 속보 칩 (목록 유형 배지) ── */
.ai-row-type.t-breaking { background: #fff4e5; color: #d9730d; }
[data-theme="dark"] .ai-row-type.t-breaking { background: #3a2a14; color: #f4a64a; }

/* ── 속보 레이더 상세 카드 ── */
.ai-post-body .brk-card {
  padding: 14px 16px; border-radius: 12px;
  background: var(--bg-card, #fff); border: 1px solid var(--border-color);
}
/* 방향별 옅은 배경 + 동일계열 테두리로 본문과 구분(좌측 막대 없음) */
.ai-post-body .brk-card.brk-up-card { background: #fff6f6; border-color: rgba(196,61,61,0.28); }
.ai-post-body .brk-card.brk-down-card { background: #f5f8ff; border-color: rgba(29,78,216,0.24); }
.ai-post-body .brk-card.brk-neutral-card { background: var(--input-bg); border-color: var(--border-color); }
[data-theme="dark"] .ai-post-body .brk-card.brk-up-card { background: rgba(196,61,61,0.10); border-color: rgba(196,61,61,0.32); }
[data-theme="dark"] .ai-post-body .brk-card.brk-down-card { background: rgba(59,130,246,0.10); border-color: rgba(59,130,246,0.30); }
[data-theme="dark"] .ai-post-body .brk-card.brk-neutral-card { background: rgba(255,255,255,0.03); }
.ai-post-body .brk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-post-body .brk-dir { font-size: 0.9em; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.ai-post-body .brk-up { background: #fef2f2; color: #d32f2f; }
.ai-post-body .brk-down { background: #eff6ff; color: #1d4ed8; }
.ai-post-body .brk-neutral { background: var(--input-bg); color: var(--text-muted); }
[data-theme="dark"] .ai-post-body .brk-up { background: rgba(211,47,47,0.18); color: #f87171; }
[data-theme="dark"] .ai-post-body .brk-down { background: rgba(29,78,216,0.18); color: #93c5fd; }
.ai-post-body .brk-conf { font-size: 0.78em; font-weight: 700; color: var(--text-muted); }
.ai-post-body .brk-event { margin: 0 0 6px; font-size: 1.05em; font-weight: 800; line-height: 1.45; }
.ai-post-body .brk-reason { margin: 0 0 10px; font-size: 0.92em; color: var(--text-secondary); line-height: 1.55; }
.ai-post-body .brk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.ai-post-body .brk-lbl { font-size: 0.78em; font-weight: 800; color: var(--text-muted); margin-right: 2px; }
.ai-post-body .brk-theme { font-size: 0.8em; font-weight: 700; color: var(--text-secondary);
  background: var(--input-bg); padding: 2px 9px; border-radius: 999px; text-decoration: none; }
a.brk-theme:active { background: var(--border-color); }

/* ── 더 보기 버튼 (commu_board와 동일 — 주식 피드에도 적용) ── */
.load-more-wrap { text-align: center; margin: 14px 0 8px; }
.load-more-btn {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-primary); background: var(--bg-card);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 9px 26px; cursor: pointer;
}
.load-more-btn:active { background: var(--input-bg); }
.ai-post-body .brk-stock { font-size: 0.82em; font-weight: 700; text-decoration: none;
  color: var(--ai-accent, #5b5bd6); background: var(--ai-accent-soft, #eef0ff); padding: 2px 9px; border-radius: 999px; }
.ai-post-body .brk-note { margin: 10px 0 0; font-size: 0.72em; color: var(--text-muted); line-height: 1.5; }

/* ── 종목명 칩 (목록/상세 공용) ── */
.stock-row-symbol {
  flex-shrink: 0;
  font-size: 0.76em; font-weight: 700;
  color: var(--text-secondary);
  background: var(--input-bg);
  padding: 2px 7px; border-radius: 6px;
  white-space: nowrap;
}

/* ── 등락 배지 (국내 관례: 상승 빨강 ▲ / 하락 파랑 ▼) ── */
.chg { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.chg-up { background: #fef2f2; color: #d32f2f; }
.chg-down { background: #eff6ff; color: #1d4ed8; }
[data-theme="dark"] .chg-up { background: rgba(211,47,47,0.18); color: #f87171; }
[data-theme="dark"] .chg-down { background: rgba(29,78,216,0.18); color: #93c5fd; }
.ai-row-top .chg { height: 20px; line-height: 18px; }
/* 등락 기준 표기(실시간 아님 — 전일 종가 대비) — 채도 낮춰 실시간 시세판과 구분 */
.chg .chg-cap { font-size: 0.82em; font-weight: 600; opacity: 0.7; margin-left: 4px; }

/* ── 실시간 작업 큐: 대기 카운터 + '작업 중' 카드 ───────────────────────── */
.live-queue-counter {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px; margin-bottom: 8px;
  background: var(--ai-accent-soft, #eef0ff);
  border: 1px solid var(--ai-accent, #5b5bd6);
  border-radius: 12px;
  font-size: 0.86em; font-weight: 600; color: var(--text-secondary);
}
.live-queue-counter .lq-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ai-accent, #5b5bd6); flex-shrink: 0;
  animation: lq-breathe 1.8s ease-in-out infinite;
}
.live-queue-counter .lq-num { color: var(--ai-accent, #5b5bd6); font-weight: 800; }
.live-queue-counter .lq-num.lq-bump { display: inline-block; animation: lq-pop 0.25s ease-out; }
@keyframes lq-breathe { 0%,100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes lq-pop { from { transform: translateY(-2px); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } }

/* '작업 중' 카드 — 클릭 비활성. 카드 본문은 정적, 모션은 작은 칩 테두리 반짝임만. */
.ai-board-row.is-working { position: relative; cursor: default; pointer-events: none; }
.ai-board-row.is-working .working-sub { font-size: 0.86em; color: var(--text-muted); }
@keyframes lq-spin { to { transform: rotate(1turn); } }

/* "AI 요약 중…" 칩 — 핫딜 .ai-badge 패턴: 둘레가 작아 회전이 '테두리 반짝임'으로 보임.
   ::before(회전 빛) → ::after(안쪽 1px만 남기고 덮음) → 1px 테두리에만 빛이 흐른다. */
.ai-row-type.t-working {
  position: relative; isolation: isolate; overflow: hidden;
  background: transparent; color: var(--ai-accent, #5b5bd6);
  border-radius: 6px; padding: 2px 8px;
}
.ai-row-type.t-working::before {
  content: ""; position: absolute; z-index: -2;
  left: -50%; top: -50%; width: 200%; height: 200%;
  background: conic-gradient(var(--ai-accent-soft, #eef0ff) 0 70%,
    var(--ai-accent, #5b5bd6) 85%, #9bb4ff 95%, var(--ai-accent-soft, #eef0ff));
  animation: lq-spin 2.6s linear infinite; will-change: transform;
}
.ai-row-type.t-working::after {
  content: ""; position: absolute; z-index: -1; inset: 1px;
  background: var(--ai-accent-soft, #eef0ff); border-radius: 5px;
}
[data-theme="dark"] .ai-row-type.t-working { color: #9bb4ff; }
[data-theme="dark"] .ai-row-type.t-working::after { background: #232931; }
[data-theme="dark"] .ai-row-type.t-working::before {
  background: conic-gradient(#232931 0 70%, #5b5bd6 85%, #9bb4ff 95%, #232931);
}

@media (prefers-reduced-motion: reduce) {
  .ai-row-type.t-working::before { animation: none; }
  .live-queue-counter .lq-dot, .live-queue-counter .lq-num.lq-bump { animation: none; }
}

/* ── '오늘 시장 한눈에' (국내 시장 종합, 콤팩트) ───────────────────────── */
.market-glance {
  background: var(--bg-card, #fff); border: 1px solid var(--border-color);
  border-radius: 14px; padding: 11px 13px; margin: 4px 0 12px;
}
.market-glance .mg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.market-glance .mg-title { font-size: 0.92em; font-weight: 800; color: var(--text-primary); }
.market-glance .mg-asof { font-size: 0.72em; color: var(--text-muted); white-space: nowrap; }
.market-glance .mg-index-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 2px; }
.market-glance .mg-index { font-size: 0.82em; font-weight: 600; color: var(--text-secondary); }
.market-glance .mg-index b { font-weight: 800; color: var(--text-primary); }
.market-glance .mg-index i { font-style: normal; font-weight: 800; }
.market-glance .mg-index.up i { color: #d32f2f; }
.market-glance .mg-index.down i { color: #1d4ed8; }
[data-theme="dark"] .market-glance .mg-index.up i { color: #f87171; }
[data-theme="dark"] .market-glance .mg-index.down i { color: #93c5fd; }
.market-glance .mg-supply {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0;
  font-size: 0.82em; font-weight: 600;
}
.market-glance .mg-supply-title { color: var(--text-muted); font-weight: 700; }
.market-glance .flow.buy { color: #c43d3d; }
.market-glance .flow.sell { color: #1d4ed8; }
[data-theme="dark"] .market-glance .flow.buy { color: #f87171; }
[data-theme="dark"] .market-glance .flow.sell { color: #93c5fd; }
.market-glance .mg-supply-tag {
  font-size: 0.85em; font-weight: 700; color: var(--text-muted);
  background: var(--input-bg); padding: 1px 6px; border-radius: 5px;
}
.market-glance .mg-rank-note { margin: 9px 0 1px; font-size: 0.74em; color: var(--text-muted); }
.market-glance .mg-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; }
.market-glance .mg-chips {
  display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px;
}
.market-glance .mg-chips::-webkit-scrollbar { display: none; }
.market-glance .mg-cat {
  flex-shrink: 0; width: 42px; font-size: 0.74em; font-weight: 800; color: var(--text-muted);
  white-space: nowrap;
}
.market-glance .mg-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.8em; font-weight: 600; text-decoration: none;
  color: var(--text-primary); background: var(--input-bg);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.market-glance .mg-chip b { font-weight: 800; }
.market-glance .mg-chip b.up { color: #d32f2f; }
.market-glance .mg-chip b.down { color: #1d4ed8; }
[data-theme="dark"] .market-glance .mg-chip b.up { color: #f87171; }
[data-theme="dark"] .market-glance .mg-chip b.down { color: #93c5fd; }
.market-glance .mg-note { margin: 8px 0 0; font-size: 0.7em; color: var(--text-muted); }

/* ── 종목 검색 자동완성 드롭다운 ── */
.stock-search-wrap { position: relative; }
.symbol-results {
  list-style: none; margin: 6px 0 0; padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  position: absolute; left: 0; right: 0; z-index: 30;
  max-height: 60vh; overflow-y: auto;
}
.symbol-result-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; }
.symbol-result-item + .symbol-result-item { border-top: 1px solid var(--border-color); }
.sr-body { flex: 1 1 auto; min-width: 0; }
.sr-name { font-weight: 700; color: var(--text-primary); font-size: 15px; }
.sr-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.symbol-empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ── 줍줍 요청 버튼 상태 ── */
.req-btn {
  flex: 0 0 auto; border: none; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.req-idle { background: var(--ai-accent, #5b5bd6); color: #fff; }
.req-idle:active { transform: scale(0.97); }
.req-queued, .req-collecting { background: var(--input-bg); color: var(--text-secondary); cursor: default; }
.req-recent { background: var(--ai-accent-soft, #eef0ff); color: var(--ai-accent, #5b5bd6); }
.req-failed { background: #fff7ed; color: #c2410c; }

/* ── 오늘의 주요 종목 (세로 랭킹 리스트 — commu 이슈 레이더 톤) ── */
.major-section {
  margin: 14px 0 6px; padding: 10px 12px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 2px 4px var(--shadow-color);
}
.major-header { margin: 2px 2px 8px; }
.major-title { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.major-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-muted); }
.major-list { list-style: none; margin: 0; padding: 0; }
.major-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 9px 4px; border: none; background: none; cursor: pointer;
  border-top: 1px solid var(--border-color);
}
.major-row:first-child { border-top: none; }
.major-row:active { background: var(--input-bg); }
.major-rank {
  flex: 0 0 20px; text-align: center;
  font-size: 14px; font-weight: 800; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.major-rank.is-top { color: var(--ai-accent, #5b5bd6); }
.major-body { flex: 1 1 auto; min-width: 0; }
.major-top { display: flex; align-items: center; gap: 7px; }
.major-name { font-weight: 700; color: var(--text-primary); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.major-flags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.major-flag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--input-bg); color: var(--text-secondary); white-space: nowrap; }
.major-flag-hot { background: #fef2f2; color: #d32f2f; }
[data-theme="dark"] .major-flag-hot { background: rgba(211,47,47,0.18); color: #f87171; }

/* ── 상세: 기사 출처 줄 + 하단 고지 (ai-post-body 안에서) ── */
.ai-post-body .sn-source { font-size: 0.82em; color: var(--text-muted); margin: -0.4em 0 0; }
.stock-detail-note {
  font-size: 0.76em; color: var(--text-muted); line-height: 1.6;
  margin: 22px 0 8px; padding: 11px 13px;
  background: var(--input-bg); border-radius: 10px;
}

/* ── 커뮤니티 분위기 카드 (의견 — 점선 테두리로 사실과 구분) ── */
.mood-card { margin: 4px 0 14px; padding: 12px 14px; background: var(--input-bg);
  border: 1px dashed var(--border-strong, #c7ccd6); border-radius: 12px; }
.mood-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mood-badge { font-size: 0.9em; font-weight: 800; padding: 3px 11px; border-radius: 999px; }
.mood-opt { background: #fef2f2; color: #d32f2f; }   /* 한국 관례: 긍정=빨강 */
.mood-neg { background: #eff6ff; color: #1d4ed8; }
.mood-neu, .mood-mix { background: var(--bg-card, #fff); color: var(--text-secondary); }
[data-theme="dark"] .mood-opt { background: rgba(211,47,47,0.2); color: #f87171; }
[data-theme="dark"] .mood-neg { background: rgba(29,78,216,0.2); color: #93c5fd; }
.mood-meta { font-size: 0.76em; color: var(--text-muted); }
.mood-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.mood-topic { font-size: 0.8em; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-card, #fff); border: 1px solid var(--border-color); padding: 2px 9px; border-radius: 999px; }
.mood-warn { margin: 8px 0 0; font-size: 0.78em; color: #c9851a; }
.mood-note { margin: 8px 0 0; font-size: 0.72em; color: var(--text-muted); line-height: 1.5; }

/* ── 출처 배지: 회원 요청 / 자동 수집 ── */
.src-badge { flex-shrink: 0; font-size: 0.72em; font-weight: 700; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.src-user { background: #eaf7ee; color: #2e7d46; }
.src-auto { background: var(--input-bg); color: var(--text-muted); }
[data-theme="dark"] .src-user { background: rgba(46,125,70,0.22); color: #7fd49b; }

/* ── 함께 주목할 종목 — 종목별 이유 한 줄 ── */
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.related-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--border-color); border-radius: 10px;
  background: var(--bg-card, #fff); text-decoration: none;
}
.related-row:active { background: var(--input-bg); }
.related-name { flex-shrink: 0; font-weight: 700; color: var(--text-primary); font-size: 0.92em; }
.related-reason { font-size: 0.82em; color: var(--text-secondary); line-height: 1.45; }

/* ── 증시 마감 브리핑: 지수 / 급등·급락 ── */
.ai-post-body .cb-index-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 12px; }
.ai-post-body .cb-index { font-size: 0.95em; color: var(--text-secondary); font-weight: 600; }
.ai-post-body .cb-index b { color: var(--text-primary); font-weight: 800; }
.ai-post-body .cb-index i { font-style: normal; font-weight: 800; }
.ai-post-body .cb-index.up i, .ai-post-body .cb-mover b.up, .ai-post-body .cb-cat.cb-up { color: #c43d3d; }
.ai-post-body .cb-index.down i, .ai-post-body .cb-mover b.down, .ai-post-body .cb-cat.cb-down { color: #1d4ed8; }
[data-theme="dark"] .ai-post-body .cb-index.up i,
[data-theme="dark"] .ai-post-body .cb-mover b.up,
[data-theme="dark"] .ai-post-body .cb-cat.cb-up { color: #f87171; }
[data-theme="dark"] .ai-post-body .cb-index.down i,
[data-theme="dark"] .ai-post-body .cb-mover b.down,
[data-theme="dark"] .ai-post-body .cb-cat.cb-down { color: #93c5fd; }
.ai-post-body .cb-movers { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; }
.ai-post-body .cb-cat { flex-shrink: 0; width: 38px; font-size: 0.82em; font-weight: 800; padding-top: 5px; }
.ai-post-body .cb-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-post-body .cb-mover {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.82em; font-weight: 600; text-decoration: none;
  color: var(--text-primary); background: var(--input-bg); padding: 4px 9px; border-radius: 999px;
}
.ai-post-body .cb-mover b { font-weight: 800; }
.ai-post-body .cb-src-title { font-size: 0.95em; margin: 16px 0 6px; color: var(--text-secondary); }
/* 마감 브리핑 투자자 순매수 */
.ai-post-body .cb-supply-block { margin: 10px 0; }
.ai-post-body .cb-supply-tag { display: block; font-size: 0.8em; font-weight: 800; color: var(--text-muted); margin-bottom: 4px; }
.ai-post-body .cb-supply { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 3px 0; font-size: 0.9em; }
.ai-post-body .cb-supply-mk { font-weight: 700; color: var(--text-secondary); min-width: 78px; }
.ai-post-body .flow { font-weight: 700; }
.ai-post-body .flow.buy { color: #c43d3d; }
.ai-post-body .flow.sell { color: #1d4ed8; }
[data-theme="dark"] .ai-post-body .flow.buy { color: #f87171; }
[data-theme="dark"] .ai-post-body .flow.sell { color: #93c5fd; }

/* ── 뉴스 주가 영향(객관적 의견) 한 줄 ── */
.ai-post-body .sn-impact { margin: 4px 0 0; font-size: 0.88em; line-height: 1.55; }
.ai-post-body .sn-impact b { font-weight: 800; margin-right: 2px; }
.ai-post-body .sn-impact-up { color: #c43d3d; }
.ai-post-body .sn-impact-down { color: #1d4ed8; }
.ai-post-body .sn-impact-neutral { color: var(--text-muted); }
[data-theme="dark"] .ai-post-body .sn-impact-up { color: #f87171; }
[data-theme="dark"] .ai-post-body .sn-impact-down { color: #93c5fd; }

/* 뉴스 항목 카드 (상세 '근거 뉴스' 목록) — hr/큰여백 대신 카드로 묶음 */
.ai-post-body.is-rendered .sn-evidence-head {
  margin: 16px 0 8px; padding-left: 9px; font-size: 0.92em; font-weight: 800;
  color: var(--text-secondary); border-left: 3px solid var(--ai-accent, #5b5bd6);
}
.ai-post-body.is-rendered .news-item {
  margin: 8px 0; padding: 12px 14px;
  background: var(--bg-card, #fff); border: 1px solid var(--border-color); border-radius: 12px;
}
.ai-post-body.is-rendered .news-item :is(h4, p) { margin: 4px 0; }
.ai-post-body.is-rendered .news-item .sn-title { margin: 0 0 5px; font-size: 1em; font-weight: 800; line-height: 1.4; }
.ai-post-body.is-rendered .news-item .sn-summary { font-size: 0.92em; line-height: 1.55; color: var(--text-secondary); }
.ai-post-body.is-rendered .news-item .sn-source { margin: 6px 0 0; }
/* 영향 pill (호재 빨강 / 악재 파랑 — 국내 관례) */
.ai-post-body .sn-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.74em; font-weight: 800; }
.ai-post-body .sn-tag-up { background: #fef2f2; color: #d32f2f; }
.ai-post-body .sn-tag-down { background: #eff6ff; color: #1d4ed8; }
.ai-post-body .sn-tag-neutral { background: var(--input-bg); color: var(--text-muted); }
[data-theme="dark"] .ai-post-body .sn-tag-up { background: rgba(211,47,47,0.18); color: #f87171; }
[data-theme="dark"] .ai-post-body .sn-tag-down { background: rgba(29,78,216,0.18); color: #93c5fd; }

/* ── 용어 풀이 (게시글 하단) ── */
.ai-post-body .sn-glossary {
  margin: 18px 0 4px; padding: 12px 14px;
  background: var(--input-bg); border-radius: 12px;
}
.ai-post-body .sn-glossary-label {
  font-size: 12px; font-weight: 800; color: var(--text-secondary); margin-bottom: 6px;
}
.ai-post-body .sn-glossary ul { margin: 0; padding-left: 18px; }
.ai-post-body .sn-glossary li { margin: 4px 0; font-size: 0.9em; color: var(--text-secondary); line-height: 1.55; }
.ai-post-body .sn-glossary li b { color: var(--text-primary); font-weight: 700; }

/* ── 통합 브리프 (게시글 최상단 AI 결론) ── */
.ai-post-body .sn-brief {
  background: var(--ai-accent-soft, #eef0ff);
  border: 1px solid var(--ai-accent, #5b5bd6);
  border-radius: 12px; padding: 14px 16px; margin: 0 0 18px;
}
.ai-post-body .sn-brief-label {
  display: inline-block; font-size: 11px; font-weight: 800;
  color: var(--ai-accent, #5b5bd6); letter-spacing: 0.3px; margin-bottom: 6px;
}
.ai-post-body .sn-brief-overview { margin: 0; font-size: 1em; line-height: 1.65; color: var(--text-primary); font-weight: 600; }
.ai-post-body .sn-brief-facts { margin: 10px 0 0; padding-left: 18px; }
.ai-post-body .sn-brief-facts li { margin: 3px 0; font-size: 0.92em; color: var(--text-secondary); }

/* 테마 페이지: 종목별 '왜 이 테마에 묶이나' 한 줄 설명 */
.theme-reason {
  margin: 4px 0 0; font-size: 0.86em; line-height: 1.5;
  color: var(--text-secondary, #5b6270);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* 시장 브리핑(증시 전체)용 강조 변형 — 위상이 종목 브리프보다 높음 */
.ai-post-body .sn-brief-market {
  background: linear-gradient(135deg, var(--ai-accent-soft, #eef0ff), var(--bg-card, #fff));
  border-width: 1px 1px 1px 4px;
}
.ai-post-body .sn-brief-market .sn-brief-overview { font-size: 1.04em; }

/* key_facts를 불릿 대신 칩으로 — 수치/키워드 스캔성 향상 */
.ai-post-body .sn-facts-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none;
}
.ai-post-body .sn-facts-chips li {
  margin: 0; background: var(--bg-card, #fff);
  border: 1px solid var(--ai-accent, #5b5bd6); color: var(--ai-accent, #5b5bd6);
  padding: 3px 10px; border-radius: 999px; font-size: 0.82em; font-weight: 700;
}

/* ── AI 요약 라벨 (기사 요약이 사실 원문이 아님을 표시) ── */
.ai-post-body .sn-source { display: block; }

/* ── 시세 기준 캡션 ── */
.stock-quote-note { font-size: 11px; color: var(--text-muted); margin-left: 4px; }

/* ── 테마 / 연관 종목 칩 (상세) ── */
.stock-chip-block { margin: 18px 0 4px; }
.stock-chip-block-title { font-size: 0.82em; font-weight: 700; color: var(--text-secondary); margin: 0 0 7px; }
.stock-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.stock-chip {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--ai-accent-soft, #eef0ff); color: var(--ai-accent, #5b5bd6);
  text-decoration: none; white-space: nowrap;
}
.stock-chip-plain { background: var(--input-bg); color: var(--text-secondary); }

/* ── 주요 종목 캡션 (자연어 한 줄) ── */
.major-caption { margin-top: 3px; font-size: 11.5px; color: var(--text-muted); }

/* ── 종목 허브 헤더 카드 ── */
.sym-hero {
  margin: 12px 0 8px; padding: 14px 16px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 14px; box-shadow: 0 2px 4px var(--shadow-color);
}
.sym-hero-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sym-ticker { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.sym-caption { margin: 8px 0 0; font-size: 13px; color: var(--text-secondary); }
.sym-hero .major-flags { margin-top: 8px; }
.sym-actions { display: flex; gap: 8px; margin-top: 14px; }
.sym-watch {
  flex: 0 0 auto; border: 1px solid var(--border-color); background: var(--bg-card);
  color: var(--text-secondary); border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.sym-watch.is-on { background: #fff7e6; border-color: #f0c45a; color: #b8740a; }
[data-theme="dark"] .sym-watch.is-on { background: #3a2d14; color: #ffc26a; }
.sym-star { font-size: 14px; }
