/* ===== 뷰포인트 브랜드 (11/11 대표: 코바 레이더와 다르게 · 대중적인 트레이딩 도구처럼) =====
   맨 마지막에 읽혀 색 · 로고 · 몇몇 배치만 덮어쓴다. 되돌리려면 index.html 에서 이 파일 한 줄만 빼면 된다.
   - 바탕: 푸른 남색(코바) → 색이 거의 없는 먹색. 브랜드: 보라(#6F4CFF) + 형광 연두 점(로고에만)
   - 보라는 오르내림(초록 · 빨강, 국내식 빨강 · 파랑) 어느 쪽과도 헷갈리지 않는다 */
:root {
  --bg: #0b0b10;
  --win: #111117;
  --win-2: #17171f;
  --line: #22222c;
  --line-2: #2e2e3a;
  --text: #ececf2;
  --text-2: #aeacbd;
  --text-3: #817f93;
  --brand: #6f4cff;
  --brand-2: #a593ff;
  --brand-bg: rgba(111, 76, 255, .16);
  --tv-accent: #6f4cff;
  --hover: rgba(255, 255, 255, .045);
}
:root[data-theme="light"] {
  --bg: #eeeef3;
  --win: #ffffff;
  --win-2: #f6f6fa;
  --line: #e6e6ee;
  --line-2: #d6d6e2;
  --text: #15141c;
  --text-2: #4f4d60;
  --text-3: #85839a;
  --brand: #5b37f5;
  --brand-2: #5b37f5;
  --brand-bg: rgba(91, 55, 245, .08);
  --tv-accent: #5b37f5;
}

/* 로고 · 이름 */
.logo { gap: 8px; letter-spacing: -.01em; }
.logo img { width: 28px; height: 28px; border-radius: 8px; }
.logo .wm b { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }

/* 멤버십 단추: 초록 알약 → 브랜드 보라 (초록은 '오름'과 겹친다) */
.unl-cta { border-color: color-mix(in srgb, var(--brand) 55%, transparent); background: var(--brand-bg); }
.unl-cta .ico, .unl-cta b { color: var(--brand-2); }
.unl-cta:hover { background: color-mix(in srgb, var(--brand) 26%, transparent); }
@media (max-width: 640px) { .unl-cta, .unl-cta:hover { background: var(--brand); border-color: var(--brand); color: #fff; } .unl-cta .ico, .unl-cta b { color: #fff; } }


/* 주요 단추 */
.btn.primary { background: var(--brand); border-color: var(--brand); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #fff); }

/* 휴대폰 아래 탭: 고른 탭은 브랜드 색, 위에 가는 선 */
.mbar.mbar a.on { color: var(--brand-2); }
.mbar a.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 0 0 2px 2px; background: var(--brand); }
.mbar a { position: relative; }

/* 트레이더 패널: 메인 트레이더 칩을 앞에서 눈에 띄게 */
.ms-people button.tf-main .ms-av { box-shadow: 0 0 0 2px var(--win), 0 0 0 3.5px var(--brand); }
.ms-people button.on { background: var(--brand-bg); }

/* 첫 화면 뼈대(불러오는 동안)도 같은 색 */
#boot .bk { border-top-color: var(--brand) !important; }
:root[data-theme="light"] .unl-cta { color: var(--text); }
:root[data-theme="light"] .unl-cta .ico, :root[data-theme="light"] .unl-cta b { color: var(--brand); }

/* ===== 11/12 대표: "딱 봤을 때 코바레이더 짭 아니야?" 소리 안 나게 — 화면 모양 자체를 바꾼다 =====
   코바 레이더 = 트레이딩뷰처럼 판이 딱 붙은 남색 화면. 뷰포인트 = 먹색 바탕 위에 둥근 카드가 떠 있는 화면 */
:root {
  --r: 10px; --r-lg: 14px;
  --up: #22c39a; --down: #f5576c; --up-bg: rgba(34, 195, 154, .14); --down-bg: rgba(245, 87, 108, .13);
  /* 차트 작업 영역(이름은 --tv-*): 남색 → 먹색, 강조 보라 */
  --tv-panel: #111117; --tv-gap: #08080c; --tv-menu: #17171f; --tv-dialog: #17171f; --tv-hover: #1f1f29; --tv-soft: #17171f;
  --tv-line: #22222c; --tv-line-2: #30303c; --tv-text: #ececf2; --tv-btn: #b9b6c8; --tv-text-3: #817f93; --tv-accent: #8b74ff;
  --tv-grid: #16161d; --tv-grid-dot: #2a2a34; --tv-ok-bg: #6f4cff; --tv-chk: #6f4cff; --tv-tpl: #30303c;
}
:root[data-theme="light"] {
  --up: #0f9e78; --down: #e0465e; --up-bg: rgba(15, 158, 120, .1); --down-bg: rgba(224, 70, 94, .1);
  --tv-panel: #ffffff; --tv-gap: #eeeef3; --tv-hover: #f3f2f8; --tv-soft: #f6f6fa; --tv-line: #e6e6ee; --tv-line-2: #d6d6e2;
  --tv-text: #15141c; --tv-btn: #2b2a36; --tv-text-3: #85839a; --tv-accent: #5b37f5; --tv-grid: #f3f3f7; --tv-ok-bg: #5b37f5; --tv-chk: #5b37f5;
}
@media (min-width: 641px) { :root { --gap: 8px; } }

/* 판 사이 두꺼운 틈(트레이딩뷰식) 대신 가는 선, 바깥은 둥근 카드 */
/* 차트 머리줄은 화면 폭 전체로 위에 떠 있다(app.css 4차) → 자르지 말 것 */
#chartWin { border-radius: var(--r-lg); }
#chartWin > .chart-head { border-radius: 12px; }
#chartWin .chart-body { border-radius: var(--r-lg) var(--r-lg) 0 0; }
#chartWin .chart-foot { border-radius: 0 0 var(--r-lg) var(--r-lg); }
#chartWin .chart-foot { border-top: 1px solid var(--tv-line); }
#chartWin .draw-bar { border-right: 1px solid var(--tv-line); }
.shell > .side, .shell > .rail, .shell .win { border-radius: var(--r-lg); }

/* 위쪽 줄: 테두리 없이 바탕과 하나로, 화면 탭은 알약 묶음 */
.topbar { border-bottom: 0; background: var(--tv-gap); }
.nav { background: var(--tv-panel); border-radius: 12px; padding: 3px; gap: 2px; }
.nav a { border-radius: 9px; padding: 6px 14px; }
.nav a.on { background: var(--brand); color: #fff; }
.search { border-radius: 12px; }

/* 오른쪽 레일: 고른 것만 보라 바탕, 아이콘은 가늘게 */
.rail button.on { background: var(--brand-bg); color: var(--brand-2); border-radius: 10px; }
.rail button.on .rl-t { color: var(--brand-2); font-weight: 700; }

/* 왼쪽 작도 도구: 고른 도구 보라 */
#drawBar .tool.on, #drawBar .tool[aria-pressed="true"] { background: var(--brand-bg); color: var(--brand-2); border-radius: 8px; }

/* 창 · 메뉴 모서리 */
.overlay .modal { border-radius: 16px; }
.pop { border-radius: 12px; }

/* ===== 11/15 대표: "전반적으로 아직 코바레이더 같다" → 처음 온 사람은 밝은 화면 (index.html data-theme="light") =====
   코바 레이더 = 어두운 남색 전문가 화면. 뷰포인트 = 밝고 넓은, 누구나 쓰는 앱 느낌. 어두운 화면은 ☀ 단추에서 그대로 고를 수 있다 */
:root[data-theme="light"] {
  --bg: #f2f2f7; --tv-gap: #f2f2f7; --tv-panel: #ffffff; --tv-menu: #ffffff; --tv-dialog: #ffffff;
  --shadow: 0 8px 30px rgba(40, 30, 90, .12);
}
:root[data-theme="light"] .topbar { background: #f2f2f7; }
:root[data-theme="light"] #chartWin, :root[data-theme="light"] .shell > .side, :root[data-theme="light"] .shell > .rail, :root[data-theme="light"] #chartWin > .chart-head { box-shadow: 0 1px 2px rgba(30, 20, 80, .05), 0 4px 16px rgba(30, 20, 80, .05); }
:root[data-theme="light"] .nav { background: #e6e5ef; }
:root[data-theme="light"] .nav a.on { background: var(--brand); color: #fff; }
:root[data-theme="light"] .search { background: #fff; border-color: transparent; }
:root[data-theme="light"] .mbar { background: #fff; border-top-color: #e6e6ee; }
:root[data-theme="light"] .tf-hero { background: #faf9ff; }
:root[data-theme="light"] .tf-grade.live b, :root[data-theme="light"] .tf-grade.flat b { color: var(--text); }

/* ===== 11/16 대표: 위쪽 줄을 깔끔하게 — 워크스페이스 탭 줄은 숨기고 차트 머리줄 '화면 이름 ⌄' 단추(#wsPick)에서 고른다 ===== */
.topbar .ws-tabs, .topbar #wsMore { display: none !important; }
.ws-pick { max-width: 150px; padding: 0 8px; gap: 3px; font-weight: 600; }
.ws-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-pick .ico { width: 12px; height: 12px; flex: none; }
/* 트레이더 줄: 옆으로 밀지 않아도 다 보이게 줄을 바꾼다 (백원좌가 잘려 안 보였다) */
.ms-people { flex-wrap: wrap; overflow-x: visible; row-gap: 2px; }

/* 11/16 관점을 차트에서 보기 단추 */
.tf-act .tf-view { color: var(--brand-2); font-weight: 700; }
.tf-act .tf-view .ico { width: 13px; height: 13px; }

/* 11/16 로그인 창: 단추 하나 + 짧은 안내 */
.au-lead { margin: 2px 0 14px; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.au-terms { margin: 10px 0 0; font-size: 12px; color: var(--text-3); text-align: center; }
.au-terms a { color: inherit; text-decoration: underline; }
