/* ===== 로그인 · 거래소 연동 · 마스터 (auth.js · master.js) ===== */
.auth-btn { gap: 6px; padding: 0 10px; }
.auth-btn .ico { width: 16px; height: 16px; color: #2aabee; }
.auth-btn.in { padding: 0 8px 0 4px; }
.auth-btn .lbl { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--win-2); color: var(--text-2); border: 1px solid var(--line-2); flex: none; }
.av.ok { background: color-mix(in srgb, #2aabee 22%, var(--win-2)); color: #2aabee; border-color: color-mix(in srgb, #2aabee 45%, transparent); }
.av.big { width: 36px; height: 36px; font-size: 15px; }
@media (max-width: 640px) { .auth-btn .lbl { display: none; } }

.au-modal { width: min(440px, calc(100vw - 32px)); }
.au-body { padding: 4px 20px 20px; font-size: 13.5px; line-height: 1.6; overflow: auto; }
.au-why { margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; background: var(--brand-bg); color: var(--text); font-size: 13px; }
.au-steps { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 16px; }
.au-step { display: flex; gap: 10px; align-items: center; color: var(--text-2); }
.au-step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--win-2); border: 1px solid var(--line-2); font-size: 12px; color: var(--text); flex: none; }
.au-step em { font-style: normal; font-weight: 700; color: var(--text); }
.au-go { width: 100%; height: 42px; justify-content: center; gap: 8px; font-size: 14px; background: #2aabee !important; border-color: #2aabee !important; color: #fff !important; }
.au-go .ico { width: 18px; height: 18px; }
.au-wait { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--text-2); }
.au-wait b { color: var(--text); }
.au-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: #2aabee; animation: auspin .8s linear infinite; flex: none; }
@keyframes auspin { to { transform: rotate(360deg); } }
.au-link { margin-left: auto; color: var(--brand-2); font-size: 12px; white-space: nowrap; }
.au-note { margin: 14px 0 0; font-size: 11.5px; color: var(--text-3); }

.rf-done { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; background: var(--win-2); border: 1px solid var(--line-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.rf-chip.sm { padding: 2px 6px; font-size: 11px; }
.rf-chip i.ok { font-style: normal; color: var(--up); font-weight: 600; font-size: 11px; }
.rf-chip button { color: var(--text-3); display: grid; place-items: center; }
.rf-chip button:hover { color: var(--down); }
.rf-ex { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.rf-ex button { height: 36px; border-radius: 8px; border: 1px solid var(--line-2); font-weight: 600; color: var(--text-2); }
.rf-ex button.on { border-color: var(--brand-2); color: var(--text); background: var(--brand-bg); }
.rf-lab { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.rf-row { display: flex; gap: 6px; }
.rf-row .inp { flex: 1; height: 38px; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.rf-row .btn { height: 38px; padding: 0 18px; }
.rf-help { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.rf-msg { min-height: 20px; margin-top: 8px; font-size: 12.5px; }
.rf-msg.good { color: var(--up); }
.rf-msg.bad { color: var(--down); }
.rf-join { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--win-2); display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.rf-join > span { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-join small { color: var(--text-3); font-size: 11px; }
.ac-head { display: flex; gap: 10px; align-items: center; padding: 8px 12px 6px; }
.ac-head small { display: block; font-size: 11px; color: var(--tv-text-3); }
.ac-head b { font-size: 14px; color: var(--tv-text); font-weight: 600; }
.ac-refs { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 12px 6px; font-size: 11px; }

/* 마스터 패널 */
.ms-head { flex: none; padding: 0 10px 8px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.ms-people { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ms-people::-webkit-scrollbar { display: none; }
.ms-people button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 8px; font-size: 11px; color: var(--text-2); flex: none; min-width: 48px; }
.ms-people button.on { background: var(--brand-bg); color: var(--text); }
.ms-av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--c, var(--line-2)); flex: none; }
.ms-av.all { background: var(--win-2); color: var(--text-2); border: 1px solid var(--line-2); }
.ms-ch .ms-av, .ad-row .ms-av { width: 22px; height: 22px; font-size: 11px; }
.ms-ch.big .ms-av { width: 30px; height: 30px; font-size: 13px; }
.ms-tabs { display: flex; align-items: center; gap: 6px; }
.ms-tabs .seg button { padding: 3px 7px; }
.ms-tabs .chip.on { border-color: var(--brand-2); color: var(--text); background: var(--brand-bg); }
.ms-write { justify-content: center; gap: 6px; }
.ms-card { margin: 8px 10px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--win); }
.ms-card:hover { border-color: var(--line-2); background: color-mix(in srgb, var(--win) 80%, var(--hover)); }
.ms-card:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.ms-card.locked { cursor: default; }
.ms-ch { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ms-ch .sp { flex: 1; }
.ms-ch b { font-weight: 700; }
.ms-ch .dim { font-size: 11px; }
.ms-k { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--win-2); color: var(--text-2); }
.ms-k.k-point { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.ms-k.k-view { background: var(--brand-bg); color: var(--brand-2); }
.ms-k.k-notice { background: var(--down-bg); color: var(--down); }
.ms-pin { font-size: 10px; color: var(--text-3); }
.ms-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12px; }
.ms-row .sp { flex: 1; }
.ms-sym { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px 2px 3px; border-radius: 12px; background: var(--win-2); }
.ms-sym b { font-weight: 700; font-size: 11.5px; }
.ms-sym i { font-style: normal; font-size: 10px; color: var(--text-3); }
.ms-mo { font-size: 10px; color: #2aabee; border: 1px solid color-mix(in srgb, #2aabee 40%, transparent); border-radius: 4px; padding: 0 4px; }
.ms-bm { color: var(--text-3); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; }
.ms-bm:hover { background: var(--hover); }
.ms-bm.on { color: var(--warn); }
.ms-bm.on .ico { fill: currentColor; }
.ms-t { margin-top: 7px; font-weight: 700; font-size: 13px; line-height: 1.45; }
.ms-b { margin-top: 4px; font-size: 12px; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.ms-img { display: block; width: 100%; margin-top: 8px; border-radius: 6px; border: 1px solid var(--line); max-height: 170px; object-fit: cover; object-position: right center; }
.ms-lock { margin-top: 8px; padding: 14px 10px; border-radius: 6px; text-align: center; display: flex; flex-direction: column; gap: 5px; align-items: center;
  background: repeating-linear-gradient(135deg, var(--win-2) 0 8px, color-mix(in srgb, var(--win-2) 70%, var(--win)) 8px 16px); }
.ms-lock b { font-size: 12.5px; }
.ms-lock span { font-size: 11.5px; color: var(--text-3); }
.ms-lock .btn { margin-top: 4px; }
.ms-more { display: block; margin: 10px auto 0; }
.ms-modal { width: min(760px, calc(100vw - 24px)); max-height: 88vh; }
.ms-pbody { padding: 4px 20px 18px; overflow: auto; font-size: 13.5px; }
.ms-big { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--line); margin-top: 12px; }
.ms-full { margin-top: 12px; white-space: pre-wrap; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.ms-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; align-items: center; }
.ms-acts .sp { flex: 1; }
.ms-acts .btn { height: 34px; gap: 6px; }
.btn.danger { color: var(--down) !important; border-color: color-mix(in srgb, var(--down) 50%, transparent) !important; }
.post-bar { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 8px; background: var(--tv-menu); box-shadow: var(--tv-shadow); font-size: 12.5px; max-width: calc(100% - 120px); white-space: nowrap; }
.post-bar[hidden] { display: none; }
.post-bar > span:not(.ms-av) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.post-bar .ms-av { width: 22px; height: 22px; font-size: 11px; }
.post-bar .hbtn { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 4px; color: var(--tv-btn); }
.post-bar .hbtn:hover { background: var(--tv-hover); color: var(--tv-text); }
.mw-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; font-size: 13px; }
.mw-l { width: 40px; color: var(--text-3); font-size: 12px; }
.mw-chart { display: inline-flex; align-items: center; gap: 4px; }
.mw-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.mw-t { width: 100%; height: 38px; font-size: 14px; font-weight: 600; margin-top: 6px; }
.mw-b { width: 100%; margin-top: 8px; resize: vertical; line-height: 1.6; font: inherit; font-size: 13.5px; padding: 10px; }
.mw-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.mw-foot .sp { flex: 1; }
.ad-search { display: flex; gap: 6px; margin-bottom: 10px; }
.ad-search .inp { flex: 1; height: 34px; }
.ad-sec { font-size: 11.5px; color: var(--text-3); margin: 12px 0 4px; font-weight: 600; }
.ad-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ad-n { flex: 1; min-width: 120px; display: flex; flex-direction: column; }
.ad-n small { font-size: 11px; color: var(--text-3); }
.ad-row .inp.sm { height: 28px; width: 110px; font-size: 12px; }

/* 화면 분할 세부 (layout.js): 칸 크기 손잡이 · 칸 번호 배지 · 저장 레이아웃 */
.kc-grid { position: relative; }
.ly-split { z-index: 7; position: relative; align-self: stretch; justify-self: stretch; pointer-events: auto; background: transparent !important; }
.ly-split.v { width: 9px; margin-left: -6px; justify-self: start; cursor: col-resize; }
.ly-split.h { height: 9px; margin-top: -6px; align-self: start; cursor: row-resize; }
.ly-split:hover, .kc-grid.ly-dragging .ly-split { background: color-mix(in srgb, var(--tv-accent) 45%, transparent) !important; }
.kc-grid.ly-dragging { cursor: col-resize; user-select: none; }
.kc-grid.ly-dragging .kc { pointer-events: none; }
.kc-grid.maxi .ly-split, .kc-grid:not(.multi) .ly-split { display: none; }
.cell-badge { position: absolute; z-index: 9; right: 66px; top: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  background: var(--tv-soft); color: var(--tv-text-3); border: 1px solid var(--tv-line); opacity: .75; }
.cell-badge:hover { opacity: 1; color: var(--tv-text); border-color: var(--tv-line-2); }
#kc.act > .cell-badge { background: var(--tv-accent); color: #fff; border-color: var(--tv-accent); opacity: 1; }
.cell { position: relative; }
.pop .ly-eq { justify-content: space-between; }
.pop .ly-eq[disabled] { opacity: .45; cursor: default; }
.pop .ly-eq .cu-key { font-size: 11px; }
.ly-pre-row { display: flex; align-items: center; }
.pop .ly-pre { gap: 10px; flex: 1; min-width: 0; }
.ly-pre-i { color: var(--tv-text-3); display: grid; place-items: center; flex: none; }
.ly-pre-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ly-pre-t b { font-weight: 500; font-size: 13px; color: var(--tv-text); }
.ly-pre-t small { font-size: 11px; color: var(--tv-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop .ly-pre-x { width: 32px !important; flex: none; justify-content: center; color: var(--tv-text-3); font-size: 16px; }
.pop .ly-pre-x:hover { color: var(--down); }
.ly-pre-save { display: flex; gap: 6px; padding: 4px 12px 8px; }
.ly-pre-save .inp { flex: 1; height: 30px; font-size: 12.5px; min-width: 0; }
.pop .ly-pre-go { width: auto !important; min-height: 30px !important; padding: 0 10px !important; border-radius: 6px !important; border: 1px solid var(--tv-line-2) !important; font-size: 12.5px !important; white-space: nowrap; }

/* 워크스페이스 탭 (workspace.js) — 위쪽 막대 */
.topbar { gap: 16px; }
.ws-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab { position: relative; display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 11px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); cursor: pointer; white-space: nowrap; flex: none; user-select: none; }
.ws-tab:hover { color: var(--text); background: var(--hover); }
.ws-tab.on { color: var(--text); background: var(--win-2); }
.ws-tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--brand-2); }
.ws-tab:focus-visible { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.ws-tab.drag { opacity: .45; }
.ws-tab.over { box-shadow: inset 2px 0 0 var(--brand-2); }
.ws-x { width: 16px; height: 16px; border-radius: 3px; display: grid; place-items: center; font-size: 14px; line-height: 1; color: var(--text-3); visibility: hidden; }
.ws-tab:hover .ws-x, .ws-tab.on .ws-x { visibility: visible; }
.ws-x:hover { background: var(--line-2); color: var(--text); }
.ws-in { height: 22px; width: 110px; border: 1px solid var(--brand-2); border-radius: 4px; background: var(--win); color: var(--text); font: inherit; padding: 0 5px; }
.ws-add { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); flex: none; }
.ws-add:hover { background: var(--hover); color: var(--text); }
body.ws-switching #kc { opacity: .4; transition: opacity .15s; }
.toast-btn { margin-left: 8px; color: var(--brand-2); font-weight: 700; }
@media (max-width: 1180px) { .ws-tab:not(.on) .ws-n { max-width: 64px; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 900px) { .ws-tabs { display: none; } }
.pop.ly-menu-pop { max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain; }
.cell-badge { right: auto; left: auto; top: 4px; right: 4px; min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; }

.al-tgb { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; color: #2aabee; font-size: 10px; font-weight: 700; }
.al-chk.al-tg span::before { content: ""; }

/* 스캐너 알림 종 (scanner.js) */
.ibell { width: 20px; height: 20px; border-radius: 4px; display: inline-grid; place-items: center; color: var(--text-3); margin-left: 2px; }
.ibell:hover { background: var(--hover); color: var(--text); }
.ibell.on { color: #2aabee; }
.ws-tabs[hidden] { display: none; }

/* 지표 창 추천 세트 */
.ind-sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 6px 12px 14px; }
.ind-set { border: 1px solid var(--tv-line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.ind-set.on { border-color: color-mix(in srgb, var(--tv-accent) 60%, transparent); }
.is-h { display: flex; align-items: baseline; gap: 8px; }
.is-h b { font-weight: 600; font-size: 14px; color: var(--tv-text); }
.is-h .dim { font-size: 11px; }
.ind-set p { margin: 0; font-size: 12px; color: var(--tv-text-3); line-height: 1.5; flex: 1; }
.is-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.is-chips span { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--tv-soft); color: var(--tv-btn); }
.is-chips span.on { background: color-mix(in srgb, var(--tv-accent) 18%, transparent); color: var(--tv-text); }
.ind-set .btn { align-self: flex-start; }
@media (max-width: 640px) { .ind-sets { grid-template-columns: 1fr; } }

/* 시세 줄 (quotebar.js) */
.quote-bar { flex: none; height: 38px; display: flex; align-items: center; gap: 22px; padding: 0 14px; background: var(--tv-panel); border-bottom: 4px solid var(--tv-gap); font-size: 12px; white-space: nowrap; overflow: hidden; }
.quote-bar[hidden] { display: none; }
.qb-main { display: flex; align-items: baseline; gap: 8px; }
.qb-px { font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: var(--tv-text); }
.qb-px.up { color: var(--up); } .qb-px.down { color: var(--down); }
.qb-chg { font-size: 12px; } .qb-chg b { font-weight: 600; margin-left: 4px; }
.qb-it { display: flex; flex-direction: column; line-height: 1.25; }
.qb-it small { font-size: 10.5px; color: var(--tv-text-3); }
.qb-it b { font-weight: 600; color: var(--tv-text); font-size: 12px; }
.qb-it b.up { color: var(--up); } .qb-it b.down { color: var(--down); } .qb-it b.warn { color: var(--warn); }
.qb-rb { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--tv-btn); }
.qb-track { position: relative; width: 90px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--down), var(--line-2) 50%, var(--up)); display: block; }
.qb-track i { position: absolute; top: -3px; width: 2px; height: 9px; margin-left: -1px; background: var(--tv-text); border-radius: 1px; display: block; }
#qbFund.soon b, #qbFund.soon small { animation: qbBlink 1s steps(2) infinite; }
@keyframes qbBlink { 50% { opacity: .35; } }
.qb-ex { font-size: 11px; }
body.qb-on #chartWin .chart-head .stat { display: none !important; }
@media (max-width: 1280px) { .quote-bar { gap: 16px; } .qb-ex { display: none; } }
@media (max-width: 1100px) { .qb-rng { display: none; } }
@media (max-width: 640px) { .quote-bar { display: none !important; } body.qb-on #chartWin .chart-head .stat { display: none; } }

/* 커뮤니티 메뉴 */
.pop.cm-pop { width: 300px; }
.pop .cm-row { gap: 10px; align-items: center; }
.pop .cm-row .ico { width: 18px; height: 18px; color: #2aabee; flex: none; }
.pop .cm-row span { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pop .cm-row b { font-weight: 500; color: var(--tv-text); }
.pop .cm-row small { font-size: 11.5px; color: var(--tv-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#commBtn .ico { width: 16px; height: 16px; }
@media (max-width: 1280px) { #commBtn .lbl { display: none; } }
.bub-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
/* 휴대폰: 위쪽 막대의 ghost 단추가 숨겨지는데, 로그인 · 보기 설정은 아이콘만 남긴다 */
@media (max-width: 640px) {
  .top-r #authBtn, .top-r #themeBtn { display: inline-flex; width: 34px; height: 34px; padding: 0; justify-content: center; }
  .top-r #authBtn .lbl { display: none; }
  .top-r #authBtn.in { width: auto; padding: 0 4px; }
  .vw-pop { left: 8px !important; right: 8px; max-height: calc(100vh - 80px); }
}

.pop.m-more-pop { left: 8px !important; right: 8px !important; width: auto !important; top: auto !important; bottom: calc(64px + env(safe-area-inset-bottom)); max-height: 70vh; overflow: auto; grid-template-columns: 1fr 1fr; }
.pop.m-more-pop.on { display: grid; }
.pop.m-more-pop .plabel { grid-column: 1 / -1; }
.pop.m-more-pop button .ico { width: 18px; height: 18px; }

/* 급등락 알림 (alerts.js) */
.mv-form { padding: 6px 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-sm); }
.mv-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mv-row.mv-on { justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.mv-row.mv-on span { display: flex; flex-direction: column; }
.mv-row.mv-on small { font-size: 11px; color: var(--text-3); }
.mv-l { width: 32px; color: var(--text-3); font-size: 12px; flex: none; }
.mv-row .seg button { padding: 3px 8px; }
.mv-note { margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--text-2); }
.mv-note.dim { color: var(--text-3); }
.mv-form .vw-sw { all: unset; box-sizing: border-box; width: 34px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; cursor: pointer; flex: none; }
.mv-form .vw-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.mv-form .vw-sw[aria-checked="true"] { background: var(--brand-2); }
.mv-form .vw-sw[aria-checked="true"]::after { left: 17px; }

.au-wait[hidden], .au-go[hidden] { display: none !important; }
.ms-big { max-height: 46vh; object-fit: contain; background: var(--win-2); }
.ms-pbody .ms-acts { position: sticky; bottom: -18px; background: var(--tv-dialog); padding: 10px 0 12px; margin-bottom: -18px; z-index: 1; border-top: 1px solid var(--tv-line); }
.post-bar { top: auto; bottom: 40px; }
.post-bar .pb-mode { display: inline-block; min-width: 58px; text-align: center; }
.ms-card.locked { cursor: pointer; }
.ms-card.locked:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }

#rail [data-p].dot { position: relative; }
#rail [data-p].dot::after { content: ""; position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 2px var(--win); }

.ms-onb { border: 1px dashed var(--brand-2); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; background: var(--brand-bg); }
.ms-onb span { color: var(--text-2); line-height: 1.5; }
.ms-onb div { display: flex; gap: 6px; }

.x-pct { position: absolute; z-index: 12; height: 16px; line-height: 16px; font-size: 10.5px; font-weight: 600; text-align: center; pointer-events: none; background: #363a45; color: #fff; font-variant-numeric: tabular-nums; border-radius: 0 0 2px 2px; }
.x-pct.up { color: #7ee2b8; } .x-pct.down { color: #ff9aa6; }
:root[data-theme="light"] .x-pct { background: #131722; }
.x-pct[hidden] { display: none; }

/* 점검 B 반영 */
#chartWin .chart-head #symBtn b { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.wl-row .sub[data-lb="1"] { display: flex; min-width: 0; white-space: nowrap; }
.wl-row .sub[data-lb="1"] .lb { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.wl-row .sub[data-lb="1"] .qv { flex: none; }
.panel[data-p="watch"] .wl-cols, .panel[data-p="watch"] .wl-row { grid-template-columns: minmax(0, 1fr) 80px 58px 14px; padding-right: 6px; }
.panel[data-p="watch"] .wl-row .x { position: static; display: grid; visibility: hidden; width: 14px; height: 18px; }
.panel[data-p="watch"] .wl-row:hover .x, .panel[data-p="watch"] .wl-row:focus-visible .x { visibility: visible; }
.panel[data-p="watch"] .wl-row.wl-idx::after { content: ""; }
@media (hover: none) { .panel[data-p="watch"] .wl-row .x.pin { display: none; } .panel[data-p="watch"] .wl-cols, .panel[data-p="watch"] .wl-row { grid-template-columns: minmax(0, 1fr) 80px 58px 0; } }
.breadth .bar.none { background: var(--line-2); }
.ix-pop, .ix-note, .ix-empty { word-break: keep-all; overflow-wrap: anywhere; }
.vw-row.vw-off { opacity: .45; pointer-events: none; }
.vw-foot .nw { white-space: nowrap; }
/* 강조색이 노랑 · 청록인 테마: 브랜드 단추 글자를 어둡게, 선택 테두리도 테마 강조색 */
:root[data-skin="amber"], :root[data-skin="sea"], :root[data-skin="ember"], :root[data-skin="forest"], :root[data-skin="plum"] { --brand: var(--tv-accent); --brand-2: var(--tv-accent); --brand-bg: color-mix(in srgb, var(--tv-accent) 16%, transparent); }
:root[data-skin="amber"] .btn.primary, :root[data-skin="sea"] .btn.primary, :root[data-skin="ember"] .btn.primary { color: #111; }
/* 밝은 테마: 노랑 글자가 안 보여서 진한 호박색 */
:root[data-theme="light"] { --warn: #a86b00; }
:root[data-theme="light"] .ws-tab { color: var(--text-2); }
:root[data-theme="light"] .search { color: var(--text-2); }
.wl-row .sub .sep { font-style: normal; padding: 0 4px; color: var(--text-3); flex: none; }
.ms-nav { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; font-size: 12px; }
.ms-nav .btn { width: 30px; justify-content: center; padding: 0; font-size: 16px; }
.panel[data-p="watch"] .wl-cols, .panel[data-p="watch"] .wl-row { grid-template-columns: minmax(0, 1fr) 72px 54px 12px; gap: 4px; padding-left: 10px; padding-right: 4px; }
.panel[data-p="watch"] .wl-row .x { width: 12px; }
@media (hover: none) { .panel[data-p="watch"] .wl-cols, .panel[data-p="watch"] .wl-row { grid-template-columns: minmax(0, 1fr) 72px 54px 0; } }

/* 사이트 안내 (tour.js) */
.tr-hole { position: fixed; z-index: 120; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0,0,0,.58); outline: 2px solid var(--brand-2); transition: all .18s; cursor: pointer; }
.tr-card { position: fixed; z-index: 121; background: var(--tv-dialog); color: var(--tv-text); border-radius: 10px; box-shadow: var(--tv-shadow); padding: 14px 16px 12px; font-size: 13px; line-height: 1.6; }
.tr-card .tr-k { font-size: 11px; color: var(--tv-text-3); margin-bottom: 4px; }
.tr-card b { font-size: 15px; display: block; margin-bottom: 4px; }
.tr-card p { margin: 0 0 12px; color: var(--tv-btn); word-break: keep-all; }
.tr-f { display: flex; align-items: center; gap: 6px; }
.tr-skip { color: var(--tv-text-3); font-size: 12px; }
.tr-skip:hover { color: var(--tv-text); }

#helpBtn.dot { position: relative; }
#helpBtn.dot::after { content: ""; position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 2px var(--win); }
.pop.nw-pop { width: 340px; max-height: 70vh; overflow: auto; }
.nw-list { padding: 0 12px 6px; }
.nw-it { padding: 8px 0; border-bottom: 1px solid var(--tv-line); font-size: 12.5px; }
.nw-it:last-child { border: 0; }
.nw-it b { display: block; color: var(--tv-text); font-weight: 600; margin: 2px 0; }
.nw-it p { margin: 0; color: var(--tv-btn); line-height: 1.55; word-break: keep-all; }
.qb-it b small { font-size: 10.5px; font-weight: 500; }
.qb-it[hidden] { display: none; }
@media (max-width: 1560px) { .qb-ex { display: none; } }

/* 마스터 매매 계획 */
.ms-plan { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 7px; padding: 6px 8px; border-radius: 6px; background: var(--win-2); font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; align-items: baseline; }
.ms-plan b { color: var(--text); font-weight: 700; }
.ms-plan b.up { color: var(--up); } .ms-plan b.down { color: var(--down); }
.ms-plan.big { font-size: 13px; margin-top: 12px; padding: 9px 12px; }
.mw-plan .inp { width: 96px; height: 30px; font-variant-numeric: tabular-nums; }

.help-modal { width: min(640px, calc(100vw - 24px)); }
.help-b { padding: 4px 20px 18px; overflow: auto; font-size: 13px; line-height: 1.7; }
.help-b section { padding: 10px 0; border-bottom: 1px solid var(--tv-line); }
.help-b section b { font-size: 14px; }
.help-b section p { margin: 4px 0 0; color: var(--tv-btn); word-break: keep-all; }
.help-b code { font-size: 12px; padding: 1px 5px; border-radius: 4px; background: var(--tv-soft); }
.help-foot { margin: 12px 0 0; font-size: 11.5px; }

/* 점검 C 반영 */
.al-bars[hidden] { display: none !important; }
.al-st { white-space: nowrap; }
#authOv, #refOv { z-index: 95; }
.ws-tab .ws-n { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-badge, #kc.act > .cell-badge { top: auto; bottom: 34px; right: auto; left: 6px; }

/* 명령창 (Ctrl+K) */
.ck-ov.overlay { z-index: 96; padding-top: 12vh; }
.ck-modal { width: min(620px, calc(100vw - 32px)); padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.ck-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 52px; border-bottom: 1px solid var(--line); }
.ck-in .ico { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.ck-in input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 15px; }
.ck-cnt { font-size: 11.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ck-list { overflow-y: auto; padding: 4px 0 6px; overscroll-behavior: contain; }
.ck-g { padding: 10px 16px 4px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.ck-it { display: flex; align-items: center; gap: 9px; padding: 0 16px; height: 36px; cursor: pointer; font-size: 13px; color: var(--text); min-width: 0; }
.ck-it.hl { background: var(--win-2); box-shadow: inset 2px 0 0 var(--brand, #2962ff); }
.ck-it b { font-weight: 600; white-space: nowrap; }
.ck-sub { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ck-r { margin-left: auto; padding-left: 10px; color: var(--text-3); font-size: 12px; white-space: nowrap; flex: none; }
.ck-r.num { color: var(--text-2); font-variant-numeric: tabular-nums; }
.ck-on { color: var(--brand, #2962ff); }
.ck-ic { display: grid; place-items: center; width: 22px; color: var(--text-2); flex: none; }
.ck-sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid; flex: none; }
.ck-it kbd, .ck-foot kbd { font: 11px/1 inherit; padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-2, var(--line)); color: var(--text-2); background: var(--win); }
.ck-empty { padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 13px; word-break: keep-all; }
.ck-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.ck-foot span { display: inline-flex; gap: 4px; align-items: center; }
@media (max-width: 640px) { .ck-ov.overlay { padding-top: 8px; } .ck-modal { max-height: calc(100vh - 16px); } .ck-foot { display: none; } .ck-it { height: 42px; } }
.ck-r.num i { font-style: normal; margin-left: 8px; display: inline-block; min-width: 54px; text-align: right; } .ck-r.num i.up { color: var(--up); } .ck-r.num i.down { color: var(--down); }
.ck-in input, .ck-in input:focus, .ck-in input:focus-visible { outline: none !important; box-shadow: none !important; border: 0 !important; padding: 0; height: 100%; }

/* 점검 E 반영: 휴대폰 스캐너 */
#scnOpen svg { display: none; width: 16px; height: 16px; }
@media (max-width: 640px) {
  #scnOpen { width: 36px; height: 32px; padding: 0 !important; justify-content: center; }
  #scnOpen .so-t { display: none; } #scnOpen svg { display: block; }
  #eyeBtn span { display: none; }
  #scnPh .tool, #resPrev, #resNext, .evi-back { min-width: 36px; min-height: 36px; }
  .istar, .ibell { min-width: 32px; min-height: 32px; display: inline-grid; place-items: center; }
  .tfc { min-height: 32px; }
  #uniSeg button, .scn-top .seg button { min-height: 32px; }
}
.modal, .pop { word-break: keep-all; overflow-wrap: anywhere; }

/* 주의 딱지 (폐지 예정 · 업비트 유의 · 주의) */
.rk { display: inline-block; margin-left: 4px; padding: 0 4px; height: 15px; line-height: 15px; border-radius: 3px; font-size: 10px; font-weight: 700; vertical-align: 1px; white-space: nowrap; cursor: help; }
.rk-danger { color: #fff; background: var(--down, #f23645); }
.rk-warn { color: #1a1a1a; background: #f0b90b; }
.ck-it .rk { margin-left: 0; }

/* 종목 목록 보기 고르기 */
.wl-view { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 2px; border-radius: 6px; font-size: 14px; color: var(--text); background: none; border: 0; cursor: pointer; max-width: 170px; }
.wl-view b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-view .ico { width: 14px; height: 14px; color: var(--text-3); flex: none; }
.wl-view:hover { background: var(--win-2); }
.pop.wlv-pop { max-height: min(70vh, 560px); overflow-y: auto; min-width: 250px; }
.pop.wlv-pop button.on .cu-ml { color: var(--brand, #2962ff); font-weight: 600; }
.wl-sec-v { cursor: default; }

/* 마스터 새 글 알림 */
.ms-subbar { display: flex; align-items: center; gap: 9px; margin: 2px 12px 8px; padding: 8px 10px; border-radius: 8px; background: var(--win-2); }
.ms-subbar .ms-av { width: 26px; height: 26px; flex: none; }
.ms-sb-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ms-sb-t b { font-size: 13px; } .ms-sb-t small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-subbar .btn { flex: none; gap: 4px; }
.ms-people button { position: relative; }
.ms-subdot { position: absolute; top: 2px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #2aabee; box-shadow: 0 0 0 2px var(--win); }

/* 뉴스: 중요 소식 · 시각 보기 */
.fd-news.imp > a::before { content: "중요"; display: inline-block; margin-right: 5px; padding: 0 4px; border-radius: 3px; background: color-mix(in srgb, var(--down, #f23645) 18%, transparent); color: var(--down, #f23645); font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.fd-jump { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); background: none; color: var(--text-3); font-size: 11px; cursor: pointer; }
.fd-jump:hover { color: var(--text); border-color: var(--line-2, var(--line)); }
#newsImp { margin-right: 6px; }
#newsImp.on { color: var(--down, #f23645); border-color: currentColor; }

/* 호가 묶음 · 단위 */
.bk-tools { display: flex; align-items: center; gap: 8px; padding: 2px 0 6px; font-size: 11.5px; color: var(--text-3); }
.bk-tools label { display: inline-flex; align-items: center; gap: 5px; }
.bk-tools select { height: 24px; padding: 0 4px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.bk-tools .seg button { height: 24px; padding: 0 8px; font-size: 11.5px; }

/* 텔레그램 알림 한눈에 */
.pop.tgs-pop { min-width: 290px; max-width: 330px; }
.tgs-row { display: flex !important; justify-content: space-between; gap: 10px; }
.tgs-row b { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tgs-test { color: #2aabee !important; font-weight: 600; }
.tgs-note { padding: 6px 12px 8px; font-size: 11.5px; color: var(--text-3); line-height: 1.5; word-break: keep-all; }

.al-logf { margin: 6px 10px 4px; display: flex; } .al-logf button { flex: 1; font-size: 11.5px; }

/* 화면 밖 레벨 표시 */
.osl-box { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.osl-col { position: absolute; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.osl { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 6px; border-radius: 4px; border: 1px solid; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; background: color-mix(in srgb, var(--win) 88%, transparent); }
.osl i { font-style: normal; font-weight: 500; opacity: .8; font-size: 10px; }
.osl.al { color: #f0b90b; border-color: color-mix(in srgb, #f0b90b 60%, transparent); }
.osl.ln { color: var(--text-2); border-color: var(--line-2, var(--line)); }
.osl:hover { background: var(--win-2); }
.osl-more { font-size: 10.5px; color: var(--text-3); pointer-events: none; }

/* 청산 탭 */
.lq-head { padding: 8px 12px 6px; }
.lq-sum { display: flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.lq-sum b { font-variant-numeric: tabular-nums; }
.lq-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--up); overflow: hidden; display: block; }
.lq-bar b { display: block; height: 100%; background: var(--down); }
.lq-note { font-size: 11px; margin-top: 5px; word-break: keep-all; }
.lq-big { cursor: pointer; } .lq-big:hover { background: var(--win-2); }
#mvSeg button { white-space: nowrap; padding: 0 7px; font-size: 12px; }
.panel[data-p="movers"] .fd-sub { padding: 10px 12px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.panel[data-p="movers"] .lq-big { padding-left: 12px; padding-right: 12px; }

/* 스캐너 결과 정렬 */
.res-sort { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.res-sort button { flex: none; height: 24px; padding: 0 9px; border-radius: 12px; border: 1px solid var(--line); background: none; color: var(--text-2); font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.res-sort button.on { color: var(--brand, #2962ff); border-color: currentColor; font-weight: 600; }
@media (max-width: 640px) { .res-sort button { height: 30px; } }
/* 사이트 쪽 창(로그인 · 거래소 연동 · 마스터 글 · 명령창)은 로그인 창처럼 바탕을 어둡게 (차트 대화 상자는 트레이딩뷰처럼 투명 그대로) */
@media (min-width: 561px) { #authOv.overlay, #refOv.overlay, #postOv.overlay, #writeOv.overlay, #adminOv.overlay { background: rgba(0, 0, 0, .5); } #ckOv.overlay { background: rgba(0, 0, 0, .28); } }

/* 점검 G 반영 */
.ck-ov.overlay { align-items: flex-start !important; }
.ms-sb-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: keep-all; }
.ms-subbar .btn { white-space: nowrap; }
#bkToolsBar { padding: 6px 12px 4px; } .bk-hint { font-size: 10.5px; }
@media (min-width: 641px) { #ckOv.overlay { padding-top: 12vh !important; } }
