:root {
  /* 팔레트는 로고에서 뽑았다. 족집게의 파랑 #00489c, 빨강 #f01824.
     어두운 배경 위에서 읽히도록 명도만 올려 쓴다. 라임 계열은 로고와
     충돌해서 전부 걷어냈다. */
  --bg: #111823;
  --surface: #1b2634;
  --surface-2: #15202d;
  --line: #344256;
  --line-soft: #293547;
  --text: #f4f7fb;
  --muted: #a4b0c0;
  --dim: #78869a;

  /* 같은 파랑이라도 쓰임새마다 명도가 달라야 한다. 흰 글자를 얹는 면은
     충분히 어둡게(--brand-strong), 어두운 배경 위 글자는 밝게(--brand-tint). */
  --brand: #3d82eb;
  --brand-strong: #2768cc;
  --brand-tint: #aac8fb;
  --brand-deep: #00489c;
  --brand-soft: rgba(61,130,235,.16);
  --brand-line: rgba(88,151,246,.52);

  --green: #22c98a;
  --red: #ff5d64;
  --amber: #f2b84b;

  /* 이전 이름들을 브랜드 색으로 다시 묶는다 */
  --blue: var(--brand);
  --accent: var(--brand);
  --panel: var(--surface);
  --panel-2: var(--surface-2);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-width: 320px;
  /* 깊은 검정 대신 슬레이트 네이비를 써서 카드 경계와 본문을 또렷하게 한다. */
  background:
    radial-gradient(circle at 82% -12%, rgba(61, 130, 235, .24), transparent 34rem),
    radial-gradient(circle at 8% 8%, rgba(255, 255, 255, .035), transparent 24rem),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  /* Pretendard 는 /fonts/pretendard.css 에서 동적 서브셋으로 자체 호스팅한다.
     브라우저가 unicode-range 로 실제 쓰인 글자 범위만 내려받는다. */
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

button, input { font: inherit; }

main { width: min(1360px, calc(100% - 48px)); margin: 0 auto; }

/* ---- 1. 판단 히어로 ---- */
.verdict { padding: 26px 2px 22px; }
.verdict-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.verdict-clock { display: flex; align-items: center; gap: 14px; }

/* 배지 장식 없이 글자만. 범위(대표기업 103선)와 역할(투자 도우미)만 읽히면 된다. */
.flagship { display: inline-flex; align-items: baseline; gap: 7px; color: var(--muted); }
.flagship b { color: #cfd8e3; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.flagship i { color: #6b7889; font-style: normal; font-size: 11.5px; }
.flagship i::before { content: "· "; color: #4e5a6a; }

.verdict h1 {
  margin: 16px 0 10px;
  font-size: clamp(29px, 3.2vw, 42px);
  line-height: 1.16;
  letter-spacing: -.045em;
  font-weight: 800;
}
.verdict h1 em { color: var(--muted); font-style: normal; font-weight: 750; }
.verdict p { color: var(--muted); margin: 0; max-width: 640px; font-size: 13px; line-height: 1.7; }
.verdict p b { color: #cfd8e3; font-weight: 650; }
.action-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .42fr);
  gap: 10px;
  margin-top: 20px;
}
.verdict-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mood-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.vcount {
  display: block;
  padding: 11px 13px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.vcount.flat { cursor: default; }
.vcount:not(.flat):hover { transform: translateY(-2px); }
.vcount > span { display: block; font-size: 11px; }
.vcount strong { display: block; margin: 4px 0 3px; font: 800 25px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.03em; color: var(--text); }
.vcount small { display: block; color: #5f6b79; font-size: 9px; line-height: 1.5; }
.vcount.buy strong { color: var(--green); }
.vcount.buy.current, .vcount.buy:hover { border-color: rgba(51,209,122,.45); background: rgba(51,209,122,.07); }
.vcount.hold strong { color: #b9c4d4; }
.vcount.hold.current, .vcount.hold:hover { border-color: rgba(132,146,166,.5); background: rgba(132,146,166,.08); }
.vcount.take strong { color: var(--amber); }
.vcount.take.current, .vcount.take:hover { border-color: rgba(240,184,75,.45); background: rgba(240,184,75,.07); }
.vcount.short strong { color: var(--red); }
.vcount.short.current, .vcount.short:hover { border-color: rgba(255,98,92,.45); background: rgba(255,98,92,.07); }

.market-mood { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.mood-label { color: var(--muted); font-size: 11px; }
.market-mood strong { font-size: 19px; font-weight: 750; letter-spacing: -.03em; }
.market-mood strong.up { color: var(--green); }
.market-mood strong.down { color: var(--red); }
.mood-sub { color: #617083; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 0 2px 10px; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 750; letter-spacing: -.03em; }
.section-note { color: var(--dim); font-size: 11.5px; }
/* 이 화면이 어느 시간대를 다루는지 여기서 한 번 말한다. 같은 종목을 두고
   메인은 "사기", 단타는 "기다리세요"가 동시에 맞을 수 있는데, 안 적어 두면
   화면끼리 싸우는 것으로 읽힌다. */
.section-note b { color: var(--text); font-weight: 650; }
.section-note a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.section-note a:hover { color: var(--text); }

/* ---- 시장 상태 패널 ---- */
.session-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 18px 20px 6px;
}
.session-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.session-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #5d6877; }
.session-pill.open { color: var(--green); border-color: rgba(51,209,122,.32); background: rgba(51,209,122,.06); }
.session-pill.pre { color: var(--amber); border-color: rgba(226,161,60,.32); background: rgba(226,161,60,.06); }
.session-pill.pre::before { background: var(--amber); }
.session-pill.open::before { background: var(--green); box-shadow: 0 0 0 3px rgba(51,209,122,.14); }
.clocks { display: flex; gap: 16px; }
.clocks span { display: flex; align-items: baseline; gap: 6px; }
.clocks i { color: #617083; font-style: normal; font-size: 10px; }
.clocks b { font: 650 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.02em; }
.breadth { margin: 8px 0 0; }
.breadth-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.breadth-head b { font: 700 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.breadth-head span:first-child b { color: var(--green); }
.breadth-head span:last-child b { color: var(--red); }
.breadth-avg { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.breadth-bar { display: flex; gap: 3px; height: 6px; margin-top: 9px; }
.breadth-bar i { display: block; height: 100%; border-radius: 3px; transition: width .4s ease; }
.breadth-bar i:first-child { background: linear-gradient(90deg, rgba(51,209,122,.45), var(--green)); }
.breadth-bar i:last-child { background: linear-gradient(90deg, var(--red), rgba(255,98,92,.45)); }

/* ---- 2. 지수 타일 ---- */
.index-section, .desk-section { padding-bottom: 20px; }
.index-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.index-row.with-third { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, .62fr); }
.skeleton-tile { min-height: 210px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(17,23,31,.5); }
.index-tile {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 16px 18px 14px;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.index-tile:hover, .index-tile:focus-visible { border-color: #445466; transform: translateY(-2px); outline: none; }
.index-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.index-name b { font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.index-name i { margin-left: 7px; color: var(--muted); font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; }
.trend-badge {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.trend-badge.up { color: var(--green); border-color: rgba(51,209,122,.32); background: rgba(51,209,122,.06); }
.trend-badge.down { color: var(--red); border-color: rgba(255,98,92,.32); background: rgba(255,98,92,.06); }
.index-price { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.index-price strong { font-size: 30px; font-weight: 750; letter-spacing: -.035em; }
.delta { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.index-tile .spark { width: 100%; height: 58px; display: block; margin: 10px 0 6px; }
.index-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 10.5px; }
.index-timing { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.index-timing.golden { color: var(--green); }
.index-timing.death { color: var(--red); }
.range52 { position: relative; height: 3px; margin-top: 12px; border-radius: 2px; background: linear-gradient(90deg, rgba(255,98,92,.3), rgba(130,144,162,.25), rgba(51,209,122,.35)); }
.range52 i { position: absolute; top: -3px; width: 2px; height: 9px; border-radius: 2px; background: var(--text); transform: translateX(-1px); }
.index-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.index-foot b { color: #c3ccd8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 650; }
.index-foot b.up { color: var(--green); }
.index-foot b.down { color: var(--red); }
.index-stance { margin-left: auto; padding: 3px 8px; border-radius: 999px; font-size: 9.5px; background: rgba(130,144,162,.14); }
.index-stance.long { color: var(--green); background: rgba(51,209,122,.12); }
.index-stance.short { color: var(--red); background: rgba(255,98,92,.12); }

/* ---- 타점 vs 그냥 보유 ---- */
.edge-section { padding-bottom: 20px; }
.edge-card {
  display: grid;
  grid-template-columns: minmax(210px, .5fr) minmax(0, 1fr);
  gap: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px 22px;
}
.edge-figure strong { display: block; font: 800 46px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.05em; }
.edge-figure strong.up { color: var(--green); }
.edge-figure strong.down { color: var(--red); }
.edge-figure > span { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.edge-bar { display: flex; gap: 3px; height: 7px; margin-top: 14px; }
.edge-bar i { display: block; height: 100%; border-radius: 4px; transition: width .4s ease; }
.edge-bar i:first-child { background: var(--green); }
.edge-bar i:last-child { background: var(--red); }
.edge-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: var(--dim); font-size: 10px; }
.edge-legend span { display: inline-flex; align-items: center; gap: 5px; }
.edge-legend .dot { width: 6px; height: 6px; border-radius: 50%; }
.edge-legend .dot.win { background: var(--green); }
.edge-legend .dot.lose { background: var(--red); }
.edge-copy p { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.edge-copy p:last-child { margin-bottom: 0; }
.edge-copy b { color: #cfd8e3; font-weight: 650; }
.edge-detail b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.edge-warn { color: var(--dim) !important; font-size: 11.5px !important; }

/* ---- 업종별 현황 ---- */
.sector-section { padding-bottom: 20px; }
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sector-tile {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  padding: 12px 13px 11px;
  background-color: var(--heat, #1e2636);
}
.st-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.st-head b { font-size: 13px; font-weight: 700; letter-spacing: -.02em; }
.st-head strong { font: 750 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.03em; }
.st-head strong.up { color: #a8f5c6; }
.st-head strong.down { color: #ffb3b0; }
.st-bar { height: 4px; margin: 10px 0 8px; border-radius: 3px; background: rgba(0,0,0,.32); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 3px; background: rgba(168,245,198,.75); }
.st-meta { display: flex; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.6); font-size: 9.5px; }
.st-lead { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.1); font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.st-lead .up { color: #a8f5c6; }
.st-lead .down { color: #ffb3b0; }
.sector-expanded {
  grid-column: 1 / -1;
  padding: 14px;
}
.sector-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.sector-subgroup {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 9px;
  background: color-mix(in srgb, var(--subheat, #1e2636) 72%, rgba(16,23,34,.82));
}
.sector-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.sector-subhead > b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  letter-spacing: -.02em;
}
.sector-subhead > span { color: rgba(255,255,255,.58); font-size: 9px; white-space: nowrap; }
.sector-subhead strong { font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.sector-subhead strong.up, .map-stock .up { color: #d8ffe5; }
.sector-subhead strong.down, .map-stock .down { color: #ffd4d2; }
.map-stocks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 48px;
  gap: 5px;
}
.map-stock {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 7px;
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: var(--stock-heat, #1e2636);
  color: #f0f4f8;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}
.map-stock-lg { grid-column: span 2; }
.map-stock-xl { grid-column: span 2; grid-row: span 2; }
.map-stock:hover { border-color: rgba(255,255,255,.3); transform: translateY(-1px); }
.map-stock b { overflow: hidden; text-overflow: ellipsis; font-size: 11px; letter-spacing: .02em; }
.map-stock span { font: 700 9.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.map-stock small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: rgba(255,255,255,.64);
  font-size: 8.5px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 3. 매매 데스크 ---- */
/* 세 갈래 중 무엇을 보고 있는지, 그리고 나머지도 누를 수 있다는 것이
   한눈에 보여야 한다. 작은 알약 탭으로는 아무도 누르지 않는다. */
.desk-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.desk-switch.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.desk-switch.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dswitch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .15s;
}
.dswitch:hover { transform: translateY(-2px); border-color: #4b5a6d; }
.dswitch .dsw-text { display: block; min-width: 0; }
.dswitch b { display: block; color: #cfd8e3; font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.dswitch small { display: block; margin-top: 4px; color: #5f6b79; font-size: 10px; }
.dswitch strong {
  margin-left: auto;
  color: #6b7889;
  font: 800 32px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -.05em;
}
.dswitch.current { background: var(--surface); }
.dswitch.current b { color: var(--text); }
.dswitch.buy.current { border-color: rgba(51,209,122,.55); box-shadow: inset 0 0 0 1px rgba(51,209,122,.18); }
.dswitch.buy.current strong, .dswitch.buy:hover strong { color: var(--green); }
.dswitch.hold.current { border-color: rgba(132,146,166,.55); box-shadow: inset 0 0 0 1px rgba(132,146,166,.18); }
.dswitch.hold.current strong, .dswitch.hold:hover strong { color: #b9c4d4; }
.dswitch.take.current { border-color: rgba(226,161,60,.55); box-shadow: inset 0 0 0 1px rgba(226,161,60,.18); }
.dswitch.take.current strong, .dswitch.take:hover strong { color: var(--amber); }
.dswitch.short.current { border-color: rgba(255,98,92,.55); box-shadow: inset 0 0 0 1px rgba(255,98,92,.18); }
.dswitch.short.current strong, .dswitch.short:hover strong { color: var(--red); }
.desk-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 12px 2px 14px; }
.desk-rule { margin: 0; color: #6b7889; font-size: 11px; line-height: 1.6; }

.desk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 8px; }

/* 히트 타일. 배경색이 "지금 이 자리가 얼마나 유리한가"를 나른다.
   --heat 는 렌더 시점에 JS 가 계산해 인라인으로 넣는다. */
.desk-card {
  position: relative;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  padding: 13px 14px 12px;
  cursor: pointer;
  overflow: hidden;
  background-color: var(--heat, #2a323e);
  transition: transform .15s, box-shadow .18s, border-color .18s;
}
.desk-card:hover, .desk-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
  border-color: rgba(255,255,255,.3);
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
}
/* 갈래 표시는 위쪽 스위치가 이미 하고 있다. 타일에는 히트 색만 남긴다. */

.dc-head { display: flex; align-items: center; gap: 7px; }
.dc-ticker { font: 800 21px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.04em; }
.dc-change { font: 650 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.dc-change.up { color: #8ff0b6; }
.dc-change.down { color: #ffb3b0; }
.dc-head .confidence { margin-left: auto; border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.78); }
.dc-head .confidence.high { color: #b9ffcd; border-color: rgba(185,255,205,.35); }

/* 타일에서 가장 크게 읽히는 한 덩어리. */
.dc-gain { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 12px 0 8px; }
.gain-row { display: flex; align-items: baseline; gap: 6px; }
.gain-row i { color: rgba(255,255,255,.55); font-style: normal; font-size: 9.5px; }
.gain-row strong { font: 750 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.03em; }
.gain-row.lead strong { font-size: 27px; font-weight: 800; letter-spacing: -.05em; }
.gain-row strong.up { color: #a8f5c6; }
.gain-row strong.down { color: #ffb3b0; }
.gain-row strong.flat { color: rgba(255,255,255,.75); }
.dc-why { margin: 0 0 11px; color: rgba(255,255,255,.72); font-size: 10.5px; line-height: 1.5; }

.dc-pair { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
.pair-cell { display: flex; align-items: baseline; gap: 5px; }
.pair-cell i { color: rgba(255,255,255,.5); font-style: normal; font-size: 9px; }
.pair-cell b { font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.pair-cell.gain b { color: #8ff0b6; }
.pair-cell.loss b { color: #ffb3b0; }

.dc-ladder { margin-bottom: 11px; }
.dc-ladder.empty { color: rgba(255,255,255,.45); font-size: 9.5px; padding: 4px 0 8px; }
.rail { position: relative; height: 4px; border-radius: 3px; background: rgba(0,0,0,.32); }
.rail i { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.rail-risk { left: 0; background: rgba(255,140,135,.45); }
.rail-reward { background: rgba(150,240,185,.5); }
.dc-ladder.open-end .rail-reward { -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent); }
.mk-entry { position: absolute; top: -3px; width: 2px; height: 10px; margin-left: -1px; border-radius: 2px; background: rgba(255,255,255,.6); }
.mk-now {
  position: absolute;
  top: -3px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.45);
  background: #fff;
}

/* 무엇을 얼마에 — 동사 + 가격 칩. 문장보다 빨리 읽힌다. */
.dc-steps { display: flex; flex-wrap: wrap; gap: 5px; }
.dc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.55); font-size: 9.5px; }
.step {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,.3);
}
.step i { color: rgba(255,255,255,.62); font-style: normal; font-size: 9px; }
.step b { font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #fff; }
.step.target b { color: #8ff0b6; }
.step.stop b { color: #ffb3b0; }
.desk-flag { padding: 3px 7px; border-radius: 5px; font-size: 9px; font-weight: 650; background: rgba(0,0,0,.32); color: rgba(255,255,255,.8); }
.desk-flag.unstable { background: rgba(0,0,0,.42); color: rgba(255,255,255,.66); }

/* 색이 무엇을 뜻하는지 한 줄로 */
.heat-key { display: flex; align-items: center; gap: 8px; color: #6b7889; font-size: 10px; }
.heat-key .scale { width: 92px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgb(122,32,37), rgb(30,38,54), rgb(17,96,68)); }

.stance-tag { display: inline-block; min-width: 34px; padding: 3px 7px; border-radius: 5px; text-align: center; font-size: 9.5px; font-weight: 650; background: rgba(130,144,162,.13); color: var(--muted); }
.stance-tag.buy { background: rgba(51,209,122,.14); color: var(--green); }
.stance-tag.hold { background: rgba(132,146,166,.14); color: #b9c4d4; }
.stance-tag.take { background: rgba(226,161,60,.14); color: var(--amber); }
.stance-tag.short { background: rgba(255,98,92,.14); color: var(--red); }
.stance-tag.watch { background: rgba(130,144,162,.13); color: var(--muted); }
.stance-tag.none { background: transparent; }
.index-detail { color: var(--muted); }

/* ---- 요약 패널 (움직임 / 신호) ---- */

.panel-empty { padding: 26px 16px; color: var(--muted); font-size: 11px; text-align: center; }

/* ---- 전체 종목 테이블 ---- */
.universe { padding-bottom: 22px; }
.universe-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 12px; }
.universe-head h2 { margin: 0; font-size: 16px; font-weight: 750; letter-spacing: -.03em; }
.universe-head h2 span { color: var(--muted); font-size: 11px; font-weight: 500; margin-left: 6px; }
.universe-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  cursor: pointer;
}
.chip:hover { color: var(--text); border-color: #445466; }
.chip.current { color: #cfe0ff; border-color: var(--brand-line); background: var(--brand-soft); }
#universeFilter {
  width: 148px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 12px;
  outline: 0;
}
#universeFilter:focus { border-color: var(--brand-line); }
/* 100종목이면 페이지가 표 하나로 끝없이 길어진다. 높이를 잘라 자체 스크롤을
   주고, thead 의 sticky 가 그 안에서 계속 붙어 있게 한다. */
.table-scroll { border: 1px solid var(--line); border-radius: 14px; overflow: auto; max-height: min(70vh, 680px); background: var(--surface-2); overscroll-behavior: contain; }
.universe-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 12px; }
.universe-table th {
  position: sticky;
  top: 0;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #131a28;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.universe-table th.num { text-align: right; }
.universe-table th:hover { color: var(--text); }
.universe-table th.sorted-asc::after { content: " ▲"; color: var(--brand-tint); font-size: 8px; }
.universe-table th.sorted-desc::after { content: " ▼"; color: var(--brand-tint); font-size: 8px; }
.universe-table th.col-spark { cursor: default; text-align: center; }
.universe-table td { padding: 9px 12px; border-bottom: 1px solid rgba(27,36,46,.65); white-space: nowrap; }
.universe-table td.num { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.universe-table tbody tr { cursor: pointer; transition: background .15s; }
.universe-table tbody tr:hover { background: var(--brand-soft); }
.universe-table tbody tr:focus-visible { outline: 1px solid var(--brand-line); outline-offset: -1px; }
.universe-table tbody tr:last-child td { border-bottom: 0; }
.col-ticker b { font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.row-cross { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.row-cross.golden { background: var(--green); }
.row-cross.death { background: var(--red); }
.col-pos { min-width: 96px; }
.pos52 { display: inline-block; width: 42px; height: 3px; margin-right: 7px; border-radius: 2px; background: rgba(130,144,162,.22); vertical-align: middle; }
.pos52 i { display: block; height: 100%; border-radius: 2px; background: #6d7d92; }
.side-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; background: #5d6877; vertical-align: middle; }
.side-bull { color: var(--green); }
.side-bull .side-dot { background: var(--green); }
.side-bear { color: var(--red); }
.side-bear .side-dot { background: var(--red); }
.universe-table .col-spark { width: 118px; padding: 4px 12px; text-align: center; }
.universe-table .spark { width: 106px; height: 24px; display: inline-block; vertical-align: middle; }
.universe-foot { margin: 10px 2px 0; color: #617083; font-size: 10px; line-height: 1.7; }

.up { color: var(--green); }
.down { color: var(--red); }
.flat, .muted { color: var(--muted); }
.hot { color: var(--amber); }

.confidence {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
}
.confidence.high { color: var(--green); border-color: rgba(51,209,122,.3); }
.confidence.mid { color: var(--amber); border-color: rgba(240,184,75,.3); }

.side { font-size: 10px; }
.side.positive { color: var(--green); }
.side.negative { color: var(--red); }

.data-note {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 23px 2px 52px;
}
.data-note span { color: var(--dim); font: 700 10px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
.data-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
footer {
  min-height: 80px;
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 0 max(24px, calc((100% - 1312px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #5f6b79;
  font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
}

@media (max-width: 1120px) {
  .index-row.with-third { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1160px) {
  /* 메뉴는 숨기지 않는다. 브랜드 아래 한 줄로 내리고, 넘치면 가로로 민다. */
}
@media (max-width: 980px) {
  #updatedText { display: none; }
  
  .verdict { grid-template-columns: 1fr; gap: 28px; padding-top: 30px; }
  .index-row, .index-row.with-third { grid-template-columns: 1fr; }
  .desk-list { grid-template-columns: 1fr; }
  .desk-switch { grid-template-columns: 1fr; gap: 8px; }
  .edge-card { grid-template-columns: 1fr; gap: 18px; }
  .action-strip { grid-template-columns: 1fr; }
  
  
  
  
  
  
  
  
}
@media (max-width: 680px) {
  main { width: min(100% - 28px, 1360px); }
  .sector-subgrid { grid-template-columns: 1fr; }
  .map-stocks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  
  
  .verdict { padding: 18px 2px 18px; }
  .verdict h1 { font-size: 29px; }
  .verdict-counts { grid-template-columns: repeat(2, 1fr); }
  .verdict-clock { width: 100%; justify-content: space-between; }
  .session-panel { padding: 15px 15px 4px; }
  .universe-head { align-items: flex-start; }
  .universe-tools { width: 100%; }
  #universeFilter { flex: 1; min-width: 110px; }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  .data-note { grid-template-columns: 1fr; gap: 6px; }
  footer { padding: 18px; min-height: 70px; gap: 15px; align-items: flex-start; }
}

/* 채널 하방 이탈 반등 자리. 근거가 있는 자리라 눈에 띄되, 매수 카드의
   기대수익보다 세지 않게 둔다. */
.desk-flag.rebound {
  background: rgba(22, 184, 122, .14);
  border-color: rgba(22, 184, 122, .38);
  color: var(--green);
}

/* 반등 자리 카드. 손절선이 없는 거래라 매수 카드와 구별되게 테두리만 준다. */
.desk-card.rebound { border-color: rgba(22, 184, 122, .34); }
.desk-card.rebound .dc-steps .step:last-child b { color: var(--muted); }
.vcount.rebound.current, .dswitch.rebound.current { border-color: var(--green); }

/* 성적 카드. 숫자를 크게 보이려고 꾸미지 않는다 -- 사례가 근거이므로
   사례 줄이 숫자만큼 읽히게 둔다. */
.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.record-card {
  border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px 22px;
  background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 6px;
}
.rc-tag { color: var(--dim); font-size: 11.5px; letter-spacing: .02em; }
.record-card strong { font-size: 40px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.rc-sub { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.rc-cases { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.rc-case {
  display: inline-flex; align-items: baseline; gap: 6px;
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 5px 11px; font-size: 12px;
}
.rc-case b { font-weight: 650; }
.rc-case i { font-style: normal; font-weight: 650; }
.rc-case small { color: var(--dim); font-size: 11px; }
.rc-note { color: var(--dim); font-size: 11.5px; align-self: center; }
@media (max-width: 780px) { .record-grid { grid-template-columns: 1fr; } }

/* 단타 히어로 안의 지수 줄. 자리 개수보다 먼저 읽히도록 위에 둔다. */
.hero-index { margin: 18px 0 4px; }
.hero-index-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hero-index-head b { font-size: 13px; letter-spacing: -.01em; }
.hero-index-head span { color: var(--dim); font-size: 11.5px; }


/* ---- 화면 밀도와 반응형 보정 -------------------------------------------
   핵심 요약은 화면 폭에 따라 한 줄 또는 가로 탐색으로 유지하고, 모바일 표는
   판단에 필요한 네 열만 남긴다. */
.mobile-only { display: none; }

.verdict p,
.section-note,
.desk-rule,
.edge-warn,
.universe-foot,
.data-note p { text-wrap: pretty; }

button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--brand-tint);
  outline-offset: 2px;
}

.verdict-counts { grid-template-columns: none; }
#verdictCounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#scalpCounts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vcount.rebound strong { color: var(--green); }
.dswitch.rebound.current strong,
.dswitch.rebound:hover strong { color: var(--green); }

@media (max-width: 1120px) and (min-width: 761px) {
  .index-row.with-third > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .index-row,
  .index-row.with-third { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-list { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
  .desk-switch.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .desk-switch:not(.five) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dswitch { gap: 9px; padding: 13px 12px; }
  .dswitch b { font-size: 13.5px; }
  .dswitch strong { font-size: 27px; }
}

@media (max-width: 820px) {
  .desk-switch.five {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(172px, 1fr);
    overflow-x: auto;
    padding: 2px 2px 7px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  .desk-switch.five::-webkit-scrollbar { display: none; }
  .desk-switch.five .dswitch { scroll-snap-align: start; }
}

@media (max-width: 760px) {
  .index-row,
  .index-row.with-third { grid-template-columns: 1fr; }
  .index-row.with-third > :last-child:nth-child(odd) { grid-column: auto; }
  .desk-list { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  main { width: min(100% - 24px, 1360px); }
  .verdict { padding: 17px 0 18px; }
  .verdict h1 {
    margin-top: 14px;
    font-size: clamp(25px, 8vw, 29px);
    line-height: 1.2;
    text-wrap: balance;
  }
  .verdict p { font-size: 12.5px; line-height: 1.6; }
  .action-strip { margin-top: 16px; }
  #verdictCounts,
  #scalpCounts {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(138px, 44vw);
    overflow-x: auto;
    padding: 2px 2px 7px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  #verdictCounts::-webkit-scrollbar,
  #scalpCounts::-webkit-scrollbar { display: none; }
  .vcount {
    min-height: 88px;
    scroll-snap-align: start;
    padding: 11px 12px;
  }
  .vcount strong { font-size: 23px; }
  .vcount small { font-size: 9.5px; }

  .section-head { display: block; padding-bottom: 9px; }
  .section-note { display: block; margin-top: 4px; line-height: 1.45; }
  .index-tile { padding: 14px; }
  .index-price { margin-top: 10px; }
  .index-price strong { font-size: 26px; }
  .index-tile .spark { height: 48px; margin-top: 8px; }
  .index-foot { gap: 9px; }
  .map-stocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .desk-bar { align-items: flex-start; margin-top: 9px; }
  .desk-rule { width: 100%; line-height: 1.55; }
  .heat-key .scale { width: 68px; }
  .desk-card { padding: 13px; }
  .dc-gain { gap: 12px; margin-top: 11px; }
  .gain-row.lead strong { font-size: 24px; }

  .record-card { padding: 16px; border-radius: 13px; }
  .record-card strong { font-size: 34px; }
  .rc-sub { font-size: 12px; }
  .edge-warn { line-height: 1.6; }

  .universe-tools {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  #universeFilter {
    width: 100%;
    min-height: 44px;
    order: 1;
    border-radius: 10px;
  }
  .filter-chips {
    width: 100%;
    order: 2;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 1px 1px 5px;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  .filter-chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; min-height: 40px; padding-inline: 12px; }

  .table-scroll {
    max-height: min(68vh, 620px);
    overflow-x: hidden;
    border-radius: 12px;
  }
  .universe-table {
    min-width: 0;
    table-layout: auto;
    font-size: 11px;
  }
  .universe-table th,
  .universe-table td { padding-inline: 6px; }
  .universe-table th { font-size: 9.5px; }
  .universe-table th:nth-child(3),
  .universe-table td:nth-child(3),
  .universe-table th:nth-child(6),
  .universe-table td:nth-child(6),
  .universe-table th:nth-child(7),
  .universe-table td:nth-child(7),
  .universe-table th:nth-child(8),
  .universe-table td:nth-child(8),
  .universe-table th:nth-child(9),
  .universe-table td:nth-child(9),
  .universe-table th:nth-child(10),
  .universe-table td:nth-child(10) { display: none; }
  .universe-table td:nth-child(4),
  .universe-table th:nth-child(4),
  .universe-table td:nth-child(5),
  .universe-table th:nth-child(5) { text-align: right; }
  .stance-tag { min-width: 31px; padding-inline: 5px; }
  .mobile-only { display: inline; }

  .data-note { padding: 19px 0 34px; }
  footer {
    min-height: 0;
    padding: 18px 12px;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .verdict-clock { gap: 9px; }
  .session-pill { padding-inline: 9px; }
  .clocks { gap: 9px; }
  .clocks span { gap: 4px; }
  .universe-table th,
  .universe-table td { padding-inline: 5px; }
}

/* 주요 지수 3개는 모든 화면에서 한 줄로 유지한다. */
.index-row.with-third {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.index-row.with-third > :last-child:nth-child(odd) {
  grid-column: auto;
}

@media (max-width: 680px) {
  .index-row,
  .index-row.with-third {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .index-tile {
    min-width: 0;
    padding: 7px 6px 6px;
    border-radius: 9px;
  }
  .index-top { gap: 3px; }
  .index-name {
    min-width: 0;
    white-space: nowrap;
  }
  .index-name b { font-size: 10px; }
  .index-name i { display: none; }
  .trend-badge {
    flex: 0 0 auto;
    padding: 2px 4px;
    font-size: 7px;
  }
  .index-price {
    gap: 3px;
    margin-top: 7px;
    flex-wrap: nowrap;
  }
  .index-price strong { font-size: 15px; }
  .index-price .delta { margin-left: auto; font-size: 8px; }
  .index-change,
  .index-change-sep { display: none; }
  .index-tile .spark {
    height: 32px;
    margin: 5px 0 1px;
  }
  .index-meta,
  .range52,
  .index-foot { display: none; }
}

@media (max-width: 380px) {
  .index-row,
  .index-row.with-third { gap: 3px; }
  .index-tile { padding-inline: 5px; }
  .index-name b { font-size: 9px; }
  .index-price strong { font-size: 14px; }
  .index-price .delta { font-size: 7.5px; }
}

@media (hover: none) {
  .vcount:not(.flat):hover,
  .dswitch:hover,
  .index-tile:hover,
  .desk-card:hover,
  .map-stock:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---- 단타 신호가 0건일 때 ---------------------------------------------
   같은 0을 여러 카드에서 반복하면 실제 정보보다 경계선이 먼저 보인다. 방향
   선택만 남기고, 빈 목록은 여백 있는 한 장의 점검 결과로 묶는다. */
.verdict.no-signals #scalpCounts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.verdict.no-signals #scalpCounts .vcount.flat { display: none; }

.desk-section.is-empty .desk-switch {
  width: min(100%, 460px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.desk-section.is-empty .dswitch {
  min-height: 54px;
  padding: 10px 13px;
  border-radius: 10px;
  gap: 9px;
}
.desk-section.is-empty .dswitch b { font-size: 13px; }
.desk-section.is-empty .dswitch small { display: none; }
.desk-section.is-empty .dswitch strong { font-size: 21px; }
.desk-section.is-empty .desk-bar { display: none; }
.desk-section.is-empty .desk-list { display: block; }

.signal-empty {
  min-height: 230px;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) minmax(390px, .85fr);
  align-items: center;
  gap: clamp(20px, 3.5vw, 48px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 50%, rgba(61,130,235,.10), transparent 15rem),
    rgba(21,32,45,.58);
}
.empty-signal-mark {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(170,200,251,.24);
  border-radius: 50%;
  background: rgba(61,130,235,.08);
}
.empty-signal-mark::before,
.empty-signal-mark::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.empty-signal-mark::before {
  width: 8px;
  height: 8px;
  background: var(--brand-tint);
  box-shadow: 0 0 0 6px rgba(61,130,235,.10);
}
.empty-signal-mark::after {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(170,200,251,.18);
}
.empty-signal-mark i {
  position: absolute;
  width: 1px;
  height: 76px;
  background: linear-gradient(transparent, rgba(170,200,251,.16), transparent);
  transform: rotate(45deg);
}
.empty-kicker {
  color: var(--brand-tint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.empty-signal-copy h3 {
  margin: 7px 0 9px;
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.25;
  letter-spacing: -.035em;
}
.empty-signal-copy p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-wrap: pretty;
}
.empty-audit {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line-soft);
}
.empty-audit > div {
  min-width: 0;
  padding: 4px clamp(12px, 2vw, 24px);
}
.empty-audit dt {
  min-height: 30px;
  color: var(--dim);
  font-size: 9.5px;
  line-height: 1.45;
}
.empty-audit dd {
  margin: 7px 0 0;
  color: #d9e2ee;
  font: 750 24px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -.04em;
}

@media (max-width: 900px) {
  .signal-empty {
    grid-template-columns: auto 1fr;
    min-height: 0;
  }
  .empty-audit {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
    padding-top: 18px;
  }
  .empty-audit > div:first-child { padding-left: 0; }
}

@media (max-width: 680px) {
  .verdict.no-signals #scalpCounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    padding: 0;
  }
  .verdict.no-signals #scalpCounts .vcount { min-height: 78px; }
  .desk-section.is-empty .desk-switch { width: 100%; }
  .signal-empty {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 20px;
    border-radius: 14px;
    background: rgba(21,32,45,.58);
  }
  .empty-signal-mark { width: 42px; height: 42px; }
  .empty-signal-mark i { height: 58px; }
  .empty-signal-copy h3 { margin-top: 6px; font-size: 21px; }
  .empty-audit {
    grid-column: auto;
    gap: 0;
    padding-top: 15px;
  }
  .empty-audit > div { padding: 2px 9px; }
  .empty-audit > div:first-child { padding-left: 0; }
  .empty-audit > div:last-child { padding-right: 0; }
  .empty-audit dt { min-height: 29px; font-size: 8.5px; }
  .empty-audit dd { font-size: 21px; }
}


/* ---- 한눈에 보는 컴팩트 히트맵 -----------------------------------------
   섹터 요약은 작은 고정 타일, 종목은 시가총액과 무관한 동일 크기다. */
.sector-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}
.sector-tile {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
}
.sector-tile[open] { grid-column: 1 / -1; }
.sector-summary {
  min-height: 58px;
  position: relative;
  display: block;
  padding: 9px 27px 8px 10px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.sector-summary::-webkit-details-marker { display: none; }
.sector-summary::after {
  content: "›";
  position: absolute;
  top: 8px;
  right: 10px;
  color: rgba(255,255,255,.52);
  font: 700 16px/1 system-ui, sans-serif;
  transition: transform .16s ease;
}
.sector-tile[open] > .sector-summary::after { transform: rotate(90deg); }
.sector-summary:hover { background: rgba(255,255,255,.045); }
.sector-summary:focus-visible {
  outline: 2px solid var(--brand-tint);
  outline-offset: -2px;
}
.sector-summary .st-head {
  width: 100%;
  display: flex;
}
.sector-summary .st-head b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.sector-summary .st-head strong { font-size: 13px; }
.sector-summary .st-meta {
  margin-top: 6px;
  font-size: 8.8px;
  white-space: nowrap;
}
.sector-detail {
  padding: 0 10px 10px;
  border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(10,15,23,.22);
}
.sector-detail > .st-bar {
  height: 3px;
  margin: 8px 0 6px;
}
.sector-detail-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255,255,255,.58);
  font-size: 9px;
}
.sector-subgrid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 5px;
  margin-top: 8px;
}
.sector-subgroup {
  padding: 6px;
  border-radius: 8px;
}
.sector-subhead { margin-bottom: 5px; }
.sector-subhead > b { font-size: 10.5px; }
.map-stocks {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: 36px;
  gap: 3px;
}
.map-stock,
.map-stock-lg,
.map-stock-xl {
  grid-column: auto;
  grid-row: auto;
}
.map-stock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 3px 2px;
  border-radius: 5px;
}
.map-stock b {
  max-width: 100%;
  font-size: 9.5px;
  line-height: 1;
}
.map-stock span { font-size: 8.5px; }
.map-stock small { display: none; }

@media (max-width: 1100px) {
  .sector-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .sector-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .sector-section { padding-bottom: 16px; }
  .sector-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .sector-summary {
    min-height: 55px;
    padding: 8px 21px 7px 8px;
  }
  .sector-summary::after { top: 7px; right: 7px; }
  .sector-summary .st-head b { font-size: 10.8px; }
  .sector-summary .st-head strong { font-size: 11px; }
  .sector-summary .st-meta { margin-top: 5px; font-size: 8px; }
  .sector-detail { padding: 0 7px 8px; }
  .sector-detail-meta { font-size: 8.5px; }
  .sector-subgrid { grid-template-columns: 1fr; }
  .sector-subhead > b { font-size: 10px; }
  .map-stocks {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 33px;
  }
  .map-stock b { font-size: 9px; }
  .map-stock span { font-size: 8px; }
}


/* 히트맵 2차 압축: 요약은 한 화면, 상세는 세부 산업별로 나눈다. */
.sector-grid { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.sector-summary {
  min-height: 42px;
  padding: 7px 19px 7px 7px;
}
.sector-summary::after {
  top: 6px;
  right: 6px;
  font-size: 13px;
}
.sector-summary .st-head {
  align-items: baseline;
  gap: 4px;
}
.sector-summary .st-head b { font-size: 10.5px; }
.sector-summary .st-head strong {
  margin-left: auto;
  font-size: 10.5px;
}
.sector-summary .st-meta { display: none; }
.sector-detail { padding: 0 7px 7px; }
.sector-detail-meta { font-size: 8.5px; }
.sector-subgrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
  align-items: start;
}
.sector-subgroup {
  min-width: 0;
  padding: 5px;
  border-radius: 6px;
}
.sector-subhead {
  gap: 4px;
  margin-bottom: 4px;
}
.sector-subhead > b { font-size: 9.5px; }
.sector-subhead > span { font-size: 7.5px; }
.sector-subhead strong { font-size: 8px; }
.sector-group-stocks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 27px;
  gap: 2px;
}
.sector-group-stocks .map-stock {
  gap: 1px;
  padding: 2px 1px;
  border-radius: 4px;
}
.sector-group-stocks .map-stock b { font-size: 8px; }
.sector-group-stocks .map-stock span { font-size: 7px; }

@media (max-width: 1100px) {
  .sector-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sector-subgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .sector-section .section-head {
    display: flex;
    align-items: center;
    padding-bottom: 6px;
  }
  .sector-section .section-note { display: none; }
  .sector-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sector-summary {
    min-height: 40px;
    padding: 6px 16px 5px 6px;
  }
  .sector-summary::after { top: 5px; right: 5px; font-size: 12px; }
  .sector-summary .st-head {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .sector-summary .st-head b {
    width: 100%;
    font-size: 9.5px;
  }
  .sector-summary .st-head strong {
    margin-left: 0;
    font-size: 9.5px;
    line-height: 1;
  }
  .sector-detail { padding: 0 5px 6px; }
  .sector-detail-meta span:last-child { display: none; }
  .sector-subgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    margin-top: 5px;
  }
  .sector-subgroup { padding: 4px; }
  .sector-subhead {
    min-height: 25px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 3px;
  }
  .sector-subhead > b {
    width: 100%;
    font-size: 8.5px;
  }
  .sector-subhead > span { font-size: 7px; }
  .sector-group-stocks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 25px;
  }
  .sector-group-stocks .map-stock b { font-size: 7.5px; }
  .sector-group-stocks .map-stock span { font-size: 6.5px; }
}

/* 시세·판정이 언제 것인지. 헤더에서는 뺐지만 어디에도 없으면 화면이 멈춘 건지
   시장이 조용한 건지 구분할 수가 없다. */
.fresh-note { color: var(--dim); font-size: 11.5px; white-space: nowrap; }

/* 전환 시점의 날짜는 부차 정보다. 며칠째인지가 먼저 읽혀야 한다. */
.index-timing i { font-style: normal; color: var(--dim); }

/* 시장 폭. 숫자보다 "지금 그 조건이 맞느냐"가 먼저 읽혀야 한다. */
.tape-breadth { border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.tb-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tb-k { color: var(--dim); font-size: 11.5px; }
.tb-v { font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.tb-s { color: var(--muted); font-size: 12px; }
.tb-n { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.tb-n b { color: var(--text); }

/* 단타 메인의 목록 + 차트 분할. 자리를 고르는 동안 화면을 옮기지 않는다. */
.scalp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 14px; align-items: start; }
.scalp-chart { border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; position: sticky; top: 92px; }
.sc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sc-tk { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.sc-px { font-size: 15px; font-weight: 650; }
.sc-chg { font-size: 13px; font-weight: 650; }
.sc-more { margin-left: auto; color: var(--muted); font-size: 12px; text-decoration: none; white-space: nowrap; }
.sc-more:hover { color: var(--text); }
.sc-tfs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sc-tf { border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 11px; }
.sc-tf .k { display: block; color: var(--dim); font-size: 11px; }
.sc-tf b { font-size: 17px; font-weight: 750; }
.sc-tf b.up { color: var(--green); } .sc-tf b.down { color: var(--red); } .sc-tf b.flat { color: var(--muted); }
.sc-verdict { margin: 9px 0 4px; color: var(--muted); font-size: 12.5px; }
.sc-svg { width: 100%; height: auto; display: block; margin-top: 8px; }
.sc-macd { margin-top: 2px; }
.sc-lg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.sc-lg i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sc-lg i.c-up { background: #3fb950; } .sc-lg i.c-dn { background: #ff6b63; }
.sc-lg i.c-ma { background: #d29922; height: 2px; width: 14px; border-radius: 0; }
.desk-card.picked { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-soft); }
@media (max-width: 1040px) {
  .scalp-split { grid-template-columns: 1fr; }
  .scalp-chart { position: static; order: -1; }
}

/* 차트 칸의 티커 검색. 목록에 없는 종목도 바로 볼 수 있어야 한다. */
.sc-search { display: flex; gap: 8px; margin-bottom: 12px; }
.sc-search input {
  flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,.03); color: var(--text); font-size: 13px;
}
.sc-search input:focus { outline: none; border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.sc-search input::placeholder { color: #667383; }
.sc-search button {
  flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 10px;
  background: var(--brand-strong); color: #fff; font-size: 13px; font-weight: 650; cursor: pointer;
}
.sc-search button:hover { filter: brightness(1.08); }
.sc-body .panel-empty .hu-in { display: inline-flex; background: #fee500; color: #191600;
  border-radius: 999px; padding: 9px 16px; font-weight: 700; text-decoration: none; }
