/* 투자엔진 — 전문 금융 터미널 수준의 디자인 시스템.
 * 다들과 톤이 다르다: 다크 테마 기본, 캔들 차트 색상 체계,
 * 모노스페이스 숫자 폰트, 게이지/바/차트 컴포넌트, 티커 테이프.
 * 색은 전부 CSS 변수 — 다크/라이트 한 블록씩 갈아끼운다. */

:root {
  /* 라이트 모드 (금융 터미널 라이트) */
  --bg: #f7f8fa;
  --card: #ffffff;
  --bg-soft: #eef1f4;
  --bg-soft2: #e4e8ec;
  --line: #e0e4ea;
  --line-strong: #cdd3da;
  --txt: #0f1115;
  --txt-2: #3f4754;
  --txt-3: #7a838e;
  --blue: #2563eb;
  --blue-soft: #eaf2ff;
  --green: #16a34a;
  --green-soft: #e7f7ef;
  --amber: #d97706;
  --amber-soft: #fef3e3;
  --red: #dc2626;
  --red-soft: #fdeced;
  --pur: #7c3aed;
  --pur-soft: #f3efff;
  --teal: #0d9488;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15,17,21,.06), 0 1px 2px rgba(15,17,21,.04);
  --shadow-lg: 0 10px 30px rgba(15,17,21,.08), 0 4px 12px rgba(15,17,21,.06);
  --txt-inv: #ffffff;
  --hd-bg: rgba(247,248,250,.92);
  --hd-bg2: rgba(247,248,250,.95);
  --ok-bg: #e7f7ef;  --ok-fg: #15803d;
  --wr-bg: #fef3e3;  --wr-fg: #92400e;
  --no-bg: #fdeced;  --no-fg: #b91c1c;
  --info-fg: #1d4ed8;
  --ph: #b0b8c1;
  --skel1: #eef1f4;  --skel2: #e4e8ec;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --grid: rgba(15,17,21,.06);
  --mono: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', ui-monospace, 'Cascadia Code', monospace;
}

/* 색은 전부 변수로만 쓴다. 다크는 이 블록 하나만 갈아끼우면 끝. */
[data-theme="dark"] {
  --bg: #0a0b0e;
  --card: #14161b;
  --bg-soft: #1a1d24;
  --bg-soft2: #232730;
  --line: #262a32;
  --line-strong: #363b46;
  --txt: #e8eaef;
  --txt-2: #a0a8b4;
  --txt-3: #6c7480;
  --blue: #5b8def;
  --blue-soft: #15203a;
  --green: #22c55e;
  --green-soft: #0f2a1c;
  --amber: #f59e0b;
  --amber-soft: #2d2310;
  --red: #f87171;
  --red-soft: #2d1717;
  --pur: #a78bfa;
  --pur-soft: #1f1833;
  --teal: #2dd4bf;
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
  --txt-inv: #0a0b0e;
  --hd-bg: rgba(10,11,14,.9);
  --hd-bg2: rgba(10,11,14,.94);
  --ok-bg: #0f2a1c;  --ok-fg: #4ade80;
  --wr-bg: #2d2310;  --wr-fg: #fbbf24;
  --no-bg: #2d1717;  --no-fg: #fca5a5;
  --info-fg: #93c5fd;
  --ph: #4a5260;
  --skel1: #1a1d24;  --skel2: #232730;
  --panel: #14161b;
  --panel-2: #1a1d24;
  --grid: rgba(255,255,255,.06);
}

html { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}

p, span, b, em, i, u, q, h1, h2, h3, div, button, textarea { overflow-wrap: anywhere; }

/* 숫자는 모노스페이스 — 금융 터미널 관례. 자릿수 정렬이 맞는다. */
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.col { max-width: 680px; margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 ---------- */
.hd {
  position: sticky; top: 0; z-index: 60;
  background: var(--hd-bg);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.hd-in { max-width: 1100px; margin: 0 auto; padding: 0 20px; height: 54px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 6px; color: var(--txt); text-decoration: none; transition: opacity .15s; }
.logo:hover { opacity: .62; }
.logo-m { display: block; width: 22px; height: 22px; flex-shrink: 0; }
.logo-w { font-size: 17px; font-weight: 800; letter-spacing: -0.07em; line-height: 1; }
.hd-r { display: flex; align-items: center; gap: 12px; }
.theme {
  flex-shrink: 0; width: 32px; height: 32px; border: 1px solid var(--line); background: var(--card);
  border-radius: 50%; color: var(--txt-2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s;
}
.theme:hover { color: var(--txt); border-color: var(--line-strong); }
.theme .moon { display: none; }
[data-theme="dark"] .theme .moon { display: block; }
[data-theme="dark"] .theme .sun { display: none; }

/* ---------- 티커 테이프 ---------- */
.ticker {
  overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-soft);
  height: 34px; display: flex; align-items: center;
}
.ticker-in {
  display: flex; gap: 24px; white-space: nowrap; animation: tickerScroll 40s linear infinite;
  padding: 0 20px; font-size: 12.5px; color: var(--txt-2);
}
.ticker-in:hover { animation-play-state: paused; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.tk-item { display: inline-flex; align-items: center; gap: 6px; }
.tk-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--bg-soft2); color: var(--txt-3); }
.tk-up { color: var(--green); font-weight: 600; }
.tk-dn { color: var(--red); font-weight: 600; }

/* ---------- 섹션 바로가기 ---------- */
.subnav {
  position: sticky; top: 54px; z-index: 55;
  background: var(--hd-bg2);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.subnav-in {
  max-width: 1100px; margin: 0 auto; padding: 8px 20px;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.subnav-in::-webkit-scrollbar { display: none; }
.nv {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  color: var(--txt-3); background: transparent; border: 1px solid transparent; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.nv:hover { color: var(--txt-2); }
.nv.on { background: var(--txt); color: var(--txt-inv); }
.nv .pend { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); animation: pulse 1.1s ease-in-out infinite; }
.nv.on .pend { background: var(--txt-inv); opacity: .6; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- 홈 ---------- */
.home { padding: 3.6vh 20px 0; }
.hh { font-size: 27px; font-weight: 800; line-height: 1.34; letter-spacing: -0.05em; text-align: center; }
.hh-s { text-align: center; color: var(--txt-2); font-size: 15px; margin-top: 10px; margin-bottom: 28px; line-height: 1.5; }

/* 입력 카드 */
.cp {
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card);
  padding: 16px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.cp:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.cp textarea {
  width: 100%; border: none; outline: none; resize: none; background: transparent;
  font-family: inherit; font-size: 16px; color: var(--txt); line-height: 1.5; min-height: 24px;
}
.cp textarea::placeholder { color: var(--ph); }
.cp-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.count { font-size: 12px; color: var(--txt-3); font-family: var(--mono); }
.send {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--txt);
  color: var(--txt-inv); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: opacity .15s, transform .1s;
}
.send:hover { opacity: .85; }
.send:active { transform: scale(.92); }
.send:disabled { opacity: .3; cursor: not-allowed; }

/* 예시 칩 */
.chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; color: var(--txt-2); cursor: pointer; transition: all .15s; line-height: 1.3;
}
.chip:hover { border-color: var(--line-strong); color: var(--txt); background: var(--bg-soft); }
.chips-more {
  margin-top: 10px; background: none; border: none; color: var(--txt-3); font-size: 13px;
  cursor: pointer; padding: 4px 0; font-family: inherit;
}
.chips-more:hover { color: var(--txt-2); }

/* 실시간 화제 */
.live { margin-top: 36px; }
.live-h { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: livePulse 1.4s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(220,38,38,.4); } 50% { opacity: .6; box-shadow: 0 0 0 6px rgba(220,38,38,0); } }
.live-t { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; }
.live-when { margin-left: auto; font-size: 12px; color: var(--txt-3); }
.live-list { display: flex; flex-direction: column; gap: 8px; }
.live-sk { height: 52px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--skel1), var(--skel2), var(--skel1)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.live-i {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: all .15s;
  text-decoration: none; color: inherit; width: 100%; text-align: left; font-family: inherit;
}
.live-i:hover { border-color: var(--line-strong); background: var(--bg-soft); transform: translateY(-1px); box-shadow: var(--shadow); }
.live-i.done { border-color: var(--green); }
.live-tag { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 5px; letter-spacing: -0.02em; }
.live-tag.t0 { background: var(--blue-soft); color: var(--blue); }
.live-tag.t1 { background: var(--green-soft); color: var(--green); }
.live-tag.t2 { background: var(--amber-soft); color: var(--amber); }
.live-tag.t3 { background: var(--pur-soft); color: var(--pur); }
.live-tag.t4 { background: var(--red-soft); color: var(--red); }
.live-q { flex: 1; font-size: 14px; font-weight: 500; line-height: 1.4; }
.live-badge { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--green-soft); color: var(--green); }
.live-go { flex-shrink: 0; color: var(--txt-3); }
.live-more { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--txt-3); text-decoration: none; }
.live-more:hover { color: var(--txt-2); }

/* ---------- 미리보기 ---------- */
.pv-k { font-size: 12px; font-weight: 700; color: var(--txt-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.pv {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow); overflow: hidden;
}
.pv-body { padding: 20px; }
.pv-q { display: flex; gap: 10px; margin-bottom: 16px; }
.pv-qi {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--blue);
  color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.pv-q p { font-size: 15px; font-weight: 600; line-height: 1.5; min-height: 24px; }
.pv-q p::after { content: '▎'; color: var(--blue); animation: blink 1s steps(1) infinite; }
.pv-q.done p::after { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.pv-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.pv-t {
  flex: 1; padding: 8px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft);
  font-size: 12.5px; font-weight: 600; color: var(--txt-3); cursor: pointer; transition: all .15s; font-family: inherit;
}
.pv-t:hover { color: var(--txt-2); }
.pv-t.on { background: var(--txt); color: var(--txt-inv); border-color: var(--txt); }
.pv-stage { min-height: 180px; }
.pv-in { animation: pvFade .35s ease; }
@keyframes pvFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* 미리보기 내부 요소 */
.pv-poll { margin-bottom: 14px; }
.pv-seg { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--txt-2); }
.pv-seg b { font-family: var(--mono); }
.pv-row { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.pv-av { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pv-n { font-size: 12px; color: var(--txt-3); }
.pv-n u { text-decoration: none; color: var(--txt-3); }
.pv-row p { font-size: 13.5px; margin-top: 3px; line-height: 1.45; }
.pv-re { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); }
.pv-buy { padding: 4px 0; }
.pv-buy-t { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.pv-buy-w { font-size: 12px; color: var(--txt-3); }
.pv-why { font-size: 13px; color: var(--txt-2); margin: 8px 0; line-height: 1.5; }
.pv-links { display: flex; gap: 8px; margin-top: 12px; }
.pv-l { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 8px; background: var(--bg-soft); font-size: 12px; color: var(--blue); text-decoration: none; }
.pv-l:hover { background: var(--blue-soft); }
.pv-alt { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--txt-2); }
.pv-alt b { color: var(--txt); }
.pv-alt-l { margin-left: auto; font-size: 11px; color: var(--txt-3); }
.pv-tone { display: flex; gap: 6px; margin-bottom: 14px; }
.pv-tone span { flex: 1; text-align: center; padding: 7px 0; border-radius: 8px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--txt-3); }
.pv-tone span.on { background: var(--txt); color: var(--txt-inv); border-color: var(--txt); }
.pv-kk { }
.pv-kk .who { font-size: 11px; color: var(--txt-3); margin: 10px 0 6px; }
.pv-kk .who.r { text-align: right; }

/* ---------- 로딩 ---------- */
.loading { text-align: center; padding: 80px 20px; }
.spinner { width: 36px; height: 36px; margin: 0 auto 18px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--txt-2); font-size: 15px; font-weight: 600; }
.prog { margin: 20px auto 0; max-width: 260px; height: 4px; border-radius: 2px; background: var(--bg-soft2); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 2px; transition: width .6s ease; }

/* ---------- 결과 레이아웃 ---------- */
.res-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; max-width: 1100px; margin: 0 auto; padding: 20px; }
.res-main { min-width: 0; }
.res-side { position: sticky; top: 120px; align-self: start; }
@media (max-width: 920px) { .res-grid { grid-template-columns: 1fr; } .res-side { position: static; } }

.back {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px;
  background: none; border: none; color: var(--txt-3); font-size: 13px; cursor: pointer; font-family: inherit;
  padding: 6px 0;
}
.back:hover { color: var(--txt-2); }

/* 질문 카드 */
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.post-q { font-size: 18px; font-weight: 700; line-height: 1.45; letter-spacing: -0.03em; }
.post-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--txt-3); }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--txt-3); }

/* ---------- 판정 히어로 (verdict strip) ---------- */
.strip {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.strip::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.strip.v-buy::before { background: var(--green); }
.strip.v-hold::before { background: var(--amber); }
.strip.v-sell::before { background: var(--red); }
.v-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800;
  padding: 5px 14px; border-radius: 8px; letter-spacing: -0.02em;
}
.v-buy { background: var(--ok-bg); color: var(--ok-fg); }
.v-hold { background: var(--wr-bg); color: var(--wr-fg); }
.v-sell { background: var(--no-bg); color: var(--no-fg); }
.strip-h { font-size: 22px; font-weight: 800; line-height: 1.35; letter-spacing: -0.04em; margin-top: 14px; }
.strip-line { font-size: 15px; color: var(--txt-2); margin-top: 8px; line-height: 1.5; }

/* 시장 체감 온도계 */
.sentiment { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.gauge { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--bg-soft2); stroke-width: 8; }
.gauge-fg { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.gauge-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-num { font-family: var(--mono); font-size: 22px; font-weight: 800; letter-spacing: -0.04em; }
.gauge-lbl { font-size: 9px; color: var(--txt-3); margin-top: -2px; }
.sent-info { flex: 1; }
.sent-label { font-size: 13px; font-weight: 700; }
.sent-split { display: flex; gap: 12px; margin-top: 8px; }
.sent-side { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.sent-side .dd { width: 8px; height: 8px; border-radius: 2px; }
.sent-side .pp { font-family: var(--mono); font-weight: 700; }

/* 여론 세그먼트 바 */
.strip-q { font-size: 12px; color: var(--txt-3); margin: 18px 0 8px; }
.segbar { display: flex; height: 28px; border-radius: 7px; overflow: hidden; }
.segbar i { display: block; height: 100%; transition: width .5s ease; }
.seglist { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.seg-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--txt-2); }
.seg-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.seg-pct { font-family: var(--mono); font-weight: 700; color: var(--txt); }

/* 근거 기사 접기 */
.gr { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.gr-s { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; background: var(--bg-soft); list-style: none; font-size: 13px; }
.gr-s::-webkit-details-marker { display: none; }
.gr-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.gr-lbl { flex: 1; color: var(--txt-2); }
.gr-lbl b { color: var(--txt); font-family: var(--mono); }
.gr-x { font-size: 12px; color: var(--blue); }
.gr-l { list-style: none; padding: 4px 14px 8px; }
.gr-l li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.gr-t { display: block; color: var(--txt); line-height: 1.4; }
.gr-m { display: block; font-size: 11px; color: var(--txt-3); margin-top: 3px; }
.gr-f { padding: 10px 14px; font-size: 11px; color: var(--txt-3); border-top: 1px solid var(--line); background: var(--bg-soft); }

/* ---------- 섹션 공통 ---------- */
.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.sec.fade { animation: secFade .4s ease; }
@keyframes secFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.sec-hd { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.sec-n { flex-shrink: 0; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--txt-3); padding-top: 2px; }
.sec-t { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; }
.sec-d { font-size: 13px; color: var(--txt-3); margin-top: 4px; line-height: 1.45; }
.sec-x { margin-left: auto; flex-shrink: 0; font-size: 12px; color: var(--txt-3); font-family: var(--mono); font-weight: 600; }
.sec-d[style] { margin: 0; }
.sub-t { font-size: 14px; font-weight: 700; margin: 20px 0 10px; }

/* 스켈레톤 */
.skel { padding: 4px 0; }
.skel i { display: block; height: 12px; border-radius: 4px; margin-bottom: 10px; background: linear-gradient(90deg, var(--skel1), var(--skel2), var(--skel1)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }

/* 콜아웃 */
.callout { padding: 14px 16px; border-radius: var(--radius-sm); margin-top: 14px; font-size: 13.5px; line-height: 1.5; }
.callout b { display: block; font-size: 12px; margin-bottom: 4px; }
.callout.gray { background: var(--bg-soft); color: var(--txt-2); }
.callout.gray b { color: var(--txt); }
.callout.dark { background: var(--bg-soft2); }
.callout.info { background: var(--blue-soft); color: var(--info-fg); }
.callout.warn { background: var(--wr-bg); color: var(--wr-fg); }
.callout.warn b { color: var(--wr-fg); }

/* 타이핑 인디케이터 */
.typing { display: flex; gap: 4px; padding: 12px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--txt-3); animation: typingBounce 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.wait-line { text-align: center; padding: 12px; color: var(--txt-3); font-size: 13px; }
.pin { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--no-bg); color: var(--no-fg); margin-top: 14px; font-size: 13.5px; line-height: 1.5; }
.pin b { display: block; font-size: 12px; margin-bottom: 4px; }

/* ---------- 댓글 (투자자 토론) ---------- */
.cmt { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.cmt:first-child { border-top: none; }
.cmt.pop { animation: cmtPop .3s ease; }
@keyframes cmtPop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.av { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cmt-main { flex: 1; min-width: 0; }
.cmt-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.cmt-nick { font-size: 13px; font-weight: 700; }
.st { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.st-bull { background: var(--ok-bg); color: var(--ok-fg); }
.st-bear { background: var(--no-bg); color: var(--no-fg); }
.st-neutral { background: var(--bg-soft2); color: var(--txt-3); }
.cmt-tag { font-size: 11px; color: var(--txt-3); padding: 1px 6px; border-radius: 4px; background: var(--bg-soft); }
.cmt-txt { font-size: 14px; line-height: 1.5; color: var(--txt); }
.cmt-ft { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--txt-3); }
.cmt-ft b { font-family: var(--mono); color: var(--txt-2); }
.re { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--line); }
.re-item { padding: 8px 0; }
.re-item .cmt-nick { font-size: 12px; }
.re-item .cmt-txt { font-size: 13px; }
.re-item .cmt-ft { margin-top: 4px; }

/* ---------- 해외 시장 ---------- */
.ab-item { padding: 16px 0; border-top: 1px solid var(--line); }
.ab-item:first-of-type { border-top: none; }
.ab-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cc { flex-shrink: 0; width: 24px; height: 18px; border-radius: 3px; font-size: 9px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; letter-spacing: .04em; }
.ab-plat { font-size: 13px; font-weight: 700; }
.ab-nick { font-size: 12px; color: var(--txt-3); }
.ab-orig { font-size: 12px; color: var(--txt-3); font-style: italic; margin-top: 4px; padding: 6px 10px; background: var(--bg-soft); border-radius: 6px; }
.ab-re { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--line); }
.ab-re > div { padding: 8px 0; }
.ab-re-n { font-size: 12px; font-weight: 700; }

/* ---------- 규제 지도 ---------- */
.nc { padding: 16px 0; border-top: 1px solid var(--line); }
.nc:first-of-type { border-top: none; }
.nc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nc-c { font-size: 14px; font-weight: 700; }
.nc-b { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-soft2); overflow: hidden; max-width: 120px; }
.nc-b i { display: block; height: 100%; border-radius: 3px; transition: width .5s ease; }
.nc-v { font-size: 12px; font-weight: 700; }
.nc-terms { font-size: 13px; margin-bottom: 6px; }
.nc-term { font-weight: 700; }
.nc-term em { font-style: normal; color: var(--txt-3); font-weight: 400; margin-left: 6px; }
.nc-l { font-size: 13.5px; color: var(--txt-2); line-height: 1.5; }
.nc-if { font-size: 13px; color: var(--txt-2); margin-top: 6px; line-height: 1.5; }
.nc-vs { font-size: 12.5px; color: var(--txt-3); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.gap2 { display: flex; gap: 16px; margin-bottom: 16px; }
.gapx { flex: 1; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-soft); }
.gapx b { display: block; font-size: 11px; color: var(--txt-3); margin-bottom: 4px; }
.gapx .gc { font-size: 14px; font-weight: 700; }
.gapx p { font-size: 12.5px; color: var(--txt-2); margin-top: 4px; line-height: 1.4; }

/* ---------- 종목 픽 ---------- */
.pick { padding: 16px 0; border-top: 1px solid var(--line); position: relative; }
.pick:first-of-type { border-top: none; }
.pk-badge { position: absolute; top: 16px; right: 0; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 5px; background: var(--blue-soft); color: var(--blue); }
.pk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; padding-right: 80px; }
.pk-name { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.pk-fit { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--txt-3); }
.pk-detail { font-size: 13px; color: var(--txt-2); margin-bottom: 8px; }
.pk-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tagbox { font-size: 12px; padding: 3px 10px; border-radius: 6px; background: var(--bg-soft); color: var(--txt-2); }
.tagbox.price { background: var(--green-soft); color: var(--green); font-family: var(--mono); font-weight: 700; }
.pk-why { font-size: 13px; color: var(--txt-2); line-height: 1.5; }
.verify { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.vf-k { font-size: 11px; color: var(--txt-3); }
.vf { font-size: 12px; padding: 5px 12px; border-radius: 7px; border: 1px solid var(--line); color: var(--blue); text-decoration: none; transition: all .15s; }
.vf:hover { background: var(--blue-soft); border-color: var(--blue); }
.pk-note { font-size: 11px; color: var(--txt-3); margin-top: 14px; }
.chk { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.chk-n { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-soft); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; color: var(--txt-3); }

/* ---------- 시나리오 분석 (새 모듈) ---------- */
.scen-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 18px; }
@media (max-width: 520px) { .scen-grid { grid-template-columns: 1fr; } }
.scen-card { padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); position: relative; overflow: hidden; }
.scen-card.bull { border-color: var(--green); background: linear-gradient(180deg, var(--green-soft), var(--card)); }
.scen-card.base { border-color: var(--blue); background: linear-gradient(180deg, var(--blue-soft), var(--card)); }
.scen-card.bear { border-color: var(--red); background: linear-gradient(180deg, var(--red-soft), var(--card)); }
.scen-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.scen-label { font-size: 14px; font-weight: 800; }
.scen-card.bull .scen-label { color: var(--green); }
.scen-card.base .scen-label { color: var(--blue); }
.scen-card.bear .scen-label { color: var(--red); }
.scen-prob { font-family: var(--mono); font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--card); }
.scen-target { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.scen-narr { font-size: 12.5px; color: var(--txt-2); line-height: 1.5; margin-bottom: 8px; }
.scen-trigger { font-size: 11.5px; color: var(--txt-3); padding-top: 8px; border-top: 1px dashed var(--line); }
.scen-trigger b { color: var(--txt-2); }

/* 확률 슬라이더 (시각화) */
.scen-slider { position: relative; height: 6px; border-radius: 3px; background: var(--bg-soft2); margin: 12px 0; overflow: hidden; }
.scen-slider i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; transition: width .6s ease; }
.scen-card.bull .scen-slider i { background: var(--green); }
.scen-card.base .scen-slider i { background: var(--blue); }
.scen-card.bear .scen-slider i { background: var(--red); }

/* 실행 계획 */
.act-step { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.act-step:first-of-type { border-top: none; }
.act-n { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.act-body { flex: 1; }
.act-what { font-size: 14px; font-weight: 700; line-height: 1.4; }
.act-when { font-size: 12px; color: var(--blue); margin-top: 4px; font-weight: 600; }
.act-why { font-size: 12.5px; color: var(--txt-2); margin-top: 4px; line-height: 1.45; }

/* 타이밍 */
.timing-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; }
@media (max-width: 520px) { .timing-grid { grid-template-columns: 1fr; } }
.timing-cell { padding: 12px; border-radius: var(--radius-sm); background: var(--bg-soft); }
.timing-cell b { display: block; font-size: 11px; color: var(--txt-3); margin-bottom: 6px; }
.timing-cell p { font-size: 12.5px; line-height: 1.45; }

/* 후회 분석 */
.rank { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.rank:first-of-type { border-top: none; }
.rank-n { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--no-bg); color: var(--no-fg); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.rank-t { flex: 1; font-size: 13px; line-height: 1.4; }
.rank-p { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--red); }

/* 신뢰도 */
.conf-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.conf-high { background: var(--ok-bg); color: var(--ok-fg); }
.conf-mid { background: var(--wr-bg); color: var(--wr-fg); }
.conf-low { background: var(--bg-soft2); color: var(--txt-3); }

/* ---------- 레버 (조건 변화 분석) ---------- */
.lv { padding: 16px 0; border-top: 1px solid var(--line); }
.lv:first-of-type { border-top: none; }
.lv-c { font-size: 14px; font-weight: 700; line-height: 1.4; }
.lv-e { font-size: 12.5px; color: var(--txt-2); margin-top: 4px; line-height: 1.45; }
.lv-m { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.lv-track { flex: 1; position: relative; height: 22px; border-radius: 5px; background: var(--bg-soft2); overflow: hidden; }
.lv-track i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 5px; transition: width .5s ease; }
.lv-track .a { background: var(--line-strong); }
.lv-track .b { background: var(--green); }
.lv-track.up .b { background: var(--red); }
.lv-track em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--txt-inv); text-shadow: 0 1px 2px rgba(0,0,0,.3); font-family: var(--mono); }
.lv-d { flex-shrink: 0; font-family: var(--mono); font-size: 13px; font-weight: 800; }
.lv-legend { display: flex; gap: 16px; margin-bottom: 14px; font-size: 11.5px; color: var(--txt-3); }
.lv-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

/* ---------- 사이드 카드 ---------- */
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: sticky; top: 120px; }
.side-h { font-size: 16px; font-weight: 800; line-height: 1.35; letter-spacing: -0.03em; margin-top: 12px; }
.side-l { font-size: 13px; color: var(--txt-2); margin-top: 6px; line-height: 1.45; }
.side-div { height: 1px; background: var(--line); margin: 16px 0; }
.side-k { font-size: 11px; font-weight: 700; color: var(--txt-3); text-transform: uppercase; letter-spacing: .04em; }
.side-v { font-size: 15px; font-weight: 800; margin-top: 4px; }
.side-p { font-size: 12px; color: var(--txt-3); margin-top: 2px; font-family: var(--mono); }
.side-btn { width: 100%; margin-top: 12px; padding: 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--txt); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; }
.side-btn:hover { background: var(--bg-soft); }
.side-btn.g { background: var(--txt); color: var(--txt-inv); border-color: var(--txt); }

/* ---------- 액션 버튼 ---------- */
.actions { display: flex; gap: 10px; margin-top: 8px; }
.a1, .a2 { flex: 1; padding: 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all .15s; }
.a1 { background: var(--txt); color: var(--txt-inv); border: none; }
.a1:hover { opacity: .85; }
.a2 { background: var(--card); color: var(--txt); border: 1px solid var(--line-strong); }
.a2:hover { background: var(--bg-soft); }
.btn-ghost { padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--txt-2); font-size: 13px; cursor: pointer; font-family: inherit; margin-top: 12px; }
.btn-ghost:hover { background: var(--bg-soft); color: var(--txt); }

/* ---------- 아카이브 ---------- */
.ar { padding: 40px 20px 60px; }
.ar-t { font-size: 24px; font-weight: 800; letter-spacing: -0.04em; }
.ar-s { color: var(--txt-2); font-size: 14px; margin: 8px 0 28px; line-height: 1.5; }
.ar-day { margin-bottom: 28px; }
.ar-d { font-size: 15px; font-weight: 700; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ar-d em { font-style: normal; font-size: 12px; color: var(--green); margin-left: 6px; }
.ar-list { display: flex; flex-direction: column; gap: 8px; }
.ar-i { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: all .15s; }
.ar-i:hover { border-color: var(--line-strong); background: var(--bg-soft); }
.ar-i.done { border-left: 3px solid var(--green); }
.ar-tag { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 5px; background: var(--bg-soft); color: var(--txt-3); }
.ar-body { flex: 1; min-width: 0; }
.ar-q { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.ar-h { display: block; font-size: 12px; color: var(--txt-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-r { flex-shrink: 0; font-size: 12px; color: var(--txt-3); font-weight: 600; }
.ar-r b { color: var(--green); }
.ar-empty { color: var(--txt-3); font-size: 14px; padding: 40px 0; text-align: center; }
.ar-back { display: inline-block; margin-top: 28px; font-size: 14px; color: var(--txt-3); text-decoration: none; }
.ar-back:hover { color: var(--txt-2); }

/* ---------- 푸터 ---------- */
.ft { padding: 40px 20px 60px; border-top: 1px solid var(--line); margin-top: 40px; }
.ft-brand { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.ft-disc { font-size: 11.5px; color: var(--txt-3); line-height: 1.6; max-width: 680px; }

/* ---------- 토스트 ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 24px; border-radius: 10px; background: var(--txt); color: var(--txt-inv);
  font-size: 13px; font-weight: 600; z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 모바일 ---------- */
@media (max-width: 640px) {
  .hh { font-size: 23px; }
  .strip-h { font-size: 19px; }
  .sec { padding: 18px; }
  .res-grid { padding: 14px; gap: 16px; }
  .home { padding: 2.5vh 16px 0; }
  .col { padding: 0 16px; }
  .pk-top { padding-right: 0; }
  .pk-badge { position: static; margin-bottom: 8px; }
}
