:root {
  --bg: #0f1218;
  --panel: #171b23;
  --panel-2: #1e232d;
  --line: #2a303c;
  --text: #e6e9ef;
  --muted: #9aa3b2;
  --accent: #f0b90b;      /* 바이낸스 옐로 */
  --up: #e5484d;          /* 국내 관례: 상승/매수 = 빨강 */
  --down: #3e7bfa;        /* 하락/매도 = 파랑 */
  --long: #16c784;
  --short: #ea3943;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.6; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
main.container { padding-top: 28px; padding-bottom: 48px; min-height: 70vh; }
main.narrow { max-width: 820px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 800; font-size: 20px; color: var(--text); }
.logo span { color: var(--accent); }
.site-header nav a { color: var(--muted); margin-left: 20px; font-weight: 600; }
.site-header nav a.active, .site-header nav a:hover { color: var(--text); text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 24px 0; }
.site-footer a { color: var(--muted); }
.disclaimer { max-width: 900px; }

.hero { padding: 40px 0 24px; }
.hero h1 { font-size: 34px; margin: 0 0 8px; }
.hero p { color: var(--muted); max-width: 720px; }
.btn { display: inline-block; background: var(--accent); color: #111; font-weight: 700; padding: 10px 18px; border-radius: 8px; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }

.post-list { list-style: none; padding: 0; }
.post-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.post-list a { font-size: 18px; font-weight: 700; color: var(--text); }
.post-list time { color: var(--muted); font-size: 13px; margin-left: 10px; }
.post-list p { color: var(--muted); margin: 6px 0 0; }
.post-date { color: var(--muted); font-size: 14px; }
.post-body { max-width: 820px; }
.post-body img { max-width: 100%; }
.post-body table { border-collapse: collapse; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 6px 10px; }
.ad-slot { margin: 24px 0; min-height: 90px; }

/* ===== Dashboard ===== */
.dash-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.dash-head h1 { margin: 0; font-size: 26px; }
.dash-meta { color: var(--muted); font-size: 13px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.tab { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; }
.tab.active { background: var(--accent); color: #111; border-color: var(--accent); }
.tab .badge { font-size: 11px; margin-left: 6px; opacity: .7; }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.summary-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.summary-card:hover { border-color: var(--accent); }
.summary-card h3 { margin: 0 0 6px; font-size: 15px; }
.summary-card .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.summary-card .row b { color: var(--text); }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .compare-grid { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.card.binance h2::before { content: "●"; color: var(--accent); margin-right: 6px; }
.card.krx h2::before { content: "●"; color: var(--up); margin-right: 6px; }
.chart-box { position: relative; height: 240px; margin-bottom: 12px; }
.chart-box.small { height: 180px; }
.kpis { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.kpi { min-width: 110px; }
.kpi .label { font-size: 12px; color: var(--muted); }
.kpi .value { font-size: 20px; font-weight: 800; }
.ratio-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 12px; font-weight: 700; margin: 6px 0 12px; }
.ratio-bar div { display: flex; align-items: center; justify-content: center; color: #fff; white-space: nowrap; transition: width .4s; }
.ratio-bar .l { background: var(--long); }
.ratio-bar .s { background: var(--short); }
.ratio-bar .b { background: var(--up); }
.ratio-bar .d { background: var(--down); }
.empty { color: var(--muted); padding: 40px 0; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
.notice { background: var(--panel-2); border-left: 3px solid var(--accent); padding: 10px 14px; font-size: 13px; color: var(--muted); border-radius: 4px; margin-bottom: 16px; }

.table-wrap { overflow-x: auto; max-height: 520px; overflow-y: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.data th { position: sticky; top: 0; background: var(--panel-2); color: var(--muted); font-weight: 600; z-index: 1; }
table.data td:first-child, table.data th:first-child { text-align: left; }
table.data tr.sum td { font-weight: 800; background: var(--panel-2); }
.pos { color: var(--up); }
.neg { color: var(--down); }
.agree { color: var(--long); font-weight: 700; }
.diverge { color: var(--accent); font-weight: 700; }
.legend-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ===== Mobile ===== */
.site-header nav { white-space: nowrap; }
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .header-inner { height: 52px; }
  .logo { font-size: 16px; }
  .site-header nav a { margin-left: 12px; font-size: 14px; }
  main.container { padding-top: 16px; }
  .hero h1 { font-size: 26px; }
  .dash-head h1 { font-size: 20px; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-card { padding: 10px; }
  .summary-card h3 { font-size: 14px; }
  .summary-card h3 .sub { display: block; font-size: 11px; }
  .summary-card .row { font-size: 12px; }
  .card { padding: 12px; }
  .kpis { gap: 10px; }
  .kpi { min-width: calc(50% - 10px); }
  .kpi .value { font-size: 17px; }
  .chart-box { height: 200px; }
  .chart-box.small { height: 160px; }
  .tab { padding: 6px 11px; font-size: 13px; }
}

/* ===== 단타 ===== */
.sc-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg-btn { background: transparent; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; }
.seg-btn.active { background: var(--accent); color: #111; }
.chk { color: var(--muted); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.tab:disabled { opacity: .5; cursor: wait; }
.sc-grid { display: grid; grid-template-columns: minmax(360px, 480px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .sc-grid { grid-template-columns: 1fr; } }
.sc-table-wrap { max-height: 760px; }
.sc-table tbody tr { cursor: pointer; }
.sc-table tbody tr:hover { background: var(--panel-2); }
.sc-table tr.sel td { background: rgba(240,185,11,.12); }
.sc-table td.nm { text-align: left; white-space: normal; min-width: 110px; }
.sc-table td.nm .sub { display: block; font-size: 11px; color: var(--muted); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; white-space: nowrap; background: var(--panel-2); color: var(--text); }
.badge.sm { padding: 2px 7px; font-size: 11px; }
.b-buy { background: rgba(22,199,132,.18); color: #34d399; }
.b-sell { background: rgba(234,57,67,.18); color: #f87171; }
.b-warn { background: rgba(240,185,11,.18); color: var(--accent); }
.b-neutral { background: var(--panel-2); color: var(--muted); }
.sc-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: start; margin-bottom: 12px; }
.sc-head h2 { margin: 0; }
.sc-verdict { display: flex; gap: 12px; align-items: flex-start; background: var(--panel-2); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.sc-verdict .badge { font-size: 15px; padding: 6px 12px; }
.v-title { font-weight: 800; }
.v-text { color: var(--muted); font-size: 14px; margin-top: 2px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 640px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--panel-2); border-radius: 8px; padding: 10px; border-top: 3px solid var(--line); }
.plan .label { font-size: 12px; color: var(--muted); }
.plan .value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan .sub { font-size: 11px; color: var(--muted); }
.plan-buy { border-top-color: #16c784; }
.plan-stop { border-top-color: #ea3943; }
.plan-tgt { border-top-color: #3e7bfa; }
.sc-chart { height: 380px; margin-bottom: 4px; }
@media (max-width: 640px) { .sc-chart { height: 300px; } }
.sc-ctx { margin-top: 12px; }
.sc-ctx .kpi.wide { flex-basis: 100%; }
.sc-ctx .txt { font-size: 13px; color: var(--muted); }
.sc-ctx small { font-size: 12px; color: var(--muted); }
.sc-h3 { font-size: 15px; margin: 16px 0 8px; }
.pat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.pat-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pat-h .sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.pat-no { color: var(--accent); font-weight: 800; }
.pat-d { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pat-plan { font-size: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.calc { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.calc label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 4px; }
.calc input { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 8px; width: 150px; font-size: 14px; }
.calc-out { font-size: 14px; flex-basis: 100%; }
table.rules td { white-space: normal; text-align: left; min-width: 90px; }

/* ===== 종합투자 ===== */
.sel { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 7px 12px; font-weight: 600; }
.mood-card { padding: 16px 20px; }
.mood-head { display: flex; justify-content: space-between; align-items: end; }
.mood-label { font-size: 26px; font-weight: 900; }
.mood-score { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; }
.gauge { position: relative; height: 10px; border-radius: 6px; margin-top: 10px;
  background: linear-gradient(90deg, #3e7bfa 0%, #2a303c 45%, #2a303c 55%, #e5484d 100%); }
.gauge-mark { position: absolute; top: -5px; width: 4px; height: 20px; background: #fff; border-radius: 2px; transform: translateX(-2px); transition: left .4s; }
.gauge-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.mk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .mk-cards { grid-template-columns: 1fr; } }
.mk-card { margin-bottom: 4px; }
.mk-top { display: flex; justify-content: space-between; align-items: center; }
.mk-top h3 { margin: 0; font-size: 16px; }
.mk-price { font-size: 22px; font-weight: 800; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.mk-price span { font-size: 15px; }
.mk-row { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.mk-row span:first-child { color: var(--muted); }
.mk-row.sm { font-size: 12px; }
.story { padding-left: 18px; margin: 8px 0 14px; }
.story li { margin-bottom: 8px; line-height: 1.6; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.part { display: grid; grid-template-columns: 110px 1fr 40px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.part b { text-align: right; }
.pbar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.pbar .pp { height: 100%; background: #e5484d; }
.pbar .pn { height: 100%; background: #3e7bfa; }
.chart-box.tall { height: 300px; }
table.data .strong { font-weight: 900; }
table.data .mid { font-weight: 700; }
table.data .weak { opacity: .7; }

/* ===== 홈 ===== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 24px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }
.card.feature { display: flex; flex-direction: column; color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; margin-bottom: 0; }
.card.feature:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.f-tag { display: inline-block; align-self: flex-start; background: rgba(240,185,11,.15); color: var(--accent); font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.card.feature h3 { margin: 10px 0 6px; font-size: 18px; }
.card.feature p { color: var(--muted); font-size: 14px; margin: 0 0 12px; flex: 1; }
.f-go { color: var(--accent); font-weight: 700; font-size: 14px; }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.home-live { margin-bottom: 16px; }
.home-live-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.home-mood { font-size: 24px; font-weight: 900; }
.home-mood b { font-size: 20px; margin-left: 6px; }
.home-live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 640px) { .home-live-grid { grid-template-columns: 1fr; } }
.hl-m { background: var(--panel-2); border-radius: 8px; padding: 10px 12px; }
.hl-n { font-size: 14px; color: var(--muted); }
.hl-n b { color: var(--text); font-size: 16px; }
.hl-r { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-top: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ===== 모바일 메뉴: 가로로 밀어서 보기 ===== */
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .logo { flex-shrink: 0; font-size: 15px; }
  .site-header nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 16px; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a { margin-left: 0; margin-right: 12px; font-size: 14px; }
  .hero { padding: 24px 0 12px; }
  .hero h1 { font-size: 24px; }
}
