/* 뉴스프리즘 — 타이포그래피 중심 에디토리얼 디자인 */
:root {
  --ink: #17150f;
  --ink-soft: #57534a;
  --ink-faint: #8b8578;
  --paper: #f6f4ee;
  --card: #fffefa;
  --line: #e3dfd2;
  --accent: #14386b;
  --accent-soft: #e8eefb;
  --prog: #2f5fd0;   /* 진보 */
  --cons: #c0392b;   /* 보수 */
  --neutral: #8b8578;
  --govpro: #1d7a4f; /* 정권호의 */
  --govcon: #cf6116; /* 정권비판 */
  --up: #1d7a4f;     /* 강세·상승 전망 */
  --dn: #b3261e;     /* 약세·하락 우려 */
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard Variable", "Pretendard", -apple-system, "Noto Sans KR",
          "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 14px; letter-spacing: -0.01em;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: #ffe9a8; }

/* ── 헤더 ─────────────────────────────── */
header {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 22px max(32px, calc((100vw - 1240px) / 2 + 32px)) 16px;
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-logo { width: 44px; height: auto; display: block; flex: none;
  align-self: center;
  filter: drop-shadow(0 1px 2px rgba(20,56,107,.15));
  transition: transform .3s cubic-bezier(.2,.8,.3,1.4); }
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }
.brand h1 {
  margin: 0; font-family: var(--serif); font-weight: 900;
  font-size: 30px; letter-spacing: -0.03em;
  white-space: nowrap; flex: none;
}
.brand .tagline {
  color: var(--ink-faint); font-size: 12.5px; margin-left: 10px;
  font-family: var(--serif);
}
.stats {
  margin-top: 8px; color: var(--ink-faint); font-size: 12px;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.stats b { color: var(--ink); font-weight: 700; }

/* ── 탭 ──────────────────────────────── */
nav#tabs {
  display: flex; gap: 0; background: var(--card);
  padding: 0 max(32px, calc((100vw - 1240px) / 2 + 32px));
  border-bottom: 1px solid var(--line); overflow-x: auto;
  position: sticky; top: 0; z-index: 20;
}
nav#tabs button {
  background: none; border: none; color: var(--ink-faint);
  padding: 13px 18px 11px; cursor: pointer; font-size: 13.5px;
  font-family: var(--sans); font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .2s;
  position: relative;
}
nav#tabs button.active { color: var(--ink); }
nav#tabs button.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px;
  height: 2px; background: var(--accent);
}
nav#tabs button:hover { color: var(--ink); }
nav#tabs.scrolled { box-shadow: 0 4px 14px rgba(40,33,24,.08); }

main { padding: 26px 32px 60px; max-width: 1240px; margin: 0 auto; }

/* ── 카드 ─────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 4px; padding: 20px 22px; margin-bottom: 16px;
  animation: rise .45s cubic-bezier(.2,.7,.3,1) both;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 290px 1fr; align-items: start; }
.grid-3 { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.brief-mid { grid-template-columns: 3fr 2fr; align-items: stretch; }
.brief-secs { grid-template-columns: 1fr 1fr; align-items: stretch; }
/* 그리드 카드 순차 등장 */
.grid > .card:nth-child(2) { animation-delay: .05s; }
.grid > .card:nth-child(3) { animation-delay: .1s; }
.grid > .card:nth-child(4) { animation-delay: .15s; }
.grid > .card:nth-child(5) { animation-delay: .2s; }
.grid > .card:nth-child(6) { animation-delay: .25s; }
.grid > .card:nth-child(7) { animation-delay: .3s; }
.grid > .card:nth-child(n+8) { animation-delay: .35s; }

.section-title {
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  margin: 0 0 14px; letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 8px;
}
.section-title::before {
  content: ""; width: 18px; height: 2px; background: var(--ink);
  align-self: center; flex: none;
}
.section-title .note {
  font-family: var(--sans); font-size: 11.5px; color: var(--ink-faint);
  font-weight: 400;
}
.kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}

/* ── 브리핑 히어로 ────────────────────── */
.brief-date {
  font-family: var(--serif); font-size: clamp(28px, 4vw, 44px);
  font-weight: 900; letter-spacing: -0.04em; line-height: 1.1;
}
.brief-sub { color: var(--ink-faint); font-size: 12.5px; margin-top: 4px; }
.stat-row { display: flex; gap: 0; margin-top: 18px; flex-wrap: wrap; }
.stat-cell {
  padding: 4px 26px 4px 0; margin-right: 26px;
  border-right: 1px solid var(--line);
}
.stat-cell:last-child { border-right: none; }
.stat-cell .num {
  font-family: var(--serif); font-size: 34px; font-weight: 700;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.stat-cell .lbl {
  font-size: 11px; color: var(--ink-faint); margin-top: 5px;
  letter-spacing: .06em;
}
.date-nav { display: flex; gap: 6px; align-items: center; }
.date-nav button, .date-nav input {
  border: 1px solid var(--line); background: var(--card); border-radius: 3px;
  padding: 7px 12px; font-family: var(--sans); font-size: 12.5px;
  cursor: pointer; color: var(--ink-soft); transition: all .2s;
}
.date-nav button:hover { border-color: var(--ink-faint); color: var(--ink); }

/* 헤더 카드: 날짜 + 캘린더 양쪽 배치 */
.head-flex { display: flex; gap: 28px; align-items: flex-start; justify-content: space-between; }
.head-main { min-width: 0; }
.head-main .date-nav { margin-top: 12px; }
.head-cal { flex: none; width: 236px; border-left: 1px solid var(--line); padding-left: 22px; }
.cal-cap { font-size: 10.5px; color: var(--ink-faint); margin-bottom: 6px; letter-spacing: .04em; }
.head-cal .cal { gap: 3px; }
.head-cal .cal-d { font-size: 10px; border-radius: 3px; aspect-ratio: 1.15; }
.head-cal .cal-d .cn { font-size: 8px; }

/* ── 차트 공통 ───────────────────────── */
.hbar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.hbar-row .lb {
  width: 62px; font-size: 12px; color: var(--ink-soft); flex: none;
  text-align: right;
}
.hbar-track { flex: 1; height: 16px; background: #f0ede3; border-radius: 2px; overflow: hidden; }
.hbar-fill {
  height: 100%; background: var(--accent); border-radius: 2px;
  width: 0; transition: width .8s cubic-bezier(.2,.7,.3,1);
}
.hbar-row .vl { font-size: 12px; color: var(--ink-faint); width: 36px; flex: none; font-variant-numeric: tabular-nums; }

.chart-tip {
  font-size: 11px; fill: var(--ink-faint); font-family: var(--sans);
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); }
.legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-wrap .hole-label { font-family: var(--serif); }

/* Bias Bar — Ground News 스타일 보도 분포 */
.biasbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #f0ede3; }
.biasbar > span { display: block; height: 100%; width: 0; transition: width .8s cubic-bezier(.2,.7,.3,1); }
.biasbar .bp { background: var(--prog); }
.biasbar .bn { background: #cfcabb; }
.biasbar .bc { background: var(--cons); }
.bias-lb { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-faint); margin-top: 3px; }

/* 매체 성향 스트립 (AllSides 스타일 축) */
.lean-strip-wrap { position: relative; padding: 8px 0 4px; }
.lean-strip-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-faint); padding: 0 2px; }

/* 헤드라인 */
.lead-card { border-top: 3px solid var(--ink) !important; }
.lead-title {
  font-family: var(--serif); font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 900; line-height: 1.35; letter-spacing: -0.025em;
  cursor: pointer;
}
.lead-title:hover { color: var(--accent); }
.lead-also { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.lead-also .rel-item { padding: 7px 0; }

/* 최신 기사 피드 — 카드 높이에 맞춰 채움 */
.feed-card { display: flex; flex-direction: column; }
.feed-card .feed-list { flex: 1; min-height: 0; }
.feed-list { max-height: none; overflow-y: auto; margin: 0 -8px; padding: 0 8px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.feed-list::-webkit-scrollbar { width: 5px; }
.feed-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.feed-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s, transform .15s; border-radius: 3px; }
.feed-item:hover { background: #fbf9f2; transform: translateX(3px); }
.feed-item:hover .ft { color: var(--accent); }
.feed-item .ftime { flex: none; width: 44px; font-size: 11px; color: var(--ink-faint); padding-top: 3px; font-variant-numeric: tabular-nums; }
.feed-item .ft { font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.feed-item .fm { font-size: 11px; color: var(--ink-faint); margin-top: 3px; display: flex; gap: 6px; }

/* 블라인드스팟 */
.bs-side { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 2px; color: #fff; }
.bs-prog { background: var(--prog); }
.bs-cons { background: var(--cons); }

/* 섹션별 주요 기사 */
.sec-list .rel-item { padding: 10px 2px; }
.sec-list .rel-item .rt { font-family: var(--serif); font-size: 14.5px; font-weight: 700; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; }

/* 3분할 비교 (AllSides) */
.side3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 10px 0 4px; }
.side-col { border: 1px solid var(--line); border-top: 3px solid var(--neutral); border-radius: 4px; padding: 10px 12px; background: #fff; }
.side-col.s-prog { border-top-color: var(--prog); }
.side-col.s-neutral { border-top-color: var(--neutral); }
.side-col.s-cons { border-top-color: var(--cons); }
.side-head { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 6px; }
.side-title { font-family: var(--serif); font-weight: 700; font-size: 14px; line-height: 1.45; cursor: pointer; }
.side-title:hover { color: var(--accent); }
.side-empty { color: var(--ink-faint); font-size: 12px; padding: 14px 0; text-align: center; font-style: italic; }
.lop-flag { margin: 8px 0 2px; padding: 7px 12px; background: #fdf3e7; border: 1px solid #ecd9b8; border-radius: 4px; font-size: 12px; color: #8a5a1e; }

/* 사건 타임라인 */
.tl { border-left: 2px solid var(--line); margin: 8px 0 4px 46px; }
.tl-day { font-family: var(--serif); font-weight: 800; font-size: 13px; margin: 12px 0 4px -14px; background: var(--paper); padding: 2px 8px; display: inline-block; }
.tl-item { display: flex; align-items: baseline; gap: 8px; padding: 3px 0 3px 12px; position: relative; font-size: 12.5px; }
.tl-time { width: 38px; flex: none; margin-left: -50px; text-align: right; color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: 11px; }
.tl-dot { position: absolute; left: -5px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.tl-outlet { flex: none; font-weight: 700; font-size: 11px; color: var(--ink-faint); }
.tl-title { color: var(--ink); }
.tl-title:hover { color: var(--accent); }

/* 캘린더 히트맵 */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-hd { font-size: 10.5px; text-align: center; color: var(--ink-faint); font-weight: 700; padding: 4px 0; }
.cal-d { aspect-ratio: 1; border-radius: 4px; background: #f0ede3; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; border: 1px solid transparent; }
.cal-d:hover { border-color: var(--accent); }
.cal-d.sel { border-color: var(--accent); border-width: 2px; }
.cal-d .cn { font-size: 9px; color: var(--ink-faint); }
.cal-d.empty { background: transparent; cursor: default; }

.kw.spike { border-color: var(--accent); color: var(--accent); font-weight: 700; }

/* 워드클라우드 */
.wcloud { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 4px; }
.wcloud .wc { font-family: var(--serif); font-weight: 700; cursor: pointer; color: var(--ink); }
.wcloud .wc:hover { color: var(--accent); }

/* 검색식 저장 */
.saved-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.saved-row .sv-name { flex: 1; font-weight: 600; cursor: pointer; }
.saved-row .sv-name:hover { color: var(--accent); }
.saved-row .sv-del { cursor: pointer; color: var(--ink-faint); border: none; background: none; font-size: 12px; }
.saved-row .sv-del:hover { color: var(--accent); }

/* 네트워크 그래프 */
.net-wrap { position: relative; }
.net-svg { display: block; width: 100%; }
.net-node { cursor: pointer; transition: transform .2s; }
.net-node:hover circle { stroke-width: 2.5; }
.net-node text {
  font-size: 10.5px; fill: var(--ink-soft); font-family: var(--sans);
  pointer-events: none;
}
.net-edge { stroke: var(--line); stroke-width: 1; }
.net-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; }
.net-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

/* ── 필터 ─────────────────────────────── */
.filters .kicker { margin-top: 16px; }
.filters .kicker:first-child { margin-top: 0; }
.filters input[type=text], .filters input[type=date],
.filters input[type=number], .filters select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 3px; font-size: 13px; background: var(--card);
  font-family: var(--sans); color: var(--ink);
}
.filters input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.chk-group { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.chk-group label {
  display: flex !important; align-items: center; gap: 5px;
  font-weight: 400 !important; margin: 0 !important; font-size: 13px;
  cursor: pointer; color: var(--ink-soft);
}
.chk-group .cnt { color: var(--ink-faint); font-size: 11px; }
.range-row { display: flex; gap: 6px; align-items: center; }
button.go {
  width: 100%; margin-top: 18px; padding: 11px; background: var(--ink);
  color: var(--paper); border: none; border-radius: 3px; font-size: 14px;
  cursor: pointer; font-weight: 700; font-family: var(--sans);
  letter-spacing: .02em; transition: background .2s;
}
button.go:hover { background: var(--accent); }
.mini-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 3px;
  padding: 6px 12px; font-size: 12px; cursor: pointer; color: var(--ink-soft);
  font-family: var(--sans); transition: all .2s;
}
.mini-btn:hover { border-color: var(--ink-faint); color: var(--ink); }
.toggle-line { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }

/* ── 검색 결과 ───────────────────────── */
.result-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.result-head .total { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.result-head select {
  padding: 6px; border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--sans); background: var(--card);
}
.facet-line { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; align-items: center; }
.facet-line .fl { font-size: 11.5px; color: var(--ink-faint); margin-right: 4px; }

.article {
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  cursor: pointer; animation: rise .4s both;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: background .15s, transform .18s;
}
.article:hover { background: #fbf9f2; transform: translateX(3px); }
.article:hover .a-title { color: var(--accent); }
.a-title {
  font-family: var(--serif); font-size: 16.5px; font-weight: 700;
  line-height: 1.45; letter-spacing: -0.015em; transition: color .15s;
}
.a-snippet { color: var(--ink-soft); font-size: 13px; margin-top: 5px; line-height: 1.6; }
.a-snippet b { color: var(--accent); font-weight: 700; }
.a-meta {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
  align-items: center; font-size: 12px; color: var(--ink-faint);
}

.chip {
  display: inline-block; padding: 2px 8px; border-radius: 2px;
  font-size: 11px; font-weight: 600; background: var(--accent-soft);
  color: var(--accent); border: 1px solid transparent;
}
.chip.cat { background: #eef6ee; color: #2c5d33; }
.chip.outlet { background: #f1efe8; color: #4c463a; cursor: pointer; }
.chip.outlet:hover { border-color: var(--ink-faint); text-decoration: none; }
.chip.admin { background: #f6eefb; color: #6c2a86; }
.chip.person { background: #fdf1e7; color: #97420e; cursor: pointer; }
.chip.event { background: #fdf9e3; color: #7d6407; cursor: pointer; }
.chip.jour { background: #eaf4f6; color: #1c5966; cursor: pointer; }
.chip.facet { cursor: pointer; background: #f1efe8; color: #4c463a; }
.chip.facet.on { background: var(--ink); color: var(--paper); }
.chip.facet:hover { border-color: var(--ink-faint); }

.lean-chip {
  padding: 2px 8px; border-radius: 2px; font-size: 11px;
  font-weight: 700; color: #fff;
}
.lean-prog { background: var(--prog); }
.lean-cons { background: var(--cons); }
.lean-neutral { background: var(--neutral); }
.gov-pro { background: var(--govpro); }
.gov-con { background: var(--govcon); }

/* 스펙트럼 */
.spectrum {
  position: relative; width: 110px; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, var(--prog) 0%, #a8c0f0 32%,
    #e7e3d7 50%, #eaa896 68%, var(--cons) 100%);
  display: inline-block; vertical-align: middle;
}
.spectrum .marker {
  position: absolute; top: -3px; width: 4px; height: 16px;
  background: var(--ink); border-radius: 2px;
  transition: left .5s cubic-bezier(.2,.7,.3,1);
}
.spectrum-wrap { display: inline-flex; align-items: center; gap: 6px; }
.spectrum-wrap .val { font-size: 11px; color: var(--ink-faint); width: 36px; font-variant-numeric: tabular-nums; }

/* 테이블 */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 9px 10px; border-bottom: 2px solid var(--ink);
  color: var(--ink-faint); font-size: 11.5px; white-space: nowrap;
  letter-spacing: .04em; font-weight: 700;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover td { background: #fbf9f2; }
.tbl tr.clickable { cursor: pointer; }
.tone-cell { font-weight: 700; font-size: 12px; text-align: center; min-width: 64px; }

.pager { display: flex; gap: 5px; justify-content: center; margin: 16px 0 4px; flex-wrap: wrap; }
.pager button {
  padding: 6px 12px; border: 1px solid var(--line); background: var(--card);
  border-radius: 3px; cursor: pointer; font-family: var(--sans);
  font-size: 12.5px; color: var(--ink-soft); transition: all .15s;
}
.pager button.cur { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager button:hover:not(.cur) { border-color: var(--ink-faint); }

/* ── 드로어 (기사 상세) ───────────────── */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 96vw);
  background: var(--card); border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(23,21,15,.12); z-index: 60;
  transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.7,.3,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: var(--card); flex: none;
}
.drawer-body { overflow-y: auto; padding: 22px 26px 40px; }
.drawer .a-title-lg {
  font-family: var(--serif); font-size: 22px; font-weight: 900;
  line-height: 1.4; letter-spacing: -0.02em; margin: 0 0 10px;
}
.drawer .body-text {
  white-space: pre-wrap; line-height: 1.85; color: var(--ink-soft);
  font-size: 14.5px; font-family: var(--serif); font-weight: 400;
}
.rel-group { margin-bottom: 4px; }
.rel-item {
  padding: 9px 6px; border-bottom: 1px solid var(--line); cursor: pointer;
  font-size: 13px; transition: background .15s;
}
.rel-item:hover { background: #fbf9f2; }
.rel-item .rt { font-weight: 600; line-height: 1.45; display: block; }
.rel-item .rm { font-size: 11.5px; color: var(--ink-faint); margin-top: 3px;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ── 모달 ─────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgba(23,21,15,.5);
  display: flex; align-items: center; justify-content: center; z-index: 70;
  animation: fade .25s both;
}
.modal.hidden { display: none; }
.modal-body {
  background: var(--card); border-radius: 6px; max-width: 860px; width: 93%;
  max-height: 86vh; overflow-y: auto; padding: 26px 28px;
  animation: pop .3s cubic-bezier(.2,.7,.3,1) both;
}
.modal-body h2 {
  margin-top: 0; font-family: var(--serif); font-size: 21px; font-weight: 900;
  line-height: 1.4;
}
.modal-close {
  float: right; border: 1px solid var(--line); background: var(--card);
  border-radius: 3px; padding: 5px 12px; cursor: pointer;
  font-family: var(--sans); font-size: 12px; color: var(--ink-soft);
}
.modal-close:hover { border-color: var(--ink-faint); }

/* ── 인용 ─────────────────────────────── */
.quote-box {
  background: #fbf7ec; border-left: 3px solid #d9a83c;
  padding: 10px 14px; margin: 9px 0; font-size: 13.5px;
  border-radius: 0 3px 3px 0;
}
.quote-box .who { font-weight: 700; color: #7c5a10; }
.quote-box .q { font-family: var(--serif); line-height: 1.65; margin-top: 3px; }

.ev-article {
  border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px;
  margin-bottom: 10px; background: var(--card);
}
.ev-article .u-kws { margin-top: 7px; }
.flip { color: var(--cons); font-weight: 700; }
.subtle { color: var(--ink-faint); font-size: 12px; }
.kw {
  display: inline-block; background: #efece2; border-radius: 2px;
  padding: 2px 7px; margin: 2px; font-size: 11.5px; color: var(--ink-soft);
  cursor: pointer; transition: all .15s;
}
.kw:hover { background: var(--ink); color: var(--paper); }

.empty-note {
  padding: 30px 0; text-align: center; color: var(--ink-faint);
  font-family: var(--serif); font-size: 14px;
}

/* 로딩 스켈레톤 */
.skel { padding: 6px 0; }
.skel .row {
  height: 15px; border-radius: 3px; margin: 12px 0;
  background: linear-gradient(90deg, #eee9dc 25%, #f7f3e9 50%, #eee9dc 75%);
  background-size: 200% 100%; animation: shimmer 1.1s infinite linear;
}
.skel .row.short { width: 55%; }
.skel .row.mid { width: 80%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* SVG 노드 팝 */
.net-node circle { transform-box: fill-box; transform-origin: center; animation: nodepop .35s cubic-bezier(.2,.7,.3,1.4) backwards; }
.net-node:nth-child(3n) circle { animation-delay: .06s; }
.net-node:nth-child(3n+1) circle { animation-delay: .12s; }
@keyframes nodepop { from { transform: scale(0); } to { transform: scale(1); } }

/* 칩/키워드 호버 톤 */
.chip { transition: all .15s; }
.chip.outlet:hover, .chip.jour:hover, .chip.person:hover { background: var(--ink); color: var(--paper); }

/* 테이블 행 호버 */
.tbl tr { transition: background .12s; }
.tbl tbody tr:hover { background: #fbf9f2; }

/* ── 애니메이션 ───────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes drawline { to { stroke-dashoffset: 0; } }
.line-path { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: drawline 1.4s ease-out .1s forwards; }
.area-path { opacity: 0; animation: fade .8s ease-out .5s forwards; }

/* ── 증시 프리즘 ─────────────────────────── */
.stock-hero {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; background: linear-gradient(135deg, #fdfcf6 0%, #f3efe1 60%, #eef0e6 100%);
  color: var(--ink); overflow: hidden; position: relative;
  border-color: #d8d2bc;
}
.stock-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(560px 190px at 88% -10%, rgba(20,56,107,.1), transparent 60%);
  pointer-events: none;
}
.hero-kicker {
  font-size: 10.5px; letter-spacing: .35em; color: var(--accent);
  font-weight: 700; margin-bottom: 8px;
}
.hero-title {
  font-family: var(--serif); font-size: 30px; font-weight: 900;
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.hero-sub { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 14px; }
.hero-stats { display: flex; gap: 26px; }
.hs { display: flex; flex-direction: column; }
.hs b { font-family: var(--serif); font-size: 26px; font-weight: 900;
  animation: rise .6s both; }
.hs span { font-size: 10.5px; color: var(--ink-faint); letter-spacing: .05em; }
.hs-up b { color: var(--up); }
.hs-dn b { color: var(--dn); }
.hero-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.hero-mid .spark polyline { stroke: var(--accent) !important; }
.hero-mid .spark polyline:first-child { fill: rgba(20,56,107,.12); }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px;
  min-width: 230px; padding-left: 20px; border-left: 1px solid rgba(87,83,74,.25); }
.hstat { display: flex; flex-direction: column; }
.hstat b { font-family: var(--serif); font-size: 19px; font-weight: 900; color: var(--ink); }
.hstat b.pos { color: var(--up); } .hstat b.neg { color: var(--dn); }
.hstat span { font-size: 10px; color: var(--ink-faint); letter-spacing: .04em; }

.gauge-needle { transition: transform 1.1s cubic-bezier(.2,.8,.3,1.2); animation: needle-in 1.2s cubic-bezier(.2,.8,.3,1.3) both; }
@keyframes needle-in { from { transform: rotate(180deg); } }
.gauge-lbl { fill: var(--ink); font-size: 15px; font-weight: 800; font-family: var(--serif); }
.gauge-side { fill: var(--ink-faint); font-size: 10.5px; font-weight: 700; }

.mover-row { display: flex; flex-wrap: wrap; gap: 10px; }
.mover {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
  background: var(--card); transition: all .18s;
  animation: rise .4s both;
}
.mover:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(20,56,107,.12); border-color: var(--accent); }
.mv-name { font-weight: 800; font-size: 14px; }
.mv-buzz { color: var(--accent); font-weight: 800; font-size: 13px; }

.stock-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.stock-tile {
  border: 1px solid var(--line); border-radius: 8px; padding: 14px;
  cursor: pointer; background: var(--card); transition: all .18s;
  animation: rise .4s both;
}
.stock-tile:nth-child(4n) { animation-delay: .04s; }
.stock-tile:nth-child(4n+1) { animation-delay: .08s; }
.stock-tile:nth-child(4n+2) { animation-delay: .12s; }
.stock-tile:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(20,56,107,.13); border-color: var(--accent); }
.stock-tile.has-risk { border-left: 3px solid var(--cons); }
.st-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.st-name { font-weight: 800; font-size: 15.5px; letter-spacing: -0.01em; }
.st-n { font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; }
.st-pct { font-family: var(--serif); font-size: 22px; font-weight: 900; }
.pos { color: #1d7a4f; }
.neg { color: #c0392b; }
.sent-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #f0ede3; margin: 8px 0 6px; }
.sent-bar .sb-up { background: #1d7a4f; transition: width .8s cubic-bezier(.2,.7,.3,1); }
.sent-bar .sb-dn { background: #c0392b; transition: width .8s cubic-bezier(.2,.7,.3,1); }
.st-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 10.5px; }

.sig {
  display: inline-block; padding: 1px 7px; border-radius: 3px;
  font-size: 10px; font-weight: 800; letter-spacing: .03em;
}
.sig-risk { background: #fbe9e7; color: #b3261e; border: 1px solid #f0c4bf; }
.sig-boom { background: #e4f4ea; color: #14663a; border: 1px solid #bfe3cd; }
.sig-buzz { background: #e8eefb; color: var(--accent); border: 1px solid #c5d4ef; }
.sig-fake { background: #fdf3e0; color: #96660a; border: 1px solid #eedcae; }
.rel-chip { font-size: 10px; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; }

.ev-article.suspicious { background: #fdf8ec; border-left: 3px solid #d9a83c; padding-left: 10px; }
.fake-card { border-top: 3px solid #d9a83c; }
.card-inset { background: #f7f4ec; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-top: 12px; }
.stk-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.modal-title { font-family: var(--serif); font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .brief-mid, .brief-secs { grid-template-columns: 1fr; }
  .side3 { grid-template-columns: 1fr; }
  .head-flex { flex-direction: column; }
  .head-cal { width: 100%; border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .stock-hero { flex-direction: column; align-items: flex-start; }
  .hero-side { border-left: none; padding-left: 0; min-width: 0; width: 100%; }
  .hero-title { font-size: 24px; }
  .tl { margin-left: 8px; }
  .tl-day { margin-left: -6px; }
  .tl-time { margin-left: 0; width: auto; min-width: 36px; }
  .brand-logo { width: 28px; }
  .brand { gap: 9px; }
  .brand h1 { font-size: 24px; }
  .brand .tagline { font-size: 10.5px; margin-left: 4px; }
  header, nav#tabs { padding-left: 18px; padding-right: 18px; }
  main { padding: 18px; }
  .stat-cell { padding-right: 18px; margin-right: 18px; }
  /* 테이블: 카드 안에서 좌우 스크롤 */
  .tbl-scroll .tbl { min-width: 560px; }
  /* 고정폭 SVG가 카드를 넘지 않도록 */
  svg.gauge, svg.spark, svg.radar, .net-svg { max-width: 100%; height: auto; }
  .hero-stats { flex-wrap: wrap; gap: 14px 26px; }
}

@media (max-width: 560px) {
  .stock-grid, .theme-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 18px 16px; width: 95%; }
  .drawer-body { padding: 18px 16px 40px; }
  .stat-cell { padding-right: 14px; margin-right: 14px; }
  .stat-cell .num { font-size: 26px; }
  .fc-index { flex-wrap: wrap; }
  .cal-d .cn { display: none; }
}

/* ── 증시 프리즘 v2: 뉴럴맵·레이더·전망 ── */
.stock-hero > *:not(canvas) { position: relative; z-index: 1; }

.fc-index { display: flex; align-items: baseline; gap: 14px; margin: 4px 0 6px; }
.fc-num { font-family: var(--serif); font-size: 64px; font-weight: 900;
  letter-spacing: -.03em; line-height: 1; color: var(--ink);
  animation: count-in .8s cubic-bezier(.16,1,.3,1) both; }
.fc-num.pos { color: var(--up); } .fc-num.neg { color: var(--dn); }
@keyframes count-in { from { opacity: 0; transform: translateY(14px) scale(.92); }
  to { opacity: 1; transform: none; } }
.fc-lbl { font-size: 15px; font-weight: 800; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .06em; }
.fc-drivers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fc-drv { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.fc-drv.up { background: #e4f4ea; color: #14663a; border: 1px solid #bfe3cd; }
.fc-drv.dn { background: #fbe9e7; color: #b3261e; border: 1px solid #f0c4bf; }

/* 레이더 (페이퍼 톤 — 증시 탭은 .cosmos 스코프에서 다크 오버라이드) */
.radar { max-width: 340px; margin: 0 auto; display: block; }
.radar-ring { fill: none; stroke: var(--line); }
.radar-axis { stroke: var(--line); }
.radar-lbl { fill: var(--ink-soft); font-size: 10.5px; font-weight: 700; }
.radar-val { font-size: 9px; fill: var(--ink-faint); }
.radar-val.pos { fill: var(--up); } .radar-val.neg { fill: var(--dn); }
.radar-poly-cov { fill: rgba(20,56,107,.13); stroke: var(--accent);
  stroke-width: 1.5; animation: radar-in 1s ease both; }
.radar-poly-sent { fill: none; stroke: var(--govpro); stroke-width: 1.3;
  stroke-dasharray: 5 4; animation: radar-in 1.2s ease both; }
@keyframes radar-in { from { opacity: 0; transform: scale(.6);
  transform-origin: center; } to { opacity: 1; transform: none; } }
.radar-legend { display: flex; gap: 18px; justify-content: center;
  font-size: 11px; color: var(--ink-faint); margin-top: 8px; }
.rl { display: inline-block; width: 16px; height: 3px; vertical-align: middle; margin-right: 4px; }
.rl-cov { background: var(--accent); }
.rl-sent { background: var(--govpro); }

/* 전망 배지·스코어 */
.oc { display: inline-block; font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px; letter-spacing: .02em; }
.oc-up { background: #e4f4ea; color: #14663a; border: 1px solid #bfe3cd; }
.oc-dn { background: #fbe9e7; color: #b3261e; border: 1px solid #f0c4bf; }
.oc-flat { background: #efecdf; color: #6b665a; border: 1px solid #ddd8c4; }
.st-outlook { margin: 4px 0 2px; }
.outlook-box { text-align: center; padding: 10px 18px; border-radius: 10px;
  background: #efecdf; }
.ob-up { background: #e4f4ea; } .ob-dn { background: #fbe9e7; }
.ob-score { font-family: var(--serif); font-size: 34px; font-weight: 900; line-height: 1; }
.ob-up .ob-score { color: #14663a; } .ob-dn .ob-score { color: #b3261e; }
.ob-lbl { font-size: 11px; font-weight: 700; color: var(--ink-soft); margin-top: 3px; }

/* 테마 카드 */
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.theme-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  cursor: pointer; transition: all .25s; background: #faf8f2;
  animation: fade-up .5s both; }
.theme-card:nth-child(4n+2) { animation-delay: .05s }
.theme-card:nth-child(4n+3) { animation-delay: .1s }
.theme-card:nth-child(4n+4) { animation-delay: .15s }
.theme-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(40,32,16,.1); }
.th-up { border-top: 3px solid var(--up); } .th-dn { border-top: 3px solid var(--dn); }
.th-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.th-name { font-weight: 800; font-size: 13.5px; }
.th-bar { position: relative; height: 6px; background: #e8e4d6; border-radius: 3px;
  margin: 9px 0 7px; overflow: hidden; }
.th-fill { position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--dn), #c9a227 50%, var(--up));
  border-radius: 3px; transition: width .8s cubic-bezier(.16,1,.3,1); }
.th-zero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1.5px;
  background: #1d1a15; opacity: .4; }
.th-meta { display: flex; gap: 8px; align-items: center; font-size: 11.5px;
  font-weight: 700; flex-wrap: wrap; }
.th-kws { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.th-kws span { font-size: 9.5px; color: var(--ink-faint); background: #efecdf;
  padding: 1px 7px; border-radius: 10px; }

@media (max-width: 1100px) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .fc-num { font-size: 46px; }
}
@media (max-width: 480px) {
  .brand-logo { width: 24px; }
  .brand { gap: 7px; }
  .brand h1 { font-size: 21px; }
  .brand .tagline { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   증시 프리즘 — 파스텔 드림 (구형 뉴럴맵 × 밝은 배경)
   ════════════════════════════════════════════════════════════════ */
.cosmos {
  --c-line: rgba(129, 140, 220, .28);
  --c-line-hi: rgba(129, 140, 220, .55);
  --c-ink: #23233c;
  --c-soft: #565a78;
  --c-faint: #8a8ea8;
  --c-up: #0e9f6e; --c-dn: #e0245e;
  --accent: #5b6ee1; --accent-soft: rgba(91, 110, 225, .12);
  --up: #0e9f6e; --dn: #e0245e; --govpro: #0284c7;
  position: relative; margin: -10px -14px; padding: 18px 14px 26px;
  border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(900px 400px at 85% -5%, rgba(196, 181, 253, .28), transparent 62%),
    radial-gradient(800px 380px at 5% 105%, rgba(147, 197, 253, .24), transparent 60%),
    radial-gradient(600px 300px at 45% 40%, rgba(254, 215, 170, .14), transparent 65%),
    linear-gradient(172deg, #fdfcf7 0%, #f8f6fd 55%, #eef3fe 100%);
}
.cosmos::before {  /* 은은한 파스텔 스파클 도트 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 20%, rgba(139, 92, 246, .3), transparent 60%),
    radial-gradient(1.4px 1.4px at 68% 9%, rgba(245, 158, 11, .3), transparent 60%),
    radial-gradient(1.8px 1.8px at 90% 42%, rgba(6, 182, 212, .28), transparent 60%),
    radial-gradient(1.4px 1.4px at 33% 64%, rgba(236, 72, 153, .26), transparent 60%),
    radial-gradient(1.6px 1.6px at 55% 86%, rgba(16, 185, 129, .26), transparent 60%),
    radial-gradient(1.4px 1.4px at 6% 80%, rgba(99, 102, 241, .28), transparent 60%);
}
.cosmos > * { position: relative; z-index: 1; }

/* 카드 → 화이트 글래스 */
.cosmos .card {
  background: rgba(255, 255, 252, .74);
  border: 1px solid var(--c-line);
  box-shadow: 0 8px 28px rgba(99, 102, 180, .1),
              inset 0 1px 0 rgba(255, 255, 255, .8);
  backdrop-filter: blur(8px);
  color: var(--c-ink);
}
.cosmos .section-title { color: var(--c-ink); }
.cosmos .section-title::before { background: linear-gradient(180deg, #8b5cf6, #06b6d4); }
.cosmos .subtle { color: var(--c-faint); }
.cosmos .empty-note { color: var(--c-faint); }

/* ── 히어로 ── */
.cosmos .stock-hero {
  background: linear-gradient(120deg, rgba(255,255,253,.9), rgba(245,243,255,.85));
  border-color: var(--c-line-hi); color: var(--c-ink);
}
.cosmos .stock-hero::before {
  background: radial-gradient(560px 200px at 88% -10%, rgba(139, 92, 246, .12), transparent 60%);
}
.cosmos .hero-stars { position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 1; pointer-events: none; }
.cosmos .hero-kicker { color: #7c5cf0; text-shadow: 0 0 14px rgba(139, 92, 246, .35); }
.cosmos .hero-title { color: var(--c-ink); text-shadow: 0 0 24px rgba(139, 92, 246, .18); }
.cosmos .hero-sub { color: var(--c-soft); }
.cosmos .fc-num { color: var(--c-ink); }
.cosmos .fc-num.pos { color: var(--c-up); text-shadow: 0 0 26px rgba(16, 185, 129, .35); }
.cosmos .fc-num.neg { color: var(--c-dn); text-shadow: 0 0 26px rgba(224, 36, 94, .3); }
.cosmos .fc-lbl { color: var(--c-soft); }
.cosmos .fc-drv.up { background: rgba(16, 185, 129, .1); color: var(--c-up); border: 1px solid rgba(16, 185, 129, .35); }
.cosmos .fc-drv.dn { background: rgba(224, 36, 94, .09); color: var(--c-dn); border: 1px solid rgba(224, 36, 94, .3); }
.cosmos .hero-side { border-left-color: var(--c-line); }
.cosmos .hstat b { color: var(--c-ink); }
.cosmos .hstat b.pos { color: var(--c-up); } .cosmos .hstat b.neg { color: var(--c-dn); }
.cosmos .hstat span { color: var(--c-faint); }
.cosmos .hero-mid .spark polyline { stroke: #7c5cf0 !important; }
.cosmos .hero-mid .spark polyline:first-child { fill: rgba(124, 92, 240, .1); }
.cosmos .gauge-lbl { fill: var(--c-ink); }
.cosmos .gauge-side { fill: var(--c-faint); }
.cosmos .gauge-needle { fill: #f59e0b; }

/* ── 볼트 그래프 카드 (.cosmos 안에서도 card-dark 그라디언트 유지) ── */
.cosmos .vault-card {
  background: linear-gradient(180deg, #fbfcff 0%, #f1f4fe 100%);
}

/* ── 매크로 레이더 (파스텔) ── */
.cosmos .radar-ring { stroke: rgba(129, 140, 220, .28); }
.cosmos .radar-axis { stroke: rgba(129, 140, 220, .2); }
.cosmos .radar-lbl { fill: var(--c-soft); }
.cosmos .radar-val { fill: var(--c-faint); }
.cosmos .radar-val.pos { fill: var(--c-up); } .cosmos .radar-val.neg { fill: var(--c-dn); }
.cosmos .radar-poly-cov { fill: rgba(124, 92, 240, .12); stroke: #7c5cf0;
  filter: drop-shadow(0 0 8px rgba(124, 92, 240, .3)); }
.cosmos .radar-poly-sent { stroke: #0284c7;
  filter: drop-shadow(0 0 6px rgba(2, 132, 199, .3)); }
.cosmos .rl-cov { background: #7c5cf0; } .cosmos .rl-sent { background: #0284c7; }

/* ── 테마 카드 ── */
.cosmos .theme-card {
  background: rgba(255, 255, 252, .7); border-color: var(--c-line); color: var(--c-ink);
}
.cosmos .theme-card:hover {
  border-color: var(--c-line-hi);
  box-shadow: 0 8px 24px rgba(99, 102, 180, .14), 0 0 16px rgba(139, 92, 246, .1);
}
.cosmos .th-up { border-top: 3px solid var(--c-up); }
.cosmos .th-dn { border-top: 3px solid var(--c-dn); }
.cosmos .th-name { color: var(--c-ink); }
.cosmos .th-bar { background: rgba(129, 140, 220, .15); }
.cosmos .th-fill { background: linear-gradient(90deg, var(--c-dn), #f59e0b 50%, var(--c-up)); }
.cosmos .th-zero { background: #3c3a5a; opacity: .4; }
.cosmos .th-kws span { background: rgba(124, 92, 240, .08); color: var(--c-soft);
  border: 1px solid var(--c-line); }

/* ── 배지·시그널 칩 (파스텔) ── */
.cosmos .oc-up { background: rgba(16, 185, 129, .1); color: var(--c-up); border: 1px solid rgba(16, 185, 129, .35); }
.cosmos .oc-dn { background: rgba(224, 36, 94, .09); color: var(--c-dn); border: 1px solid rgba(224, 36, 94, .3); }
.cosmos .oc-flat { background: rgba(129, 140, 220, .12); color: #5b6ee1; border: 1px solid rgba(129, 140, 220, .35); }
.cosmos .sig-risk { background: rgba(224, 36, 94, .09); color: var(--c-dn); border: 1px solid rgba(224, 36, 94, .3); }
.cosmos .sig-boom { background: rgba(16, 185, 129, .1); color: var(--c-up); border: 1px solid rgba(16, 185, 129, .35); }
.cosmos .sig-buzz { background: rgba(124, 92, 240, .1); color: #7c5cf0; border: 1px solid rgba(124, 92, 240, .35); }
.cosmos .sig-fake { background: rgba(217, 119, 6, .1); color: #b45309; border: 1px solid rgba(217, 119, 6, .3); }
.cosmos .rel-chip { color: var(--c-faint); border-color: var(--c-line); }
.cosmos .outlook-box { background: rgba(255, 255, 252, .8); border: 1px solid var(--c-line); }
.cosmos .ob-up { background: rgba(16, 185, 129, .1); } .cosmos .ob-dn { background: rgba(224, 36, 94, .09); }
.cosmos .ob-up .ob-score { color: var(--c-up); } .cosmos .ob-dn .ob-score { color: var(--c-dn); }
.cosmos .ob-lbl { color: var(--c-soft); }

/* ── 종목 타일·급부상 ── */
.cosmos .mover { background: rgba(255, 255, 252, .7); border-color: var(--c-line); color: var(--c-ink); }
.cosmos .mover:hover { border-color: var(--c-line-hi); box-shadow: 0 0 16px rgba(124, 92, 240, .15); }
.cosmos .mv-buzz { color: #7c5cf0; }
.cosmos .stock-tile { background: rgba(255, 255, 252, .7); border-color: var(--c-line); color: var(--c-ink); }
.cosmos .stock-tile:hover {
  border-color: var(--c-line-hi);
  box-shadow: 0 8px 22px rgba(99, 102, 180, .13), 0 0 14px rgba(124, 92, 240, .1);
}
.cosmos .stock-tile.has-risk { border-left: 3px solid var(--c-dn); }
.cosmos .st-name { color: var(--c-ink); }
.cosmos .st-n { color: var(--c-faint); }
.cosmos .sent-bar { background: rgba(129, 140, 220, .15); }
.cosmos .sent-bar .sb-up { background: var(--c-up); }
.cosmos .sent-bar .sb-dn { background: var(--c-dn); }
.cosmos .pos { color: var(--c-up); } .cosmos .neg { color: var(--c-dn); }

/* ── 신호·의심 피드 ── */
.cosmos .ev-article {
  background: rgba(255, 255, 252, .66); border-color: var(--c-line);
  transition: all .15s;
}
.cosmos .ev-article:hover { background: rgba(255, 255, 255, .95); border-color: var(--c-line-hi); }
.cosmos .ev-article .a-title { color: var(--c-ink); }
.cosmos .ev-article .a-meta { color: var(--c-faint); }
.cosmos .ev-article .a-meta b { color: var(--c-soft); }
.cosmos .ev-article.suspicious { background: rgba(254, 243, 220, .75); border-left: 3px solid #d97706; }
.cosmos .fake-card { border-top: 3px solid #d97706; }
.cosmos .card-inset { background: rgba(248, 246, 253, .8); border-color: var(--c-line); }

/* 스파크라인 공통 */
.cosmos .spark polyline { stroke: #7c5cf0; }
.cosmos .spark polyline:first-child { fill: rgba(124, 92, 240, .08); }

@media (max-width: 900px) {
  .cosmos { margin: -10px -18px; }
}
/* ── 볼트 그래프 — F5.wiki 대시보드 지식 그래프(card-dark) 포팅 ── */
.vault-card {
  background: linear-gradient(180deg, #fbfcff 0%, #f1f4fe 100%);
  overflow: hidden;
}
.vault-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px 4px;
}
.vault-count {
  font-size: 10px; color: #64748b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vault-hint { margin-left: auto; font-size: 10px; color: #64748b; white-space: nowrap; }
.vault-map { position: relative; padding: 0 8px 8px; }
.vault-map canvas {
  display: block; width: 100%; height: 420px;
  border-radius: 12px; cursor: grab;
}
.vault-tip {
  position: absolute; display: none; pointer-events: none; z-index: 10;
  background: rgba(255, 255, 255, .95); color: #334155;
  font-size: 11px; font-weight: 500; padding: 4px 8px; border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, .12);
  border: 1px solid #cbd5e1;
  max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vlg {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; user-select: none; z-index: 2;
}
.vlg-l { left: 20px; }
.vlg-r { right: 20px; text-align: right; }
.vlg-r .vs-row { justify-content: flex-end; }
.vs-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; line-height: 16px; color: #64748b; white-space: nowrap;
}
.vs-num { font-weight: 600; color: #1e293b; }
.vs-unit { color: #94a3b8; }
.vs-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; flex-shrink: 0;
}
.vault-legend {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 20px 12px; font-size: 10px; color: #64748b;
}
.vl-lg { display: inline-flex; align-items: center; gap: 4px; }
.vl-lg i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.vault-tag { margin-left: auto; color: #94a3b8; }
@media (max-width: 768px) {
  .vlg { display: none; }
  .vault-map canvas { height: 340px; }
}

/* ── 인사이트 (파생 신호) ── */
.ins-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.ins-card .section-title { margin-bottom: 10px; }
.ins-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 2px; border-top: 1px dashed var(--line);
  cursor: default;
}
.ins-row.clickable { cursor: pointer; }
.ins-row.clickable:hover .ins-name { color: var(--accent); }
.ins-rank {
  font-family: var(--serif); font-weight: 800; font-size: 12px;
  color: var(--ink-faint); width: 16px; flex-shrink: 0; text-align: right;
}
.ins-name {
  font-weight: 700; font-size: 13.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex: 1 1 auto;
}
.ins-meta {
  margin-left: auto; font-size: 11px; color: var(--ink-faint);
  white-space: nowrap; flex-shrink: 0;
}
.ins-x {
  font-family: var(--serif); font-weight: 800; font-size: 12.5px;
  color: var(--accent); flex-shrink: 0;
  background: var(--accent-soft); border-radius: 6px; padding: 1px 7px;
}
.ins-x.hot { color: #b3261e; background: rgba(179, 38, 30, .1); }
.ins-cl { grid-column: 1 / -1; }
.ins-cluster {
  padding: 10px 0; border-top: 1px dashed var(--line);
}
.ins-cl-kws {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.ins-kw {
  font-family: var(--serif); font-weight: 800; font-size: 12px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 8px; padding: 2px 9px; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ins-cl-art .rm { flex-shrink: 0; }
.ins-kw:hover { filter: brightness(.94); }
.ins-cl-n {
  font-size: 11.5px; font-weight: 700; color: var(--ink-faint);
  margin-left: 2px;
}
.ins-cl-art {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 2px 4px 14px; cursor: pointer; font-size: 12.5px;
}
.ins-cl-art:hover .ins-cl-t { color: var(--accent); }
.ins-cl-t {
  color: var(--ink); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; min-width: 0;
}
@media (max-width: 900px) {
  .ins-grid { grid-template-columns: 1fr; }
}
