/* 머니레이더 — 라이트/다크 토큰 (브랜드: 딥 에메랄드, 상승 빨강·하락 파랑) */
:root {
  --bg: #f5f5f4;
  --bg-grad: none;
  --card: #ffffff;
  --card-solid: #ffffff;
  --border: #e7e5e4;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-hover: 0 6px 18px rgba(28, 25, 23, 0.08);
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #6f6862;
  --line: #eeecea;
  --chip: rgba(28, 25, 23, 0.05);
  --accent: #1e5b45;
  --accent-soft: #e6f0eb;
  --on-accent: #ffffff;
  --up: #d6302a;
  --up-soft: rgba(214, 48, 42, 0.10);
  --down: #2563c9;
  --down-soft: rgba(37, 99, 201, 0.10);
  --flat: #78716c;
  --limit: #fdeceb;
  --limit-text: #9b1c22;
  --track: rgba(28, 25, 23, 0.08);
  --dock: rgba(250, 250, 249, 0.92);
  --rest-bg: #efeeec;
  --hm-frame: #f4f2ee;
  --rest-fg: #44403c;
  --r-card: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-grad: none;
    --card: #141414;
    --card-solid: #161616;
    --border: #2a2a2a;
    --shadow: none;
    --shadow-hover: 0 0 0 1px #3a3a3a;
    --text: #f5f5f5;
    --text-2: #a3a3a3;
    --text-3: #8f8f8f;
    --line: #222222;
    --chip: rgba(255, 255, 255, 0.06);
    --accent: #3f9b78;
    --accent-soft: #10261d;
    --on-accent: #ffffff;
    --up: #ff5a52;
    --up-soft: rgba(255, 90, 82, 0.14);
    --down: #5b8cff;
    --down-soft: rgba(91, 140, 255, 0.15);
    --flat: #8a8a8a;
    --limit: #3a1b1d;
    --limit-text: #ffb3ae;
    --track: rgba(255, 255, 255, 0.10);
    --dock: rgba(0, 0, 0, 0.9);
    --rest-bg: #2a2a2a;
    --hm-frame: #161616;
    --rest-fg: #d4d4d4;
    --r-card: 8px;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-grad: none;
  --card: #141414;
  --card-solid: #161616;
  --border: #2a2a2a;
  --shadow: none;
  --shadow-hover: 0 0 0 1px #3a3a3a;
  --text: #f5f5f5;
  --text-2: #a3a3a3;
  --text-3: #8f8f8f;
  --line: #222222;
  --chip: rgba(255, 255, 255, 0.06);
  --accent: #3f9b78;
  --accent-soft: #10261d;
  --on-accent: #ffffff;
  --up: #ff5a52;
  --up-soft: rgba(255, 90, 82, 0.14);
  --down: #5b8cff;
  --down-soft: rgba(91, 140, 255, 0.15);
  --flat: #8a8a8a;
  --limit: #3a1b1d;
  --limit-text: #ffb3ae;
  --track: rgba(255, 255, 255, 0.10);
  --dock: rgba(0, 0, 0, 0.9);
  --rest-bg: #2a2a2a;
  --hm-frame: #161616;
  --rest-fg: #d4d4d4;
  --r-card: 8px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: -0.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.muted { color: var(--text-3); }

/* ---------- 상단바 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px;
  background: var(--dock);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--accent); white-space: nowrap; }
.brand span { color: var(--text); }
.brand-mark { width: 26px; height: 26px; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--down) 0 50%, var(--up) 50% 100%); }
/* 네프콘 채널 배지 (오버나잇 브리핑과 같은 모양) */
.channel { display: flex; align-items: center; gap: 9px; padding: 3px 12px 3px 14px; border-left: 1px solid var(--line); color: inherit; min-width: 0; flex: none; }
.channel img { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 28%;
  border: 2px solid rgba(255, 255, 255, 0.9); box-shadow: 0 3px 10px rgba(120, 84, 40, 0.2); background: #fbf3e6;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; }
.channel:hover img { transform: translateY(-1px) scale(1.05); box-shadow: 0 6px 14px rgba(120, 84, 40, 0.26); }
.channel-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.25; }
.channel-name { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.channel-name i { font-style: normal; font-weight: 500; color: var(--text-3); margin: 0 3px; }
.channel-kicker { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.channel .go { display: inline-block; margin-left: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: #03a64b; background: rgba(3, 199, 90, 0.12); transition: background .2s, color .2s, transform .2s; }
.channel:hover .go { background: #03c75a; color: #fff; transform: translateX(2px); }
.channel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.search { position: relative; flex: 1; max-width: 420px; display: flex; align-items: center; }
.search > svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--chip); color: var(--text); font: inherit; outline: none;
  transition: border-color .15s, background .15s;
}
.search input:focus { border-color: var(--accent); background: var(--card-solid); }
.suggest {
  position: absolute; top: 42px; left: 0; right: 0; z-index: 40;
  background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-hover); padding: 6px; max-height: 60vh; overflow: auto;
}
.suggest h6 { margin: 6px 8px 4px; font-size: 11px; color: var(--text-3); font-weight: 600; }
.suggest a { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 8px; }
.suggest a:hover, .suggest a.active { background: var(--accent-soft); }
.suggest .empty { padding: 10px; color: var(--text-3); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.clock { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; margin-right: 6px; white-space: nowrap; }
.mstatus { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--chip); color: var(--text-2); }
.mstatus.open { background: var(--accent-soft); color: var(--accent); }
.icon-btn { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--chip); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.spin svg { animation: spin .8s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 본문 */
.view { max-width: 1280px; margin: 0 auto; padding: 18px 20px 190px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 16px; }
.page-head h1 { font-size: 20px; margin: 0; letter-spacing: -0.02em; }
.page-head .sub { color: var(--text-3); font-size: 12.5px; }
.page-head .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn { border: 1px solid var(--border); background: var(--card); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.btn:hover { background: var(--card-solid); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }

.card {
  background: var(--card);
  
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
  min-width: 0;
}
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card h2 { font-size: 15px; margin: 0 0 10px; letter-spacing: -0.01em; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.notice { border-radius: 12px; background: var(--accent-soft); color: var(--text-2); padding: 10px 14px; font-size: 12.5px; margin-bottom: 14px; }
.empty-state { text-align: left; padding: 28px 20px; color: var(--text-2); }
.empty-state strong { display: block; font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty-state code { background: var(--chip); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.error { color: var(--up); }
.skeleton { height: 220px; border-radius: var(--r-card); background: linear-gradient(90deg, var(--chip), var(--track), var(--chip)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 테마 카드 */
.theme-card .th-head { display: flex; align-items: flex-start; gap: 10px; }
.theme-card .th-title { flex: 1; min-width: 0; }
.theme-card .th-title a { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.theme-card .th-title a:hover { color: var(--accent); }
.theme-card .th-rate { font-weight: 800; font-size: 15px; white-space: nowrap; }
.theme-card .th-desc { color: var(--text-2); font-size: 12.5px; margin: 4px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theme-card .th-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--text-2); white-space: nowrap; }
.chip b { color: var(--text); }
a.chip:hover { background: var(--accent-soft); color: var(--accent); }

.srow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 60px 58px;
  grid-template-areas: "name price rate val" "bar bar bar bar";
  column-gap: 8px; row-gap: 4px;
  padding: 8px 8px; margin: 0 -8px; border-radius: 10px; cursor: pointer;
  border-top: 1px solid var(--line);
}
.srow:hover { background: var(--chip); }
.srow.limit { background: var(--limit); color: var(--limit-text); }
.srow.limit .up, .srow.limit .muted { color: var(--limit-text); }
.srow .s-name { grid-area: name; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .s-price { grid-area: price; }
.srow .s-rate { grid-area: rate; font-weight: 700; }
.srow .s-val { grid-area: val; color: var(--text-2); }
.srow .s-bar { grid-area: bar; }
.srow-head { display: grid; grid-template-columns: minmax(0, 1fr) 76px 60px 58px; column-gap: 8px; font-size: 11px; color: var(--text-3); padding: 0 0 4px; }
.tag-limit { font-size: 10px; font-weight: 800; background: var(--up); color: #fff; padding: 1px 5px; border-radius: 5px; margin-left: 4px; vertical-align: 1px; }

.range { position: relative; height: 6px; border-radius: 3px; background: var(--track); }
.range .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; opacity: .35; }
.range .dot { position: absolute; top: -2px; width: 10px; height: 10px; border-radius: 50%; transform: translateX(-50%); border: 2px solid var(--card-solid); }
.range.na { opacity: .4; }
.range-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

/* 마켓중심 v2: Top 3 + 한 줄 목록 + 히트맵 */
.th-heroes { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.th-hero { padding: 16px 18px; }
.th-hhead { display: flex; align-items: baseline; gap: 8px; }
.th-rank { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--chip); color: var(--text-2); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; transform: translateY(-2px); }
.th-rank.sm { width: 20px; height: 20px; font-size: 11px; transform: none; }
.th-name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-name:hover, .th-lname:hover { color: var(--accent); }
.th-big { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.th-meta { font-size: 12px; color: var(--text-3); margin: 4px 0 2px; }
.th-lu { color: #b07a00; font-weight: 700; }
.th-desc { font-size: 12px; color: var(--text-3); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-srow { display: grid; grid-template-columns: minmax(0, 1fr) 72px 64px; gap: 8px; align-items: baseline; padding: 8px 6px; margin: 0 -6px; border-top: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 14px; }
.th-srow:hover { background: var(--chip); }
.th-sname { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-srow .num:nth-child(2) { font-weight: 700; }
.th-sval { color: var(--text-2); font-size: 13px; }
.th-list { padding: 4px 16px; }
.th-item { border-top: 1px solid var(--line); }
.th-item:first-child { border-top: 0; }
.th-line { display: grid; grid-template-columns: 24px minmax(110px, 200px) minmax(0, 1fr) 70px 16px; gap: 10px; align-items: center; padding: 11px 0; cursor: pointer; }
.th-line:hover .th-lname { color: var(--accent); }
.th-lname { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-lpeek { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-lval { font-weight: 700; white-space: nowrap; }
.th-chev { color: var(--text-3); transition: transform .2s; }
.th-item.open .th-chev { transform: rotate(180deg); }
.th-more { display: none; padding: 0 0 10px 34px; max-width: 620px; }
.th-item.open .th-more { display: block; }
.heat-note { font-size: 12px; margin: 10px 0 0; }
.th-sechead { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 22px 0 10px; }
.th-sechead .th-sec { margin: 0; }
.sess-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--chip); color: var(--text-2); vertical-align: middle; letter-spacing: 0; }
.th-sec { font-size: 16px; margin: 22px 0 10px; letter-spacing: -0.01em; }
.heatmap { position: relative; height: 560px; border-radius: 14px; overflow: hidden; background: var(--bg); }
.hm-tip { position: fixed; z-index: 70; min-width: 150px; max-width: 280px; padding: 9px 12px; background: var(--card-solid); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-hover); font-size: 12.5px; line-height: 1.55; pointer-events: none; }
.hm-tip b { display: block; font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.hm-tip div { color: var(--text-2); font-variant-numeric: tabular-nums; }
.hm-sec { position: absolute; box-sizing: border-box; border: 2px solid var(--bg); border-radius: 8px; background: var(--hm-frame); }
.hm-head { position: absolute; height: 20px; font-size: 12px; line-height: 20px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; font-variant-numeric: tabular-nums; }
.hm-head b { font-weight: 800; color: var(--text); }
.hm-rate { display: inline-block; padding: 0 5px; margin: 0 2px; border-radius: 5px; line-height: 16px; font-weight: 700; font-size: 11.5px; }
.heat-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.heat-foot .heat-note { flex: 1 1 320px; }
.hm-legend { display: flex; margin-top: 10px; border-radius: 6px; overflow: hidden; flex: none; }
.hm-legend span { width: 34px; height: 18px; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.hm-cell.rest { cursor: default; border: 1.5px dashed var(--line-strong, rgba(0, 0, 0, 0.18)); }
.hm-cell.rest b { font-weight: 800; }
.hm-cell.rest .rest-mini { font-size: 11px; margin: auto; padding: 0; }
.hm-cell { position: absolute; box-sizing: border-box; border: 1.5px solid var(--hm-frame); border-radius: 5px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; transition: filter .15s; }
.hm-cell:hover { filter: brightness(1.08); z-index: 1; }
.hm-cell b { font-size: 12px; font-weight: 800; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hm-cell span { font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- 순위 테이블 */
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3); padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rank-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rank-table tbody tr { cursor: pointer; }
.rank-table tbody tr:hover td { background: var(--chip); }
.rank-table tr.limit td { background: var(--limit); color: var(--limit-text); }
.rank-table tr.limit .up { color: var(--limit-text); }
.rank-table td.num { white-space: nowrap; }
.rank-table th.sortable { cursor: pointer; user-select: none; }
.rank-table th.sortable:hover { color: var(--text); }
.rank-table th.sorted { color: var(--accent); }
.rank-table .rk { color: var(--text-3); width: 30px; }
.rank-table .nm { font-weight: 600; }
.rank-table .nm small { display: block; font-weight: 400; color: var(--text-3); font-size: 11.5px; }
.rank-table .rg { width: 130px; }
.rank-table .nm .range { display: none; margin-top: 6px; }

/* ---------- 일정 */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { min-height: 140px; padding: 12px; }
.day.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.day h3 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
.day h3 b { color: var(--text); font-size: 15px; margin-right: 4px; }
.day.sat h3 b { color: var(--down); } .day.sun h3 b { color: var(--up); }
.ev { --c: var(--accent); border-left: 3px solid var(--c); padding: 4px 8px; margin-bottom: 6px; background: var(--chip); border-radius: 6px; font-size: 12.5px; }
.ev.imp3 { font-weight: 700; } .ev.imp1 { color: var(--text-2); }
.ev[data-code] { cursor: pointer; } .ev[data-code]:hover { background: var(--accent-soft); }
.c-us { --c: #2f6bed; } .c-policy { --c: #e5333f; } .c-ir { --c: #10a37f; } .c-expiry { --c: #f59e0b; } .c-holiday { --c: #8b5cf6; } .c-ipo { --c: #db2777; } .c-manual { --c: #64748b; }
.ev-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.ev-cat { border: 1px solid var(--border); cursor: pointer; font: inherit; font-size: 12px; padding: 4px 10px; }
.ev-cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.ev-cat.off { opacity: .45; text-decoration: line-through; }
.ev time { color: var(--text-3); font-size: 11px; margin-right: 4px; }
.ev small { display: block; color: var(--text-3); }

/* ---------- 일정 (월간·주간) — 모든 일정 글씨는 같은 크기·굵기·색 */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav b { font-size: 16px; min-width: 112px; text-align: center; }
.cal-nav .btn { padding: 5px 10px; }
.cal-foot { font-size: 12px; margin-top: 14px; }
.mev, .fev { font-size: 12.5px; font-weight: 400; color: var(--text); line-height: 1.45; }
.mev i, .fev i { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.mhead { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--text-2); border-bottom: 1px solid var(--line); background: var(--chip); }
.mhead.sat, .mnum.sat { color: var(--down); } .mhead.sun, .mnum.sun { color: var(--up); }
.mcell { min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; transition: background .15s; }
.mcell:nth-child(7n+7) { border-right: 0; }
.mcell:hover { background: var(--chip); }
.mcell.out { background: color-mix(in srgb, var(--chip) 60%, transparent); }
.mcell.out .mnum, .mcell.out .mevs { opacity: .45; }
.mcell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.mnum { font-size: 13px; font-weight: 700; margin: 0 2px 4px; }
.mev { display: flex; align-items: center; gap: 5px; padding: 1px 3px; border-radius: 4px; }
.mev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mev[data-code]:hover { background: var(--accent-soft); }
.mmore { font-size: 12.5px; font-weight: 700; font-style: italic; color: var(--text-2); padding: 2px 3px; }
.stars { color: #f5a400; letter-spacing: -1px; }
.stars .off { color: var(--track); }
.mdots { display: none; }
.wlist { display: flex; flex-direction: column; gap: 10px; }
.wday { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px 16px; }
.wday.today { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.wday-date { display: flex; flex-direction: column; gap: 2px; }
.wday-date b { font-size: 22px; line-height: 1.1; }
.wday-date span { font-size: 12.5px; color: var(--text-2); }
.wday-date.sat b { color: var(--down); } .wday-date.sun b { color: var(--up); }
.wday-date em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.wday-evs { display: flex; flex-direction: column; min-width: 0; }
.fev { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 12px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-solid); }
.fev:last-child { margin-bottom: 0; }
.fev-time { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 800; }
.fev-body { min-width: 0; overflow-wrap: anywhere; }
.fev b, .mev b { font-weight: 700; }
.fev.empty { display: block; color: var(--text-3); }
.fev[data-code] { cursor: pointer; } .fev[data-code]:hover { border-color: var(--accent); }
.fev-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 0 13px 6px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.day-modal { max-height: 60vh; overflow-y: auto; padding-right: 2px; }
.modal-panel:has(.day-modal) { width: fit-content; min-width: min(420px, 100%); max-width: min(980px, 100%); }
@media (min-width: 721px) { .day-modal .fev-body { white-space: nowrap; } }

/* 월간 마우스 오버 미리보기 */
.cal-preview { position: fixed; z-index: 45; width: max-content; min-width: 240px; max-width: 460px; padding: 10px 12px; background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-hover); pointer-events: none; animation: rise .12s ease; }
.prev-head { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.pev { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12.5px; color: var(--text); }
.pev i { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pev-time { flex: 0 0 auto; min-width: 38px; font-variant-numeric: tabular-nums; font-weight: 800; }
.mev .ev-time { font-weight: 800; }
.pev-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pev b { font-weight: 700; }
.prev-more { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; font-style: italic; color: var(--text-2); }

/* ---------- 시장종합 */
.idx-card { cursor: pointer; }
.idx-card h2 { display: flex; align-items: center; gap: 8px; }
.idx-hint { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--accent); }
.idx-card.on { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.ix-panel { margin: 14px 0; animation: rise .2s ease; scroll-margin-top: 120px; }
.ix-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.ix-head .btn { margin-left: auto; }
.ix-name { font-weight: 800; font-size: 15px; }
.ix-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.ix-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.ix-tfs { display: flex; flex-wrap: wrap; gap: 8px; }
.fut-note { font-size: 11.5px; margin-top: 6px; }
.fut-row[data-idx] { cursor: pointer; border-radius: 6px; padding-left: 4px; padding-right: 4px; margin: 0 -4px; }
.fut-row[data-idx]:hover { background: var(--chip); }
.fut-row.on { background: var(--accent-soft); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.ix-chart-wrap { position: relative; }
.ix-chart { height: 420px; }
.ix-tip { position: absolute; top: 8px; left: 8px; z-index: 5; min-width: 170px; padding: 10px 12px; background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-hover); font-size: 12.5px; pointer-events: none; }
.ix-tip > div { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; }
.ix-tip span { color: var(--text-2); }
.ix-tip .ix-tip-date { color: var(--text-2); margin-bottom: 4px; }
/* 수급 동향 */
#mkFlows { margin-top: 14px; }
.fl-section { margin-top: 4px; }
.fl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.fl-head h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.fl-head .spacer { flex: 1; }
.fl-ctrl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fl-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.fl-card { padding: 12px 14px; }
.fl-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.fl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fl-table th { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.fl-table th:nth-child(n+3), .fl-table td:nth-child(n+3) { text-align: right; white-space: nowrap; }
.fl-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.fl-table th:first-child, .fl-table td:first-child { width: 26px; }
.fl-table tbody tr[data-code] { cursor: pointer; }
.fl-table tbody tr[data-code]:hover td { background: var(--chip); }
.fl-name { max-width: 0; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-note { font-size: 12px; margin: 10px 0 0; }
.fl-mk { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 12px; }
.fl-sub { margin: 12px 0 4px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.fl-dets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0 14px; }
.fl-det { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fl-det span { color: var(--text-2); }
.fl-chart { height: 260px; margin-top: 6px; }
.fl-pending { margin-bottom: 4px; } .fl-pending p { margin: 6px 0 0; color: var(--text-2); font-size: 13px; }
/* 상승·하락 종목 수, 상위 종목 */
#mkMovers { margin-top: 18px; }
.br-card { margin-bottom: 12px; }
.br-row { padding: 8px 0; border-top: 1px solid var(--line); }
.br-row:first-of-type { border-top: 0; }
.br-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13px; margin-bottom: 6px; }
.br-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--track); gap: 2px; }
.br-bar i { display: block; height: 100%; }
.br-up { background: var(--up); } .br-flat { background: var(--text-3); opacity: .5; } .br-down { background: var(--down); }
.mv-more { margin-left: auto; font-size: 12px; } .mv-more:hover { color: var(--accent); }
.mv-table tr.limit td { background: var(--limit); color: var(--limit-text); }
.mv-table tr.limit .up { color: var(--limit-text); }
.fl-tots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 16px; }
.fl-tot b:first-child { margin-right: 6px; }
.modal-panel.wide { max-width: 1200px; width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; }
.mk-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-12 { grid-column: span 12; }
.big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.kv { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.flow-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 84px; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.flow-bar { height: 10px; position: relative; }
.flow-bar .mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.flow-bar .b { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.chart-box { height: 240px; margin-top: 8px; }
.fut-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; white-space: nowrap; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); }

/* ---------- 종목 상세 시트 */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 22, 0.42); backdrop-filter: blur(2px); display: flex; justify-content: center; align-items: flex-start; padding: 40px 16px; overflow-y: auto; }
.tsheet { z-index: 49; }
.sheet-panel.tsheet-panel { max-width: 980px; }
.tsheet-desc { margin: 4px 0 14px; color: var(--text-2); font-size: 13.5px; }
.sheet-panel { width: 100%; max-width: 820px; background: var(--card-solid); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-hover); padding: 20px; animation: rise .2s ease; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.sd-head { display: flex; align-items: flex-start; gap: 10px; }
.sd-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.sd-head .close { margin-left: auto; }
.sd-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 6px 0 12px; }
.sd-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; }
.sd-tabs button { border: 0; background: transparent; padding: 9px 14px; cursor: pointer; color: var(--text-3); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sd-tabs button.on { color: var(--text); border-color: var(--accent); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 18px; margin-bottom: 14px; }
.info-grid div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-grid span { color: var(--text-3); }
.sec { margin: 24px 0 10px; padding: 7px 12px; font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--text);
  background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; }
.list a, .list div.li { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list a:hover { color: var(--accent); }
.list small { color: var(--text-3); margin-left: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ov p { margin: 0 0 6px; color: var(--text-2); }
.tf-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.ma-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-3); }
.ma-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.stock-chart { height: 380px; }

.ob { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); font-size: 13px; }
.ob > div { padding: 6px 8px; border-bottom: 1px solid var(--line); position: relative; }
.ob .q { position: relative; }
.ob .q .bg { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; }
.ob .q.sell .bg { right: 0; background: var(--down-soft); }
.ob .q.buy .bg { left: 0; background: var(--up-soft); }
.ob .q span { position: relative; }
.ob .q.sell { text-align: right; }
.ob .p { font-weight: 700; text-align: center; }
.ob .p.sellp { background: var(--down-soft); } .ob .p.buyp { background: var(--up-soft); }
.ob-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.ticks { font-size: 12.5px; }
.ticks div { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line); }

/* ---------- 모달 */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 14, 22, 0.42); display: grid; place-items: center; padding: 16px; }
.modal-panel { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--card-solid); border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-hover); padding: 20px; }
.modal-panel h2 { margin: 0 0 14px; font-size: 18px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row p { margin: 2px 0 0; font-size: 12px; color: var(--text-3); }

/* ---------- 하단 도크 */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--dock); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.strip { display: flex; align-items: center; gap: 12px; padding: 7px 20px; border-bottom: 1px solid var(--line); font-size: 12.5px; max-width: 1280px; margin: 0 auto; }
.idx-ticker { display: flex; gap: 14px; white-space: nowrap; flex-shrink: 0; }
.idx-ticker b { margin-right: 4px; }
.news-wrap { flex: 1; overflow: hidden; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.news-ticker { display: inline-flex; gap: 28px; padding-right: 28px; white-space: nowrap; animation: marquee 120s linear infinite; }
.news-wrap:hover .news-ticker { animation-play-state: paused; }
.news-ticker a time { color: var(--text-3); margin-right: 6px; }
.news-ticker a:hover { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .news-ticker { animation-duration: 400s; } }
.disclaimer a { text-decoration: underline; }
.disclaimer { margin: 0 auto; max-width: 1280px; padding: 4px 20px; font-size: 11px; color: var(--text-3); }
.tabs { display: flex; justify-content: center; gap: 4px; max-width: 640px; margin: 0 auto; padding: 4px 8px 6px; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; color: var(--text-3); font-size: 11.5px; font-weight: 600; }
.tabs a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--on-accent); background: var(--accent); }
.tabs a:hover { color: var(--text); }

/* ---------- 반응형 */
@media (max-width: 1000px) {
  .th-heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .span-3 { grid-column: span 6; } .span-4 { grid-column: span 6; } .span-6 { grid-column: span 12; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .chwrap { order: 2; flex-basis: 100%; }
  .channel { flex: 1 1 auto; border-left: 0; padding: 2px 0; gap: 8px; }
  .chl-l { display: none; }
  .chl-btn { padding: 5px 9px; font-size: 12px; }
  .channel img { width: 30px; height: 30px; }
  .channel-text { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
  .channel-name { font-size: 13.5px; }
  .clock #clock { display: none; }
  .view { padding: 12px 12px 200px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .th-heroes { grid-template-columns: minmax(0, 1fr); }
  .th-line { grid-template-columns: 22px minmax(0, 1fr) 62px 14px; }
  .th-lpeek { display: none; }
  .th-more { padding-left: 0; }
  .heatmap { height: 460px; }
  .rank-table .rg, .rank-table .mc { display: none; }
  .rank-table .nm .range { display: block; }
  .rank-table th, .rank-table td { padding: 8px 5px; }
  .ob-wrap { grid-template-columns: minmax(0, 1fr); }
  .mcell { min-height: 64px; padding: 4px 3px; }
  .mevs, .mmore { display: none; }
  .mdots { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
  .mdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
  .mdots span { font-size: 11px; color: var(--text-2); margin-left: 2px; }
  .mhead { padding: 6px 4px; text-align: center; }
  .mnum { text-align: center; margin: 0 0 4px; }
  .wday { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; }
  .wday-date { flex-direction: row; align-items: baseline; gap: 8px; }
  .cal-nav b { min-width: 0; }
  .sheet { padding: 0; }
  .sheet-panel { border-radius: 0; min-height: 100%; padding: 16px 14px 120px; }
  .stock-chart { height: 300px; }
  .ix-chart { height: 320px; }
  .ix-tip { min-width: 150px; padding: 8px 10px; font-size: 12px; }
  .strip { padding: 6px 12px; flex-wrap: wrap; row-gap: 4px; }
  .news-wrap { flex-basis: 100%; }
  .idx-ticker .chg { display: none; }
  .disclaimer { padding: 3px 12px; }
}
@media (max-width: 560px) {
  .span-3, .span-4 { grid-column: span 12; }
  .week { grid-template-columns: minmax(0, 1fr); }
  .day { min-height: 0; }
  .srow, .srow-head { grid-template-columns: minmax(0, 1fr) 70px 56px 50px; column-gap: 6px; }
  .info-grid { grid-template-columns: minmax(0, 1fr); }
  .ob { grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr); }
}

/* ---------- 구독자 입장 화면 */
.gate { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: 20px 16px; overflow-y: auto; }
body.gated { overflow: hidden; }
.gate-card { width: 100%; max-width: 400px; background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px 24px 22px; box-shadow: var(--shadow-hover); }
.gate-brand { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.gate-brand span { color: var(--text); }
.gate-brand .brand-mark { width: 32px; height: 32px; }
.gate-stripe { height: 3px; margin: 14px 0 18px; border-radius: 2px; background: linear-gradient(90deg, var(--down) 0 50%, var(--up) 50% 100%); }
.gate-channel { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 18px; }
.gate-channel img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; border: 2px solid #fff; background: #fbf3e6; flex: none; }
.gate-channel b { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -0.02em; }
.gate-channel b i { font-style: normal; font-weight: 500; color: var(--text-3); margin: 0 3px; }
.gate-channel small { display: block; font-size: 12px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.gate-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.gate-card input { width: 100%; height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: 0.08em; outline: none; }
.gate-card input::placeholder { font-weight: 400; letter-spacing: 0; color: var(--text-3); font-size: 14px; }
.gate-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gate-err { color: var(--up); font-size: 13px; margin: 8px 0 0; }
.gate-btn { width: 100%; height: 46px; margin-top: 12px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 800; cursor: pointer; }
.gate-btn:disabled { opacity: .6; cursor: wait; }
.gate-help { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin: 16px 0 0; }
.gate-help a { color: var(--accent); font-weight: 700; text-decoration: underline; }

.dart-tag { font-size: 11px; font-weight: 700; color: var(--accent); margin-left: 4px; white-space: nowrap; }
.dart-src { font-size: 11.5px; margin: 6px 0 0; }

/* AI분석 상승이유: 다른 탭과 달리 색 박스로 강조 */
.sd-tabs { align-items: center; }
.sd-tabs .sd-ai { margin-left: 6px; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 0; }
.sd-tabs .sd-ai:hover { filter: brightness(0.97); }
.sd-tabs .sd-ai.on { background: var(--accent); color: var(--on-accent); }
.ai-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.ai-head { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 8px; }
.ai-badge { background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; }
.ai-sum { font-size: 15px; font-weight: 700; margin: 0 0 10px; line-height: 1.5; }
.ai-reason { padding: 10px 0; border-top: 1px solid var(--line); }
.ai-reason b { font-size: 14px; }
.ai-reason p { margin: 4px 0 6px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.ai-src { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-src a { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--chip); color: var(--text-2); }
.ai-src a:hover { color: var(--accent); }
.ai-note { font-size: 11.5px; margin: 10px 0 0; }

/* ============================================================ 주도섹터 · 대금상위 (테마 색) */
/* 테마마다 고정 파스텔 색. --tc-bg = 칸/행 배경, --tc-bd = 테두리·강조 */
.tc-0 { --tc-bg: #fbd3d0; --tc-bd: #ef9f99; }
.tc-1 { --tc-bg: #dcd8fc; --tc-bd: #a9a1f1; }
.tc-2 { --tc-bg: #d3ecfc; --tc-bd: #8fcaf2; }
.tc-3 { --tc-bg: #fde1bf; --tc-bd: #f4b66c; }
.tc-4 { --tc-bg: #fcebab; --tc-bd: #eccc55; }
.tc-5 { --tc-bg: #e5ea9f; --tc-bd: #c3cd4c; }
.tc-6 { --tc-bg: #cdeedb; --tc-bd: #7fd0a3; }
.tc-7 { --tc-bg: #eedcf6; --tc-bd: #cd9fe4; }
.tc-8 { --tc-bg: #ece2d6; --tc-bd: #c7ae93; }
.tc-9 { --tc-bg: #ffd9c7; --tc-bd: #f5a07a; }
.tc-none { --tc-bg: var(--chip); --tc-bd: var(--border); }
:root { --tc-ink: #1c1917; --tc-pill: rgba(255, 255, 255, 0.72); --lu-bg: #fde9e8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tc-ink: var(--text); --tc-pill: rgba(0, 0, 0, 0.32); --lu-bg: rgba(255, 90, 82, 0.13); }
  :root:not([data-theme="light"]) [class*="tc-"] { --tc-bg: color-mix(in srgb, var(--tc-bd) 26%, #141414); }
}
:root[data-theme="dark"] { --tc-ink: var(--text); --tc-pill: rgba(0, 0, 0, 0.32); --lu-bg: rgba(255, 90, 82, 0.13); }
:root[data-theme="dark"] [class*="tc-"] { --tc-bg: color-mix(in srgb, var(--tc-bd) 26%, #141414); }

.ld-h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; margin: 2px 0 12px; }
.ld-h3 { font-size: 16px; font-weight: 800; margin: 14px 0 10px; }
.ld-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.ld-grid.one { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }

/* 주도섹터 카드 */
.ld-card { background: var(--card); border: 2px solid var(--tc-bd); border-radius: 16px; padding: 14px 4px 6px; min-width: 0; box-shadow: 0 2px 10px color-mix(in srgb, var(--tc-bd) 22%, transparent); }
.ld-head { display: flex; align-items: center; gap: 10px; padding: 0 14px 8px; min-width: 0; }
.ld-rank { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--tc-bg); color: var(--tc-ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.ld-title { flex: none; font-size: 22px; font-weight: 800; letter-spacing: -0.04em; color: var(--text); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.ld-news { position: relative; flex: 1; min-width: 0; height: 1.5em; font-size: 13px; overflow: hidden; }
.ld-news a { position: absolute; inset: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1.5px solid var(--text-3); opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s; pointer-events: none; }
.ld-news a.on { opacity: 1; transform: none; pointer-events: auto; }
.ld-news a:hover { color: var(--text); }
.ld-news.empty { color: var(--text-3); white-space: nowrap; text-overflow: ellipsis; }
.ld-cols, .ld-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 76px 70px; align-items: center; gap: 6px; padding: 0 14px; }
.ld-cols { font-size: 11.5px; color: var(--text-3); padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.ld-cols span:not(:first-child), .ld-row > span:not(:first-child) { text-align: right; }
.ld-cols span:nth-child(3), .ld-row > span:nth-child(3) { text-align: center; }
.ld-row { min-height: 48px; cursor: pointer; transition: background .15s; }
.ld-row:hover { background: var(--chip); }
.ld-row.lu { background: var(--lu-bg); }
.ld-nm { font-size: 15.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-px { font-size: 16.5px; font-weight: 800; }
.ld-rt { font-size: 13.5px; font-weight: 700; }
.ld-val { font-size: 15.5px; font-weight: 700; color: var(--text); }
.ld-limit { color: var(--up); font-weight: 800; font-size: 14px; }
/* +10% 이상: 작은 글자 칩 (빨간 삼각형은 넥스트레이드 표시라 겹치지 않게) */
.ld-hot { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 15px; color: #fff; background: var(--up); vertical-align: 2px; letter-spacing: 0; }
.ld-more { display: block; width: 100%; border: 0; background: transparent; color: var(--text-3); font-size: 12.5px; padding: 8px 0 4px; cursor: pointer; }
.ld-more:hover { color: var(--text); }
.ld-foot { padding: 6px 14px 4px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); margin-top: 2px; }

/* 거래대금 상위 상승종목 — 테마 색 알약 행 */
.lt-list { display: grid; gap: 8px; max-width: 880px; }
.lt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 86px 70px; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px; border-radius: 12px; background: var(--tc-bg); color: var(--tc-ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.lt-row:hover { transform: translateY(-1px); box-shadow: 0 3px 10px color-mix(in srgb, var(--tc-bd) 45%, transparent); }
.lt-nm { display: flex; align-items: baseline; gap: 5px; min-width: 0; white-space: nowrap; }
.lt-nm b { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; }
.lt-nm small { font-size: 11.5px; color: color-mix(in srgb, var(--tc-ink) 55%, transparent); overflow: hidden; text-overflow: ellipsis; }
.lt-nm .ld-hot { align-self: center; flex: none; }
.lt-px { font-size: 18px; font-weight: 800; color: var(--up); text-align: right; }
.lt-rt { justify-self: end; font-size: 13.5px; font-weight: 700; color: var(--up); background: var(--tc-pill); padding: 4px 9px; border-radius: 8px; }
.lt-rt.lu { background: var(--up); color: #fff; }
.lt-val { font-size: 15px; font-weight: 700; text-align: right; }

/* 증시캘린더 > 일별 주도섹터 (월~금 달력) */
.lgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.lgrid .mhead { text-align: center; }
.lcell { position: relative; min-height: 84px; padding: 6px 8px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.lcell:nth-child(5n+5) { border-right: 0; }
.lcell.has { background: var(--tc-bg); cursor: pointer; }
.lcell.has:hover { filter: brightness(0.97); }
.lcell.out { opacity: .4; }
.lcell.today { box-shadow: inset 0 0 0 3px #4ade80; }
.lnum { font-size: 12px; color: var(--text-3); font-weight: 600; }
.lcell.has .lnum { color: color-mix(in srgb, var(--tc-ink) 60%, transparent); }
.lnum em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--up); margin-left: 4px; }
.lsecs { flex: 1; display: grid; place-items: center; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--tc-ink); line-height: 1.35; word-break: keep-all; padding-top: 2px; }
.ld-modal h2 { margin-bottom: 10px; }
.modal .ld-modal .ld-card { box-shadow: none; }

@media (max-width: 720px) {
  .ld-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ld-title { font-size: 20px; }
  .ld-cols, .ld-row { grid-template-columns: minmax(0, 1fr) 72px 66px 58px; gap: 4px; padding: 0 10px; }
  .ld-head { padding: 0 10px 8px; }
  .ld-nm, .ld-val { font-size: 14.5px; }
  .ld-px { font-size: 15px; }
  .ld-rt { font-size: 12.5px; }
  .lt-row { grid-template-columns: minmax(0, 1fr) auto 74px 56px; gap: 6px; padding: 6px 10px; }
  .lt-nm { flex-wrap: wrap; row-gap: 0; }
  .lt-nm small { flex-basis: 100%; }
  .lt-nm b { font-size: 15.5px; }
  .lt-px { font-size: 15.5px; }
  .lt-rt { font-size: 12px; padding: 3px 6px; }
  .lt-val { font-size: 13px; }
  .lcell { min-height: 68px; padding: 4px; }
  .lsecs { font-size: 11.5px; }
  .tabs a { font-size: 10.5px; padding: 6px 2px; }
}

/* 시장종합 가독성: 카드 제목은 또렷하게, 표는 한 단계 크게, 등락 숫자는 굵게 */
.idx-card h2, .fl-card .fl-title b, .br-card .fl-title b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.fl-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.fl-head h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--accent); }
.fl-table { font-size: 14px; }
.fl-table th, .rank-table th { font-size: 12px; color: var(--text-3); }
.fl-table td.num, .fut-row .num { font-weight: 600; }
.fl-table .up, .fl-table .down, .fut-row .up, .fut-row .down, .fl-det .up, .fl-det .down { font-weight: 700; }
.fut-row { font-size: 14px; }
.fl-det { font-size: 13.5px; }
.br-top { font-size: 13.5px; }
.fut-note, .fl-note { font-size: 12px; }
.mv-table tr.limit td:first-child, .rank-table tr.limit td:first-child { box-shadow: inset 3px 0 0 var(--up); }
.fl-title { flex-wrap: wrap; row-gap: 2px; }
.fl-title b { white-space: nowrap; }

/* 상승 섹터 카드: 주도섹터 카드와 같은 생김새 */
.th-hero { background: var(--card); border: 2px solid var(--tc-bd); border-radius: 16px; padding: 14px 16px 8px; min-width: 0; box-shadow: 0 2px 10px color-mix(in srgb, var(--tc-bd) 22%, transparent); }
.th-hero .th-rank, .th-rank.sm[class*="tc-"] { background: var(--tc-bg); color: var(--tc-ink); }
.th-hero .th-name { font-size: 21px; letter-spacing: -0.04em; }
.th-hero .th-big { font-size: 19px; }
.th-cols { display: grid; grid-template-columns: minmax(0, 1fr) 84px 76px; gap: 8px; font-size: 11.5px; color: var(--text-3); padding: 8px 0 4px; border-bottom: 1px solid var(--line); margin-top: 4px; }
.th-cols span:not(:first-child) { text-align: right; }
.th-hero .th-srow { grid-template-columns: minmax(0, 1fr) 84px 76px; min-height: 44px; align-items: center; padding: 6px; font-size: 15px; }
.th-hero .th-srow:first-of-type { border-top: 0; }
.th-hero .th-sname { font-weight: 600; }
.th-hero .th-srow .num:nth-child(2) { font-size: 13.5px; text-align: right; }
.th-hero .th-sval { font-size: 15px; font-weight: 700; color: var(--text); text-align: right; }
.th-list { border-radius: 16px; }
/* 시장종합 순위 표: 종목 옆 연한 테마 (앞의 점은 주도섹터와 같은 테마 색) */
.mv-tag { margin-left: 6px; font-size: 11.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.mv-tag::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--tc-bd); margin-right: 4px; vertical-align: 1px; }

/* 시장종합 카드: 카드마다 고정 파스텔 테두리 (주도섹터 카드와 같은 생김새) */
.card.mk-card { border: 2px solid var(--tc-bd); border-radius: 16px; box-shadow: 0 2px 10px color-mix(in srgb, var(--tc-bd) 22%, transparent); }
.card.mk-card.idx-card.on { box-shadow: inset 0 0 0 2px var(--accent), 0 2px 10px color-mix(in srgb, var(--tc-bd) 22%, transparent); }
.mk-card .idx-hint { color: var(--text-2); }

/* 증시캘린더: 분류 키는 분류 색 테두리 칩, 달력·주간 카드는 파스텔 테두리 */
.ev-filter { gap: 8px; margin: -2px 0 16px; }
.ev-cat { border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--card)); color: var(--text); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; gap: 6px; }
.ev-cat b { color: color-mix(in srgb, var(--c) 80%, var(--text)); font-weight: 800; }
.ev-cat i { width: 9px; height: 9px; }
.ev-cat:hover { background: color-mix(in srgb, var(--c) 16%, var(--card)); }
.ev-cat.off { border-color: var(--line); background: transparent; opacity: .5; }
.card.mgrid, .card.lgrid { border: 2px solid #8fcaf2; border-radius: 16px; box-shadow: 0 2px 10px rgba(143, 202, 242, 0.22); }
.mgrid .mhead, .lgrid .mhead { font-size: 13px; font-weight: 800; color: var(--text); background: color-mix(in srgb, #8fcaf2 18%, var(--card)); border-bottom: 1.5px solid color-mix(in srgb, #8fcaf2 55%, transparent); }
.mnum { font-size: 14px; }
.card.wday { border: 2px solid #8fcaf2; border-radius: 16px; box-shadow: 0 2px 10px rgba(143, 202, 242, 0.18); }
.card.wday.today { border-color: var(--accent); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 25%, transparent); }
@media (max-width: 720px) {
  /* 휴대폰: 테마는 종목 이름 아래 줄로 (이름이 잘리지 않게) */
  .mv-table .fl-name b { display: block; overflow: hidden; text-overflow: ellipsis; }
  .mv-table .mv-tag { display: block; margin: 1px 0 0; overflow: hidden; text-overflow: ellipsis; }
}

/* 상한가 진입 시각 */
.lu-time { margin-left: 4px; font-size: 11px; font-weight: 700; color: var(--up); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lu-at { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  /* 휴대폰: 주도섹터 카드 열을 좁혀 종목명이 보이게 (팝업 안에서도) */
  /* 현재가는 종목명 아래 줄로 → 종목명이 넓게 보인다 */
  .ld-cols, .ld-row { grid-template-columns: minmax(0, 1fr) 64px 58px; gap: 0 6px; padding: 0 10px; }
  .ld-row { grid-template-areas: "nm rt val" "px rt val"; padding-top: 6px; padding-bottom: 6px; }
  .ld-row > .ld-nm { grid-area: nm; font-size: 14.5px; }
  .ld-row > .ld-px { grid-area: px; text-align: left !important; font-size: 13.5px; }
  .ld-row > .ld-rt { grid-area: rt; font-size: 12.5px; }
  .ld-row > .ld-val { grid-area: val; font-size: 13.5px; }
  .ld-cols span:nth-child(2) { display: none; }
  .ld-head { padding: 0 10px 8px; }
  .ld-title { font-size: 19px; }
  .modal-panel { padding: 14px; }
  .ld-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 간밤 해외시장 (오버나잇 마켓 브리핑) */
.ovn { margin: 0 0 14px; }
#ovnBelow .ovn, #ovnBelow .ovn-strip { margin: 14px 0 0; }
.ovn-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ovn-head b { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.ovn-head .muted { font-size: 12px; }
.ovn-range { font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--chip); padding: 2px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.ovn-head .spacer { flex: 1; }  /* 접기 버튼을 펼치기 버튼과 같은 오른쪽 끝에 */
.ovn-head .ovn-toggle { margin-left: auto; }
.ovn-src { font-size: 12px; } .ovn-src:hover { color: var(--accent); }
.ovn-toggle { border: 0; background: var(--chip); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.ovn-desc { font-size: 12px; margin: 6px 0 12px; }
.ovn-grid { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ovn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ovn-c { border: 2px solid var(--tc-bd); border-radius: 14px; padding: 10px 12px 8px; min-width: 0; background: var(--card); }
.ovn-t { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovn-t small { font-size: 11px; font-weight: 500; color: var(--text-3); margin-left: 5px; }
.ovn-v { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.ovn-r { font-size: 13.5px; font-weight: 700; }
.ovn-r .muted { font-weight: 500; font-size: 12px; }
.ovn-spark { display: block; width: 100%; height: 34px; margin: 6px 0 4px; }
.ovn-f { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovn-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; width: 100%; padding: 10px 14px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; color: var(--text); }
.ovn-strip b { font-weight: 800; }
.ovn-strip .num { font-weight: 700; }
.ovn-strip .spacer { flex: 1; }
@media (max-width: 520px) { .ovn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ovn-v { font-size: 17px; } }

/* 주도섹터 박스 — 촘촘한 카드 (티마처럼 한눈에) */
.ld-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.ld-card.lc { padding: 0 0 4px; border-radius: 14px; overflow: hidden; }
.lc-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--tc-bg); }
.lc-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.03em; color: var(--tc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.lc-total { flex: none; font-size: 12.5px; font-weight: 800; color: var(--text); background: var(--card); border-radius: 999px; padding: 2px 8px; }
.lc-news { padding: 5px 10px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--tc-bg) 35%, var(--card)); }
.lc-news .ld-news { display: block; height: 1.45em; font-size: 12px; }
.lc-news .ld-news a { border-bottom: 0; }
.lc-row { padding: 6px 10px 7px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lc-row:hover { background: var(--chip); }
.lc-row.lu { background: var(--lu-bg); }
.lc-l { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; }
.lc-nm { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lc-rt { font-size: 13.5px; font-weight: 800; white-space: nowrap; text-align: right; }
.lc-rt .lu-at { display: inline; margin-left: 3px; }
.lc-px { font-size: 13px; font-weight: 700; }
.lc-val { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.cb { position: relative; height: 10px; margin-top: 5px; border-radius: 3px; background: var(--track); }
.cb.empty { visibility: hidden; }
.cb i { position: absolute; display: block; }
.cb-wick { top: 4px; height: 2px; border-radius: 1px; opacity: .55; }
.cb-body { top: 1px; height: 8px; border-radius: 2px; }
.cb-prev { top: -2px; width: 2px; height: 14px; margin-left: -1px; background: var(--text); border-radius: 1px; }
.ld-card.lc .ld-more { padding: 6px 0 2px; font-size: 12px; }
@media (max-width: 520px) {
  .ld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .lc-head { padding: 7px 8px; }
  .lc-name { font-size: 14.5px; }
  .lc-total { font-size: 11.5px; padding: 1px 6px; }
  .lc-news { padding: 4px 8px; }
  .lc-row { padding: 5px 8px 6px; }
  .lc-nm { font-size: 13px; }
  .lc-rt { font-size: 12.5px; }
  .lc-px { font-size: 12.5px; }
  .lc-val { font-size: 11.5px; }
}

/* PC 프로그램 창 크기 전환 */
.app-size { padding: 2px; border-radius: 9px; }
.app-size button { padding: 4px 9px; font-size: 12px; }

/* 넥스트레이드 거래 가능 종목 표시: 이름 오른쪽 아래 빨간 삼각형 */
.nx { display: inline-block; width: 0; height: 0; margin-left: 1px; vertical-align: baseline;
  border-left: 7px solid transparent; border-bottom: 7px solid #E5383B; }

/* 거래대금순 탭: 업종 전체 거래대금 (박스 위 숫자는 두 탭 모두 박스 종목 합계) */
.lc-all { padding: 3px 10px; font-size: 11.5px; color: var(--text-2); background: var(--tc-bg); border-top: 1px solid var(--line); text-align: right; }
.lc-all b { color: var(--text); font-weight: 800; }
@media (max-width: 520px) { .lc-all { padding: 2px 8px; font-size: 11px; } }

/* 시장종합 작은 지수 카드: 한 줄에 2개 (넓은 화면 4개), 거래대금 + 작은 선 차트 */
.mk-grid#mkTop { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.idx-card.mini { padding: 12px 14px 10px; min-width: 0; }
.mi-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.mi-name { font-size: 14px; font-weight: 700; color: var(--text-2); }
.mi-val { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.mi-px { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.mi-px b { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.mi-px span { font-size: 14px; font-weight: 700; }
.mi-spark { display: block; width: 100%; height: 46px; margin-top: 6px; }
.idx-card.mini .fut-row { padding: 4px 0; font-size: 13px; gap: 4px; white-space: nowrap; }
.idx-card.mini .fut-row .num b { margin-left: 2px; }
@media (max-width: 900px) { .mk-grid#mkTop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 520px) {
  .idx-card.mini { padding: 10px 11px 8px; }
  .mi-px b { font-size: 18px; } .mi-px span { font-size: 12.5px; }
  .mi-spark { height: 38px; }
  .idx-card.mini .fut-row { font-size: 12px; }
}
/* 금일 수급 표: 시장 칸은 고정, 이름을 누르면 아래로 펼침 */
.fls { padding: 6px 14px 10px; }
.fls-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fls-table th, .fls-table td { padding: 12px 4px; text-align: center; border-bottom: 1px solid var(--line); font-size: 15px; }
.fls-table thead th { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 8px 4px; }
.fls-table tbody th { text-align: left; }
.fls-table td { font-weight: 800; }
.fls-table tbody tr:last-child th, .fls-table tbody tr:last-child td { border-bottom: 0; }
.fls-mk { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 800; color: var(--text); cursor: pointer; }
.fls-mk i { font-style: normal; font-size: 11px; color: var(--text-3); margin-left: 2px; }
.fls-table tr.on th .fls-mk { color: var(--accent); }
.fls-unit { margin: 4px 0 0; font-size: 11.5px; }
.fls-detail { margin-top: 12px; }
@media (max-width: 520px) { .fls-table th, .fls-table td { font-size: 13.5px; padding: 10px 2px; } .fls-mk { font-size: 13.5px; } }
/* 수급 탭 맨 위: 코스피·코스닥·선물 등락률 선 차트 */
.il-card { padding: 12px 14px; margin-bottom: 14px; }
.il-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin-bottom: 8px; }
.il-i { display: inline-flex; align-items: center; gap: 5px; }
.il-i i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.il-chart { height: 300px; }
@media (max-width: 520px) { .il-chart { height: 240px; } }

/* 입장 화면: 로그인 / 회원가입 / 입장 코드 */
.gate-tabs { display: flex; width: 100%; margin-bottom: 14px; }
.gate-tabs button { flex: 1; padding: 8px 0; font-size: 13.5px; }
.gate-pane .gate-label { margin-top: 10px; }
.gate-pane .gate-label:first-child { margin-top: 0; }
.gate-card input.plain { letter-spacing: 0; font-weight: 600; text-transform: none; }
.gate-pane input + input { margin-top: 8px; }
.gate-ok { color: var(--accent); font-size: 13px; font-weight: 700; margin: 6px 0 0; }
.gate-help b { color: var(--text); }
/* 관리자 화면 */
.adm-login { max-width: 420px; padding: 20px; }
.adm-card { padding: 16px 18px; margin-bottom: 14px; }
.adm-h { font-size: 16px; font-weight: 800; margin: 0 0 10px; }
.adm-in { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; box-sizing: border-box; }
.adm-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.adm-in { resize: vertical; line-height: 1.5; }
.adm-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.adm-row .adm-h { margin: 0; }
.adm-row .spacer { flex: 1; }
.adm-date { width: auto; }
.adm-q { width: auto; flex: 1; min-width: 140px; }
.gate-btn.adm-go { width: auto; height: 38px; margin: 0; padding: 0 18px; font-size: 14px; }
.adm-note { font-size: 12px; margin: 8px 0 0; }
.adm-msg { font-size: 13px; font-weight: 700; color: var(--accent); margin: 8px 0 0; }
.adm-table-wrap { overflow-x: auto; margin-top: 10px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-id { font-weight: 700; }
.adm-stocks { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.adm-acts { text-align: right; }
.adm-acts .btn { padding: 4px 9px; font-size: 12px; margin-left: 4px; }
.btn.danger { color: var(--up); }
.adm-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.adm-badge.ok { background: color-mix(in srgb, #2fa84f 16%, transparent); color: #1f7a3a; }
.adm-badge.warn { background: color-mix(in srgb, #f59e0b 20%, transparent); color: #9a5b00; }
.adm-badge.bad { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.adm-badge.idle { background: var(--chip); color: var(--text-2); }
.adm-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.adm-sug-wrap { position: relative; }
.adm-sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--card-solid); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-hover); max-height: 260px; overflow-y: auto; padding: 4px; }
.adm-sug button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.adm-sug button:hover { background: var(--chip); }
.adm-sug > .muted { display: block; padding: 8px 10px; font-size: 13px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.adm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.adm-chip button { border: 0; background: none; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 4px; }
@media (max-width: 520px) { .adm-grid { grid-template-columns: 1fr; } .adm-card { padding: 14px 12px; } }

/* 관리자 표: 휴대폰에서는 한 줄을 카드처럼 (아이디·상태 / 기한·접속 / 버튼) — 옆으로 밀지 않아도 버튼이 보이게 */
@media (max-width: 620px) {
  .adm-table thead { display: none; }
  .adm-table, .adm-table tbody { display: block; }
  .adm-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .adm-table td { border: 0; padding: 2px; white-space: normal; }
  .adm-table td:nth-child(2), .adm-table td:nth-child(4) { text-align: right; }
  .adm-table .adm-acts { grid-column: 1 / -1; text-align: left; padding-top: 6px; }
  .adm-table .adm-acts .btn { margin: 0 4px 4px 0; }
  .adm-stocks { max-width: none; }
}
.adm-on { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2fa84f; vertical-align: middle; margin-left: 2px; }

/* 공지 팝업 */
.notice-ov { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; padding: 20px 16px; overflow-y: auto; }
.notice-ov[hidden] { display: none; }
.nt-card { width: 100%; max-width: 400px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--card-solid); border-radius: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); display: flex; flex-direction: column; }
.nt-img { display: block; flex: none; }
.nt-img img { display: block; width: 100%; height: auto; }
.nt-text { padding: 16px 18px 4px; }
.nt-chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.nt-text h3 { margin: 8px 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.nt-text p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-2); word-break: keep-all; overflow-wrap: anywhere; }
.nt-text p a { color: var(--accent); text-decoration: underline; }
.nt-btn { display: flex; align-items: center; justify-content: space-between; margin: 12px 14px 0; padding: 13px 18px; border-radius: 12px; background: #1f1f1f; color: #fff; font-size: 16px; font-weight: 800; text-decoration: none; }
.nt-btn:hover { background: #000; }
.nt-image .nt-btn { margin-top: 12px; }
.nt-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.nt-foot label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.nt-foot input { width: 15px; height: 15px; margin: 0; }
.nt-foot button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer; padding: 4px 2px; }
/* 관리자: 공지 쓰기 */
.nt-form { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; margin-top: 12px; align-items: start; }
.nt-form.noimg { grid-template-columns: minmax(0, 1fr); }
.nt-pick { display: flex; align-items: center; justify-content: center; min-height: 190px; border: 1.5px dashed var(--border); border-radius: 12px; cursor: pointer; overflow: hidden; background: var(--bg); text-align: center; }
.nt-pick:hover { border-color: var(--accent); }
.nt-pick img { display: block; width: 100%; height: auto; }
.nt-pick span { display: flex; flex-direction: column; gap: 4px; padding: 10px; font-size: 13px; color: var(--text-2); }
.nt-pick small { font-size: 11.5px; color: var(--text-3); }
.nt-check { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; }
@media (max-width: 520px) { .nt-form { grid-template-columns: 1fr; } .nt-pick { min-height: 140px; max-width: 220px; } }

/* 시장종합 PC 너비: 금일 수급 표와 상승·하락 종목 수를 한 줄에 (표가 양옆으로 길게 늘어나지 않게) */
.mk-pair { display: grid; grid-template-columns: minmax(0, 1fr); }
.mk-pair #mkBreadth:empty { display: none; }
.mk-spacer { display: none; }
@media (min-width: 900px) {
  /* 두 박스의 위·아래 선을 맞춘다: 오른쪽 위에 제목과 같은 높이의 빈칸, 두 박스는 같은 높이로 늘림 */
  .mk-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; margin-bottom: 14px; }
  .mk-pair.open { align-items: start; }
  .mk-spacer { display: flex; visibility: hidden; }
  .mk-pair { margin-top: 14px; }
  .mk-pair > div { margin-top: 0 !important; }
  .mk-pair > div, .mk-pair .fl-section { display: flex; flex-direction: column; min-width: 0; }
  .mk-pair .fl-section { flex: 1; margin-top: 0; }
  .mk-pair:not(.open) .fls, .mk-pair:not(.open) .br-card { flex: 1; }
  .mk-pair .br-card, .mk-pair .fls { margin: 0; }
  #mkFlowsDetail .fl-mk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }  /* 투자자별 순매수 | 누적 흐름 */
  #mkFlowsDetail:not(:empty) { margin-bottom: 14px; }
}

/* 수급 탭 선 차트: 선 끝 오른쪽 칸 = 현재 지수 시세 */
.il-card { position: relative; }
.il-tags { position: absolute; right: 14px; height: 0; pointer-events: none; z-index: 5; }  /* 차트 눈금 글자보다 위에 */
.il-tags span { position: absolute; right: 0; min-width: 100%; box-sizing: border-box; transform: translateY(-50%); padding: 2px 5px; border-radius: 3px; color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; white-space: nowrap; box-shadow: 0 0 0 2px var(--card-solid); }

/* 24시간 시세 (하이퍼리퀴드) */
.hl { padding: 14px 16px 12px; margin-bottom: 14px; }
.hl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hl-head b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.hl-head .muted { font-size: 12px; margin-left: auto; }
.hl-live { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--up); background: color-mix(in srgb, var(--up) 10%, transparent); padding: 2px 8px; border-radius: 999px; }
.hl-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); animation: hlPulse 1.6s ease-in-out infinite; }
@keyframes hlPulse { 50% { opacity: .25; } }
.hl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hl-c { border: 1px solid var(--tc-bd, var(--line)); background: var(--card-solid); border-radius: 12px; padding: 10px 12px; min-width: 0; perspective: 600px; }
.hl-c[data-sw] { cursor: pointer; user-select: none; transition: transform .15s, box-shadow .15s; }
.hl-c[data-sw]:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.hl-c[data-sw]:active { transform: scale(.97); }
.hl-mk { display: inline-flex; margin-top: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 1px; font-size: 10.5px; font-weight: 800; }
.hl-mk span { padding: 1px 7px; border-radius: 999px; color: var(--text-3, #999); transition: background .25s, color .25s; }
.hl-mk span.on { background: var(--text); color: var(--card-solid); }
.hl-flip .hl-sw { animation: hlFlip .5s cubic-bezier(.2,.8,.2,1); transform-origin: 50% 0; }
.hl-flip .hl-v { animation: hlPop .5s ease; }
@keyframes hlFlip { 0% { transform: rotateX(90deg); opacity: 0; } 60% { transform: rotateX(-12deg); opacity: 1; } 100% { transform: rotateX(0); } }
@keyframes hlPop { 0% { transform: translateY(6px); opacity: .2; } 100% { transform: none; opacity: 1; } }
.hl-n { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hl-n b { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-logo { width: 20px; height: 20px; border-radius: 50%; flex: none; background: #fff; }
.hl-usd { font-size: 11px; margin-top: 2px; }
.hl-v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; white-space: nowrap; }
.hl-v small { font-size: 13px; font-weight: 700; margin-left: 2px; }
.hl-r { font-size: 13px; margin-top: 2px; white-space: nowrap; }
.hl-b { font-size: 11.5px; margin-top: 4px; line-height: 1.35; word-break: keep-all; color: var(--text); font-weight: 600; }  /* 좁으면 두 줄로 */
.hl-note { font-size: 11.5px; margin: 10px 0 0; line-height: 1.5; }
@media (max-width: 520px) {
  .hl { padding: 12px 10px 10px; }
  .hl-grid { gap: 6px; }
  .hl-c { padding: 8px 7px; }
  .hl-n { gap: 4px; }
  .hl-n b { font-size: 13.5px; }
  .hl-logo { width: 16px; height: 16px; }
  .hl-usd { font-size: 10px; }
  .hl-v { font-size: 15.5px; }
  .hl-v small { font-size: 11px; }
  .hl-r { font-size: 11px; }
  .hl-b { font-size: 10px; }
  .hl-mk { font-size: 9.5px; }
  .hl-mk span { padding: 1px 5px; }
}

/* 장중: 지수 카드 아래 24시간 시세 — 위 카드들과 같은 간격 */
#hlBottom .hl { margin-top: 12px; }
@media (max-width: 900px) { #hlBottom .hl { margin-top: 10px; } }

/* 채널 바로가기 (카페 · 유튜브 · Q&A) */
.chwrap { display: flex; align-items: center; gap: 6px; min-width: 0; flex: none; }
.chl { position: relative; flex: none; }
.chl-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: transparent; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 800; letter-spacing: -0.02em; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s; }
.chl-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chl-btn .chl-cv { width: 12px; height: 12px; transition: transform .2s; }
.chl-btn:hover { background: var(--accent-soft); }
.chl.open .chl-btn { background: var(--accent); color: #fff; }
.chl.open .chl-cv { transform: rotate(180deg); }
.chl-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 220px; padding: 6px; border-radius: 14px;
  background: var(--card-solid); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.14); animation: chlIn .16s ease-out; }
@keyframes chlIn { from { opacity: 0; transform: translateY(-4px); } }
.chl-menu a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--text); }
.chl-menu a:hover, .chl-menu a:focus-visible { background: var(--bg); outline: none; }
.chl-menu a::after { content: "↗"; margin-left: auto; color: var(--text-3); font-size: 13px; }
.chl-ic { width: 32px; height: 32px; flex: none; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.chl-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.chl-ic svg .fill { fill: currentColor; stroke: none; }
.chl-ic.cafe { background: #e6f7ec; color: #03a94d; }
.chl-ic.yt { background: #fdeaea; color: #e62117; }
.chl-ic.qa { background: var(--accent-soft); color: var(--accent); }
.chl-t { display: flex; flex-direction: column; line-height: 1.25; }
.chl-t b { font-size: 13.5px; font-weight: 800; letter-spacing: -0.02em; }
.chl-t small { font-size: 11.5px; color: var(--text-3); }
@media (max-width: 720px) {
  .chwrap { order: 2; flex: 1 1 100%; }
  .chwrap .channel { flex: 1 1 0; min-width: 0; }
  .chl-menu { width: 210px; }
}

/* PC 프로그램: 항상 위에 */
.pin-btn svg { fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s; }
.pin-btn.on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.pin-btn.on svg { fill: currentColor; transform: rotate(-30deg); }
.app-toast { position: fixed; left: 50%; bottom: 110px; z-index: 200; transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  background: rgba(28, 25, 23, .92); color: #fff; font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 999px; white-space: nowrap;
  transition: opacity .2s, transform .2s; }
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 버전 표시 */
.ver-tag { white-space: nowrap; }
.chip.ver-new { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* 좁은 창(PC 앱 모바일 크기 등): 로고와 오른쪽 버튼들을 한 줄에 */
@media (max-width: 480px) {
  .brand { gap: 6px; font-size: 17px; }
  .brand-mark { width: 24px; height: 24px; }
  .top-actions { gap: 0; }
  .clock { margin-right: 3px; }
  .icon-btn { width: 30px; height: 32px; }
  .icon-btn svg { width: 17px; height: 17px; }
  .app-size { margin-right: 2px; }
  .app-size button { padding: 4px 7px; }
}
.ver-go { margin: 6px 0 2px; padding: 6px 12px; font-size: 12.5px; font-weight: 800; background: var(--accent); color: #fff; border-color: var(--accent); }
.ver-go:disabled { opacity: .7; cursor: default; }

/* 일별 수급 동향 */
.fld { margin-top: 18px; }
.fld .seg button { padding: 5px 12px; }
.fld-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fld-table th, .fld-table td { padding: 9px 4px; text-align: right; border-bottom: 1px solid var(--line); font-size: 14px; }
.fld-table thead th { font-size: 12.5px; color: var(--text-2); font-weight: 600; text-align: right; }
.fld-table thead th:first-child, .fld-table tbody th { text-align: left; }
.fld-table tbody th { font-weight: 600; white-space: nowrap; }
.fld-table tbody th small { color: var(--text-3); font-weight: 500; }
.fld-table tr.live { background: var(--chip); }
.fld-table td.muted { text-align: center; padding: 18px; }
.fld-tag { font-size: 10.5px; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 0 4px; margin-left: 2px; }
.fld-more { display: block; width: 100%; margin-top: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-solid); color: var(--text-2); font-size: 13px; cursor: pointer; }
.fld-more:hover { color: var(--text); }

/* 지수 차트 버튼: 작게 */
.seg.sm { padding: 2px; border-radius: 9px; }
.seg.sm button { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.ix-grp button { font-weight: 700; }
.ix-mins { flex-basis: 100%; }
.ix-ctrl .ix-tfs { gap: 6px; }

/* 관리자 테마: 기존 업종 박스 종목 보면서 고치기 */
.adm-secnames { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; }
.adm-sn { border: 1px solid var(--line, #ddd); background: none; border-radius: 999px; padding: 2px 9px; font-size: 12px; cursor: pointer; color: inherit; }
.adm-sn:hover { border-color: var(--accent); color: var(--accent); }
.adm-base { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--line, #ddd); border-radius: 10px; }
.adm-base-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.adm-base-h .muted { font-size: 12px; }
.adm-base-note { font-size: 12px; margin: 4px 0 8px; }
.adm-bases { display: flex; flex-wrap: wrap; gap: 5px; }
.adm-bs { border: 1px solid var(--line, #ddd); background: var(--card, #fff); border-radius: 999px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: inherit; }
.adm-bs small { font-weight: 500; opacity: .75; }
.adm-bs.lead { color: var(--up); }
span.adm-bs { border: 0; padding: 0; font-size: inherit; background: none; }
.adm-bs.off { text-decoration: line-through; opacity: .4; }
.adm-base-more { margin-top: 8px; }
.adm-bsort { margin-left: auto; }

.adm-sn.mod { border-color: #2fa84f; color: #1f7a3a; font-weight: 700; background: color-mix(in srgb, #2fa84f 10%, transparent); }
.adm-sn.off { border-color: var(--up); color: var(--up); text-decoration: line-through; text-decoration-color: var(--up); text-decoration-thickness: 2px; background: var(--up-soft); }
.adm-sn.off small { text-decoration: none; display: inline-block; font-size: 10.5px; font-weight: 700; }
.adm-sn.cur { box-shadow: 0 0 0 2px var(--accent); }
.adm-sn-legend { font-size: 11.5px; margin-top: 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.adm-sn-legend .adm-sn { cursor: default; padding: 0 6px; font-size: 11px; }

.adm-sn em { font-style: normal; font-size: 10px; font-weight: 700; color: #9a5b00; background: color-mix(in srgb, #f59e0b 22%, transparent); border-radius: 6px; padding: 0 4px; margin-left: 2px; display: inline-block; text-decoration: none; }
.adm-dirty { margin: 8px 0 0; text-align: right; font-size: 12.5px; font-weight: 700; color: #9a5b00; }
.fld-table tbody td { font-weight: 700; }
.ld-crit { font-size: 12.5px; font-weight: 700; color: var(--up); background: var(--up-soft); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }

.adm-table tr.adm-past td { opacity: .55; }
#evCat { min-width: 120px; }

/* 실시간 시세: 값이 바뀌면 잠깐 반짝 (오르면 빨강, 내리면 파랑) */
@keyframes lvUp { 0%, 35% { background: rgba(214,48,42,.22); } 100% { background: transparent; } }
@keyframes lvDn { 0%, 35% { background: rgba(47,107,237,.22); } 100% { background: transparent; } }
.lv-up { animation: lvUp 1.6s ease-out; border-radius: 4px; }
.lv-dn { animation: lvDn 1.6s ease-out; border-radius: 4px; }

.adm-pend { color: #9a5b00; }
.adm-approve { border-color: #2fa84f !important; color: #1f7a3a !important; font-weight: 700; }
.gate-done { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #2fa84f 12%, transparent); color: #1f7a3a; font-size: 13.5px; font-weight: 600; line-height: 1.5; }

/* ---------- 인트로 (앱 처음 열 때) ---------- */
.intro { position: fixed; inset: 0; z-index: 99999; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color 1s ease .2s; }
html.intro-on, html.intro-on body { overflow: hidden; }
/* 사라질 때: 흰 배경이 먼저 걷히고, 그림·로고는 커지고 흐려지며 잔상처럼 천천히(1.8초) 사라짐 */
.intro.out { background-color: transparent; pointer-events: none; }
.intro-stage { transition: opacity 1.8s cubic-bezier(.45,0,.55,1), transform 1.8s cubic-bezier(.2,.7,.2,1), filter 1.8s ease; }
.intro.out .intro-stage { opacity: 0; transform: translateY(-2vh) scale(1.14); filter: blur(12px); }
.intro.out .intro-skip { opacity: 0; transition: opacity .3s; }
.intro-stage { position: relative; display: flex; flex-direction: column; align-items: center; transform: translateY(-2vh); }
.intro-vid { width: min(78vmin, 560px); height: auto; aspect-ratio: 1; display: block; mix-blend-mode: multiply; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.intro.show-brand .intro-vid { transform: translateY(-3vmin) scale(.94); }
.intro-brand { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: #1e5b45; opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.intro-mark { position: relative; width: 38px; height: 38px; display: inline-block; }
.intro-mark svg { width: 100%; height: 100%; display: block; }
.intro-sweep { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(30,91,69,.55), rgba(30,91,69,0) 28%, transparent);
  -webkit-mask: radial-gradient(circle, #000 0 70%, transparent 71%); mask: radial-gradient(circle, #000 0 70%, transparent 71%);
  animation: intro-spin 1.1s linear infinite; }
@keyframes intro-spin { to { transform: rotate(360deg); } }
.intro-name { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.intro-tag { margin-top: 8px; font-size: 14px; color: #6b7a74; font-weight: 500; opacity: 0; transform: translateY(10px);
  transition: opacity .55s ease .15s, transform .55s cubic-bezier(.2,.7,.2,1) .15s; }
.intro.show-brand .intro-brand, .intro.show-brand .intro-tag { opacity: 1; transform: none; }
.intro-skip { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); padding: 7px 14px;
  border-radius: 999px; border: 1px solid rgba(0,0,0,.12); background: rgba(255,255,255,.85); color: #555; font: inherit; font-size: 13px; cursor: pointer; }

/* 로그인 화면: PC 프로그램 내려받기 */
.gate-dl { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 6%, transparent);
  color: var(--text); text-decoration: none; transition: background .15s, border-color .15s; }
.gate-dl[hidden] { display: none; }
.gate-dl:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); border-style: solid; }
.gate-dl > svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.gate-dl span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.gate-dl b { font-size: 14px; }
.gate-dl small { font-size: 12px; color: var(--text-2); }
.gate-dl .gate-dl-arrow { width: 20px; height: 20px; }

/* 종목 상세: 출처·기업 정보·실적 (DART) */
.info-src { font-size: 11.5px; margin: -6px 0 12px; }
.co-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 18px; margin-bottom: 6px; }
.co-info div { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.co-info span { color: var(--text-3); flex: none; width: 56px; }
.co-info b { font-weight: 600; word-break: break-all; }
.co-info a { color: var(--accent); }
.fin-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.fin-tbl th, .fin-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.fin-tbl th:first-child { text-align: left; color: var(--text-3); font-weight: 500; }
.fin-tbl thead th { color: var(--text-3); font-weight: 600; }
.fin-tbl td.dn { color: var(--down, #1d64d8); }
.fin-ratio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; font-size: 13px; margin-bottom: 14px; }
.fin-ratio span { color: var(--text-3); }
.fin-ratio b { color: var(--text); margin-left: 4px; }
.fin-ratio small { margin-left: auto; font-size: 11.5px; }
