/* 화면 모양. 값은 tokens.css 의 변수만 씀. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
/* 휴대폰 브라우저(삼성 인터넷 등)에서 화면이 옆으로 밀려 왼쪽이 잘리지 않게 — 가로 넘침은 늘 잘라 냄(11-26 선생님 지원 화면). clip 은 스크롤 칸을 만들지 않아 고정 · sticky 에 영향 없음 */
html, body { overflow-x: clip; max-width: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs);
  line-height: var(--lh);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, p { margin: 0; }

/* 키보드로 옮겨 다닐 때 어디에 있는지 보이게 */
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus); border-radius: var(--radius); }

.skip {
  position: absolute; left: var(--s2); top: -40px; z-index: 50;
  padding: var(--s1) var(--s2); background: var(--raised); color: var(--text); border-radius: var(--radius);
}
.skip:focus { top: var(--s2); }

/* ── 위 메뉴 ── */
.top {
  flex: none;
  display: flex; align-items: center; gap: var(--s4);
  height: calc(44px * var(--fz)); padding: 0 var(--s4);
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.logo { flex: none; display: flex; align-items: center; padding: var(--s1); border-radius: var(--radius); }
.logo img { display: block; height: 28px; width: auto; }
.logo .logo-mark { display: none; } /* 좁은 화면에서만 마크로 바꿈 */
/* 밝은 화면에서는 글자가 진한 로고로(어두운 화면용 로고의 글자는 밝은 색이라 흰 바탕에서 안 보임) */
:root:not([data-theme="light"]) .logo .logo-on-light, :root[data-theme="light"] .logo .logo-on-dark { display: none; }
.nav {
  display: flex; align-items: center; gap: var(--s1); flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; /* 메뉴가 넘치면 줄을 바꾸지 않고 옆으로 밀어 봄 */
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; padding: 6px var(--s3); border-radius: var(--radius);
  color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--raised); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* ── 단추 ── */
.btn {
  height: var(--ctl-h); padding: 0 var(--s3);
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { border-color: var(--on-accent); }
.btn-lg { height: calc(36px * var(--fz)); padding: 0 var(--s4); display: inline-flex; align-items: center; text-decoration: none; }

.chip {
  flex: none; height: var(--ctl-h); padding: 0 var(--s3);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius);
  color: var(--muted); white-space: nowrap;
}
.chip:hover { color: var(--text); background: var(--raised); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] {
  color: var(--text); background: var(--accent-soft); border-color: var(--accent);
}
.chip:disabled { cursor: default; opacity: 0.7; border-style: dashed; border-color: var(--line); }
.chip:disabled:hover { background: transparent; color: var(--muted); }

/* ── 주의 띠(인터넷 끊김·쉬는 중) ── */
.banner {
  flex: none; padding: 3px var(--s4);
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn);
  font-size: var(--fs-sm); text-align: center;
}

main { flex: 1; min-height: 0; overflow: auto; }
main:focus-visible { box-shadow: none; } /* 건너뛰기 링크로 초점만 받는 자리라 테두리를 그리지 않음 */

/* ── 맨 아래 ── */
.foot {
  flex: none; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); justify-content: space-between;
  padding: var(--s1) var(--s4);
  border-top: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font-size: var(--fs-sm);
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ── 준비 중 화면 ── */
.soon {
  max-width: 560px; margin: 12vh auto 0; padding: var(--s4);
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3);
}
.soon h1 { font-size: var(--fs-xl); }
.soon p { color: var(--muted); font-size: var(--fs-lg); }
.tag-soon {
  display: inline-block; padding: 2px var(--s2);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--muted); font-size: var(--fs-sm);
}

/* ── 차트 화면 ── */
.chart-page { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.bar {
  flex: none; display: flex; align-items: center; gap: var(--s1);
  min-height: calc(38px * var(--fz)); padding: var(--s1) var(--s3);
  background: var(--panel); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.bar::-webkit-scrollbar { display: none; }
.bar .gap { flex: 1; min-width: var(--s3); }
.bar-group { flex: none; display: flex; align-items: center; gap: 2px; }
.bar .label { flex: none; color: var(--muted); font-size: var(--fs-sm); margin-right: var(--s1); white-space: nowrap; }
.bar .sep { flex: none; width: 1px; height: 18px; background: var(--line); margin: 0 var(--s2); }
/* 봉 단추가 먹는 칸을 알려 주는 꼬리표 — 지금 칸 테두리와 같은 색 점 */
.now-tag {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: var(--ctl-h); padding: 0 var(--s2); margin-right: var(--s2);
  border: 1px solid var(--accent); border-radius: var(--radius);
  color: var(--text); font-size: var(--fs-sm); white-space: nowrap;
}
.now-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.info { gap: var(--s4); white-space: nowrap; }
.info-name { display: flex; align-items: baseline; gap: var(--s2); flex: none; }
.info-name b { font-size: var(--fs-lg); }
.info-name small { color: var(--muted); font-size: var(--fs-sm); }
.info-price { font-size: var(--fs-lg); font-weight: 700; flex: none; }
.info-item { flex: none; color: var(--muted); font-size: var(--fs-sm); }
.info-item b { color: var(--text); font-weight: 600; font-size: var(--fs); margin-left: var(--s1); }
.info-pct { margin-left: var(--s1); font-size: var(--fs); font-weight: 600; }

.is-up { color: var(--up); }
.is-down { color: var(--down-text); }
.is-flat { color: var(--flat); }

.work { flex: 1; min-height: 0; display: flex; }
/* 차트 영역: 아래에 차트 격자, 그 위에 같은 격자로 경계 손잡이를 겹침 */
.grid-wrap { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; }
.grid-handles {
  position: absolute; inset: 0; z-index: 5;
  display: grid; gap: var(--s1); padding: var(--s1);
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  pointer-events: none; /* 손잡이만 눌리고 나머지는 아래 차트로 통과 */
}
/* 손잡이: 잡히는 영역은 12px, 보이는 선은 4px(틈 한가운데). 격자가 경계 바로 다음 줄의 시작에 놓아 주므로 틈 쪽으로 당겨 놓음 */
.gh { pointer-events: auto; position: relative; touch-action: none; user-select: none; z-index: 1; }
.gh-col { justify-self: start; width: 12px; margin-left: -8px; cursor: col-resize; }
.gh-row { align-self: start; height: 12px; margin-top: -8px; cursor: row-resize; }
.gh::after { content: ""; position: absolute; border-radius: 2px; background: transparent; }
.gh-col::after { left: 4px; top: 0; bottom: 0; width: 4px; }
.gh-row::after { top: 4px; left: 0; right: 0; height: 4px; }
.gh:hover::after, .gh.is-dragging::after, .gh:focus-visible::after { background: var(--accent); }
.gh:focus-visible { box-shadow: none; }
/* 영역이 좁아 그 방향으로는 크기를 못 바꿀 때 */
.gh.is-off { cursor: default; }
.gh.is-off:hover::after { background: transparent; }
.gh.is-off:focus-visible::after { background: var(--muted); }
/* 끄는 동안: 차트가 마우스를 받지 않게(차트가 같이 끌려 움직이지 않음), 글자가 선택되지 않게 */
.grid-wrap.is-resizing .grid { pointer-events: none; }
.grid-wrap.is-resizing { user-select: none; }
.grid {
  flex: 1; min-width: 0; min-height: 0;
  display: grid; gap: var(--s1); padding: var(--s1);
  /* 열·행과 칸 자리는 모양 자료(js/util/shapes.js)에서 chart-page.js 가 넣음 — 여기에 칸 수별 규칙을 두지 않음 */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}
.grid-msg { place-self: center; color: var(--muted); text-align: center; padding: var(--s4); }

.pane {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.pane.is-active { border-color: var(--accent); }
.pane:focus-visible { box-shadow: none; border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -2px; }
.pane-chart { position: absolute; inset: 0; }
.pane-legend {
  position: absolute; left: var(--s2); top: var(--s1); right: 64px; z-index: 3;
  display: flex; flex-wrap: nowrap; gap: 0 var(--s2); align-items: baseline;
  pointer-events: none; font-size: var(--fs-sm);
  white-space: nowrap; overflow: hidden; /* 줄을 바꾸지 않음 — 글자가 캔들 위로 내려오지 않게 */
}
/* 자리가 모자라면 이름·봉은 지키고 값 쪽이 잘림 */
.pane-title { pointer-events: auto; appearance: none; border: 0; color: inherit; font-family: inherit; cursor: pointer; text-align: left; line-height: inherit; }
.pane-title:hover { outline: 1px solid var(--accent); }
.pane-title::after { content: ' ▾'; color: var(--muted); font-weight: 400; }
.pane-title { flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 700; font-size: var(--fs); }
/* 글자 뒤에 차트 바탕색을 반투명하게 깔아, 지표 선이 지나가도 읽히게 */
.pane-title, .pane-ohlc { padding: 0 var(--s1); background: var(--veil); border-radius: 3px; }
.pane-ohlc { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--muted); display: flex; flex-wrap: nowrap; gap: 0 var(--s2); }
.pane-ohlc > * { flex: none; }
/* 좁은 칸(너비는 chart-pane.js 가 재서 붙임): 시·고·저를 숨기고, 더 좁으면 이름·봉만 */
.pane.is-compact .ohlc-extra { display: none; }
.pane.is-compact .pane-legend { right: var(--s2); }
.pane.is-tiny .pane-ohlc { display: none; }
/* 켜진 지표의 꼬리표(이름 아래 줄). 줄 자체는 눌리지 않고(캔들로 통과) × 단추만 눌림 */
.pane-ind {
  /* z-index 5: "이 종목은 지금 없어요" 덮개(4)보다 위 — 못 받은 칸에서도 × 로 지표를 끌 수 있게 */
  position: absolute; left: var(--s2); top: calc(26px * var(--fz)); right: 64px; z-index: 5;
  display: flex; flex-wrap: nowrap; gap: var(--s1); align-items: center;
  pointer-events: none; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden;
}
.ind-tags { flex: none; display: flex; gap: var(--s1); }
.ind-tag, .method-tag {
  display: inline-flex; align-items: center; height: calc(20px * var(--fz)); padding-left: 6px;
  background: var(--veil); border: 1px solid var(--muted); border-radius: var(--radius); color: var(--text);
}
.ind-tag-x, .method-x {
  pointer-events: auto; width: calc(20px * var(--fz)); height: calc(18px * var(--fz)); padding: 0; margin-left: 2px;
  background: transparent; border: 0; border-radius: var(--radius); color: var(--muted); line-height: 1;
}
.ind-tag-x:hover, .method-x:hover { color: var(--text); background: var(--raised); }
.ind-count { display: none; padding: 0 6px; height: calc(20px * var(--fz)); line-height: calc(18px * var(--fz)); background: var(--veil); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); pointer-events: auto; }
.ind-note { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); padding: 0 var(--s1); background: var(--veil); border-radius: 3px; }
/* 아래 칸 이름표: 그 칸의 왼쪽 위. 자리(top)는 chart-pane.js 가 넣음 */
.pane-subs { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.pane-sub {
  position: absolute; left: var(--s2); display: flex; gap: 6px; align-items: baseline;
  padding: 0 var(--s1); background: var(--veil); border-radius: 3px;
  font-size: var(--fs-sm); color: var(--muted); white-space: nowrap;
}
.pane-sub b { font-weight: 700; color: var(--text); }
.pane.is-compact .sub-value { display: none; }
/* 좁은 칸: 꼬리표 대신 개수만("지표 3"), 안내 글은 개수에 올리면 보임 */
.pane.is-compact .pane-ind { right: var(--s2); }
.pane.is-compact .ind-tags, .pane.is-compact .ind-note { display: none; }
.pane.is-compact .ind-count { display: inline-block; }
.pane-ohlc b { color: var(--text); font-weight: 500; margin-left: 2px; }
.pane-ohlc .is-up { color: var(--up); }
.pane-ohlc .is-down { color: var(--down-text); }
.pane-msg {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2);
  padding: var(--s4); text-align: center;
  background: var(--veil);
}
.pane-msg.is-soft { background: transparent; pointer-events: none; }
.pane-msg-text { font-size: var(--fs-lg); font-weight: 700; }
.pane-msg-hint { color: var(--muted); }

/* ── 오른쪽 칸 ── */
.side {
  flex: none; width: var(--side-w); min-height: 0;
  display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line);
}
.side-head { flex: none; display: flex; align-items: center; gap: 2px; padding: var(--s1); border-bottom: 1px solid var(--line); }
.side-head .chip { padding: 0 var(--s2); }
/* 탭 줄: 한 줄로(줄바꿈 없음). 탭이 많아 좁은 폭에서 넘치면 옆으로 밀어 봄(글자는 줄이지 않음 — 간격 · 안쪽 여백만 좁힘) */
.side-tabs {
  display: flex; flex-wrap: nowrap; gap: 1px; min-width: 0; flex: 0 1 auto;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
}
.side-tabs::-webkit-scrollbar { display: none; }
.side-head .side-tab { flex: none; padding: 0 4px; }
.side-head .gap { flex: 1; }
.side-fold { width: var(--ctl-h); padding: 0; flex: none; }
.side-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-soon { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.side-soon b { font-size: var(--fs-lg); }
.side-soon p { color: var(--muted); }
.side.is-folded { width: calc(36px * var(--fz)); }
.side.is-folded .side-head { flex-direction: column; border-bottom: 0; }
.side.is-folded .side-tabs, .side.is-folded .side-body, .side.is-folded .side-head .gap { display: none; }

.symlist { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.symlist-tools { flex: none; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2); border-bottom: 1px solid var(--line); }
.symlist-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.symlist-row .label { color: var(--muted); font-size: var(--fs-sm); margin-right: var(--s1); }
.symlist-row .chip { padding: 0 var(--s2); }
.input {
  width: 100%; height: calc(30px * var(--fz)); padding: 0 var(--s2);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.input::placeholder { color: var(--muted); }
.input:focus-visible { box-shadow: none; border-color: var(--accent); }
.symlist-view { flex: 1; min-height: 0; overflow-y: auto; position: relative; overscroll-behavior: contain; }
.symlist-space { position: relative; width: 100%; }
.symlist-empty { padding: var(--s4); color: var(--muted); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }

/* 종목 줄 — 칸은 언제나 머리줄과 같은 넷: 종목 · 현재가 · 변동(금액+변동률) · 거래대금(값+단위).
   좁으면(.is-two) 칸 안에서 두 줄로 쌓고, 넓으면(.is-one) 한 줄로 늘어놓음.
   줄 높이는 symbol-list.js 의 ROW_TWO · ROW_ONE · ROW_ONE_TOUCH 와 같은 값 */
.symlist { --c-price: 56px; --c-chg: 56px; --c-vol: 60px; --c-gap: 4px; --c-star: 22px; --c-pad: 4px; } /* 거래대금 칸은 머리 이름 「거래대금 ↓」이 들어갈 폭 */
.symlist.is-one { --c-price: 88px; --c-chg: 140px; --c-vol: 100px; --c-gap: 8px; --c-star: 28px; --c-pad: 8px; }
.symlist-view { scroll-padding-top: calc(30px * var(--fz)); }
.symlist-wide { margin-left: auto; }
.symlist-cols {
  position: sticky; top: 0; z-index: 2; height: calc(28px * var(--fz));
  display: grid; grid-template-columns: minmax(0, 1fr) var(--c-price) var(--c-chg) var(--c-vol);
  align-items: center; column-gap: var(--c-gap); padding: 0 var(--c-pad) 0 var(--c-star);
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.sym-col {
  min-width: 0; height: 100%; padding: 0; background: transparent; border: 0;
  display: flex; align-items: center; justify-content: flex-end; /* 칸보다 긴 이름(「거래대금 ↓」)은 왼쪽으로 넘쳐 화살표가 안 잘림 */
  color: var(--muted); font-size: var(--fs-sm); white-space: nowrap;
}
.sym-col:first-child { justify-content: flex-start; }
.sym-col:hover { color: var(--text); }
.sym-col[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.sym-col:focus-visible { box-shadow: none; outline: 2px solid var(--accent); outline-offset: -2px; }
.sym-col-dir { font-style: normal; margin-left: 2px; }

.sym-row {
  position: absolute; left: 0; right: 0; height: 46px; height: calc(46px * var(--fz)); /* 앞 값 = 보통 크기(symbol-list.js 의 ROW_TWO × 배율) */
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line-soft);
}
.symlist.is-one .sym-row { height: 34px; }
.symlist.is-one .sym-row { height: calc(34px * var(--fz)); }
/* 글자 크기 고르기: 칸 폭도 배율을 따라감(보통일 때는 위 값과 같음) */
.symlist { --c-price: calc(56px * var(--fz)); --c-chg: calc(56px * var(--fz)); --c-vol: calc(60px * var(--fz)); --c-star: calc(22px * var(--fz)); }
.symlist.is-one { --c-price: calc(88px * var(--fz)); --c-chg: calc(140px * var(--fz)); --c-vol: calc(100px * var(--fz)); --c-star: calc(28px * var(--fz)); }
.sym-row.is-current { background: var(--accent-soft); }
.sym-row:hover { background: var(--raised); }
.sym-head { flex: 1; padding: 0 var(--s2); color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.sym-row.is-head, .sym-row.is-head:hover { background: var(--bg); }
.sym-star {
  flex: none; width: var(--c-star); height: 100%; padding: 0;
  background: transparent; border: 0; color: var(--muted); font-size: 0.875rem;
}
.sym-star[aria-pressed="true"] { color: var(--accent); } /* 주의 색은 띠·경고에만 씀 */
.sym-star:focus-visible, .sym-main:focus-visible { box-shadow: none; outline: 2px solid var(--accent); outline-offset: -2px; }
.sym-main {
  flex: 1; min-width: 0; height: 100%; padding: 0 var(--c-pad) 0 0;
  display: grid; grid-template-columns: 24px minmax(0, 1fr) var(--c-price) var(--c-chg) var(--c-vol);
  align-items: center; column-gap: var(--c-gap);
  background: transparent; border: 0; text-align: left; white-space: nowrap;
}
/* 로고: 넣어 둔 그림이 없으면 글자 동그라미. 바탕색은 종목마다 고정(tokens.css 의 --logo-0 … 7, 오름·내림 색과 다른 차분한 색) */
.sym-logo {
  grid-column: 1; width: 24px; height: 24px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--logo-text); font-size: var(--fs-sm); font-weight: 700; letter-spacing: -0.5px; line-height: 1;
}
.sym-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* 밝은 바탕용으로 그려진 회사 로고(주식)는 밝은 동그란 받침 위에 — 어두운 바탕에서도 보이게 */
.sym-logo.on-plate { background: var(--logo-text); }
.sym-logo.on-plate img { box-sizing: border-box; padding: 4px; }
.sym-logo.c0 { background: var(--logo-0); }
.sym-logo.c1 { background: var(--logo-1); }
.sym-logo.c2 { background: var(--logo-2); }
.sym-logo.c3 { background: var(--logo-3); }
.sym-logo.c4 { background: var(--logo-4); }
.sym-logo.c5 { background: var(--logo-5); }
.sym-logo.c6 { background: var(--logo-6); }
.sym-logo.c7 { background: var(--logo-7); }
.sym-name { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.sym-name b { font-weight: 700; }
.sym-name small { color: var(--muted); font-size: var(--fs-sm); margin-left: var(--s1); }
.symlist.is-two .sym-name small { display: block; margin-left: 0; overflow: hidden; text-overflow: ellipsis; }
.sym-tag {
  margin-left: var(--s1); padding: 0 var(--s1); border: 1px solid var(--line); border-radius: 4px;
  color: var(--muted); font-size: var(--fs-sm); font-style: normal;
}
.sym-price { grid-column: 3; text-align: right; overflow: hidden; }
/* 「변동」 칸: 금액과 변동률을 한 칸에(좁으면 위아래, 넓으면 나란히) */
.sym-chg {
  grid-column: 4; min-width: 0; display: flex; flex-direction: column; align-items: flex-end;
  font-size: var(--fs-sm); line-height: 1.25;
}
.symlist.is-one .sym-chg { flex-direction: row; justify-content: flex-end; align-items: baseline; gap: var(--s2); }
/* 「거래대금」 칸: 값과 단위(USDT) */
.sym-vol {
  grid-column: 5; min-width: 0; display: flex; flex-direction: column; align-items: flex-end;
  color: var(--text); font-size: var(--fs-sm); line-height: 1.25;
}
.symlist.is-one .sym-vol { flex-direction: row; justify-content: flex-end; align-items: baseline; gap: 3px; }
.sym-vol-num { flex: none; }
.sym-vol-unit { color: var(--muted); font-style: normal; font-size: var(--fs-sm); } /* 14단계: 10px → 12px(작아서 안 읽힘) */
/* 「넓게」: 종목 탭이 보일 때만 오른쪽 칸을 넓힘(다른 탭 · 접힌 칸은 원래 폭) */
@media (min-width: 861px) {
  .side:not(.is-folded):has(.side-panel:not([hidden]) .symlist.is-wide) { width: min(var(--side-w-wide), 55vw); }
  /* 「경제 이벤트」 탭이 보일 때도 조금 넓힘(탭 이름 다섯 개 · 발표마다 표 다섯 칸이 한 줄에 들어가게) */
  .side:not(.is-folded):has(#side-panel-econ:not([hidden])) { width: min(var(--side-w-econ), 45vw); }
}
@media (max-width: 860px) {
  .symlist-wide { display: none; } /* 좁은 화면은 오른쪽 칸이 이미 화면 폭 전체 */
  .symlist-cols { height: calc(34px * var(--fz)); }
  .symlist-view { scroll-padding-top: calc(36px * var(--fz)); }
  .symlist.is-one .sym-row { height: 40px; }
  .symlist.is-one .sym-row { height: calc(40px * var(--fz)); }
}

/* ── 시세 띠 ── */
.strip {
  flex: none; display: flex; align-items: center; gap: var(--s4);
  height: calc(30px * var(--fz)); padding: 0 var(--s3);
  background: var(--panel); border-top: 1px solid var(--line);
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip-item { flex: none; display: flex; align-items: baseline; gap: var(--s2); }
.strip-item b { font-weight: 700; }
.strip-item .pct { font-size: var(--fs-sm); }

/* ── 토스트(화면 안 작은 안내) ── */
.toasts {
  position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: var(--s2); pointer-events: none;
}
.toast {
  padding: var(--s2) var(--s4);
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.toast.has-action { display: flex; align-items: center; gap: var(--s3); pointer-events: auto; padding-right: var(--s2); }

/* ── [화면 분할] 단추와 판 ── */
.chart-page { position: relative; }
.split-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.split-btn[aria-expanded="true"] { border-color: var(--accent); }
.split-btn-thumb { display: inline-flex; }
.split-btn-count { color: var(--muted); font-size: var(--fs-sm); }
.thumb { display: block; flex: none; }
.thumb rect { fill: var(--muted); opacity: 0.55; }
.split-panel, .ind-panel {
  position: absolute; z-index: 20; width: calc(400px * var(--fz));
  display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s3); overflow-y: auto; overscroll-behavior: contain;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.split-section { display: flex; flex-direction: column; gap: var(--s1); }
.split-section + .split-section { padding-top: var(--s3); border-top: 1px solid var(--line); }
.split-title { margin: 0 0 var(--s1); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.split-row { display: flex; align-items: center; gap: var(--s2); }
.split-count { flex: none; width: calc(36px * var(--fz)); color: var(--muted); font-size: var(--fs-sm); text-align: right; }
.split-shapes { display: flex; flex-wrap: wrap; gap: var(--s1); }
.shape-btn {
  display: inline-flex; padding: 5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.shape-btn:hover { border-color: var(--muted); }
.shape-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.shape-btn[aria-pressed="true"] .thumb rect, .saved-main[aria-pressed="true"] .thumb rect { fill: var(--accent); opacity: 1; }
.saved-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.saved-row { display: flex; align-items: center; gap: var(--s1); min-height: 40px; }
.saved-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s2); text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius);
}
.saved-main:hover { background: var(--panel); }
.saved-main[aria-pressed="true"] { border-color: var(--accent); }
.saved-text { min-width: 0; display: flex; flex-direction: column; }
.saved-name { display: flex; align-items: center; gap: var(--s1); min-width: 0; }
.saved-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-text small { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-tag {
  flex: none; padding: 0 var(--s1); font-style: normal; font-size: var(--fs-sm);
  color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius);
}
.saved-del { flex: none; height: var(--ctl-h); padding: 0 var(--s2); background: transparent; border: 0; color: var(--muted); border-radius: var(--radius); }
.saved-del:hover { color: var(--text); background: var(--panel); }
.saved-row.is-confirm { padding: 0 var(--s2); background: var(--panel); border-radius: var(--radius); }
.saved-ask { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-box { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s1); }
.save-box small { color: var(--muted); font-size: var(--fs-sm); }
.save-actions { width: 100%; display: flex; align-items: center; gap: var(--s1); }
.save-actions small { flex: 1; }

/* ── 오류 표시(개발 중 버그를 숨기지 않게 화면 구석에) ── */
.errbox { position: fixed; left: var(--s2); bottom: 40px; z-index: 70; max-width: min(520px, calc(100vw - 16px)); }
.errbox-btn {
  height: var(--ctl-h); padding: 0 var(--s2);
  background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius); color: var(--warn);
}
.errbox-list {
  margin: var(--s1) 0 0; padding: var(--s2); list-style: none;
  max-height: 40vh; overflow: auto;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: var(--fs-sm); word-break: break-all;
}
.errbox-list li + li { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px solid var(--line); }

/* ── 좁은 화면: 오른쪽 칸을 아래로 ── */
@media (max-width: 860px) {
  .top { gap: var(--s2); padding: 0 var(--s2); }
  .logo .logo-wide { display: none; }
  .logo .logo-mark { display: block; }
  .nav a { padding: 6px var(--s2); }
  .work { flex-direction: column; }
  .side { width: 100%; height: 42%; border-left: 0; border-top: 1px solid var(--line); }
  .side.is-folded { width: 100%; height: auto; }
  .side.is-folded .side-head { flex-direction: row; justify-content: flex-end; }
  .foot { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ── 칸 크기 같게 · 차트 연동 ── */
.split-extra { margin-top: var(--s1); }
.even-btn:disabled { opacity: 0.5; cursor: default; }
.even-btn:disabled:hover { border-color: var(--line); }
.split-title .link-sum { margin-left: var(--s2); font-weight: 400; }
.link-btns { display: flex; flex-wrap: wrap; gap: var(--s1); }
.link-btn { border-color: var(--line); }
.link-box.is-dim { opacity: 0.55; }
.link-badge {
  flex: none; height: var(--ctl-h); display: inline-flex; align-items: center; padding: 0 var(--s2); margin-right: var(--s1);
  border: 1px dashed var(--accent); border-radius: var(--radius);
  color: var(--accent); font-size: var(--fs-sm); white-space: nowrap;
}

/* ── [지표] 단추와 판 ── */
.ind-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; margin-left: var(--s1); }
.ind-btn[aria-expanded="true"] { border-color: var(--accent); }
.ind-btn-count { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: var(--fs-sm); text-align: center; }
.ind-panel { width: calc(300px * var(--fz)); }
.ind-body { display: flex; flex-direction: column; gap: var(--s2); }
.ind-lock { margin: 0; color: var(--text); line-height: var(--lh); word-break: keep-all; }
.ind-rows { display: flex; flex-direction: column; gap: 2px; }
.ind-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  min-height: var(--row-h); padding: 0 var(--s2); text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}
button.ind-row:hover { border-color: var(--muted); }
.ind-row[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ind-row-state { font-style: normal; font-size: var(--fs-sm); color: var(--muted); }
.ind-row[aria-pressed="true"] .ind-row-state { color: var(--accent); }
.ind-row.is-locked { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: var(--s1) var(--s2); color: var(--muted); border-style: dashed; }
.ind-row.is-locked small { font-size: var(--fs-sm); word-break: keep-all; }
.ind-foot { display: flex; justify-content: flex-end; }
.ind-foot .btn:disabled { opacity: 0.5; cursor: default; }

/* ── 매매법: 단추·판·칸 꼬리표·상태 문구 ── */
.method-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.method-btn[aria-expanded="true"] { border-color: var(--accent); }
.method-btn-name { max-width: calc(160px * var(--fz)); overflow: hidden; text-overflow: ellipsis; color: var(--accent); font-size: var(--fs-sm); }
.method-panel { width: calc(360px * var(--fz)); }
.method-tabs { display: flex; gap: var(--s1); }
.method-tabs .chip { border-color: var(--line); }
.method-rows { display: flex; flex-direction: column; gap: 2px; }
.method-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: 6px var(--s2); text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}
button.method-row:hover { border-color: var(--muted); }
.method-row[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.method-row[aria-pressed="true"] .ind-row-state { color: var(--accent); }
.method-row.is-soon, .method-row.is-locked { opacity: 0.85; border-style: dashed; }
.method-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.method-text b { font-weight: 700; }
.method-text small { color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.method-chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.method-chips i { font-style: normal; font-size: var(--fs-sm); color: var(--muted); padding: 0 6px; border: 1px solid var(--line); border-radius: 9px; }
.method-foot { color: var(--muted); font-size: var(--fs-sm); }
/* 칸 꼬리표: 매매법은 강조색 테두리 */
.method-tag { flex: none; border-color: var(--accent); color: var(--accent); max-width: 60%; overflow: hidden; }
.method-tag > span { overflow: hidden; text-overflow: ellipsis; }
.method-warn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: calc(20px * var(--fz)); padding-left: 6px;
  background: var(--veil); border: 1px solid var(--warn); border-radius: var(--radius); color: var(--warn);
}
.method-warn-btn { pointer-events: auto; height: calc(18px * var(--fz)); padding: 0 6px; background: var(--warn-soft); border: 0; border-radius: var(--radius); color: var(--warn); font-size: var(--fs-sm); }
.method-warn-btn:hover { color: var(--text); }
.warn-narrow { display: none; }
/* 좁은 칸: 안내 글은 숨기고 단추 글을 "15분봉에서 봐요 ›"로 바꿔 단추만으로 뜻이 통하게 */
.pane.is-compact .method-warn > span { display: none; }
.pane.is-compact .method-warn { padding-left: 0; }
.pane.is-compact .warn-wide { display: none; }
.pane.is-compact .warn-narrow { display: inline; }
/* 매매법 묶음에 든 지표의 꼬리표: × 없이 흐리게(매매법 꼬리표의 × 하나로 끔) */
.ind-tag.is-bundled { padding-right: 6px; color: var(--muted); border-color: var(--line); }
/* 권한이 없어 못 그리는 지표(이평) 안내 + 빼기 */
.ind-locked {
  flex: none; display: inline-flex; align-items: center; height: calc(20px * var(--fz)); padding-left: 6px;
  background: var(--veil); border: 1px dashed var(--muted); border-radius: var(--radius); color: var(--muted);
}
.pane.is-compact .ind-locked { display: none; }
/* 좁은 칸에서 개수를 누르면: 숨어 있던 안내(잠금·기준·봉 안내 글)가 아래로 펼쳐짐 */
.ind-count { font: inherit; cursor: pointer; }
.pane.is-compact .pane-ind.is-open { flex-wrap: wrap; white-space: normal; overflow: visible; }
.pane.is-compact .pane-ind.is-open .ind-note,
.pane.is-compact .pane-ind.is-open .ind-locked { display: inline-flex; }
.pane.is-compact .pane-ind.is-open .method-warn > span { display: inline; }
/* 상태 문구 한 줄: 꼬리표 줄 아래. 기본은 흐린 글자, 눈여겨볼 것만 주의 색 */
.pane-status {
  position: absolute; left: var(--s2); top: calc(50px * var(--fz)); right: 64px; z-index: 3;
  display: flex; flex-wrap: nowrap; gap: var(--s2); overflow: hidden; white-space: nowrap;
  pointer-events: none; font-size: var(--fs-sm); color: var(--muted);
}
.pane-status span { flex: none; padding: 0 var(--s1); background: var(--veil); border-radius: 3px; }
.pane-status .is-warn { color: var(--warn); }
.pane.is-compact .pane-status, .pane.is-low .pane-status { display: none; }
/* ── 매매법 화면(#/method) ── */
.method-page { padding: var(--s4); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s4); }
.method-page h1 { margin: 0; font-size: var(--fs-xl); }
.method-page h2 { margin: 0 0 var(--s2); font-size: var(--fs-lg); }
.method-page > p { margin: 0; color: var(--muted); }
.method-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(260px * var(--fz))), 1fr)); gap: var(--s3); }
.method-card {
  display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.method-card h3 { margin: 0; font-size: var(--fs); }
.method-card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.method-card .btn { align-self: flex-start; margin-top: auto; }
.method-card.is-soon { opacity: 0.85; border-style: dashed; }
@media (max-width: 600px) { .method-cards { grid-template-columns: 1fr; } }

/* ── 포착(오른쪽 칸의 「포착」 탭) ── */
.side-tab { display: inline-flex; align-items: center; gap: 4px; }
.side-badge {
  font-style: normal; min-width: calc(16px * var(--fz)); height: calc(16px * var(--fz)); padding: 0 4px; border-radius: calc(8px * var(--fz));
  background: var(--accent); color: var(--on-accent); font-size: var(--fs-sm); line-height: calc(16px * var(--fz)); font-weight: 700; text-align: center;
}
.scan { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scan-tools { flex: none; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2); border-bottom: 1px solid var(--line); }
.scan-tools .gap { flex: 1; }
.scan-tools .chip { padding: 0 var(--s2); }
.scan-view { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.scan-msg { margin: 0; padding: var(--s4); color: var(--muted); line-height: var(--lh); word-break: keep-all; }
.scan-msg.is-lock { color: var(--text); }
.scan-sec h4 {
  position: sticky; top: 0; z-index: 1; margin: 0; padding: var(--s2) var(--s2) var(--s1);
  background: var(--bg); color: var(--muted); font-size: var(--fs-sm); font-weight: 700;
}
.scan-kind { border-bottom: 1px solid var(--line-soft); }
.scan-kind-head { display: flex; align-items: center; height: var(--row-h); }
.scan-kind-main {
  flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: var(--s1); padding: 0 2px 0 var(--s2);
  background: transparent; border: 0; color: var(--text); text-align: left;
}
.scan-kind-main:hover, .scan-item:hover { background: var(--raised); }
.scan-caret { flex: none; width: 10px; font-style: normal; color: var(--muted); transition: transform 0.12s; }
.scan-kind.is-open .scan-caret { transform: rotate(90deg); }
.scan-kind-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.scan-kind.is-dim .scan-kind-name { font-weight: 400; color: var(--muted); }
.scan-kind-count { flex: none; color: var(--muted); font-size: var(--fs-sm); }
.scan-kind-count.is-on { color: var(--accent); font-weight: 700; }
.scan-kind-ago { flex: none; margin-left: 2px; text-align: right; color: var(--muted); font-size: var(--fs-sm); }
.scan-item-ago { flex: none; min-width: calc(52px * var(--fz)); text-align: right; color: var(--muted); font-size: var(--fs-sm); }
/* 🔔·★: 꺼져 있으면 흐린 회색, 켜면 제 색(켜짐·꺼짐은 aria-pressed 와 이름표 글자로도 전함) */
.scan-ico {
  flex: none; width: calc(24px * var(--fz)); height: calc(26px * var(--fz)); padding: 0; background: transparent; border: 0; border-radius: var(--radius);
  color: var(--muted); font-size: var(--fs); filter: grayscale(1); opacity: 0.6;
}
.scan-ico:hover { opacity: 0.8; }
/* 검색기 화면 카드의 🔔: 「알림」 글자를 같이(아이콘만으로는 알림 단추인 줄 모름) */
.scr-bell { width: auto; padding: 0 var(--s2); white-space: nowrap; font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: 999px; opacity: 0.85; }
.scr-bell[aria-pressed="true"] { border-color: var(--accent); }
/* 포착 탭 맨 위 한 줄 안내(닫으면 다시 안 뜸) */
.scan-tip { display: flex; align-items: flex-start; gap: var(--s1); padding: var(--s1) var(--s1) var(--s1) var(--s2); background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-sm); line-height: var(--lh); word-break: keep-all; }
.scan-tip[hidden] { display: none; }
.scan-tip > span { flex: 1; min-width: 0; }
.scan-tip-x { flex: none; width: calc(24px * var(--fz)); height: calc(24px * var(--fz)); padding: 0; background: transparent; border: 0; border-radius: var(--radius); color: var(--muted); font-size: var(--fs); line-height: 1; }
.scan-tip-x:hover { color: var(--text); }
.scan-ico[aria-pressed="true"] { filter: none; opacity: 1; color: var(--accent); }
.scan-list { display: flex; flex-direction: column; padding-bottom: var(--s1); }
.scan-item {
  display: flex; align-items: center; gap: var(--s2); min-height: calc(28px * var(--fz)); padding: 0 var(--s2) 0 26px;
  background: transparent; border: 0; color: var(--text); text-align: left;
}
.scan-item.is-old { opacity: 0.8; } /* 14단계: 0.55 → 0.8(흐린 글자도 대비 4.5:1 이상) */
.scan-item.is-missing .scan-item-name b { color: var(--muted); text-decoration: line-through; }
.scan-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-item-name b { font-weight: 700; }
.scan-item-name small { margin-left: var(--s1); color: var(--muted); font-size: var(--fs-sm); }
.scan-none { margin: 0; padding: var(--s1) var(--s2) var(--s1) 26px; color: var(--muted); font-size: var(--fs-sm); }
.scan-more { align-self: flex-start; margin: var(--s1) 0 0 26px; }
.scan-foot { flex: none; border-top: 1px solid var(--line); }
.scan-bots {
  width: 100%; min-height: var(--ctl-h); padding: 0 var(--s2); background: transparent; border: 0;
  color: var(--muted); font-size: var(--fs-sm); text-align: left;
}
.scan-bots.is-warn, .scr-bots.is-warn { color: var(--warn); }
.scan-kind-main:focus-visible, .scan-item:focus-visible, .scan-ico:focus-visible, .scan-bots:focus-visible {
  box-shadow: none; outline: 2px solid var(--accent); outline-offset: -2px;
}

/* ── 검색기 화면 ── */
.scr-page { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.scr-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); }
.scr-head h1 { margin: 0; font-size: var(--fs-xl); }
.scr-head .gap { flex: 1; }
.scr-page > p { margin: 0; color: var(--muted); }
.scr-page h2 { margin: 0 0 var(--s2); font-size: var(--fs-lg); }
.scr-bots { color: var(--muted); font-size: var(--fs-sm); }
.scr-body { display: flex; flex-direction: column; gap: var(--s4); }
.scr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(260px * var(--fz))), 1fr)); gap: var(--s3); align-items: start; }
.scr-card {
  min-width: 0; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.scr-card.is-dim { border-style: dashed; }
.scr-card.is-focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.scr-link { align-self: flex-start; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--accent); font-size: var(--fs-sm); }
.scr-card-head { display: flex; align-items: center; gap: var(--s2); }
.scr-card-head h3 { flex: 1; min-width: 0; margin: 0; font-size: var(--fs); }
.scr-card > p { margin: 0; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.scr-list { display: flex; flex-direction: column; }
.scr-list .scan-item { padding: 0 var(--s1); border-radius: var(--radius); }
.scr-more { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 600px) { .scr-cards { grid-template-columns: 1fr; } }

/* ══════════ 첫 화면(#/) — 세로로 읽는 문서형 화면. 좁은지는 창이 아니라 이 화면이 놓인 폭으로 가름(@container) ══════════ */
.home, .data-page { container-type: inline-size; }
.home-in { max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px; display: flex; flex-direction: column; gap: 40px; }
.home h2, .home h3, .data-page h2, .data-page h3 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 시장 한눈에(카드 둘) — .hcard 는 실시간 데이터 화면도 씀 */
.hcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.hcard {
  min-width: 0; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
/* 제목 옆에 고르기 단추가 안 들어가면 단추가 아랫줄로 내려감(제목은 자르지 않음) */
.hcard-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); min-height: 26px; }
.hcard-head h2 { flex: 1 0 auto; font-size: var(--fs); font-weight: 600; color: var(--muted); white-space: nowrap; }
.hcard-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--s2); }
.hcard-foot { margin-top: auto; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.hcard-note, .hcard-err { margin: 0; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }

/* 둘 · 셋 가운데 하나 고르기 */
.seg { flex: none; display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); }
.seg-btn { height: calc(24px * var(--fz)); padding: 0 7px; background: transparent; border: 0; border-radius: 4px; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--raised); color: var(--text); font-weight: 600; }
.seg-btn:focus-visible, .hmover:focus-visible, .htaste-row:focus-visible, .dnav-btn:focus-visible, .dsym:focus-visible {
  box-shadow: none; outline: 2px solid var(--accent); outline-offset: 1px;
}

/* 값을 기다리는 동안의 뼈대 */
.sk { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.sk i { display: block; height: 12px; border-radius: 4px; background: var(--raised); animation: sk-pulse 1.6s ease-in-out infinite; }
.sk i:nth-child(odd) { width: 72%; }
.sk i:first-child { height: 18px; width: 46%; }
@keyframes sk-pulse { 50% { opacity: 0.45; } }

/* 시장 한눈에: 오른 · 보합 · 내린 종목 수를 한 줄 막대로(조각 사이 2px 틈) */
.breadth { display: flex; gap: 2px; height: 8px; margin-top: 2px; }
.breadth span { min-width: 0; border-radius: 2px; }
.breadth-up { background: var(--up); }
.breadth-flat { background: var(--flat); opacity: 0.45; }
.breadth-down { background: var(--down); }
.breadth-legend { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s1); }
.hrow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 0 var(--s2); min-height: 24px; padding-top: var(--s1); border-top: 1px solid var(--line-soft); white-space: nowrap; }
.hrow-k { color: var(--muted); font-weight: 600; }
.hrow-k { margin-right: auto; }
/* 가격은 자르지 않음: 자리가 모자라면 등락률이 아랫줄로 내려감 */
.hrow b { flex: none; text-align: right; }
.hrow > span:last-child { flex: none; font-size: var(--fs-sm); font-weight: 600; }

/* 뜨는 종목 */
.hmovers { display: flex; flex-direction: column; margin: 0 calc(var(--s2) * -1); }
.hmover {
  display: flex; align-items: center; gap: var(--s2); width: 100%; height: calc(28px * var(--fz)); padding: 0 var(--s2);
  background: transparent; border: 0; border-radius: var(--radius); text-align: left; white-space: nowrap;
}
.hmover:hover { background: var(--raised); }
.hmover i { flex: none; width: 10px; color: var(--muted); font-style: normal; font-size: var(--fs-sm); }
.hmover-name { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; overflow: hidden; }
.hmover-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.hmover-name small { flex: none; color: var(--muted); font-size: var(--fs-sm); }
.hmover > span:last-child { flex: none; font-size: var(--fs-sm); font-weight: 600; }

/* 선물 시장 */
.hstat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); white-space: nowrap; }
.hstat + .hstat { padding-top: var(--s2); border-top: 1px solid var(--line-soft); }
.hstat-k { flex: 1 0 100%; color: var(--muted); font-size: var(--fs-sm); }
.hstat b { font-size: var(--fs-lg); }
.hstat small { min-width: 0; color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; }

/* 공포 · 탐욕 눈금: 다섯 구간, 지금 구간만 밝게, 값 자리에 금색 표시선 */
.fng { display: flex; flex-direction: column; gap: var(--s2); }
.fng-now { display: flex; align-items: baseline; gap: var(--s2); }
.fng-value { font-size: var(--fs-xl); line-height: 1.2; }
.fng-label { font-weight: 600; }
.fng-track { position: relative; display: flex; gap: 2px; height: 8px; margin-top: 6px; }
.fng-track span { min-width: 0; border-radius: 2px; background: var(--line); }
.fng-track span.is-on { background: var(--muted); }
.fng-mark { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--accent); }
.fng-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--fs-sm); }

/* 한 줄 소개 */
.hintro { display: flex; flex-direction: column; align-items: flex-start; }
.eyebrow { display: flex; align-items: center; gap: var(--s2); margin: 0; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.hintro h1 { margin: 12px 0; font-size: clamp(28px, 3.6vw, 42px); font-size: clamp(28px, 3.6cqi, 42px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; word-break: keep-all; }
/* 글자 크기 고르기: 큰 제목도 같은 배율로(앞 선언은 calc 안 clamp 를 모르는 브라우저용) */
.hintro h1 { font-size: calc(clamp(28px, 3.6vw, 42px) * var(--fz)); font-size: calc(clamp(28px, 3.6cqi, 42px) * var(--fz)); }
.hintro h1 em { font-style: normal; color: var(--accent); }
.hintro-desc { margin: 0; max-width: 30em; color: var(--muted); font-size: var(--fs-lg); word-break: keep-all; }
.hintro-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: 24px; }
.btn-xl { height: calc(44px * var(--fz)); padding: 0 20px; display: inline-flex; align-items: center; font-size: var(--fs-lg); font-weight: 700; text-decoration: none; }
.dsec-head .gap { flex: 1; }

/* 바로 해 보는 세 입구 */
.hgos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.hgo {
  min-width: 0; display: flex; flex-direction: column; gap: var(--s3); padding: 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.hgo-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.hgo-head h2 { font-size: var(--fs-lg); word-break: keep-all; }
.hgo-tag { flex: none; padding: 1px 8px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.hgo-desc { margin: 0; color: var(--muted); word-break: keep-all; }
.hgo-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--s2); }
.hgo-foot { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: auto; }
/* 공포지수 지금 값: 큰 숫자 + 구간 + 구간 눈금 */
.hfear-num { display: flex; align-items: baseline; gap: var(--s2); }
.hfear-value { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hfear-zone { font-size: var(--fs-lg); font-weight: 700; }
.hfear-meter { display: flex; flex-direction: column; gap: var(--s2); }
.hfear-msg { margin: 0; }
/* 마법사가 붙이는 번호표 */
.hwiz { list-style: none; margin: 0; padding: 0; flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
.hwiz li { display: inline-flex; align-items: center; gap: 6px; height: calc(28px * var(--fz)); padding: 0 10px 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); font-size: var(--fs-sm); white-space: nowrap; }
.hwiz i { color: var(--wiz-badge); font-style: normal; font-size: var(--fs-lg); line-height: 1; }
/* 검색기 · 매매법: 포착 수(누구나) · 맛보기(권한 회원) */
.hcap-box { display: flex; flex-direction: column; gap: var(--s2); }
.hcap { display: flex; flex-wrap: wrap; gap: var(--s4); }
.hcap-g { display: flex; flex-direction: column; min-width: 0; }
.hcap-g b { font-size: var(--fs-xl); line-height: 1.2; }
.hcap-g span { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.hcap-lock { margin: 0; }
.htaste-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.htaste-msg { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s3); }
.htaste-msg > .sk { align-self: stretch; }
.htaste-row {
  display: flex; align-items: center; gap: var(--s3); min-height: 36px; padding: 0 var(--s3);
  background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); text-align: left; white-space: nowrap;
}
.htaste-row:last-of-type { border-bottom: 0; }
.htaste-row:hover { background: var(--raised); }
.htaste-row:focus-visible { outline-offset: -2px; }
.htaste-name { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; overflow: hidden; }
.htaste-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.htaste-name small, .htaste-kind, .htaste-ago { color: var(--muted); font-size: var(--fs-sm); }
.htaste-kind { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.htaste-ago { flex: none; min-width: calc(52px * var(--fz)); text-align: right; }
.hmethods { display: flex; flex-wrap: wrap; gap: var(--s1); }
.hmethod { max-width: 100%; overflow: hidden; text-overflow: ellipsis; border-color: var(--line); color: var(--text); }

/* 무료 회원 안내 한 줄: 로그인 → 운영진 확인 → 이용 */
.hjoin { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: var(--s4) 20px; border: 1px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); }
.hjoin-lead { font-size: var(--fs-lg); }
.hjoin-steps { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; padding: 0; list-style: none; counter-reset: hstep; }
.hjoin-steps li { counter-increment: hstep; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hjoin-steps li::before { content: counter(hstep); width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: var(--fs-sm); font-weight: 700; }
.hjoin-steps li:not(:last-child)::after { content: "→"; margin-left: var(--s1); color: var(--muted); }
.hjoin-text { margin: 0; word-break: keep-all; }
.hjoin .btn { margin-left: auto; }
.hjoin-link { color: var(--accent); font-size: var(--fs-sm); }
.home-foot { display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.home-note { margin: 0; color: var(--muted); font-size: var(--fs-sm); text-align: center; word-break: keep-all; }
.home-links { margin: 0; display: flex; gap: var(--s3); font-size: var(--fs-sm); }
.home-links a { color: var(--muted); }

@container (max-width: 1080px) {
  /* 입구 셋을 2 + 1 로(검색기 입구가 한 줄을 다 씀) */
  .hgos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hgo[data-go="scan"] { grid-column: 1 / -1; }
}
@container (max-width: 720px) {
  .home-in { padding: 20px var(--s4) 32px; gap: 28px; }
  /* 입구 · 시장 카드는 한 줄에 하나 */
  .hgos, .hcards { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .hgo[data-go="scan"] { grid-column: auto; }
  .hgo, .hcard { padding: var(--s4); }
  .hintro-cta { width: 100%; margin-top: 20px; }
  .btn-xl { flex: 1 1 auto; justify-content: center; }
  .hjoin { padding: var(--s3) var(--s4); }
  .hjoin .btn { margin-left: 0; }
}

/* ══════════ 실시간 데이터 화면(#/data) ══════════ */
.data-in { max-width: 1200px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.data-head h1 { font-size: var(--fs-xl); }
.data-head p { margin-top: var(--s1); color: var(--muted); }
.data-cols { display: grid; grid-template-columns: calc(200px * var(--fz)) minmax(0, 1fr); gap: 24px; align-items: start; }
.dnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--s4); }
.dnav-btn {
  flex: none; height: calc(36px * var(--fz)); padding: 0 var(--s3); text-align: left; white-space: nowrap;
  background: transparent; border: 0; border-left: 2px solid transparent; border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted); font-weight: 600;
}
.dnav-btn:hover { color: var(--text); background: var(--raised); }
.dnav-btn[aria-pressed="true"] { color: var(--text); background: var(--raised); border-left-color: var(--accent); }
.dnav-more { padding: var(--s3); color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.dsec {
  min-width: 0; min-height: 420px; display: flex; flex-direction: column; gap: var(--s2); padding: 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.dsec-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); min-height: 28px; }
.dsec-head h2 { font-size: var(--fs-lg); }
.dsec-desc { color: var(--muted); word-break: keep-all; }
.dsec-status { min-height: 18px; color: var(--muted); font-size: var(--fs-sm); }
.dsec-note { margin: 0; padding: 24px 0; color: var(--muted); }
.dsec-body { min-width: 0; overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; }
.dtable th { padding: 6px var(--s2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; text-align: left; white-space: nowrap; }
.dtable td { height: calc(34px * var(--fz)); padding: 0 var(--s2); border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.dtable tbody tr:hover td { background: var(--raised); }
.dtable .dcol-num { text-align: right; }
.dtable .dcol-n { width: calc(36px * var(--fz)); color: var(--muted); }
.dtable .dcol-time { width: calc(84px * var(--fz)); color: var(--muted); }
.dtable .dcol-side { font-weight: 600; }
.dtable .is-big { font-weight: 700; }
.dsym { max-width: 100%; display: inline-flex; align-items: baseline; gap: 6px; padding: var(--s1) 0; background: transparent; border: 0; text-align: left; }
.dsym b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.dsym small { color: var(--muted); font-size: var(--fs-sm); }
.dsym:hover b { text-decoration: underline; }
/* 지금 차트가 없는 종목: 흐리게, 눌리지 않음 */
.dsym.is-off { cursor: default; opacity: 0.8; }
.dsym.is-off:hover b { text-decoration: none; }
.dsec-tools { display: flex; align-items: center; gap: var(--s2); }
.dsec-again:disabled { cursor: default; opacity: 0.5; }
.dsec-again:disabled:hover { border-color: var(--line); }
.dbig-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s2) var(--s3); }
.dbig { font-size: var(--fs-xl); }
.dbig-row > span { font-weight: 600; }
.dbig-row .btn { margin-left: auto; align-self: center; }
.dmini { position: relative; height: 280px; margin: var(--s3) 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dmini-chart { position: absolute; inset: 0; }
.ddom .dsec-note { padding: var(--s3) 0; }
.dfng { max-width: 560px; display: flex; flex-direction: column; gap: 20px; padding-top: var(--s2); }
.dfng-hist h3 { margin-bottom: var(--s2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.dfng-hist .dsec-note { display: block; padding: var(--s2) 0 0; font-size: var(--fs-sm); }
.fng-bars { display: flex; align-items: flex-end; gap: 2px; height: 96px; border-bottom: 1px solid var(--line); }
.fng-bars span { flex: 1; min-width: 0; border-radius: 2px 2px 0 0; background: var(--muted); opacity: 0.45; }
.fng-bars span:hover, .fng-bars span.is-now { opacity: 1; }
.fng-bars span.is-now { background: var(--accent); }

@container (max-width: 720px) {
  .data-in { padding: var(--s4); gap: var(--s3); }
  .data-cols { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  /* 항목 목록은 위쪽 한 줄로(넘치면 옆으로 밀어 봄) */
  .dnav { position: static; flex-direction: row; align-items: center; gap: var(--s1); overflow-x: auto; scrollbar-width: none; padding: 2px; }
  .dnav::-webkit-scrollbar { display: none; }
  .dnav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 20px; }
  .dnav-btn { padding: 0 10px; border-left: 0; border-bottom: 2px solid transparent; border-radius: var(--radius) var(--radius) 0 0; }
  .dnav-btn[aria-pressed="true"] { border-bottom-color: var(--accent); }
  .dnav-btn:focus-visible { outline-offset: -2px; }
  .dnav-more { flex: none; padding: 0 var(--s2); }
  .dsec { padding: var(--s3); min-height: 320px; }
  .dtable .dcol-opt { display: none; }
  .dmini { height: 200px; }
}

/* ── 좁은 화면의 위 메뉴 · 항목 줄: 옆으로 밀어 봄. 더 있다는 표시로 오른쪽 끝이 살짝 흐려짐 ── */
@media (max-width: 640px) {
  .nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 20px; }
  .top { gap: var(--s2); padding: 0 var(--s2); }
  .logo .logo-wide { display: none; }
  .logo .logo-mark { display: block; }
}

/* ── @container 를 모르는 브라우저용 대체: 위의 좁은 화면 규칙을 창 폭 기준으로 한 벌 더(내용은 위와 같게 유지) ── */
@supports not (container-type: inline-size) {
  @media (max-width: 1080px) {
    /* 입구 셋을 2 + 1 로(검색기 입구가 한 줄을 다 씀) */
    .hgos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hgo[data-go="scan"] { grid-column: 1 / -1; }
  }
  @media (max-width: 720px) {
    .home-in { padding: 20px var(--s4) 32px; gap: 28px; }
    /* 입구 · 시장 카드는 한 줄에 하나 */
    .hgos, .hcards { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
    .hgo[data-go="scan"] { grid-column: auto; }
    .hgo, .hcard { padding: var(--s4); }
    .hintro-cta { width: 100%; margin-top: 20px; }
    .btn-xl { flex: 1 1 auto; justify-content: center; }
    .hjoin { padding: var(--s3) var(--s4); }
    .hjoin .btn { margin-left: 0; }
  }
  @media (max-width: 720px) {
    .data-in { padding: var(--s4); gap: var(--s3); }
    .data-cols { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
    /* 항목 목록은 위쪽 한 줄로(넘치면 옆으로 밀어 봄) */
    .dnav { position: static; flex-direction: row; align-items: center; gap: var(--s1); overflow-x: auto; scrollbar-width: none; padding: 2px; }
    .dnav::-webkit-scrollbar { display: none; }
    .dnav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 20px; }
    .dnav-btn { padding: 0 10px; border-left: 0; border-bottom: 2px solid transparent; border-radius: var(--radius) var(--radius) 0 0; }
    .dnav-btn[aria-pressed="true"] { border-bottom-color: var(--accent); }
    .dnav-btn:focus-visible { outline-offset: -2px; }
    .dnav-more { flex: none; padding: 0 var(--s2); }
    .dsec { padding: var(--s3); min-height: 320px; }
    .dtable .dcol-opt { display: none; }
    .dmini { height: 200px; }
  }
}

/* ══════════ 5단계: 내용 자리 — 매매법 설명 틀 · 비밀 병기 종목 · 일기장 · 지원 ══════════ */
/* 매매법 카드의 단추 줄과, [자세히]를 누르면 그 줄 아래 전체 폭으로 펼쳐지는 설명 틀 */
/* 펼친 설명 틀은 문서에서도 그 줄의 마지막 카드 뒤에 놓임(method-page.js 의 placePanel) — 보이는 순서 = 키보드 순서 */
.method-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: auto; }
.method-card .method-actions .btn { margin-top: 0; }
.method-more[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.method-guide {
  grid-column: 1 / -1; min-width: 0; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3);
  background: var(--raised); border: 1px solid var(--accent); border-radius: var(--radius);
}
.method-guide h3 { margin: 0; font-size: var(--fs); }
.method-guide h4 { margin: var(--s1) 0 0; font-size: var(--fs-sm); color: var(--muted); font-weight: 400; }
.guide-facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--s3); }
.guide-facts dt { color: var(--muted); font-size: var(--fs-sm); }
.guide-facts dd { margin: 0; word-break: keep-all; }
.guide-read { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.guide-read li { display: inline-flex; align-items: center; gap: 6px; min-height: 20px; font-size: var(--fs-sm); }
.guide-read li.has-means { flex-basis: 100%; }
.guide-read small { color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.guide-read small::before { content: '= '; }
/* 기호 견본: 색은 받은 지표 설정의 것(글자색으로 넣어 둠) */
.guide-sw { flex: none; display: inline-block; width: 18px; height: 0; color: var(--muted); border-top: 2px solid currentColor; font-style: normal; }
.guide-sw.is-dots { border-top-style: dotted; border-top-width: 3px; }
.guide-sw.is-step { height: 6px; width: 9px; margin-right: 9px; border-right: 2px solid currentColor; position: relative; }
.guide-sw.is-step::after { content: ''; position: absolute; left: 9px; bottom: 0; width: 9px; border-top: 2px solid currentColor; }
.guide-sw.is-level { border-top-width: 1px; }
.guide-sw.is-level.is-dashed { border-top-style: dashed; }
.guide-sw.is-level.is-dotted { border-top-style: dotted; }
.guide-sw.is-dot { width: 8px; height: 8px; margin: 0 5px; border: 0; border-radius: 50%; background: currentColor; }
.guide-sw.is-label { width: auto; height: auto; padding: 0 4px; border: 1px solid currentColor; border-radius: 3px; font-size: var(--fs-sm); line-height: 1.25; }
.guide-sw.is-fill { height: 10px; border: 0; display: inline-flex; }
.guide-sw.is-fill b { flex: 1; }
.guide-sw.is-ma { height: 8px; border-top: 2px solid var(--muted); border-bottom: 2px solid var(--muted); }
.guide-sw.is-lock, .guide-sw.is-note { display: none; }
.guide-list { margin: 0; padding-left: var(--s4); display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); word-break: keep-all; }
.guide-list.is-caution li::marker { color: var(--warn); }
.guide-pending { margin: 0; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s1); }
/* 검색기 화면: 매매법 화면에서 넘어온 종류의 카드 */

/* 비밀 병기 종목 */
.pick-card {
  display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.pick-card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.pick-card h3 { margin: 0; font-size: var(--fs); display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); }
.pick-card .pick-why.is-soon { font-style: normal; opacity: 0.8; }
.pick-note { color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }

/* 일기장(차트 오른쪽 칸) */
.diary { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s2); }
.diary-list { display: flex; flex-direction: column; gap: var(--s2); }
.diary-msg { margin: 0; padding: var(--s3) var(--s2); color: var(--muted); word-break: keep-all; }
.diary-card {
  display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3); min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.diary-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); color: var(--muted); font-size: var(--fs-sm); }
.diary-card h3 { margin: 0; font-size: var(--fs); overflow-wrap: anywhere; }
.diary-text {
  margin: 0; line-height: var(--lh); white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.diary-text.is-open { display: block; overflow: visible; }
.diary-note { color: var(--muted); font-size: var(--fs-sm); }
.diary-toggle { align-self: flex-start; padding: 0; background: none; border: 0; color: var(--accent); font-size: var(--fs-sm); cursor: pointer; }
.diary-toggle:hover { text-decoration: underline; }
.diary-symbols { display: flex; flex-wrap: wrap; gap: var(--s1); }
.diary-symbol.is-off { opacity: 0.5; cursor: default; }
.diary-more-list { align-self: center; }
.diary-foot { color: var(--muted); font-size: var(--fs-sm); text-align: center; }

/* 경제 이벤트(차트 오른쪽 칸) — 글자 크기는 --fs · --fs-sm(「가」 단추를 따름) */
.econ { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s2); }
.econ-bar { display: flex; gap: var(--s1); }
.econ-bar .chip { padding: 0 var(--s2); }
.econ-list { display: flex; flex-direction: column; gap: var(--s2); }
.econ-msg { margin: 0; padding: var(--s3) var(--s2); color: var(--muted); word-break: keep-all; }
.econ-card {
  display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3); min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.econ-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1) var(--s2); }
.econ-head h3 { margin: 0; font-size: var(--fs); overflow-wrap: anywhere; word-break: keep-all; }
.econ-tag { padding: 0 6px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: var(--fs-sm); }
.econ-tag.is-core { border-color: var(--accent); color: var(--accent); }
.econ-when { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); }
.econ-until { color: var(--accent); }
.econ-for { color: var(--muted); font-size: var(--fs-sm); }
.econ-last { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s2); font-size: var(--fs-sm); }
.econ-last dt { color: var(--muted); }
.econ-last dd { margin: 0; font-variant-numeric: tabular-nums; }
.econ-toggle { align-self: flex-start; padding: 0; background: none; border: 0; color: var(--accent); font-size: var(--fs-sm); cursor: pointer; }
.econ-toggle:hover { text-decoration: underline; }
.econ-react { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.econ-react table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.econ-react caption { text-align: left; color: var(--muted); padding-bottom: 2px; }
.econ-react th, .econ-react td { padding: 2px 4px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.econ-react th:first-child { text-align: left; }
.econ-react thead th { color: var(--muted); font-weight: 400; }
.econ-sum td { white-space: normal; }
.econ-sum td span { display: block; }
.econ-rows .is-up { color: var(--up); }
.econ-rows .is-down { color: var(--down-text); }
.econ-rows .is-none { color: var(--muted); }
.econ-note { color: var(--muted); font-size: var(--fs-sm); }
.econ-more { align-self: center; }
.econ-foot { display: flex; flex-direction: column; gap: 2px; padding-top: var(--s1); }
.econ-advice { color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.econ-src { color: var(--muted); font-size: var(--fs-sm); overflow-wrap: anywhere; }

/* 지원 화면(#/help) */
.help-page { max-width: 720px; width: 100%; margin: 0 auto; padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.help-page h1 { margin: 0; font-size: var(--fs-xl); }
.help-page h2 { margin: 0 0 var(--s2); font-size: var(--fs-lg); }
.help-intro { margin: 0; color: var(--muted); }
.help-list { display: flex; flex-direction: column; gap: var(--s1); }
.help-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.help-item h3 { margin: 0; font-size: var(--fs); }
.help-q {
  width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: var(--s2) var(--s3); background: none; border: 0; border-radius: var(--radius); color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; word-break: keep-all;
}
.help-q:hover { background: var(--raised); }
.help-caret { flex: none; font-style: normal; color: var(--muted); }
.help-q[aria-expanded="true"] .help-caret { transform: rotate(180deg); }
.help-a { padding: 0 var(--s3) var(--s3); }
.help-a p { margin: 0; color: var(--muted); line-height: var(--lh); word-break: keep-all; }
.help-contact p { margin: 0; }
.help-contact p.is-soon { color: var(--muted); }

/* 자바스크립트가 꺼져 있을 때의 안내(스타일을 속성으로 적지 않음 — CSP 의 style-src 에 unsafe-inline 이 없음) */
.noscript { padding: 16px; }

/* [지표] 판: 서버가 계산해 주는 지표의 안내 한 줄 */
.ind-remote-note { color: var(--muted); font-size: var(--fs-sm); line-height: var(--lh); word-break: keep-all; }

/* [지표] 판: 줄 아래 작은 안내(선은 구매자에게만 등) */
.ind-row-text { min-width: 0; display: flex; flex-direction: column; gap: 0; }
.ind-row-text small { color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.ind-row:has(.ind-row-text) { min-height: calc(var(--row-h) + 14px); }

/* 선별 값 줄(이평 선을 받는 사람): 상태 문구 아래. 색 점 + 번호 이름 + 값, 길면 줄바꿈. 접으면 [값] 단추만 */
.pane-values {
  position: absolute; left: var(--s2); top: calc(68px * var(--fz)); right: 64px; z-index: 5;
  display: flex; gap: var(--s1); align-items: flex-start; pointer-events: none; font-size: var(--fs-sm); color: var(--muted);
}
.pane-values-btn {
  pointer-events: auto; flex: none; font: inherit; color: var(--muted); cursor: pointer;
  padding: 0 var(--s1); background: var(--veil); border: 1px solid var(--line); border-radius: 3px;
}
.pane-values-btn[aria-expanded="true"] { color: var(--text); }
.pane-values-list { display: none; flex-wrap: wrap; gap: 0 var(--s2); min-width: 0; }
.pane-values.is-open .pane-values-list { display: flex; }
.pane-value { display: inline-flex; align-items: center; gap: 3px; padding: 0 var(--s1); background: var(--veil); border-radius: 3px; white-space: nowrap; }
.pane-value-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pane-value-num { color: var(--text); font-variant-numeric: tabular-nums; }
/* 이평: 굵은 선(더 중요한 선)의 값은 굵은 글자, 나머지는 흐리게 — 값은 그대로 보임 */
.pane-value.is-strong .pane-value-name, .pane-value.is-strong .pane-value-num { font-weight: 700; color: var(--text); }
.pane-value.is-strong .pane-value-dot { width: 9px; height: 9px; }
.pane-value.is-weak { opacity: 0.75; }
.pane.is-compact .pane-values, .pane.is-low .pane-values { top: calc(46px * var(--fz)); }
/* 값 자리가 낱말(구간 이름)인 아래 칸 이름표: 숫자 값과 달리 좁은 칸에서도 보이고, 구간 색으로 또렷하게 */
.sub-value.is-word { font-weight: 700; }
.pane.is-compact .sub-value.is-word { display: inline; }
/* 봉이 모자라 서버 계산 선이 없는 아래 칸: 값 자리에 안내 — 좁은 칸에서만(넓은 칸은 위 안내 줄에 같은 글, 11-26 월봉) */
.sub-value.is-note { display: none; color: var(--muted); font-weight: 400; }
.pane.is-compact .sub-value.is-note { display: block; order: 3; flex-basis: 100%; white-space: normal; min-width: 0; }
.pane.is-compact .pane-sub:has(.sub-value.is-note) { flex-wrap: wrap; max-width: 68%; white-space: normal; }
.pane.is-compact .pane-sub:has(.sub-value.is-note) > b, .pane.is-compact .pane-sub:has(.sub-value.is-note) > .sub-btn { flex: none; white-space: nowrap; }

/* 캔들 출처 표시(주식 종목): 제목 옆 작은 꼬리표. 좁은 칸은 짧은 말만 */
.pane-src { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 0 var(--s1); background: var(--veil); border: 1px solid var(--line); border-radius: 3px; color: var(--muted); pointer-events: auto; }
.pane-src.is-warn { color: var(--warn); }
.pane-src .src-narrow { display: none; }
.pane.is-compact .pane-src .src-wide { display: none; }
.pane.is-compact .pane-src .src-narrow { display: inline; }
.pane.is-tiny .pane-src { display: none; }

/* 실시간 데이터: 묶음 제목 · 준비 중 항목 · 서버에서 받는 항목(지금 값 칸 + 큰 그림 + 설명) */
.dnav-group { margin: var(--s3) 0 var(--s1); padding: 0 var(--s3); color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.dnav-group:first-child { margin-top: 0; }
.dnav-soon { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s3); color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.dpulse { display: flex; flex-direction: column; gap: var(--s3); max-width: 960px; }
.dpulse h3 { margin-top: var(--s2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.dpulse-tiles { display: flex; flex-wrap: wrap; gap: var(--s3); }
.dpulse-tile { min-width: calc(140px * var(--fz)); padding: var(--s3); background: var(--raised); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; gap: 2px; }
.dpulse-tile small { color: var(--muted); }
.dpulse-tile b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.dpulse-chart { height: 320px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.dpulse-legend { display: flex; flex-wrap: wrap; gap: var(--s3); color: var(--muted); font-size: var(--fs-sm); }
.dpulse-legend span { display: inline-flex; align-items: center; gap: var(--s1); }
.dpulse-legend i { width: 10px; height: 3px; border-radius: 2px; }
.dpulse-text { margin: 0; padding-left: 18px; word-break: keep-all; }
@media (max-width: 860px) { .dnav-group { display: none; } .dnav-soon { display: none; } }

.dpulse-range { color: var(--muted); font-size: var(--fs-sm); }
.dpulse-table { min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.dmonth { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.dmonth th, .dmonth td { padding: 6px var(--s2); border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
.dmonth th { color: var(--muted); font-weight: 600; }
.dmonth tbody tr:last-child th, .dmonth tbody tr:last-child td { border-bottom: 0; }
.dmonth .is-now { font-weight: 700; }

/* ── 휴대폰 · 좁은 화면(7-가): 손가락으로 누르는 것은 크게, 차트 분할은 1 · 2칸까지 ── */
/* 넓은 화면의 모습은 그대로 — 아래는 창 폭 860px 이하에서만 */
@media (max-width: 860px) {
  /* 단추 · 줄 높이를 토큰으로 한꺼번에(28 → 38, 32 → 40) */
  :root { --ctl-h: 38px; --row-h: 40px; }
  /* 글자 크기 고르기(크게 · 아주 크게): 손가락 크기에서 조금 더(tokens.css 의 넓은 화면 값보다 우선) */
  :root[data-fs="lg"] { --ctl-h: 42px; --row-h: 44px; }
  :root[data-fs="xl"] { --ctl-h: 46px; --row-h: 48px; }
  .seg-btn { height: 34px; padding: 0 var(--s3); height: max(34px, calc(30px * var(--fz))); }
  .hmover { height: 38px; height: max(38px, calc(34px * var(--fz))); }
  .dsym { min-height: 38px; align-items: center; }
  .dnav-btn { height: 40px; height: max(40px, calc(36px * var(--fz))); }
  .ind-tag-x, .method-x { min-width: 28px; min-height: 28px; }
  .pane-values-btn { min-height: 28px; padding: 0 var(--s2); }
  .shape-btn { padding: var(--s2); }
  .dpulse-tile { flex: 1 1 40%; min-width: 0; }
}
@media (max-width: 600px) {
  /* 좁은 화면에서는 한 칸이 너무 작아져 차트를 읽을 수 없음 → 분할은 1 · 2칸 모양만 고르게 함(이미 여러 칸인 배치는 그대로 보임) */
  .shape-btn[data-shape^="3"], .shape-btn[data-shape^="4"], .shape-btn[data-shape^="5"], .shape-btn[data-shape^="6"],
  .shape-btn[data-shape^="8"], .shape-btn[data-shape^="9"], .shape-btn[data-shape^="1"]:not([data-shape="1"]) { display: none; }
}
.dpulse-tile small { font-size: var(--fs-sm); }
@media (max-width: 600px) {
  /* 단추 줄이 옆으로 밀려 있어도 판은 화면 안에: 왼쪽 · 오른쪽 여백만 두고 폭을 다 씀(코드가 넣는 left 값보다 우선) */
  .ind-panel, .split-panel, .method-panel { left: var(--s2) !important; right: var(--s2); width: auto; max-width: none !important; }
}

/* ══════════ 8차 점검 고침 ══════════ */
/* 도구 줄: 옆으로 잘리지 않고 다음 줄로 접힘. [화면 분할] 은 늘 첫 줄 오른쪽 끝(.bar-main 밖) */
.bar.tools { align-items: flex-start; overflow: visible; gap: var(--s2); }
.bar-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.bar-main .bar-group { flex: 0 1 auto; flex-wrap: wrap; }
.bar-main .sep { margin: 0 var(--s1); }
.bar-main .now-tag { max-width: 100%; margin-right: 0; overflow: hidden; }
.bar-main .now-tag > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  /* 휴대폰: 첫 줄 = 봉 단추, 둘째 줄 = 매매법 · 지표 · 그리기 + [화면 분할](오른쪽 끝). [그리기] 를 펴면 도구가 그 아래 줄로 */
  .bar.tools { flex-wrap: wrap; align-items: center; padding: var(--s1) var(--s2); gap: var(--s1); }
  .bar-main { display: contents; }
  .bar-main .bar-group { flex: 1 0 100%; }
  .bar-main .chip { padding: 0 var(--s2); }
  .bar-main .sep { display: none; }
  .bar.tools > .split-btn { order: 1; margin-left: auto; }
}

/* 주의 띠: 화면을 밀지 않고 겹쳐 띄움(뜨고 사라질 때 아래 내용이 움직이지 않음). 눌리지 않음(아래 것이 그대로 눌림) */
.banner {
  position: fixed; top: calc(50px * var(--fz)); right: var(--s2); z-index: 40; max-width: calc(100vw - 2 * var(--s2));
  padding: 3px var(--s3); border: 1px solid var(--warn); border-radius: var(--radius);
  background: var(--raised); box-shadow: var(--shadow); pointer-events: none; text-align: left;
}
@media (max-width: 860px) {
  /* 좁은 화면: 위쪽은 종목 정보 줄이 차지하므로 아래(시세 띠 자리)에 띄움 */
  .banner { top: auto; bottom: 34px; left: var(--s2); right: var(--s2); text-align: center; }
}

/* 잠금 안내 + [로그인] 한 묶음(매매법 · 검색기 화면) */
.gate-box { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }
.method-body { display: flex; flex-direction: column; gap: var(--s4); }

/* 없는 화면 */
.soon .btn-lg { margin-top: var(--s2); }

/* 종목 찾기: 다른 묶음에 있을 때의 안내 단추 */
.symlist-hint {
  flex: none; margin: var(--s2); padding: var(--s1) var(--s2); text-align: left;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); color: var(--text);
}
.symlist-hint:hover { border-color: var(--text); }
.symlist-empty .symlist-hint { margin: 0; }

/* 칸 왼쪽 위 글자는 가격 눈금 위로 넘어가지 않음(눈금 폭은 chart-pane.js 가 재서 --axis-w 로 넣음). 아주 좁은 칸은 이름이 먼저 */
.pane-legend, .pane-ind, .pane-status, .pane-values,
.pane.is-compact .pane-legend, .pane.is-compact .pane-ind { right: calc(var(--axis-w, 60px) + var(--s1)); }
.pane.is-tiny .pane-legend { right: var(--s2); }
.pane.is-tiny .pane-title { background: var(--panel); }

/* 선별 값 줄: 접힌 상태 = 한 줄(넘치는 값은 잘림 — [값] 을 누르면 전부 펼쳐짐), 펼친 상태 = 줄바꿈해 전부 */
.pane-values-list { display: flex; flex-wrap: nowrap; overflow: hidden; }
.pane-values:not(.is-open) .pane-values-list { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.pane-values.is-open .pane-values-list { flex-wrap: wrap; overflow: visible; }
.pane-value { flex: none; }
.pane-values-btn::after { content: " ▸"; }
.pane-values-btn[aria-expanded="true"]::after { content: " ▾"; }

/* 매매법 [자세히]: 누른 카드 바로 옆(같은 줄 오른쪽 두 칸 — 자리가 없으면 바로 아랫줄)에 펼쳐짐. 좁은 화면은 카드 바로 아래 한 줄 */
.method-cards.has-guide { align-items: start; }
@media (min-width: 620px) { .method-guide { grid-column: span 2; } }

/* 맨 아래 고정 글: 좁은 화면에서는 한 줄(넘치면 옆으로 밀어 봄 — 글은 그대로) */
@media (max-width: 860px) {
  .foot { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .foot::-webkit-scrollbar { display: none; }
  .foot > span { flex: none; }
}
/* 아주 좁은 화면의 위 메뉴: 로고 + [로그인] 한 줄, 메뉴 한 줄(단추가 메뉴 끝을 가리지 않음) */
@media (max-width: 480px) {
  .top { flex-wrap: wrap; height: auto; padding: var(--s1) var(--s2); gap: var(--s1) var(--s2); }
  .top .nav { order: 3; flex: 1 0 100%; padding-right: 0; -webkit-mask-image: none; mask-image: none; justify-content: space-between; }
  .top #login-btn { margin-left: auto; }
  /* 언어 고르기(지구 단추)가 있으면 그것이 로고 줄 오른쪽 끝으로 가고 [로그인]은 바로 옆에 붙음(메뉴 줄을 가리지 않음) */
  .top .lang-pick { margin-left: auto; }
  .top .lang-pick + #login-btn { margin-left: 0; }
  /* 「가」 단추(글자 크기)는 지구 단추 바로 왼쪽 — 둘이 붙어 로고 줄 오른쪽 끝으로 */
  .top .font-pick { margin-left: auto; }
  .top .font-pick + .lang-pick, .top .font-pick + #login-btn { margin-left: 0; }
  /* 해/달 단추(밝은 화면)는 「가」 단추 바로 왼쪽 — 셋이 붙어 로고 줄 오른쪽 끝으로 */
  .top .btn-theme { margin-left: auto; }
  .top .btn-theme + .font-pick { margin-left: 0; }
  /* 확성기 단추(공지 · 업데이트)는 해/달 단추 바로 왼쪽 — 넷이 붙어 로고 줄 오른쪽 끝으로 */
  .top .btn-notice { margin-left: auto; }
  .top .btn-notice + .btn-theme { margin-left: 0; }
  /* 「가」 판은 머리줄 전체를 기준으로 오른쪽에 붙여 화면 밖으로 나가지 않게(.top 이 기준 — 판 규칙은 맨 아래 「14단계」 묶음) */
  .top .font-pick { position: static; }
  .top .font-list { right: var(--s2); max-width: calc(100vw - 2 * var(--s2)); }
  .btn-lang-code { display: none; }
  .banner { bottom: 34px; }
}

/* ── 그리기 도구: 차트 영역 왼쪽의 세로 도구 줄(트레이딩뷰처럼). 휴대폰(600px 이하)에서는 [그리기] 단추 하나로 접힘 ──
   묶음 판(.draw-fly)은 ▸ · 길게 누르기로 열림. 이름 말풍선은 data-tip(글자는 CSS 가 attr 로 꺼냄 — 화면 글은 draw-texts.js). 크기는 「가」 배율(--fz)을 따름 */
/* 차트 영역 줄: [세로 도구 줄 | 차트 격자] — 좁은 화면에서 오른쪽 칸이 아래로 가도 도구 줄은 차트 옆에 남음 */
.chart-zone { flex: 1; min-width: 0; min-height: 0; display: flex; position: relative; }
.draw-box {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 12;
  width: calc(40px * var(--fz)); padding: var(--s1) 0; background: var(--panel); border-right: 1px solid var(--line);
}
.draw-fold { display: none; }
.draw-fold.is-on { color: var(--text); border-color: var(--accent); }
.draw-group { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.draw-slot { position: relative; display: flex; align-items: center; }
.draw-slot[data-group="magnet"] { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px solid var(--line); }
.draw-slot[data-group="erase"] { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px solid var(--line); }
.draw-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  width: calc(30px * var(--fz)); height: calc(30px * var(--fz));
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); cursor: pointer;
}
.draw-btn:hover { color: var(--text); background: var(--raised); }
.draw-btn[aria-pressed="true"] { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.draw-ico { width: calc(18px * var(--fz)); height: calc(18px * var(--fz)); flex: none; }
.draw-ico-box { display: inline-flex; }
.di-line { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.di-fill { fill: currentColor; stroke: none; }
/* 묶음 판 여는 ▸(아이콘 오른쪽 아래 모서리) */
.draw-more {
  position: absolute; right: -3px; bottom: 0; width: calc(9px * var(--fz)); height: calc(14px * var(--fz)); padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--muted); opacity: 0.6; cursor: pointer;
}
.draw-slot:hover .draw-more, .draw-more:focus-visible, .draw-slot.is-fly .draw-more { opacity: 1; color: var(--text); }
.draw-more-ico { width: calc(5px * var(--fz)); height: calc(7px * var(--fz)); }
/* 이름 말풍선(마우스를 올리거나 키보드로 갔을 때) */
.draw-btn[data-tip]:hover::after, .draw-btn[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); z-index: 31;
  padding: 2px var(--s2); background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); font-size: var(--fs-sm); white-space: nowrap; pointer-events: none;
}
.draw-slot.is-fly .draw-btn::after { display: none; }
.draw-fly {
  display: none; position: absolute; left: calc(100% + 6px); top: 0; z-index: 30; flex-direction: column; gap: 1px;
  min-width: calc(170px * var(--fz)); padding: var(--s1); background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.draw-slot.is-fly .draw-fly { display: flex; }
.draw-fly-title { padding: 2px var(--s2); color: var(--muted); font-size: var(--fs-sm); }
.draw-item {
  display: flex; align-items: center; gap: var(--s2); height: calc(30px * var(--fz)); padding: 0 var(--s2);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--text); text-align: left; white-space: nowrap; cursor: pointer;
}
.draw-item:hover { background: var(--panel); }
.draw-item[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.draw-item .draw-ico { color: var(--muted); }
/* 글자 도구의 글 칸(누른 자리에 뜸) */
.draw-text-input {
  position: absolute; z-index: 8; width: calc(200px * var(--fz)); height: calc(26px * var(--fz)); padding: 0 var(--s2);
  background: var(--raised); color: var(--text); border: 1px solid var(--accent); border-radius: var(--radius); font-size: var(--fs);
}
.pane-chart.is-drawing { cursor: crosshair; touch-action: none; }
.draw-text-input.is-note { width: calc(260px * var(--fz)); }
/* 21단계: 되돌리기 · 다시 — 할 것이 없으면 흐리게(누르면 "없어요" 알림) */
.draw-btn[aria-disabled="true"] { opacity: 0.4; }
.draw-slot[data-group="undo"] { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px solid var(--line); }
/* 십자선 종류(마우스 모양만 — 그리는 도구를 켜면 십자): 점 = 작은 점(그림은 이 파일 안의 data 주소) · 화살표 = 보통 화살표 */
.chart-zone.cur-dot .pane-chart, .chart-zone.cur-dot .pane-chart canvas {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ccircle cx='8' cy='8' r='3' fill='%23C9A227' stroke='%23FFFFFF' stroke-width='1.5'/%3E%3C/svg%3E") 8 8, crosshair;
}
.chart-zone.cur-arrow .pane-chart, .chart-zone.cur-arrow .pane-chart canvas { cursor: default; }
.chart-zone .pane-chart.is-drawing, .chart-zone .pane-chart.is-drawing canvas { cursor: crosshair; }
/* 고른 그림 위에 뜨는 설정 띠(바이낸스처럼): 색 8가지 · 굵기 1~4 · 점선 · 이 그림 잠금 · 지우기 */
.draw-float {
  position: absolute; z-index: 9; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; max-width: calc(100% - 8px);
  padding: 3px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.draw-float[hidden] { display: none; }
.dfb-group { display: inline-flex; align-items: center; gap: 2px; }
.dfb-sep { width: 1px; align-self: stretch; margin: 2px; background: var(--line); }
.dfb-sw {
  width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); padding: 0; flex: none;
  border: 2px solid var(--raised); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer;
}
.dfb-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.dsw-0 { background: var(--dsw-0); } .dsw-1 { background: var(--dsw-1); } .dsw-2 { background: var(--dsw-2); } .dsw-3 { background: var(--dsw-3); }
.dsw-4 { background: var(--dsw-4); } .dsw-5 { background: var(--dsw-5); } .dsw-6 { background: var(--dsw-6); } .dsw-7 { background: var(--dsw-7); }
.dfb-w, .dfb-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0;
  width: calc(26px * var(--fz)); height: calc(26px * var(--fz));
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); cursor: pointer;
}
.dfb-w:hover, .dfb-btn:hover { color: var(--text); background: var(--panel); }
.dfb-w[aria-pressed="true"], .dfb-btn[aria-pressed="true"] { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.dfb-line { display: block; width: calc(14px * var(--fz)); background: currentColor; border-radius: 1px; }
.dfb-w1 .dfb-line { height: 1px; } .dfb-w2 .dfb-line { height: 2px; } .dfb-w3 .dfb-line { height: 3px; } .dfb-w4 .dfb-line { height: 4px; }
@media (max-width: 600px) {
  /* 휴대폰: 세로 줄 대신 차트 위에 뜨는 [그리기] 단추 하나(차트 폭을 지킴). 누르면 도구 판이 펼쳐짐 */
  .draw-box {
    position: absolute; left: var(--s2); top: calc(74px * var(--fz)); width: auto; padding: 0;
    background: transparent; border: 0; align-items: flex-start;
  }
  .draw-fold {
    display: inline-flex; align-items: center; gap: 4px; height: calc(30px * var(--fz)); padding: 0 var(--s2);
    background: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text);
  }
  .draw-box:not(.is-open) .draw-group { display: none; }
  .draw-box.is-open .draw-group {
    display: grid; grid-template-columns: repeat(5, auto); gap: 2px; margin-top: 4px; padding: var(--s1);
    background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  .draw-slot[data-group="magnet"], .draw-slot[data-group="erase"] { margin-top: 0; padding-top: 0; border-top: 0; }
  .draw-btn { width: calc(36px * var(--fz)); height: calc(36px * var(--fz)); }
  .draw-box .draw-btn[data-tip]:hover::after, .draw-box .draw-btn[data-tip]:focus-visible::after { display: none; }
  .draw-fly { left: 0; top: calc(100% + 4px); }
}

/* ── 8-마 · 8-바: 검색기의 맨 위 자리 · 종목별 지수 화면 · 글 화면 · 내 정보 판 · 로그인 화면 ── */
.scr-feature { border: 1px solid var(--accent); border-radius: var(--radius); padding: var(--s3); background: var(--accent-soft); display: flex; flex-direction: column; gap: var(--s2); }
.scr-feature h2 { margin: 0; color: var(--accent); }
.scr-feature-note { margin: 0; color: var(--text); line-height: var(--lh); word-break: keep-all; }
.scr-feature .scr-cards { grid-template-columns: minmax(0, 520px); }

.fear-page { max-width: 960px; width: 100%; margin: 0 auto; padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.fear-page h1 { margin: 0; font-size: var(--fs-xl); }
.fear-page h2 { margin: 0 0 var(--s2); font-size: var(--fs-lg); }
.fear-page h3 { margin: var(--s3) 0 var(--s1); font-size: var(--fs); }
.fear-lead { margin: 0; color: var(--muted); line-height: var(--lh); word-break: keep-all; }
.fear-view { display: flex; flex-direction: column; gap: var(--s3); }
.fear-tool { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s2) var(--s3); }
.fear-pick { position: relative; flex: 1 1 220px; max-width: calc(320px * var(--fz)); }
.fear-search { width: 100%; height: calc(32px * var(--fz)); padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); font: inherit; }
.fear-search:focus-visible { outline: none; box-shadow: var(--focus); }
.fear-results { position: absolute; z-index: 5; left: 0; right: 0; top: calc(36px * var(--fz)); display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.fear-hit { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s2) var(--s3); border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fear-hit:hover, .fear-hit:focus-visible { background: var(--panel); }
.fear-hit small { color: var(--muted); font-size: var(--fs-sm); }
.fear-nohit { margin: 0; padding: var(--s2) var(--s3); color: var(--muted); }
.fear-quick, .fear-iv { display: flex; flex-wrap: wrap; gap: var(--s1); }
.fear-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.fear-who { display: flex; align-items: baseline; gap: var(--s2); min-width: 0; }
.fear-name { font-size: var(--fs-lg); }
.fear-sub, .fear-asof { color: var(--muted); font-size: var(--fs-sm); }
.fear-num { display: flex; align-items: baseline; gap: var(--s2); }
.fear-value { font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fear-zone { font-size: var(--fs-lg); font-weight: 700; }
.fear-note { margin: 0; color: var(--muted); }
.fear-basket-note, .fear-iv-note { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.fear-chart { height: 320px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.fear-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--fs-sm); }
.fear-legend li { display: inline-flex; align-items: center; gap: var(--s1); }
.fear-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.fear-read { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2) var(--s3); }
.fear-read summary { cursor: pointer; font-weight: 600; }
.fear-read p { margin: var(--s2) 0 0; word-break: keep-all; }
.fear-read-zones { margin: var(--s2) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s1); font-size: var(--fs-sm); }
.fear-read-zones li { display: grid; grid-template-columns: 10px 5em minmax(0, 1fr); align-items: baseline; gap: var(--s2); }
.fear-read-zones i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.fear-read-zones span { word-break: keep-all; }
.fear-read-zones span, .fear-read-note { color: var(--muted); }
.fear-read-note { font-size: var(--fs-sm); }
.fear-scan { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.fear-scan a, .hfear-scan { text-decoration: none; }
.fear-scan p { margin: 0; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.fear-guide { border-top: 1px solid var(--line); padding-top: var(--s4); }
.fear-guide p { margin: 0; }
.fear-guide p.is-soon { color: var(--muted); }
/* 「쓰는 법」(공포지수 화면 · 차트 지표 창) */
.fear-howto-list, .ind-howto ul { margin: var(--s2) 0 0; padding-left: 1.2em; display: grid; gap: var(--s1); line-height: var(--lh); word-break: keep-all; }
/* 「공포지수 알림」 판 */
.fear-alert { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.fear-alert h2 { margin: 0; }
.fear-alert h3 { margin: 0; font-size: var(--fs); }
.fa-member, .fa-lock { display: flex; flex-direction: column; gap: var(--s2); }
.fa-lock { align-items: flex-start; }
.fa-lead, .fa-note, .fa-msg { margin: 0; word-break: keep-all; }
.fa-lead, .fa-note { color: var(--muted); font-size: var(--fs-sm); }
.fa-msg:empty { display: none; }
.fa-msg { font-size: var(--fs-sm); font-weight: 600; }
.fa-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2) var(--s4); }
.fa-field { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.fa-label { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.fa-sym-box { display: flex; align-items: baseline; gap: var(--s2); min-height: calc(32px * var(--fz)); flex-wrap: wrap; }
.fa-sym-box small { color: var(--muted); font-size: var(--fs-sm); }
.fa-chips, .fa-value { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.fa-input { width: calc(84px * var(--fz)); height: calc(32px * var(--fz)); padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.fa-input:focus-visible { outline: none; box-shadow: var(--focus); }
.fa-input::placeholder { color: var(--muted); }
.fa-list-head { display: flex; align-items: baseline; gap: var(--s2); margin-top: var(--s2); }
.fa-count { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.fa-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s1); }
.fa-empty { color: var(--muted); font-size: var(--fs-sm); }
.fa-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.fa-item.is-hit { border-color: var(--accent); }
.fa-item.is-off .fa-item-text { opacity: 0.6; }
.fa-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fa-item-text b { word-break: keep-all; overflow-wrap: anywhere; }
.fa-item-text small { color: var(--muted); font-size: var(--fs-sm); }
.fa-item-act { display: flex; gap: var(--s1); flex: none; }
/* 차트 지표 창의 공포지수 줄 아래 「쓰는 법」 */
.ind-howto { margin-left: calc(var(--ctl-h) + var(--s1) + var(--s3)); font-size: var(--fs-sm); color: var(--muted); }
.ind-howto summary { cursor: pointer; padding: 2px 0; font-weight: 600; }
.ind-howto summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }
.ind-howto-go { margin-top: var(--s2); text-decoration: none; display: inline-flex; }
@media (max-width: 600px) { .fear-pick { max-width: none; flex-basis: 100%; } .fear-value { font-size: 1.5rem; } .ind-howto { margin-left: var(--s4); } .fear-alert { padding: var(--s3); } .fa-item-act { margin-left: auto; } }

.doc-body { display: flex; flex-direction: column; gap: var(--s2); }
.doc-body p { margin: 0; line-height: 1.6; word-break: keep-all; }
.doc-body p.is-soon { color: var(--muted); }
.doc-body p.doc-item { padding-left: 1em; text-indent: -1em; overflow-wrap: anywhere; }
.doc-body h2 { margin: var(--s3) 0 0; }
/* 약관 · 개인정보 번역본의 맨 위 한 줄("번역본 · 한국어 원문이 우선") + [한국어 원문 보기] — js/ui/doc-page.js */
.doc-translated { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.doc-translated a { color: var(--accent); white-space: nowrap; }
/* 일본어는 띄어쓰기가 없어 keep-all 이면 쉼표에서만 줄이 바뀜 — 글 화면은 글자 단위로(금칙 처리는 strict) */
.doc-body:lang(ja) p, .doc-translated:lang(ja) { word-break: normal; line-break: strict; }
.doc-back { margin: 0; }
.doc-back a, .help-doc-list a, .acct-link, .login-page a { color: var(--accent); }
.help-doc-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }

.top { position: relative; }
/* 로그인 전 위쪽 [로그인] 단추는 금색으로 눈에 띄게(CFO 11-26 "로그인 탭이 안 보였다") · 회원이 되면 이름 단추로 차분하게 */
#login-btn:not(.is-member) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; padding: 0 calc(14px * var(--fz)); }
#login-btn:not(.is-member):hover { border-color: var(--on-accent); }
#login-btn.is-member { max-width: calc(140px * var(--fz)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; z-index: 30; right: var(--s3); top: calc(100% + var(--s1)); min-width: calc(200px * var(--fz)); max-width: calc(100vw - 2 * var(--s3)); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s3); background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.acct-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-line { margin: 0; color: var(--muted); }
/* 모든 기기에서 로그아웃: 처음 단추는 차분하게, 확인 단계의 [정말 로그아웃]은 빨간 글자 · 두 단추는 한 줄(좁으면 줄바꿈) */
.acct-menu .acct-sub { color: var(--muted); }
.acct-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.acct-menu [data-line="logout-all"] { max-width: calc(260px * var(--fz)); }
.acct-menu .acct-danger { color: var(--down-text); border-color: var(--down-text); font-weight: 700; }

.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-page { width: 100%; max-width: 420px; margin: 0 auto; padding: var(--s4); display: flex; flex-direction: column; align-items: center; gap: var(--s3); text-align: center; }
.login-page h1 { margin: var(--s2) 0 0; font-size: var(--fs-xl); }
.login-page p { margin: 0; color: var(--muted); line-height: var(--lh); word-break: keep-all; }
.login-lead { color: var(--text); }
.login-slot { min-height: 48px; display: flex; align-items: center; justify-content: center; }
.login-agree { display: flex; flex-direction: column; gap: var(--s1); font-size: var(--fs-sm); }
/* 카카오 로그인 단추: 카카오 디자인 가이드(바탕 · 말풍선 · 글자 색, 모서리 12px, 말풍선 + "카카오 로그인") — 그림은 받지 않고 화면 안의 말풍선 모양(svg)으로 */
.login-page a.kakao-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-width: 220px; height: 44px; padding: 0 var(--s4); border-radius: 12px; background: var(--kakao-bg); color: var(--kakao-label); font-size: 15px; font-weight: 600; text-decoration: none; }
.login-page a.kakao-btn[hidden] { display: none; }
.login-page a.kakao-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kakao-btn svg { width: 18px; height: 18px; flex: none; fill: var(--kakao-symbol); }
.fear-meter { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.fear-meter-track { position: relative; height: 8px; border-radius: 4px; background: var(--line); }
.fear-meter-dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--panel); transform: translate(-50%, -50%); }
.fear-meter-cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s1); color: var(--muted); font-size: var(--fs-sm); text-align: center; word-break: keep-all; }
.fear-meter-cell.is-on { font-weight: 700; }
.fear-login-hint { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); color: var(--muted); }

/* ── 차트 마법사(도구 줄의 [마법사 ▾] · 「차트 읽기」 목록 · 칸 위 알약). 선 색은 tokens.css 의 --wiz-* ── */
.wiz-box { flex: none; position: relative; display: flex; align-items: center; gap: 2px; }
.wiz-btn.is-on { color: var(--text); border-color: var(--wiz-level); }
.wiz-more { padding: 0 6px; }
.wiz-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; max-width: calc(100vw - 2 * var(--s2));
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: var(--s1);
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.wiz-menu .chip { text-align: left; }
.wiz-menu .chip[aria-pressed="true"] { color: var(--text); border-color: var(--wiz-level); }
.wiz-panel {
  flex: none; width: calc(260px * var(--fz)); min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s2); padding: var(--s2) var(--s3);
  background: var(--panel); border-left: 1px solid var(--line); font-size: var(--fs-sm);
}
.wiz-head { display: flex; align-items: center; gap: 2px; }
.wiz-head .chip { padding: 0 var(--s2); }
.wiz-title { flex: 1; margin: 0; font-size: var(--fs); }
.wiz-basis, .wiz-status, .wiz-notes p { margin: 0; color: var(--muted); line-height: var(--lh); word-break: keep-all; overflow-wrap: anywhere; }
.wiz-status { color: var(--warn); }
.wiz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.wiz-row {
  width: 100%; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 6px; align-items: baseline;
  padding: var(--s1); text-align: left; background: none; border: 1px solid transparent; border-radius: var(--radius);
  color: var(--text); font: inherit; cursor: pointer;
}
.wiz-row:hover, .wiz-row.is-hl { border-color: var(--wiz-level); background: var(--raised); }
.wiz-num { color: var(--wiz-badge); }
.wiz-tag { color: var(--muted); white-space: nowrap; }
.wiz-text { min-width: 0; line-height: var(--lh); word-break: keep-all; overflow-wrap: anywhere; }
.wiz-side { margin: 0; padding-left: var(--s4); line-height: var(--lh); }
.wiz-notes { display: flex; flex-direction: column; gap: 2px; padding-top: var(--s2); border-top: 1px solid var(--line); }
.wiz-words-btn { align-self: flex-start; padding: 0; background: none; border: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.wiz-words { margin: 0; }
.wiz-words dt { margin-top: var(--s1); font-weight: 600; }
.wiz-words dd { margin: 0; color: var(--muted); line-height: var(--lh); word-break: keep-all; }
@media (max-width: 860px) {
  .wiz-panel { width: 100%; max-height: 30vh; border-left: 0; border-top: 1px solid var(--line); }
  .work:has(> .wiz-panel:not([hidden])) .side:not(.is-folded) { height: 30%; }
}
/* 휴대폰: 마법사를 켠 동안은 차트 + 「차트 읽기」만(오른쪽 칸은 접어 둠 — 끄면 돌아옴). 차트가 납작해지지 않게 */
@media (max-width: 600px) {
  .wiz-panel { max-height: 28vh; }
  .work:has(> .wiz-panel:not([hidden])) .side { display: none; }
}
.wiz-pill {
  position: absolute; left: var(--s2); bottom: calc(36px * var(--fz)); z-index: 4; height: calc(24px * var(--fz)); padding: 0 var(--s2);
  background: var(--wiz-badge); color: var(--wiz-badge-text); border: 0; border-radius: 12px;
  font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
}
.wiz-corner {
  position: absolute; left: var(--s2); bottom: calc(36px * var(--fz)); z-index: 4; padding: 1px 6px; pointer-events: none;
  background: var(--veil); color: var(--text); border: 1px solid var(--wiz-level); border-radius: var(--radius); font-size: var(--fs-sm);
}
.pane.is-low .wiz-pill, .pane.is-low .wiz-corner { bottom: var(--s1); }

/* ── 세계 지수 띠(모든 화면 맨 위 한 줄) ──
   넓은 화면: 항목이 여러 줄로 감기고 보이는 것은 한 줄 — ▲▼ 단추가 한 줄씩 위 · 아래로(저절로 넘기지 않음).
   좁은 화면(휴대폰): 단추 없이 옆으로 밀어 보는 한 줄 */
.idx-band {
  flex: none; display: flex; align-items: stretch;
  height: calc(30px * var(--fz)); background: var(--panel); border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.idx-band-view {
  flex: 1; min-width: 0; height: calc(30px * var(--fz)); overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s4); padding: 0 var(--s3);
}
.idx-item {
  flex: none; height: calc(30px * var(--fz)); display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.idx-item:hover .idx-name { color: var(--text); text-decoration: underline; }
.idx-name { color: var(--muted); }
.idx-value { font-weight: 700; }
.idx-src { flex: none; height: calc(30px * var(--fz)); display: inline-flex; align-items: center; color: var(--muted); white-space: nowrap; }
.idx-band-btns { flex: none; display: flex; align-items: center; gap: 2px; padding: 0 var(--s2); border-left: 1px solid var(--line); }
.idx-band-btn {
  width: calc(24px * var(--fz)); height: calc(22px * var(--fz)); padding: 0; line-height: 1;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); font-size: 0.625rem;
}
.idx-band-btn:hover:not(:disabled) { color: var(--text); background: var(--raised); }
.idx-band-btn:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 720px) {
  .idx-band-view { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .idx-band-view::-webkit-scrollbar { display: none; }
  .idx-band-btns { display: none; }
}

/* ── 지수 화면(#/index/<id>) ── */
.idx-page {
  max-width: 1200px; margin: 0 auto; padding: var(--s4);
  display: grid; grid-template-columns: minmax(0, 1fr) calc(280px * var(--fz)); gap: var(--s4); align-items: start;
}
.idx-main { min-width: 0; display: flex; flex-direction: column; gap: var(--s3); }
.idx-head { display: flex; flex-direction: column; gap: var(--s1); }
.idx-title { font-size: var(--fs-xl); }
.idx-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); }
.idx-big { font-size: 1.75rem; font-weight: 700; }
.idx-quote .idx-diff, .idx-quote .idx-pct { font-size: var(--fs-lg); font-weight: 600; }
.idx-delay {
  padding: 1px var(--s2); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--muted); font-size: var(--fs-sm);
}
.idx-delay:empty { display: none; }
.idx-desc { color: var(--muted); }
.idx-stats { display: flex; flex-wrap: wrap; gap: var(--s4); }
.idx-stat { display: inline-flex; gap: var(--s2); color: var(--muted); font-size: var(--fs-sm); align-items: baseline; }
.idx-stat b { color: var(--text); font-size: var(--fs); }
.idx-ranges { display: flex; flex-wrap: wrap; gap: var(--s1); }
.idx-chart { width: 100%; min-height: 300px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.idx-wait { padding: var(--s4); color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.idx-daily h2, .idx-side-group h2 { font-size: var(--fs-lg); margin-bottom: var(--s2); }
.idx-table-wrap { overflow-x: auto; }
.idx-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.idx-table th, .idx-table td { padding: 6px var(--s2); text-align: right; border-bottom: 1px solid var(--line); }
.idx-table th:first-child, .idx-table td:first-child { text-align: left; }
.idx-table th { color: var(--muted); font-weight: 600; font-size: var(--fs-sm); }
.idx-pager { display: flex; align-items: center; justify-content: center; gap: var(--s3); margin-top: var(--s2); }
.idx-page-no { color: var(--muted); font-size: var(--fs-sm); }
.idx-note { color: var(--muted); font-size: var(--fs-sm); }
.idx-side { display: flex; flex-direction: column; gap: var(--s4); }
.idx-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.idx-side-item {
  display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; align-items: center; gap: var(--s2);
  padding: 6px var(--s2); border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.idx-side-item:hover { background: var(--raised); }
.idx-side-item[aria-current="page"] { background: var(--accent-soft); }
.idx-side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idx-spark { display: block; width: 96px; height: 28px; }
.idx-side-num { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-sm); }
@media (max-width: 860px) {
  .idx-page { grid-template-columns: minmax(0, 1fr); padding: var(--s3); }
  .idx-big { font-size: var(--fs-xl); }
}

/* ── 언어 고르기(위 메뉴 오른쪽 지구 단추 — LANG_SWITCH 가 켜졌을 때만 생김, js/ui/lang-menu.js) ── */
.lang-pick { position: relative; flex: none; }
.btn-lang { display: inline-flex; align-items: center; gap: var(--s1); padding: 0 var(--s2); }
.btn-lang svg { display: block; }
.btn-lang-code { font-size: var(--fs-sm); color: var(--muted); }
.lang-list { position: absolute; z-index: 31; right: 0; top: calc(100% + var(--s1)); min-width: calc(150px * var(--fz)); display: flex; flex-direction: column; padding: var(--s1); background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.lang-list[hidden] { display: none; }
.lang-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: var(--row-h); padding: 0 var(--s2); background: none; border: 0; border-radius: var(--radius); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.lang-item:hover, .lang-item:focus-visible { background: var(--accent-soft); outline: none; }
.lang-item[aria-checked="true"] { color: var(--accent); }
.lang-item[aria-checked="true"]::after { content: "✓"; }
/* 다른 언어로 쓴 이름은 그 언어 글꼴로(한국어 화면에서도 हिन्दी · 日本語 · Tiếng Việt 가 깨지지 않게) */
.lang-item:lang(ja) { font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", var(--font); }
.lang-item:lang(hi) { font-family: "Nirmala UI", "Kohinoor Devanagari", "Noto Sans Devanagari", "Mangal", var(--font); }
.lang-item:lang(vi) { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, var(--font); }
/* (휴대폰 폭의 지구 단추 자리는 위 「아주 좁은 화면의 위 메뉴」 묶음 안에 있음) */

/* ── 14단계 가독성: 글자 크기 고르기(위 메뉴의 「가」 단추 — js/ui/font-menu.js · js/util/font-scale.js) ──
   배율(--fz)은 tokens.css 의 :root[data-fs]. 각 줄은 그 크기의 글자로 미리 보여 줌(지금 고른 크기와 상관없이 고정 px). */
.font-pick { position: relative; flex: none; }
.btn-font { display: inline-flex; align-items: center; justify-content: center; min-width: var(--ctl-h); padding: 0 var(--s2); font-size: var(--fs-lg); font-weight: 700; line-height: 1; }
.btn-font[aria-expanded="true"] { border-color: var(--accent); }
.font-list { position: absolute; z-index: 31; right: 0; top: calc(100% + var(--s1)); min-width: calc(190px * var(--fz)); display: flex; flex-direction: column; gap: 2px; padding: var(--s1); background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.font-list[hidden] { display: none; }
.font-list-title { margin: 0; padding: var(--s1) var(--s2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.font-item { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 var(--s2); background: none; border: 1px solid transparent; border-radius: var(--radius); color: var(--text); font-family: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.font-item:hover, .font-item:focus-visible { background: var(--accent-soft); outline: none; box-shadow: none; border-color: var(--accent); }
.font-item[aria-checked="true"] { color: var(--accent); font-weight: 700; }
.font-item[aria-checked="true"]::after { content: "✓"; margin-left: auto; padding-left: var(--s3); }
.font-item-glyph { flex: none; min-width: 1.4em; text-align: center; font-weight: 700; }
.font-item-md { font-size: 13px; }
.font-item-lg { font-size: 16px; }
.font-item-xl { font-size: 18px; min-height: 48px; }
/* 밝은 화면 · 어두운 화면(위 메뉴의 해/달 단추 — js/ui/theme-menu.js · js/util/theme-mode.js). 그림은 "누르면 바뀔 화면" */
.btn-theme { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: var(--ctl-h); padding: 0 var(--s2); font-size: var(--fs-lg); line-height: 1; }
.btn-theme-glyph { font-family: "Segoe UI Symbol", "Apple Symbols", var(--font); }

/* 손가락으로 쓰는 넓은 화면(태블릿): 휴대폰과 같은 누르는 크기(창 폭 860px 이하는 위 좁은 화면 묶음이 이미 맡음) */
@media (pointer: coarse) and (min-width: 861px) {
  :root { --ctl-h: 38px; --row-h: 40px; }
  :root[data-fs="lg"] { --ctl-h: 42px; --row-h: 44px; }
  :root[data-fs="xl"] { --ctl-h: 46px; --row-h: 48px; }
}

/* 주소로 가는 단추(<a class="btn">): 글자가 단추 위쪽에 붙지 않고 가운데(글자를 키워도 단추 안) */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* 칸 제목을 누르면 뜨는 「종목 찾기」 창(ui/symbol-popover.js) — 화면 가운데 큰 창, 휴대폰(600px 이하)은 화면 가득 */
.sympop-back {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: var(--s4); background: var(--veil);
}
.sympop-back[hidden] { display: none; }
.sympop {
  /* 칸 폭(머리줄과 줄이 같은 값) */
  --sp-logo: calc(28px * var(--fz)); --sp-price: calc(112px * var(--fz)); --sp-pct: calc(88px * var(--fz));
  --sp-vol: calc(104px * var(--fz)); --sp-star: calc(40px * var(--fz)); --sp-gap: var(--s3);
  width: min(calc(760px * var(--fz)), 100%); height: min(calc(700px * var(--fz)), 100%);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.sympop-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s4) var(--s4) var(--s3); }
.sympop-head h2 { margin: 0; font-size: var(--fs-xl); line-height: 1.2; }
.sympop-x {
  flex: none; width: calc(36px * var(--fz)); height: calc(36px * var(--fz)); padding: 0;
  background: transparent; border: 0; border-radius: var(--radius); color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.sympop-x:hover { background: var(--raised); color: var(--text); }
.sympop-search {
  flex: none; display: flex; align-items: center; gap: var(--s2); margin: 0 var(--s4) var(--s3);
  height: calc(48px * var(--fz)); padding: 0 var(--s3);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; cursor: text;
}
.sympop-search:focus-within { border-color: var(--accent); }
/* 돋보기: 동그라미 + 손잡이(그림 파일 없이) */
.sympop-glass { flex: none; position: relative; width: 14px; height: 14px; margin-right: 4px; border: 2px solid var(--muted); border-radius: 50%; }
.sympop-glass::after { content: ""; position: absolute; right: -5px; bottom: -6px; width: 2px; height: 7px; background: var(--muted); transform: rotate(-45deg); }
.sympop-input {
  flex: 1; min-width: 0; height: 100%; padding: 0;
  background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: var(--fs-lg);
}
.sympop-input::placeholder { color: var(--muted); }
.sympop-esc {
  flex: none; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px;
  color: var(--muted); font-family: inherit; font-size: var(--fs-sm);
}
.sympop-tabs { flex: none; display: flex; gap: var(--s4); padding: 0 var(--s4); border-bottom: 1px solid var(--line); overflow-x: auto; }
.sympop-tab {
  flex: none; min-height: calc(40px * var(--fz)); padding: var(--s2) 2px;
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); font: inherit; font-size: var(--fs-lg); font-weight: 700; white-space: nowrap; cursor: pointer;
}
.sympop-tab:hover { color: var(--text); }
.sympop-tab[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }
.sympop-subs { flex: none; display: flex; flex-wrap: wrap; gap: var(--s1); padding: var(--s2) var(--s4); }
/* 머리줄 · 줄 · 빈 글을 한 스크롤 안에(머리줄은 위에 붙박이 — 스크롤 막대가 있어도 칸이 맞음) */
.sympop-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--s2) var(--s2); }
.sympop-cols {
  position: sticky; top: 0; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--sp-price) var(--sp-pct) var(--sp-vol) var(--sp-star); column-gap: var(--sp-gap);
  padding: var(--s1) 0 var(--s1) var(--s2); background: var(--panel); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: var(--fs-sm);
}
.sympop-c-price, .sympop-c-pct, .sympop-c-vol { text-align: right; }
.sympop-group { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s2); padding: var(--s3) var(--s2) var(--s1); }
.sympop-group b { font-size: var(--fs); }
.sympop-group small { color: var(--muted); font-size: var(--fs-sm); }
.sympop-row { display: flex; align-items: stretch; border-radius: 8px; }
.sympop-row:hover { background: var(--raised); }
.sympop-row.is-sel { background: var(--accent-soft); }
.sympop-main {
  flex: 1; min-width: 0; min-height: calc(52px * var(--fz)); padding: var(--s1) 0 var(--s1) var(--s2);
  display: grid; grid-template-columns: var(--sp-logo) minmax(0, 1fr) var(--sp-price) var(--sp-pct) var(--sp-vol);
  align-items: center; column-gap: var(--sp-gap);
  background: transparent; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.sympop-main:focus-visible, .sympop-star:focus-visible { box-shadow: none; outline: 2px solid var(--accent); outline-offset: -2px; }
.sympop .sympop-logo { width: var(--sp-logo); height: var(--sp-logo); }
.sympop-name { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sympop-line1 { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.sympop-sym { flex: none; font-size: var(--fs-lg); font-weight: 700; }
.sympop-row.is-current .sympop-sym { color: var(--accent); }
.sympop-ko { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sympop-en { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sympop-price, .sympop-pct, .sympop-vol { text-align: right; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.sympop-pct.is-flat { color: var(--muted); }
.sympop-vol i { margin-left: 3px; color: var(--muted); font-size: var(--fs-sm); font-style: normal; }
.sympop-star {
  flex: none; width: var(--sp-star); padding: 0;
  background: transparent; border: 0; color: var(--muted); font-size: 1.125rem; cursor: pointer;
}
.sympop-star:hover { color: var(--text); }
.sympop-star[aria-pressed="true"] { color: var(--accent); }
.sympop-empty, .sympop-more { margin: 0; padding: var(--s3) var(--s2); color: var(--muted); }
.sympop-more { font-size: var(--fs-sm); }
.sympop-foot {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s4);
  padding: var(--s2) var(--s4); background: var(--bg); border-top: 1px solid var(--line);
  color: var(--muted); font-size: var(--fs-sm);
}
.sympop-session { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.sympop-session[hidden] { display: none; }
.sympop-session b { color: var(--text); }
.sympop-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--flat); }
.sympop-dot.is-open { background: var(--up); }
.sympop-dot.is-pre, .sympop-dot.is-after { background: var(--accent); }
/* 휴대폰: 화면 가득 · 변동%는 현재가 아래로(한 칸에 두 줄) · 크게 · 아주 크게에서는 거래대금 칸을 숨겨 이름 칸을 지킴 */
@media (max-width: 600px) {
  .sympop-back { padding: 0; }
  .sympop {
    --sp-price: calc(88px * var(--fz)); --sp-vol: calc(68px * var(--fz)); --sp-star: calc(36px * var(--fz)); --sp-gap: var(--s2);
    width: 100%; height: 100%; border: 0; border-radius: 0;
  }
  .sympop-head { padding: var(--s3) var(--s3) var(--s2); }
  .sympop-search { margin: 0 var(--s3) var(--s2); }
  .sympop-esc { display: none; }
  .sympop-tabs { gap: var(--s3); padding: 0 var(--s3); }
  .sympop-subs { padding: var(--s2) var(--s3); }
  .sympop-cols { grid-template-columns: minmax(0, 1fr) var(--sp-price) var(--sp-vol) var(--sp-star); }
  .sympop-c-pct { display: none; }
  .sympop-main { grid-template-columns: var(--sp-logo) minmax(0, 1fr) var(--sp-price) var(--sp-vol); grid-template-rows: auto auto; row-gap: 1px; }
  .sympop .sympop-logo, .sympop-name, .sympop-vol { grid-row: 1 / 3; }
  .sympop-name { grid-column: 2; }
  .sympop-price { grid-column: 3; grid-row: 1; }
  .sympop-pct { grid-column: 3; grid-row: 2; font-size: var(--fs-sm); }
  .sympop-vol { grid-column: 4; }
  .sympop-vol i { display: none; } /* 단위(USDT)는 좁은 화면에서 숨김 — 값만 */
  .sympop-foot { padding: var(--s2) var(--s3); }
  :root[data-fs="lg"] .sympop-cols, :root[data-fs="xl"] .sympop-cols { grid-template-columns: minmax(0, 1fr) var(--sp-price) var(--sp-star); }
  :root[data-fs="lg"] .sympop-main, :root[data-fs="xl"] .sympop-main { grid-template-columns: var(--sp-logo) minmax(0, 1fr) var(--sp-price); }
  :root[data-fs="lg"] .sympop-c-vol, :root[data-fs="lg"] .sympop-vol, :root[data-fs="xl"] .sympop-c-vol, :root[data-fs="xl"] .sympop-vol { display: none; }
}

/* ══════════ 15단계 차트 꾸미기: 봉 메뉴 · 차트 모양 메뉴 · 지표 창 ══════════ */
/* 도구 줄의 작은 판(봉 메뉴 · 차트 모양) — 위치는 코드가 top · left 로 잡음 */
.pop-panel {
  position: absolute; z-index: 21; display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s3); overflow-y: auto; overscroll-behavior: contain;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pop-panel[hidden] { display: none; }
.pop-title { margin: 0 0 var(--s1); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.pop-note { color: var(--muted); font-size: var(--fs-sm); line-height: var(--lh); word-break: keep-all; }
.bar-more { display: inline-flex; align-items: center; gap: 2px; padding: 0 var(--s2); }
.bar-more[aria-expanded="true"] { color: var(--text); border-color: var(--accent); }
.bar-more-caret { font-size: var(--fs-sm); }
.bar-panel { width: calc(260px * var(--fz)); }
.bar-sec { display: flex; flex-direction: column; gap: 2px; }
.bar-sec + .bar-sec { padding-top: var(--s2); border-top: 1px solid var(--line); }
.bar-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 2px var(--s1); }
.bar-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.bar-pick {
  flex: 1; min-width: 0; height: var(--ctl-h); padding: 0 var(--s2); text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--text);
}
.bar-pick:hover { background: var(--panel); }
.bar-pick[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.bar-star, .ind-fav {
  flex: none; width: var(--ctl-h); height: var(--ctl-h); padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); opacity: 0.45; font-size: var(--fs);
}
.bar-star:hover, .ind-fav:hover { opacity: 0.8; background: var(--panel); }
.bar-star[aria-pressed="true"], .ind-fav[aria-pressed="true"] { color: var(--accent); opacity: 1; }
.style-btn { display: inline-flex; align-items: center; padding: 0 var(--s2); }
.style-btn[aria-expanded="true"] { border-color: var(--accent); }
.style-panel { width: calc(220px * var(--fz)); }
.style-rows { display: flex; flex-direction: column; gap: 2px; }
.style-row {
  display: flex; align-items: center; gap: var(--s2); min-height: var(--row-h); padding: 0 var(--s2); text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--text);
}
.style-row:hover { background: var(--panel); }
.style-row[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.style-icon { display: block; flex: none; }
.style-icon .si-stroke { stroke: currentColor; stroke-width: 1.4; }
.style-icon .si-thin { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }
.style-icon .si-fill { fill: currentColor; stroke: currentColor; stroke-width: 1; }
.style-icon .si-hollow { fill: none; stroke: currentColor; stroke-width: 1.2; }
.style-icon .si-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.style-icon .si-area { fill: var(--accent-soft); stroke: none; }
.style-btn-icon { display: inline-flex; color: var(--muted); }
.style-btn:hover .style-btn-icon, .style-btn[aria-expanded="true"] .style-btn-icon { color: var(--text); }

/* 지표 창: 큰 창(넓은 화면 = 차트 화면 한가운데, 휴대폰 = 화면 가득). 위 찾기 · 왼쪽 묶음 · 오른쪽 목록 · 아래 모두 끄기 */
.ind-panel.is-big {
  left: 50%; transform: translateX(-50%); width: min(calc(760px * var(--fz)), calc(100% - 2 * var(--s3)));
  max-width: none; height: min(calc(600px * var(--fz)), 80vh); padding: 0; gap: 0; overflow: hidden;
}
.ind-panel.is-big[hidden] { display: none; }
.ind-panel.is-big .ind-body { flex: 1; min-height: 0; gap: 0; }
.ind-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s3) var(--s2); }
.ind-win-title { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.ind-head .split-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ind-close {
  flex: none; margin-left: auto; width: var(--ctl-h); height: var(--ctl-h); padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); font-size: var(--fs-lg);
}
.ind-close:hover { color: var(--text); background: var(--panel); }
.ind-panel.is-big .ind-body > .ind-lock, .ind-panel.is-big .ind-body > .btn { margin: 0 var(--s3) var(--s3); align-self: flex-start; }
.ind-search {
  margin: 0 var(--s3) var(--s2); height: calc(34px * var(--fz)); padding: 0 var(--s3);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font: inherit;
}
.ind-search:focus-visible { border-color: var(--accent); }
.ind-main { flex: 1; min-height: 0; display: flex; border-top: 1px solid var(--line); }
.ind-nav { flex: none; width: calc(150px * var(--fz)); display: flex; flex-direction: column; gap: 2px; padding: var(--s2); border-right: 1px solid var(--line); overflow-y: auto; }
.ind-cat {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: var(--row-h); padding: 0 var(--s2); text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted);
}
.ind-cat:hover { color: var(--text); background: var(--panel); }
.ind-cat[aria-current="true"] { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.ind-cat-n { font-style: normal; font-size: var(--fs-sm); color: var(--muted); }
.ind-list { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--s2) var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.ind-sec { display: flex; flex-direction: column; gap: var(--s1); }
.ind-sec-title { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.ind-panel.is-big .ind-rows { gap: var(--s1); }
.ind-item { display: flex; flex-direction: column; gap: 2px; }
.ind-item-main { display: flex; align-items: stretch; gap: var(--s1); }
.ind-item-main .ind-fav { align-self: center; }
.ind-item-main > .ind-row { flex: 1; min-width: 0; }
.ind-panel.is-big button.ind-row:not(.ind-opt) {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name state" "desc state" "bars state" "sub state";
  align-items: center; column-gap: var(--s3); row-gap: 1px; padding: 6px var(--s3);
}
.ind-panel.is-big .ind-name { grid-area: name; font-weight: 700; }
.ind-panel.is-big .ind-desc { grid-area: desc; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.ind-panel.is-big .ind-bars { grid-area: bars; color: var(--muted); font-size: var(--fs-sm); }
.ind-panel.is-big .ind-sub { grid-area: sub; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.ind-desc:empty, .ind-bars:empty { display: none; }
/* 켜기 스위치(글자 켜짐 · 꺼짐 + 손잡이 그림 — 색만으로 전하지 않음) */
.ind-panel.is-big button.ind-row:not(.ind-opt) > .ind-row-state { grid-area: state; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ind-panel.is-big button.ind-row:not(.ind-opt) > .ind-row-state::after {
  content: ""; width: 30px; height: 16px; border-radius: 8px; border: 1px solid var(--line); background-color: var(--bg);
  background-image: radial-gradient(circle at 8px 50%, var(--muted) 5px, transparent 5.5px);
}
.ind-panel.is-big button.ind-row[aria-pressed="true"]:not(.ind-opt) > .ind-row-state::after {
  border-color: var(--accent); background-color: var(--accent-soft);
  background-image: radial-gradient(circle at 21px 50%, var(--accent) 5px, transparent 5.5px);
}
.ind-panel.is-big .ind-row.is-locked { flex: 1; min-width: 0; }
.ind-opts { display: flex; flex-direction: column; gap: 2px; margin-left: calc(var(--ctl-h) + var(--s1) + var(--s3)); }
.ind-opts .ind-opt { min-height: calc(var(--row-h) - 4px); font-size: var(--fs-sm); background: transparent; border-style: dashed; }
.ind-empty { margin: var(--s4) 0; color: var(--muted); text-align: center; }
.ind-panel.is-big .ind-foot { flex: none; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s3); border-top: 1px solid var(--line); }
.ind-panel.is-big .ind-foot .ind-remote-note { flex: 1; min-width: 0; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.ind-panel.is-big .ind-foot .btn { flex: none; margin-left: auto; }
@media (max-width: 600px) {
  /* 휴대폰: 지표 창은 화면 가득, 왼쪽 묶음은 위쪽 한 줄 */
  .ind-panel.is-big { position: fixed; inset: 0; left: 0 !important; top: 0 !important; transform: none; width: auto; height: auto; max-height: none !important; border-radius: 0; z-index: 70; }
  .ind-main { flex-direction: column; }
  .ind-nav { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); padding: var(--s1) var(--s2); }
  .ind-cat { flex: none; }
  .ind-list { padding: var(--s2); }
  .ind-opts { margin-left: var(--s4); }
  .bar-panel, .style-panel { left: var(--s2) !important; right: var(--s2); width: auto; }
}
@media (max-width: 600px) {
  /* 휴대폰: 창 아래 안내는 두 줄까지(목록 자리를 지킴) */
  .ind-panel.is-big .ind-foot .ind-remote-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
/* 도구 줄의 봉 단추 줄(★ 고른 봉 + [▾]) + 차트 모양 단추 */
.bar-itv-row { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--s1); }
.bar-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; }
@media (max-width: 600px) {
  /* 휴대폰: 첫 줄 = 봉 단추(넘치면 옆으로 밀어 봄) · [▾] · 차트 모양 — 둘째 줄은 예전처럼 매매법 · 지표 · 그리기 · 화면 분할 */
  .bar-main .bar-itv-row { flex: 1 0 100%; }
  .bar-main .bar-itv-row .bar-group { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
  .bar-chips { flex: 1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .bar-chips::-webkit-scrollbar { display: none; }
}

/* ══════════ 19단계: 휴대폰 차트를 바이낸스 앱처럼(선생님 "휴대폰은 너무 작아요" · CFO "단추 줄을 차트 안으로") ══════════
   넓은 화면(601px 이상)의 모습은 그대로 — 아래 묶음은 대부분 휴대폰 폭에서만. 차트 높이(--chart-h)는 chart-page.js 가 재서 넣음 */
/* 종목 정보 줄의 묶음 상자: 넓은 화면에서는 없는 것처럼(예전 한 줄 그대로) */
.info-main, .info-quote, .info-stats { display: contents; }
/* 차트 안 아이콘 줄 · 아이콘(휴대폰에서만 보임) */
.m-tools { display: none; }
.m-ico { display: none; flex: none; width: calc(16px * var(--fz)); height: calc(16px * var(--fz)); }
.mi-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mi-fill { fill: currentColor; stroke: none; }
/* 「격자 보이기」 줄(차트 모양 판 아래) */
.style-opts { margin-top: var(--s1); padding-top: var(--s2); border-top: 1px solid var(--line); }
.style-grid .ind-row-state { margin-left: auto; font-style: normal; color: var(--muted); font-size: var(--fs-sm); }
.style-grid[aria-pressed="true"] .ind-row-state { color: var(--accent); }

/* 십자선 가격 상자(가격 + 지금 가격 대비 %): 차트가 그리는 가격 꼬리표 바로 위를 덮음. 바탕색은 차트 꼬리표 색(chart-pane.js 가 넣음) */
.cross-price {
  position: absolute; right: 0; z-index: 6; width: var(--axis-w, 60px); transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; padding: 2px 1px; border-radius: 2px;
  color: var(--cross-text); font-size: calc(12px * var(--fz)); line-height: 1.2; white-space: nowrap; overflow: hidden;
  pointer-events: none; font-variant-numeric: tabular-nums;
}
.cross-price-v { font-weight: 700; }
.cross-price .cross-pct { font-weight: 500; color: inherit; } /* 오름 · 내림 색 대신 부호(+ · −)로 — 꼬리표 바탕 위에서 읽히게 */
/* 손가락으로 쓸 때만: 가격 상자 왼쪽 「+」 = 그 가격에 가로선 */
.cross-add {
  position: absolute; z-index: 7; right: calc(var(--axis-w, 60px) + 6px); transform: translateY(-50%);
  width: calc(30px * var(--fz)); height: calc(30px * var(--fz)); padding: 0; border-radius: 50%;
  background: var(--raised); border: 1px solid var(--muted); color: var(--text); box-shadow: var(--shadow);
  font-size: calc(18px * var(--fz)); font-weight: 700; line-height: 1;
}
/* 마지막 봉 오른쪽 빈자리의 시각(차트는 세로선만 그음) */
.cross-time {
  position: absolute; bottom: 3px; z-index: 6; transform: translateX(-50%); padding: 2px 6px; border-radius: 2px;
  color: var(--cross-text); font-size: calc(12px * var(--fz)); line-height: 1.35; white-space: nowrap; pointer-events: none;
}

/* ── 좁은 화면(860px 이하): 차트 화면이 아래로 길어짐 — 차트가 화면 대부분(--chart-h), 오른쪽 칸 · 시세 띠는 차트 아래(밀어 내려 봄) ── */
@media (max-width: 860px) {
  .chart-page { height: auto; min-height: 100%; }
  .chart-page > .work { flex: none; }
  .chart-zone { flex: none; height: var(--chart-h, 70vh); }
  .work > .side { flex: none; height: min(78vh, 640px); }
  .work > .side.is-folded { height: auto; }
  .work:has(> .wiz-panel:not([hidden])) .side:not(.is-folded) { height: min(60vh, 520px); }
  .work > .wiz-panel { flex: none; }
}

@media (max-width: 600px) {
  /* 위 메뉴: 한 줄 높이를 줄임(단추 32px), 메뉴 줄은 옆으로 밀어 보는 얇은 한 줄 */
  .top { padding: 2px var(--s2); row-gap: 0; }
  .top .btn { height: calc(32px * var(--fz)); }
  .top .logo img { height: 24px; }
  .nav a { padding: 3px var(--s2); font-size: var(--fs-sm); }
  /* 지수 띠: 차트 화면에서는 숨김(첫 화면 · 다른 화면은 그대로) */
  :root[data-route="/chart"] .idx-band { display: none; }

  /* 종목 · 가격 줄: 왼쪽 = 종목 + 큰 가격 + 변동%, 오른쪽 = 작게 24시간 고가 · 저가 · 거래대금 */
  .bar.info {
    display: grid; grid-template-columns: fit-content(56%) minmax(0, 1fr); align-items: center; gap: 0 var(--s3);
    min-height: 0; padding: 4px var(--s3) 6px; overflow: hidden;
  }
  .info-main { display: flex; flex-direction: column; min-width: 0; }
  .info-name { min-width: 0; overflow: hidden; }
  .info-name b { font-size: var(--fs); }
  .info-name small { overflow: hidden; text-overflow: ellipsis; }
  .info-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); min-width: 0; }
  .info-price { font-size: calc(24px * var(--fz)); line-height: 1.15; letter-spacing: -0.3px; }
  .info-quote .info-lab { display: none; }
  .info-quote .info-item { color: inherit; }
  .info-quote .info-pct { margin-left: 0; font-size: var(--fs); }
  .info-stats {
    display: grid; column-gap: var(--s2); align-items: baseline;
    justify-self: end; max-width: 100%; grid-template-columns: minmax(0, max-content) max-content;
    font-size: var(--fs-sm); line-height: 1.4;
  }
  .info-stats .info-item { display: contents; }
  .info-stats .info-lab { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .info-stats .info-item b { margin-left: 0; text-align: right; font-size: var(--fs-sm); }

  /* 도구 줄 = 봉 줄 한 줄(매매법 · 지표 · 마법사 · 화면 분할은 차트 안 아이콘 줄로 옮겨 감) */
  .bar.tools { padding: 2px var(--s2); min-height: 0; }

  /* 차트 안 위쪽 아이콘 줄 */
  .chart-zone { flex-direction: column; }
  .m-tools {
    display: flex; flex: none; order: -1; align-items: center; gap: 4px; padding: 4px var(--s1);
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    background: var(--panel); border-bottom: 1px solid var(--line);
  }
  .m-tools::-webkit-scrollbar { display: none; }
  .m-tools > .btn, .m-tools > .chip, .m-tools .wiz-box > .chip {
    flex: none; display: inline-flex; align-items: center; gap: 4px;
    height: calc(28px * var(--fz)); min-height: 0; padding: 0 var(--s2);
    background: var(--raised); border: 1px solid var(--line); border-radius: 999px;
    color: var(--text); font-size: var(--fs-sm); white-space: nowrap;
  }
  .m-tools .m-ico { display: block; }
  .m-tools .wiz-box { flex: none; gap: 2px; }
  .m-tools .wiz-more { padding: 0 6px; }
  .m-tools .split-btn > span:nth-child(2) { display: none; } /* 「화면 분할」 글자 — 그림 + 칸 수만 */
  .m-tools .method-btn-name { max-width: 6.5em; overflow: hidden; text-overflow: ellipsis; }
  .m-tools .ind-btn-count:empty { display: none; }
  .m-tools [aria-expanded="true"], .m-tools .is-on { border-color: var(--accent); }
  /* 공포지수: 눈에 띄게(금색 테두리 · 켜면 금색 바탕) */
  .m-tools > .m-fear { border-color: var(--accent); color: var(--accent); font-weight: 700; }
  .m-tools > .m-fear[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

  /* 그리기: 차트 위에 떠 있던 [그리기] 단추는 아이콘 줄의 것으로 — 도구 판은 아래에서 올라옴 */
  .draw-box { top: 0; left: 0; width: 0; height: 0; }
  .draw-box .draw-fold { display: none; }
  .draw-box.is-open .draw-group {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 75; margin: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr)); justify-items: center; gap: var(--s1);
    padding: var(--s4) var(--s3) calc(var(--s3) + env(safe-area-inset-bottom));
    border: 1px solid var(--line); border-radius: 14px 14px 0 0;
    box-shadow: 0 0 0 100vmax var(--sheet-back), var(--shadow); animation: sheet-up 0.18s ease-out;
  }
  .draw-box.is-open .draw-group .draw-btn { width: calc(42px * var(--fz)); height: calc(42px * var(--fz)); }
  .draw-fly { top: auto; bottom: calc(100% + 4px); }
  .draw-slot:nth-child(5n) .draw-fly, .draw-slot:nth-child(5n + 4) .draw-fly { left: auto; right: 0; }
  /* 21단계: 판에서는 묶음마다 도구를 한 줄에 모두 보임(▸ 판 대신 — 바이낸스 앱처럼). 켜고 끄는 단추들은 맨 아래 한 줄 */
  .draw-box.is-open .draw-group { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: flex-start; max-height: 72vh; overflow-y: auto; }
  .draw-box.is-open .draw-slot { order: 2; }
  .draw-box.is-open .draw-slot.has-more { order: 1; flex-basis: 100%; }
  .draw-box.is-open .draw-slot.has-more > .draw-btn, .draw-box.is-open .draw-slot.has-more > .draw-more { display: none; }
  .draw-box.is-open .draw-slot.has-more .draw-fly {
    display: flex; position: static; flex-direction: row; flex-wrap: wrap; gap: 2px; min-width: 0; width: 100%;
    padding: 0 0 var(--s1); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none;
  }
  .draw-box.is-open .draw-fly-title { flex-basis: 100%; padding: 4px 2px 2px; }
  .draw-box.is-open .draw-fly .draw-item {
    flex-direction: column; justify-content: center; gap: 2px; width: calc(66px * var(--fz)); height: auto; min-height: calc(52px * var(--fz));
    padding: 4px 2px; white-space: normal; text-align: center;
  }
  .draw-box.is-open .draw-fly .draw-item-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-sm); line-height: 1.2; }
  .draw-slot[data-group="undo"] { margin-top: 0; padding-top: 0; border-top: 0; }
  .dfb-sw { width: calc(18px * var(--fz)); height: calc(18px * var(--fz)); }
  .dfb-w, .dfb-btn { width: calc(24px * var(--fz)); height: calc(24px * var(--fz)); }

  /* 판(매매법 · 지표 · 화면 분할 · 봉 · 차트 모양 · 마법사 고르기): 아래에서 올라오는 판(코드가 넣는 자리 값보다 우선) */
  .method-panel, .ind-panel, .ind-panel.is-big, .split-panel, .bar-panel, .style-panel, .wiz-menu {
    position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
    transform: none !important; width: auto !important; max-width: none !important; max-height: 82vh !important;
    z-index: 75; border-radius: 14px 14px 0 0;
    padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom));
    box-shadow: 0 0 0 100vmax var(--sheet-back), var(--shadow); animation: sheet-up 0.18s ease-out;
  }
  .ind-panel.is-big { height: 86vh !important; padding-bottom: env(safe-area-inset-bottom); }
  /* 판 맨 위 손잡이 모양(꾸밈) */
  .method-panel::before, .ind-panel::before, .split-panel::before, .bar-panel::before, .style-panel::before, .wiz-menu::before {
    content: ""; flex: none; align-self: center; width: 36px; height: 4px; margin: 0 0 var(--s1); border-radius: 2px; background: var(--line);
  }
  .ind-panel.is-big::before { margin-top: var(--s2); }
  .wiz-menu .chip { height: var(--row-h); }

  /* 칸 왼쪽 위 이름 줄: 휴대폰에서는 시 · 고 · 저를 빼고 이름 · 종가 · 등락률만(넓은 휴대폰에서도 값이 눈금 앞에서 잘리지 않게) */
  .pane .ohlc-extra { display: none; }
  /* 화면 분할 판: 휴대폰에서 못 고르는 칸 수(3칸 이상)는 줄째 숨김(빈 줄이 남지 않게) */
  .split-row:has(.shape-btn[data-shape^="3"]), .split-row:has(.shape-btn[data-shape^="4"]), .split-row:has(.shape-btn[data-shape^="5"]),
  .split-row:has(.shape-btn[data-shape^="6"]), .split-row:has(.shape-btn[data-shape^="8"]), .split-row:has(.shape-btn[data-shape^="9"]),
  .split-row:has(.shape-btn[data-shape^="1"]:not([data-shape="1"])) { display: none; }
  /* 칸 왼쪽 위: 「지표 N」 다음 줄에 [값 ▸] 만(접힌 값 줄이 옆으로 잘리지 않게) — 펼치면 줄바꿈해 전부 */
  .pane.is-compact .pane-values, .pane.is-low .pane-values { top: calc(50px * var(--fz)); }
  .pane-values:not(.is-open) .pane-values-list { display: none; }


  /* 공포지수 화면: 봉 단추(1분 … 주 · ▾ 봉 더 보기)를 촘촘히 — 한 줄에 다 못 놓으면(더 보기를 펼침 · 좁은 휴대폰) 두 줄로(화면 밖으로 숨지 않게, 11-26 월봉) */
  .fear-iv { flex-wrap: wrap; gap: 2px; overflow: visible; scrollbar-width: none; }
  .fear-iv::-webkit-scrollbar { display: none; }
  .fear-iv .chip { padding: 0 var(--s2); }
  /* 첫 화면 공포지수 카드(맨 앞): 숫자를 크게 */
  .hgo[data-go="fear"] .hfear-value { font-size: 2.75rem; }
  .hgo[data-go="fear"] .hfear-zone { font-size: var(--fs-xl); }
}
@keyframes sheet-up { from { translate: 0 28px; opacity: 0.6; } to { translate: 0 0; opacity: 1; } }

/* ══════════ 11-26 휴대폰 디자인 손질(선생님 "모바일 UI · 되돌림 설정이 알아보기 쉽지 않고 클릭이 매끄럽지 않다") ══════════
   간격 4 · 8 · 12 · 16, 둥근 모서리는 단추 6 · 판 14 · 알약 999, 그림자는 떠 있는 것(띠 · 안내 · 판)만 */
/* 누르기: 두 번 눌러 확대 · 300ms 기다림 없이, 누른 순간 눈에 보이게(손가락 화면) */
button, a, .chip, .btn, [role="button"], label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  .btn:active, .chip:active, .draw-btn:active, .draw-item:active, .dfb-btn:active, .dfb-w:active, .dfb-sw:active, .nav a:active, .draw-sheet-close:active, .draw-hint-stop:active, .wiz-fold:active {
    filter: brightness(1.18); transform: scale(0.96);
  }
}
@media (prefers-reduced-motion: reduce) { .btn:active, .chip:active, .draw-btn:active, .draw-item:active { transform: none; } }

/* 도구를 고른 뒤 짧은 안내(칸 아래 가운데 알약) — 첫 점 · 끝 점 · [그만] */
.draw-hint {
  position: absolute; z-index: 9; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s2); max-width: calc(100% - 16px);
  padding: 4px 4px 4px var(--s3); background: var(--raised); color: var(--text);
  border: 1px solid var(--accent); border-radius: 999px; box-shadow: var(--shadow);
  font-size: var(--fs); font-weight: 600; white-space: nowrap; animation: hint-in 0.16s ease-out;
}
.draw-hint-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.draw-hint-stop {
  flex: none; height: calc(32px * var(--fz)); padding: 0 var(--s3); border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: var(--fs-sm); font-weight: 600;
}
@keyframes hint-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
/* 설정 띠의 휴지통: 빨강으로 가장 찾기 쉽게 */
.dfb-del-text { display: none; }
.dfb-btn[data-st="del"] { color: var(--down-text); }
/* 좁은 칸(휴대폰): 설정 띠를 칸 아래쪽에 가로로 붙임 — 첫 줄 색 8가지, 둘째 줄 굵기 · 점선 · 잠금 · [삭제] */
.draw-float.is-dock {
  max-width: none; flex-wrap: wrap; justify-content: flex-start; gap: 6px; padding: 6px var(--s2);
  border-radius: 14px;
}
.draw-float.is-dock .dfb-sep { display: none; }
.draw-float.is-dock .dfb-group:first-child { flex: 1 0 100%; justify-content: space-between; padding: 0 2px; }
.draw-float.is-dock .dfb-sw { width: calc(28px * var(--fz)); height: calc(28px * var(--fz)); }
.draw-float.is-dock .dfb-w, .draw-float.is-dock .dfb-btn { width: calc(38px * var(--fz)); height: calc(38px * var(--fz)); border-radius: var(--radius); }
.draw-float.is-dock .dfb-btn[data-st="del"] {
  width: auto; margin-left: auto; gap: 6px; padding: 0 var(--s3);
  background: var(--danger); border-color: var(--danger); color: var(--on-danger); font-weight: 700;
}
.draw-float.is-dock .dfb-btn[data-st="del"] .draw-ico { width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); }
.draw-float.is-dock .dfb-del-text { display: inline; }
/* 그리기 판 머리(손잡이 · 제목 · 닫기) — 휴대폰 판에서만 */
.draw-sheet-head { display: none; }
/* 맨 아래 꼬리말: 넓은 화면은 출처 전체, 휴대폰은 짧은 링크 하나 */
.foot-tv { display: none; }
/* 차트 마법사 판의 한 줄 요약 · 접기 단추 — 휴대폰에서만 */
.wiz-sum, .wiz-fold { display: none; }

@media (max-width: 600px) {
  /* 위 메뉴 · 차트 안 아이콘 줄: 옆으로 밀리는 줄의 오른쪽 끝을 흐리게(잘린 티 대신 "더 있음"), 끝까지 밀면 마지막 것이 흐림 밖으로 나옴 */
  .nav, .m-tools { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .nav::after, .m-tools::after { content: ""; flex: 0 0 20px; }
  .m-tools { gap: 6px; padding: 6px var(--s2); }
  .m-tools > .btn, .m-tools > .chip, .m-tools .wiz-box > .chip { height: calc(32px * var(--fz)); }
  /* 공포지수 단추: 눈에 띄되 다른 단추와 같은 크기 · 켜면 옅은 금색 바탕(꽉 찬 금색 대신) */
  .m-tools > .m-fear[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

  /* 그리기 판: 머리 + 묶음마다 고른 칸 격자(한 줄 4칸쯤 · 「가」 크게면 3칸) · 아이콘 24px · 이름 한 줄 */
  .draw-box.is-open .draw-group { padding-top: 0; row-gap: 0; column-gap: var(--s1); }
  .draw-box.is-open .draw-group.is-pulling { animation: none; }
  .draw-box.is-open .draw-sheet-head {
    display: flex; order: 0; flex: 0 0 100%; position: sticky; top: 0; z-index: 40; align-items: center; gap: var(--s2);
    padding: 18px 2px var(--s2); background: var(--raised); border-bottom: 1px solid var(--line); touch-action: none; cursor: grab;
  }
  .draw-sheet-grip { position: absolute; left: 50%; top: 7px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--muted); opacity: 0.45; }
  .draw-sheet-title { flex: 1; font-size: var(--fs-lg); }
  .draw-sheet-close {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: calc(40px * var(--fz)); height: calc(40px * var(--fz)); padding: 0;
    background: var(--panel); border: 1px solid var(--line); border-radius: 50%; color: var(--text);
  }
  .draw-sheet-close .draw-ico { width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); }
  /* 판 안의 묶음은 제자리 칸이라 겹쳐 뜰 일이 없음 — z-index 를 풀어 위 머리줄(✕) 위로 그려지지 않게(11-26 점검: ✕ 자리에 「평행 채널」이 잡혀 판이 안 닫힘) */
  .draw-box.is-open .draw-slot.has-more .draw-fly {
    z-index: auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(78px * var(--fz)), 1fr)); gap: 4px; padding: 0 0 var(--s2);
  }
  .draw-box.is-open .draw-fly-title { grid-column: 1 / -1; padding: var(--s3) 2px var(--s1); color: var(--text); font-size: var(--fs-sm); font-weight: 700; }
  .draw-box.is-open .draw-fly .draw-item {
    width: auto; min-width: 0; min-height: calc(62px * var(--fz)); gap: 6px; padding: var(--s2) 2px; border-radius: 10px; white-space: nowrap;
  }
  .draw-box.is-open .draw-fly .draw-item .draw-ico { width: calc(24px * var(--fz)); height: calc(24px * var(--fz)); color: var(--text); }
  .draw-box.is-open .draw-fly .draw-item-name { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .draw-box.is-open .draw-fly .draw-item[aria-pressed="true"] .draw-ico { color: var(--accent); }
  .draw-box.is-open .draw-slot:not(.has-more) { padding-top: var(--s2); }
  .draw-box.is-open .draw-group .draw-btn { width: calc(44px * var(--fz)); height: calc(44px * var(--fz)); border: 1px solid var(--line); background: var(--panel); }
  .draw-box.is-open .draw-group .draw-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
  .draw-box.is-open .draw-group .draw-btn .draw-ico { width: calc(22px * var(--fz)); height: calc(22px * var(--fz)); }

  /* 꼬리말: 한 줄(교육용 · 투자 권유 아님 · TradingView 링크) — 긴 저작권 문구는 링크의 title. 차트 안 TV 로고는 그대로 */
  .foot { display: flex; flex-wrap: nowrap; align-items: center; gap: 0; white-space: nowrap; overflow: hidden; padding: 3px var(--s3); font-size: var(--fs-sm); line-height: 1.4; }
  .foot > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .foot > .foot-cr { display: none; }
  .foot > .foot-tv { display: inline; flex: none; }
  .foot > .foot-tv::before { content: "\00a0·\00a0"; display: inline-block; color: var(--muted); }

  /* 차트 마법사 「차트 읽기」: 한 줄 요약 띠로 접어 둠(제목 · 첫 줄 · 다시 · 끄기 · 펼치기) — 누르면 펼침 */
  .wiz-panel:not(.is-open) { max-height: none; padding: 4px var(--s2); gap: 0; overflow: hidden; }
  .wiz-panel:not(.is-open) > :not(.wiz-head) { display: none; }
  .wiz-head { gap: var(--s1); min-width: 0; }
  .wiz-title { flex: none; font-size: var(--fs-sm); cursor: pointer; }
  .wiz-sum { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); cursor: pointer; }
  .wiz-panel.is-open .wiz-sum { visibility: hidden; }
  .wiz-head .chip { height: calc(30px * var(--fz)); padding: 0 var(--s2); font-size: var(--fs-sm); border-color: var(--line); }
  .wiz-fold {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: calc(30px * var(--fz)); height: calc(30px * var(--fz)); padding: 0;
    background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
  }
}
/* 차트 마법사: 무엇을 해 주는지 한 줄(판 맨 위 · 고르는 판 맨 위) */
.wiz-what { margin: 0; color: var(--text); font-size: var(--fs-sm); line-height: var(--lh); word-break: keep-all; }
.wiz-menu .wiz-what { padding: 2px var(--s1) var(--s1); color: var(--muted); max-width: 22em; }
/* 위쪽 종목 이름 자리 = 종목 찾기 단추(이름 옆 ▾) */
.info-find { padding: 2px var(--s1); margin-left: calc(-1 * var(--s1)); background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: inherit; text-align: left; cursor: pointer; }
.info-find:hover { background: var(--raised); }
.info-caret { color: var(--muted); font-size: var(--fs-sm); }

/* ── 「공지 · 업데이트」 창(23단계 — ui/notice-panel.js). 머리줄 확성기 단추 → 큰 창(휴대폰은 화면 가득, 왼쪽 목록은 위쪽 가로 탭) ──
   색 꼬리표: 중요 = 내림 글자색(빨강) · 새로 = 파랑 · 바뀜 = 노랑 · 고침 = 초록(밝은 · 어두운 화면 모두 tokens.css 의 변수) */
.btn-notice { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: var(--ctl-h); padding: 0 var(--s2); }
.btn-notice .ntc-btn-ico { width: calc(17px * var(--fz)); height: calc(17px * var(--fz)); }
.ntc-dot { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--raised); }
.ntc-ico { flex: none; width: 16px; height: 16px; }
.ntc-ico-line { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ntc-ico-fill { fill: currentColor; stroke: none; }
.ntc-lock main { overflow: hidden; }

.ntc-dlg [data-kind="important"] { --k: var(--down-text); }
.ntc-dlg [data-kind="new"] { --k: var(--dsw-4); }
.ntc-dlg [data-kind="change"] { --k: var(--warn); }
.ntc-dlg [data-kind="fix"] { --k: var(--up); }

.ntc-dlg {
  padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text);
  width: min(1040px, calc(100vw - 48px)); height: min(780px, calc(100dvh - 48px)); max-width: none; max-height: none; box-shadow: var(--shadow); overflow: hidden;
}
.ntc-dlg::backdrop { background: var(--sheet-back); }
.ntc-dlg h2, .ntc-dlg h3, .ntc-dlg h4, .ntc-dlg h5, .ntc-dlg p, .ntc-dlg ul { margin: 0; }
.ntc-box { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ntc-head { flex: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.ntc-head-ico { flex: none; display: flex; align-items: center; justify-content: center; width: calc(38px * var(--fz)); height: calc(38px * var(--fz)); border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.ntc-head-ico .ntc-ico { width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); }
.ntc-head-txt { flex: 1; min-width: 0; }
.ntc-title { font-size: var(--fs-lg); font-weight: 800; }
.ntc-sub { color: var(--muted); font-size: var(--fs-sm); }
.ntc-x { flex: none; width: calc(36px * var(--fz)); height: calc(36px * var(--fz)); padding: 0; background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); font-size: var(--fs-xl); line-height: 1; }
.ntc-x:hover { color: var(--text); background: var(--raised); }

.ntc-main {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: calc(250px * var(--fz)) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "nav body" "legend body";
}
.ntc-nav { grid-area: nav; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: var(--s2); background: var(--bg); border-right: 1px solid var(--line); }
.ntc-tab {
  display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: calc(50px * var(--fz)); padding: var(--s2);
  background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--text); text-align: left;
}
.ntc-tab:hover { background: var(--raised); }
.ntc-tab[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); }
.ntc-tab-ico { flex: none; display: flex; align-items: center; justify-content: center; width: calc(30px * var(--fz)); height: calc(30px * var(--fz)); border-radius: 8px; background: var(--raised); color: var(--muted); }
.ntc-tab[aria-selected="true"] .ntc-tab-ico { color: var(--accent); background: var(--panel); }
.ntc-tab-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ntc-tab-txt b { font-size: var(--fs); white-space: nowrap; }
.ntc-tab-txt small { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntc-badge { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); padding: 0 6px; border-radius: 999px; background: var(--danger); color: var(--on-danger); font-size: var(--fs-sm); font-weight: 700; }
.ntc-legend { grid-area: legend; padding: var(--s3); background: var(--bg); border-right: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s1); }
.ntc-legend-title { color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.ntc-legend-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px var(--s2); }
.ntc-legend-list li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.ntc-swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--k); }
.ntc-legend-at { color: var(--muted); font-size: var(--fs-sm); }
.ntc-body { grid-area: body; min-height: 0; overflow-y: auto; padding: var(--s4) 24px var(--s4); line-height: 1.6; }
.ntc-body:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.ntc-foot { flex: none; padding: var(--s2) var(--s4); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); background: var(--bg); }

.ntc-h3 { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-lg); font-weight: 800; margin: var(--s4) 0 var(--s2); }
.ntc-body > .ntc-h3:first-child { margin-top: 0; }
.ntc-h5 { font-size: var(--fs); font-weight: 700; margin-top: var(--s3); }
.ntc-list { padding-left: 1.25em; display: flex; flex-direction: column; gap: 2px; }
.ntc-ko { display: inline-block; margin: 0 0 var(--s2); padding: 1px var(--s2); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: var(--fs-sm); }
.ntc-status { padding: var(--s4) 0; color: var(--muted); }
.ntc-new { color: var(--dsw-4); font-size: var(--fs-sm); font-weight: 800; letter-spacing: 0.04em; }
.ntc-tag, .ntc-kind {
  flex: none; display: inline-flex; align-items: center; padding: 0 6px; border: 1px solid var(--k, var(--line)); border-radius: 4px;
  background: color-mix(in srgb, var(--k, var(--muted)) 12%, transparent); color: var(--k, var(--muted)); font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; line-height: 1.6;
}
.ntc-card { margin-top: var(--s3); padding: var(--s3) var(--s4); background: var(--raised); border: 1px solid var(--line); border-left: 3px solid var(--k, var(--line)); border-radius: 10px; }
.ntc-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1) var(--s2); }
.ntc-meta { margin-left: auto; color: var(--muted); font-size: var(--fs-sm); }
.ntc-card-title { margin: var(--s2) 0 var(--s1); font-size: var(--fs-lg); font-weight: 800; line-height: 1.4; }
.ntc-card-body { display: flex; flex-direction: column; gap: var(--s1); }

.ntc-chips { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s3); }
.ntc-chip { border-color: var(--line); }
.ntc-chip[data-kind]::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--k); }
.ntc-day { margin-top: var(--s4); }
.ntc-day + .ntc-day { padding-top: var(--s4); border-top: 1px solid var(--line); }
.ntc-day-head { display: flex; align-items: center; gap: var(--s3); }
.ntc-cal { flex: none; width: calc(50px * var(--fz)); overflow: hidden; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.ntc-cal span { display: block; padding: 1px 0; background: var(--accent); color: var(--on-accent); font-size: var(--fs-sm); font-weight: 700; }
.ntc-cal b { display: block; font-size: var(--fs-xl); line-height: 1.35; }
.ntc-day-txt { min-width: 0; }
.ntc-day-txt h4 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); font-size: var(--fs-lg); font-weight: 800; }
.ntc-day-txt small { color: var(--muted); font-size: var(--fs-sm); }
.ntc-group { margin-top: var(--s3); padding-left: calc(50px * var(--fz) + var(--s3)); }
.ntc-group-title { font-size: var(--fs); font-weight: 800; }
.ntc-group-n { margin-left: var(--s2); color: var(--muted); font-weight: 600; }
.ntc-items { list-style: none; padding: 0; margin-top: var(--s1); display: flex; flex-direction: column; gap: 6px; }
.ntc-item { display: flex; align-items: flex-start; gap: var(--s2); }
.ntc-item .ntc-kind { min-width: calc(44px * var(--fz)); justify-content: center; margin-top: 1px; }
.ntc-item-txt { flex: 1; min-width: 0; }
.ntc-item-date { margin-right: var(--s2); color: var(--muted); font-size: var(--fs-sm); }

.ntc-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(300px * var(--fz))), 1fr)); gap: var(--s3); }
.ntc-note { display: flex; flex-direction: column; overflow: hidden; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; }
.ntc-art { --k: var(--accent); display: flex; align-items: center; justify-content: center; height: calc(92px * var(--fz)); background: color-mix(in srgb, var(--k) 16%, var(--panel)); color: var(--k); }
.ntc-art[data-icon="phone"] { --k: var(--dsw-4); }
.ntc-art[data-icon="pen"] { --k: var(--dsw-5); }
.ntc-art[data-icon="globe"] { --k: var(--dsw-7); }
.ntc-art[data-icon="bell"], .ntc-art[data-icon="sun"] { --k: var(--warn); }
.ntc-art[data-icon="shield"] { --k: var(--up); }
.ntc-art-ico { width: calc(40px * var(--fz)); height: calc(40px * var(--fz)); }
.ntc-note-txt { flex: 1; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3); }
.ntc-note .ntc-card-title { margin: var(--s1) 0 0; }
.ntc-note-sum { color: var(--muted); }
.ntc-note-foot { margin-top: auto; padding-top: var(--s2); display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.ntc-note-foot small { color: var(--muted); font-size: var(--fs-sm); }
.ntc-more { flex: none; min-height: calc(32px * var(--fz)); padding: 0 var(--s1); background: transparent; border: 0; border-radius: var(--radius); color: var(--accent); font-weight: 700; }
.ntc-more:hover { text-decoration: underline; }
.ntc-back { margin-bottom: var(--s3); }
.ntc-note-full .ntc-card-title { font-size: var(--fs-xl); }
.ntc-note-full .ntc-note-sum { margin-bottom: var(--s2); }

.ntc-prose { display: flex; flex-direction: column; gap: var(--s2); }
.ntc-core { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4); background: var(--accent-soft); border: 2px solid var(--accent); border-radius: 12px; }
.ntc-core-title { color: var(--accent); font-size: var(--fs-lg); font-weight: 800; }
.ntc-sum { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4); background: var(--raised); border: 1px solid var(--line); border-radius: 12px; }
.ntc-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s4); }
.ntc-two-col { padding: var(--s3); background: var(--raised); border: 1px solid var(--line); border-radius: 10px; }
.ntc-two-col h4 { margin-bottom: var(--s1); font-size: var(--fs); font-weight: 800; }
.ntc-two-col[data-side="do"] h4 { color: var(--up); }
.ntc-two-col[data-side="dont"] h4 { color: var(--down-text); }
.ntc-links { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.ntc-link { display: inline-flex; align-items: center; height: calc(36px * var(--fz)); text-decoration: none; }
.ntc-fine { margin-top: var(--s2); color: var(--muted); font-size: var(--fs-sm); }

/* 태블릿 세로: 왼쪽 목록을 조금 좁게 */
@media (max-width: 900px) {
  .ntc-main { grid-template-columns: calc(210px * var(--fz)) minmax(0, 1fr); }
  .ntc-dlg { width: calc(100vw - 32px); height: calc(100dvh - 32px); }
}
/* 휴대폰: 화면 가득 · 왼쪽 목록 → 위쪽 가로 탭(옆으로 밀어 봄) · 색 표시는 아래 한 줄 */
@media (max-width: 720px) {
  .ntc-dlg { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .ntc-head { gap: var(--s2); padding: var(--s2) var(--s3); }
  .ntc-head-ico { width: calc(32px * var(--fz)); height: calc(32px * var(--fz)); }
  .ntc-x { width: 44px; height: 44px; }
  .ntc-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "nav" "body" "legend"; }
  .ntc-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: var(--s1); padding: var(--s2) var(--s3); border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .ntc-nav::-webkit-scrollbar { display: none; }
  .ntc-tab { flex: none; width: auto; min-height: 40px; min-height: max(40px, calc(36px * var(--fz))); padding: 4px 10px 4px 6px; border-color: var(--line); border-radius: 999px; }
  .ntc-tab-ico { width: calc(24px * var(--fz)); height: calc(24px * var(--fz)); border-radius: 50%; }
  .ntc-tab-txt small { display: none; }
  .ntc-badge { min-width: calc(18px * var(--fz)); height: calc(18px * var(--fz)); padding: 0 5px; }
  /* 색 표시 · 출처 띠는 한 줄씩(넘치면 옆으로 밀어 봄 — 본문 자리를 지킴) */
  .ntc-legend { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px var(--s3); padding: 6px var(--s3); border-right: 0; white-space: nowrap; }
  .ntc-foot::-webkit-scrollbar { display: none; }
  .ntc-legend-list { display: flex; flex: none; gap: var(--s3); }
  .ntc-legend-at { flex: none; margin-left: auto; }
  .ntc-body { padding: var(--s3); }
  .ntc-card { padding: var(--s3); }
  .ntc-group { padding-left: 0; }
  .ntc-two { grid-template-columns: 1fr; }
  .ntc-foot { padding: 6px var(--s3); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .ntc-legend-title { display: none; }
}

/* ── 첫 로그인의 「가입 확인」(join.html · js/join.js — 2026-11-26) ──
   60 · 70대 기준: 본문 18px(× 「가」 배율) · 누르는 곳 56px · 한 줄에 하나씩. 색은 공통 변수만(밝은 · 어두운 화면 모두) */
.join-body { min-height: 100vh; background: var(--bg); color: var(--text); font-size: 1.125rem; line-height: 1.6; }
.join-page { width: 100%; max-width: 560px; margin: 0 auto; padding: var(--s4) var(--s4) 48px; display: flex; flex-direction: column; gap: var(--s4); }
.join-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.join-page h1 { margin: 0; font-size: 1.75rem; line-height: 1.3; }
.join-slot { display: flex; flex-direction: column; gap: var(--s4); }
.join-lead { margin: 0; color: var(--text); word-break: keep-all; }
.join-again { padding: var(--s3); border-left: 4px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); }
.join-step { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.join-step h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: 1.25rem; line-height: 1.35; word-break: keep-all; }
.join-tag { font-size: 0.875rem; font-weight: 600; padding: 2px var(--s2); border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.join-tag.is-must { color: var(--accent); border-color: var(--accent); }
.join-agree-row { display: flex; flex-direction: column; gap: var(--s1); }
.join-agree { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); cursor: pointer; word-break: keep-all; }
.join-check { flex: none; width: 28px; height: 28px; margin: 0; accent-color: var(--accent); }
.join-read { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s2); color: var(--accent); font-weight: 600; }
.join-input { width: 100%; min-height: 56px; padding: var(--s2) var(--s3); font: inherit; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); }
.join-note { min-height: 112px; resize: vertical; }
.join-input:focus-visible, .join-choice:focus-visible, .join-agree:focus-within, .join-read:focus-visible, .join-big:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.join-help { margin: 0; color: var(--muted); font-size: 1rem; word-break: keep-all; }
.join-q { margin: 0; font-weight: 600; }
.join-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s2); }
.join-yn { grid-template-columns: 1fr 1fr; }
.join-choice { min-height: 56px; padding: var(--s2) var(--s3); font: inherit; font-weight: 600; color: var(--text); background: var(--raised); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; word-break: keep-all; }
.join-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.join-choice[aria-pressed="true"]::before { content: "✓ "; color: var(--accent); }
.join-rooms { display: flex; flex-direction: column; gap: var(--s2); }
.join-err { margin: 0; min-height: 1.6em; color: var(--down-text); font-weight: 700; word-break: keep-all; }
.join-err:empty { min-height: 0; }
.btn.join-big { display: flex; align-items: center; justify-content: center; width: 100%; height: auto; min-height: 56px; font-size: 1.125rem; text-decoration: none; white-space: normal; text-align: center; }
.btn.join-big:disabled { opacity: 0.6; }
.join-font-btn { height: auto; min-width: 56px; min-height: 44px; font-weight: 700; font-size: 1rem; }
.join-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.join-done { display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s4); text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.join-done h2 { margin: 0; font-size: 1.5rem; }
.join-done-mark { margin: 0; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 2rem; font-weight: 700; }
@media (max-width: 400px) {
  .join-page { padding: var(--s3) var(--s3) 40px; }
  .join-step { padding: var(--s3); }
  .join-page h1 { font-size: 1.5rem; }
}

/* ══════════ 22단계 B: 화면 · 공통 (11-26 휴대폰 점검 — notes/community/qa-1126.md B 1~21) ══════════ */
/* B1 안내 창: 폭이 화면 반쪽에 갇혀 4~5줄로 끊기지 않게 — 글 길이만큼, 화면 폭 - 32px 까지 */
.toasts { width: max-content; max-width: calc(100vw - 32px); }
.toast { max-width: 100%; word-break: keep-all; overflow-wrap: anywhere; }
/* B3 실시간 데이터 순위 표: 긴 영문 이름이 표를 밀어 펀딩비 · 현재가가 화면 밖으로 가지 않게(이름 칸 폭 제한 · 말줄임, 영문은 먼저 줄어듦) */
.dsym b { flex: 0 1 auto; white-space: nowrap; }
.dsym small { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container (max-width: 720px) {
  .dsym { max-width: calc(170px * var(--fz)); }
}
@container (max-width: 480px) {
  .dsym { max-width: calc(118px * var(--fz)); }
  .dsym small { display: none; }
  .dtable td, .dtable th { padding-left: 6px; padding-right: 6px; }
}
/* 아주 좁은 칸(폴드 접힘 · 「가」 아주 크게): 이름 칸을 글자 배율과 상관없이 묶고 말줄임, 숫자 칸 글자는 한 단계 작게 — 펀딩비 · 현재가가 칸 안에 들어오게(11-26 메인 확인) */
@container (max-width: 480px) {
  html[data-fs="lg"] .dsym, html[data-fs="xl"] .dsym { max-width: 96px; }
  html[data-fs="lg"] .dsym b, html[data-fs="xl"] .dsym b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  html[data-fs="lg"] .dtable .dcol-num, html[data-fs="xl"] .dtable .dcol-num { font-size: var(--fs-sm); }
  html[data-fs="xl"] .dtable .dcol-n { display: none; }
  html[data-fs="lg"] .dtable td, html[data-fs="lg"] .dtable th, html[data-fs="xl"] .dtable td, html[data-fs="xl"] .dtable th { padding-left: 4px; padding-right: 4px; }
}
/* B4 공포지수 봉 단추: 글자를 키우면 한 줄에 다 못 놓음 → 두 줄로(화면 밖으로 숨지 않게) */
@media (max-width: 600px) {
  :root[data-fs="lg"] .fear-iv, :root[data-fs="xl"] .fear-iv { flex-wrap: wrap; overflow: visible; }
}
/* B5 경제 이벤트 「발표마다」 표: 좁은 칸에서는 표만 옆으로 밀어 봄 · 머리글은 두 줄까지 */
.econ-rows-wrap { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.econ-rows thead th { white-space: normal; word-break: keep-all; vertical-align: bottom; line-height: 1.25; }
/* B7 「준비 중」 작은 글씨 10px → 12px */
.dnav-soon small { font-size: var(--fs-sm); }
/* B11 지수 옆 목록: 긴 이름(필라델피아 반도체)은 잘리지 않고 두 줄로 · 좁은 화면은 작은 선 그림을 조금 좁게 */
.idx-side-name { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 600px) {
  .idx-side-item { grid-template-columns: minmax(0, 1fr) 64px auto; }
  .idx-spark { width: 64px; }
}
/* B2 · B14 아주 좁은 화면의 머리줄: 이름 단추는 짧게(로고 줄에 같이 들어가게), 「가」 아주 크게면 머리줄 단추만 1.2배까지 */
@media screen and (max-width: 480px) {
  #login-btn.is-member { max-width: min(calc(72px * var(--fz)), 88px); padding: 0 var(--s2); }
  :root[data-fs="xl"] .top { column-gap: 6px; }
  :root[data-fs="xl"] .top .btn { height: calc(32px * 1.2); }
  :root[data-fs="xl"] .top .btn-notice, :root[data-fs="xl"] .top .btn-theme, :root[data-fs="xl"] .top .btn-font, :root[data-fs="xl"] .top .btn-lang { min-width: calc(32px * 1.2); padding: 0 6px; font-size: calc(16px * 1.2); }
  :root[data-fs="xl"] .top .btn-notice .ntc-btn-ico { width: calc(17px * 1.2); height: calc(17px * 1.2); }
  :root[data-fs="xl"] #login-btn { padding: 0 10px; font-size: calc(13px * 1.2); }
}
/* B13 · B18 · B3 · B5 · B11 옆으로 밀어 보는 줄 · 표: 더 있는 쪽 끝만 흐리게(data-sh 는 js/util/scroll-hint.js 가 붙임 — 넘치지 않으면 흐림 없음) */
:root [data-sh][data-sh="0"] { -webkit-mask-image: none; mask-image: none; }
:root [data-sh][data-sh="r"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
:root [data-sh][data-sh="l"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
:root [data-sh][data-sh="lr"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
/* B19 검색기 맨 위 큰 묶음 카드: 접은 폴드 · 태블릿 세로에서 카드가 반쪽만 차지하지 않게, 「외 N종목 …」 은 낱말째 줄바꿈 */
@media (max-width: 860px) { .scr-feature .scr-cards { grid-template-columns: minmax(0, 1fr); } }
.scr-more { word-break: keep-all; }
/* B20 꼬리말: 펼친 폴드 · 태블릿 세로(601~860px)에서는 저작권 글이 잘리지 않고 다음 줄로 */
@media (min-width: 601px) and (max-width: 860px) {
  .foot { flex-wrap: wrap; overflow-x: visible; white-space: normal; }
  .foot > span { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
}
/* B21 공지 창 아래 출처 줄: 휴대폰에서 끝이 잘리지 않게 줄바꿈 · 로그인 실패 · 한도 안내는 경고 색 상자로 */
@media (max-width: 720px) { .ntc-foot { white-space: normal; overflow-x: visible; overflow-wrap: anywhere; } }
.login-page .login-lead[data-tone="warn"] { padding: var(--s2) var(--s3); border: 1px solid var(--warn); border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-weight: 700; }

/* 22단계 B: 화면·공통 손가락 크기 */
@media (pointer: coarse) {
  /* B6 태블릿 가로(넓은 화면)도 휴대폰처럼: 순서 단추 · 표 종목 · 항목 단추 */
  .seg-btn { height: max(34px, calc(30px * var(--fz))); padding: 0 var(--s3); }
  .dsym { min-height: 38px; align-items: center; }
  .hmover { height: max(38px, calc(34px * var(--fz))); }
  .dnav-btn { height: max(40px, calc(36px * var(--fz))); }
  /* B8 「읽는 법」 · 「쓰는 법」 · 「지난 발표 때 반응 보기」 · 「접기」: 손가락 높이 */
  .fear-read summary { padding: 10px 0; }
  .econ-toggle { display: inline-flex; align-items: center; min-height: 40px; }
  /* B13 위 메뉴 글씨 단추 */
  .nav a { display: inline-flex; align-items: center; min-height: 36px; }
  /* B15 글 속 링크(지원 약관 · 개인정보, 로그인 화면, 내 정보 「권한을 받는 방법」) */
  .doc-back a, .help-doc-list a, .acct-link, .login-links a, .login-back a { display: inline-flex; align-items: center; min-height: 40px; }
  /* B16 포착 탭 🔔 · ☆, 안내 ×, 검색기 「🔔 알림」, 종목 줄 */
  .scan-ico { width: max(40px, calc(28px * var(--fz))); height: max(40px, calc(28px * var(--fz))); }
  .scan-tip-x { width: max(40px, calc(28px * var(--fz))); height: max(40px, calc(28px * var(--fz))); }
  .scan-ico.scr-bell { width: auto; height: auto; min-height: 40px; }
  .scan-item { min-height: max(40px, calc(28px * var(--fz))); }
}

/* 22단계 A: 차트·그리기 손가락 크기 */
/* A5 매매법만 켜고 지표가 없으면 「지표 N」 자리에 빈 네모가 남던 것 → 글이 없으면 숨김 */
.pane .pane-ind .ind-count:empty { display: none; }
/* A6 넓은 칸이라도 꼬리표가 칸 폭을 넘치면(chart-pane.js 가 .is-crowded) 좁은 칸처럼 「지표 N」 — 누르면 줄을 바꿔 꼬리표 · × 까지 전부 */
.pane.is-crowded .ind-tags, .pane.is-crowded .ind-note { display: none; }
.pane.is-crowded .ind-count { display: inline-block; }
.pane.is-crowded .pane-ind.is-open { flex-wrap: wrap; white-space: normal; overflow: visible; }
.pane.is-crowded .pane-ind.is-open .ind-tags, .pane.is-compact .pane-ind.is-open .ind-tags { display: flex; flex: 1 1 100%; flex-wrap: wrap; min-width: 0; }
.pane.is-crowded .pane-ind.is-open .ind-note { display: inline-flex; }
/* 펼친 동안: 「지표 N」 은 제자리(맨 앞)에 남아 다시 누르면 접히고, 펼친 꼬리표는 아래 줄(상태 문구 · [값])보다 위에 */
.pane.is-crowded .pane-ind.is-open, .pane.is-compact .pane-ind.is-open { z-index: 6; }
.pane.is-crowded .pane-ind.is-open .ind-count, .pane.is-compact .pane-ind.is-open .ind-count { order: -1; }
/* A3 좁은 칸의 설정 띠: 한 줄(「색」 동그라미 · 굵기 · 점선 · 잠금 · 삭제) — 「색」을 누르면 그 아래 색 8가지 줄. 띠가 좁으면 「삭제」 글은 숨기고 휴지통만 */
.dfb-color { display: none; }
.dfb-cur { display: block; width: calc(22px * var(--fz)); height: calc(22px * var(--fz)); border: 2px solid var(--raised); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.draw-float.is-dock { gap: 4px; padding: 4px 6px; container-type: inline-size; }
.draw-float.is-dock .dfb-color { display: inline-flex; }
.draw-float.is-dock .dfb-color[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.draw-float.is-dock .dfb-colors { display: none; }
.draw-float.is-dock.is-colors .dfb-colors { display: flex; order: 10; flex: 1 0 100%; justify-content: space-between; padding: 2px 2px 0; }
.draw-float.is-dock .dfb-sw { width: calc(28px * min(var(--fz), 1.15)); height: calc(28px * min(var(--fz), 1.15)); }
.draw-float.is-dock .dfb-w, .draw-float.is-dock .dfb-btn { width: 38px; height: 38px; }
.draw-float.is-dock .dfb-btn[data-st="del"] { width: auto; min-width: 38px; }
/* 띠가 넓으면(넓은 휴대폰 · 「가」 크게) 단추도 글자 크기를 따라 조금 크게 — 좁은 띠(360 아주 크게)는 38px 로 한 줄을 지킴 */
@container (min-width: 401px) {
  .draw-float.is-dock .dfb-w, .draw-float.is-dock .dfb-btn { width: calc(38px * min(var(--fz), 1.15)); height: calc(38px * min(var(--fz), 1.15)); }
  .draw-float.is-dock .dfb-btn[data-st="del"] { width: auto; min-width: calc(38px * min(var(--fz), 1.15)); }
}
@container (max-width: 400px) {
  .draw-float.is-dock .dfb-del-text { display: none; }
  .draw-float.is-dock .dfb-btn[data-st="del"] { padding: 0; }
}
/* A12 손가락 기기: 그리기 단추 이름 말풍선이 손을 뗀 뒤에도 남던 것(:hover 가 남음) → 마우스가 없는 기기는 키보드로 갔을 때만 */
@media (hover: none) {
  .draw-btn[data-tip]:hover:not(:focus-visible)::after { display: none; }
}
/* A16 태블릿 · 좁은 PC(601~1100px): 「화면 분할」 글자는 숨겨(읽어 주는 이름은 남김) 「마법사 ▾」가 둘째 줄로 내려가 차트 높이를 먹지 않게 */
@media (min-width: 601px) and (max-width: 1100px) {
  .bar.tools > .split-btn > span:nth-child(2) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bar.tools .bar-chips .chip { padding-left: var(--s2); padding-right: var(--s2); }
  .bar-main .sep { display: none; }
}
/* A11 아주 좁은 화면 + 「가」 아주 크게: 24시간 고가 · 저가 · 거래대금을 가격 아래 한 줄(넘치면 두 줄)로 — 오른쪽 좁은 칸에서 「2..」「저.」로 잘리던 것 */
@media (max-width: 420px) {
  :root[data-fs="xl"] .bar.info { grid-template-columns: minmax(0, 1fr); }
  :root[data-fs="xl"] .info-stats { display: flex; flex-wrap: wrap; justify-self: stretch; gap: 0 var(--s3); }
  :root[data-fs="xl"] .info-stats .info-item { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
}
/* A18 좁은 화면(860 이하): 「시세 받기를 잠시 쉬고 있어요」 띠는 겹쳐 띄우지 않고 머리줄 바로 아래 한 줄로 — 아래 고정이면 「차트 읽기」 · 옆 칸 탭 · 시세 띠를 덮음 */
@media (max-width: 860px) {
  .banner {
    position: static; max-width: none; padding: 2px var(--s3); border: 0; border-bottom: 1px solid var(--warn); border-radius: 0;
    background: var(--warn-soft); box-shadow: none; text-align: center;
  }
}
@media (max-width: 600px) {
  /* A15 그리기 판이 열려 있으면 안내(「그린 것 1개를 지웠어요 · 되돌리기」)는 판 위쪽(화면 맨 위)에 — 판 아래 줄을 가리지 않게 */
  :root:has(.draw-box.is-open) .toasts { top: calc(var(--s2) + env(safe-area-inset-top)); bottom: auto; z-index: 80; }
  /* A17 그리기 판 도구 이름: 한 줄에서 잘리지 않게 두 줄까지 */
  .draw-box.is-open .draw-fly .draw-item-name {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.2;
  }
  /* A19 지표 창 아래 안내 글: 두 줄에서 잘리지 않고 전부(단추는 그 아래 줄 오른쪽), 왼쪽 묶음 줄(즐겨찾기 등)은 오른쪽 끝을 흐리게 — 밀어 보면 더 있음 */
  .ind-panel.is-big .ind-foot { flex-wrap: wrap; }
  .ind-panel.is-big .ind-foot .ind-remote-note { display: block; flex: 1 1 100%; overflow: visible; -webkit-line-clamp: none; }
  .ind-nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .ind-nav::after { content: ""; flex: 0 0 20px; }
}
/* 매매법 판 머리(제목 + ×): 판 안 여백은 판이 이미 가짐 */
.method-panel .method-head { padding: 0; }
@media (pointer: coarse) {
  /* A2 iOS 는 16px 보다 작은 입력칸을 누르면 화면을 저절로 확대함 → 글자 칸은 16px 이상 */
  .draw-text-input, .input, .ind-search { font-size: max(16px, var(--fs)); }
  /* A13 누르는 자리 키우기 — 차트 위에 떠 있는 것은 보이는 크기는 그대로 두고 눌리는 자리만 넓힘 */
  .cross-add { width: max(44px, calc(30px * var(--fz))); height: max(44px, calc(30px * var(--fz))); font-size: calc(22px * var(--fz)); }
  .wiz-pill { height: max(36px, calc(28px * var(--fz))); border-radius: 18px; }
  .pane-legend { top: calc(var(--s1) - 10px); padding-top: 10px; padding-bottom: 6px; }
  .pane-title {
    padding-top: 10px; padding-bottom: 6px; margin-top: -10px; margin-bottom: -6px;
    background: linear-gradient(var(--veil), var(--veil)) no-repeat 0 10px / 100% calc(100% - 16px);
  }
  .pane-ind { top: calc(26px * var(--fz) - 6px); padding-top: 6px; padding-bottom: 6px; }
  .ind-count, .ind-tag-x, .method-x, .method-warn-btn { position: relative; }
  .ind-count::after, .ind-tag-x::after, .method-x::after, .method-warn-btn::after { content: ""; position: absolute; inset: -6px -2px; }
  .info-find { padding-top: 7px; padding-bottom: 7px; margin-top: -7px; margin-bottom: -7px; }
  .bar-more { min-width: 44px; justify-content: center; }
  .bar-chips .chip { min-width: 44px; }
  .ind-howto summary { padding: 10px 0; }
  .ind-close { min-width: 44px; min-height: 44px; }
}
/* A4 손가락 태블릿(601px 이상): 왼쪽 그리기 줄 단추 · 「더 보기」 삼각형 · 묶음 판 줄 · 설정 띠를 손가락 크기로.
   세로 줄이 차트 영역 밖으로 넘치지 않게 단추 높이는 차트 영역 높이에 맞춰 28~44px(가로 아이패드 · 펼친 폴드는 약 35px) */
@media (pointer: coarse) and (min-width: 601px) {
  /* 세로 줄 높이(= 차트 영역 높이)를 단추 크기의 기준으로(cqh) — 단추 14개 + 사이 여백이 줄 안에 들어가게 */
  .draw-box { width: calc(52px * var(--fz)); container-type: size; }
  .draw-btn { width: 44px; height: clamp(28px, calc((100cqh - 64px) / 14), 44px); }
  .draw-more { right: -7px; width: 16px; height: 24px; opacity: 0.85; }
  .draw-more-ico { width: 7px; height: 10px; }
  .draw-item { height: auto; min-height: 44px; }
  .draw-float:not(.is-dock) .dfb-sw { width: 34px; height: 34px; }
  .draw-float:not(.is-dock) .dfb-w, .draw-float:not(.is-dock) .dfb-btn { width: 44px; height: 44px; }
}

/* ── 25단계 아래 칸 분석 도구 ── */
/* 본 차트 · 아래 칸 사이 경계 손잡이(ui/pane-grip.js): 자리(top)는 chart-pane.js 가 넣음. 가격 눈금 위에는 놓지 않음(눈금 끌기는 그대로) */
.pane-grips { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.sub-grip {
  position: absolute; left: 0; right: var(--axis-w, 56px); height: 12px; transform: translateY(-50%);
  pointer-events: auto; cursor: row-resize; touch-action: none; user-select: none; -webkit-user-select: none;
}
.sub-grip::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1px; border-radius: 2px; background: transparent; }
/* 손잡이 모양(선만이 아니라 잡는 곳이 보이게 — 선생님 11-26): 오른쪽 끝(가격 눈금 앞) 둥근 막대 + 두 줄 홈 — 왼쪽의 이름표 · 단추와 겹치지 않게 */
.sub-grip::before {
  content: ""; position: absolute; right: 12px; top: 50%; width: 44px; height: 10px; margin: -5px 0 0 0;
  border-radius: 5px; border: 1px solid var(--line); background-color: var(--raised);
  background-image: linear-gradient(var(--muted), var(--muted)), linear-gradient(var(--muted), var(--muted));
  background-size: 22px 1px, 22px 1px; background-position: center 3px, center 6px; background-repeat: no-repeat;
  opacity: 0.9;
}
.sub-grip:hover::after, .sub-grip.is-dragging::after, .sub-grip:focus-visible::after { background: var(--accent); }
.sub-grip:hover::before, .sub-grip.is-dragging::before, .sub-grip:focus-visible::before { opacity: 1; border-color: var(--accent); }
.sub-grip:focus-visible { outline: none; box-shadow: none; }
.pane.is-sub-resizing .pane-chart { pointer-events: none; }
.pane.is-sub-resizing, .pane.is-sub-resizing * { cursor: row-resize; }
/* 손가락: 누르는 자리 44px, 가운데 작은 손잡이를 늘 흐리게 보여 끌 수 있는 곳임을 알림 */
@media (pointer: coarse) {
  .sub-grip { height: 44px; }
  .sub-grip::before { width: 56px; height: 14px; margin: -7px 0 0 0; border-radius: 7px; background-position: center 4px, center 8px; background-size: 28px 2px, 28px 2px; }
}
/* 지표 창의 도구 단추 줄(그 지표 줄 아래): 고점·저점 · 역대 · 추세선 */
.ind-tools { display: flex; flex-wrap: wrap; gap: var(--s1); margin-left: calc(var(--ctl-h) + var(--s1) + var(--s3)); }
.ind-tool {
  min-height: calc(var(--row-h) - 6px); padding: 0 var(--s3); font-size: var(--fs-sm); white-space: nowrap;
  background: transparent; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted);
}
.ind-tool:hover { color: var(--text); border-color: var(--muted); }
.ind-tool[aria-pressed="true"] { color: var(--text); background: var(--accent-soft); border: 1px solid var(--accent); font-weight: 700; }
.ind-tool[aria-pressed="true"]::before { content: "✓ "; }
@media (max-width: 600px) { .ind-tools { margin-left: var(--s4); } }
@media (pointer: coarse) { .ind-tool { min-height: 44px; } }
/* 아래 칸 이름표 뒤 단추(「크게 보기」 · 「자동」): 이름표 층은 눌리지 않으므로 단추만 눌리게 */
.pane-sub { align-items: center; }
.sub-btn {
  pointer-events: auto; height: calc(20px * var(--fz)); padding: 0 6px; font-size: var(--fs-sm); line-height: 1; white-space: nowrap;
  background: var(--veil); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted);
}
.sub-btn:hover { color: var(--text); border-color: var(--muted); }
.sub-big[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.sub-auto { color: var(--text); border-style: dashed; border-color: var(--accent); }
.sub-auto[aria-expanded="true"] { background: var(--accent-soft); }
@media (pointer: coarse) {
  .sub-btn { position: relative; }
  .sub-btn::after { content: ""; position: absolute; left: -4px; right: -4px; top: -12px; bottom: -12px; }
}
/* 「자동」 판: 이름표 바로 아래 */
.auto-menu {
  position: absolute; left: var(--s2); z-index: 6; min-width: 220px; max-width: calc(100% - var(--s2) * 2 - var(--axis-w, 56px));
  display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  font-size: var(--fs-sm); color: var(--text);
}
.auto-menu[hidden] { display: none; }
.auto-menu-title { margin: 0; font-weight: 700; }
.auto-menu-empty { margin: 0; color: var(--muted); }
.auto-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.auto-row.is-hidden .auto-name { color: var(--muted); text-decoration: line-through; }
.auto-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-act, .auto-all { flex: none; min-height: calc(var(--row-h) - 6px); font-size: var(--fs-sm); }
@media (pointer: coarse) { .auto-act, .auto-all { min-height: 44px; } }

/* 종목 찾기 바텀 시트(11-26) — 사장님 추가 지시("최대한 바이낸스 모바일 버전을 따라서")로 휴대폰은 왼쪽에서 밀려 나오는 서랍(ui/symbol-popover.js · ui/sym-drawer.js).
   폭 88%(최대 480px) · 높이 전체 · 오른쪽 틈은 어둡게(누르면 닫힘) · 왼쪽으로 밀면 닫힘. 열어도 찾기 칸에 초점을 안 줌(키보드는 찾기 칸을 눌렀을 때만).
   키보드가 올라오면 --sympop-vh · --sympop-top(visualViewport)로 보이는 만큼만. 태블릿 · PC(601px 이상)는 위의 가운데 창 그대로. */
.sympop-recent[hidden], .sympop-dcols[hidden], .sympop-subs[hidden], .sympop-tab[hidden] { display: none; }
.sympop-back.is-drawer { padding: 0; align-items: stretch; justify-content: flex-start; background: var(--sheet-back); }
.sympop.is-drawer {
  --sp-logo: calc(24px * var(--fz)); --sp-price: calc(80px * var(--fz)); --sp-pct: calc(68px * var(--fz)); --sp-star: calc(30px * var(--fz)); --sp-gap: var(--s2);
  position: absolute; left: 0; top: var(--sympop-top, 0px);
  width: min(88%, 480px); height: var(--sympop-vh, 100%);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  border: 0; border-right: 1px solid var(--line); border-radius: 0 12px 12px 0; box-shadow: var(--shadow);
  touch-action: pan-y; outline: none;
  animation: sympop-in 0.2s ease-out;
}
.sympop.is-drawer:not(.is-pulling) { transition: translate 0.15s ease-out; }
.sympop.is-drawer.is-pulling { animation: none; transition: none; }
@keyframes sympop-in { from { translate: -100% 0; } to { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sympop.is-drawer, .sympop.is-drawer:not(.is-pulling) { animation: none; transition: none; } }
.sympop.is-drawer .sympop-head, .sympop.is-drawer .sympop-cols, .sympop.is-drawer .sympop-tip, .sympop.is-drawer .sympop-esc { display: none; }
.sympop.is-drawer:not(.is-stock) .sympop-foot { display: none; }
.sympop.is-drawer .sympop-search {
  margin: var(--s3) var(--s3) var(--s2); height: calc(40px * var(--fz)); padding: 0 var(--s3);
  background: var(--raised); border-color: transparent; border-radius: 8px;
}
.sympop.is-drawer .sympop-search:focus-within { border-color: var(--accent); }
/* 최근 본 종목: 찾기 칸 바로 아래 얇은 칩 줄(옆으로 밀어 더 봄). 칩은 32px, 누르는 자리는 위아래로 넓혀 44px */
.sympop-recent {
  flex: none; display: flex; align-items: center; gap: var(--s1); padding: 0 var(--s3) var(--s2);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.sympop-recent::-webkit-scrollbar { display: none; }
.sympop-recent-label { flex: none; margin-right: 2px; color: var(--muted); font-size: var(--fs-sm); }
.sympop-chip {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px;
  min-height: calc(32px * var(--fz)); padding: 0 var(--s2) 0 5px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); font: inherit; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer;
}
.sympop-chip::after { content: ""; position: absolute; inset: -6px 0; }
.sympop-chip:active { background: var(--accent-soft); }
.sympop-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sympop-chip b { font-weight: 700; }
.sym-logo.sympop-chip-logo { width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); letter-spacing: -1px; }
.sympop-chip-pct { font-variant-numeric: tabular-nums; }
.sympop-chip-pct.is-up { color: var(--up); }
.sympop-chip-pct.is-down { color: var(--down-text); }
.sympop-chip-pct.is-flat { color: var(--muted); }
/* 탭: 즐겨찾기 ★ · 전체 · 코인 · 미국 주식 */
.sympop.is-drawer .sympop-tabs { gap: var(--s4); padding: 0 var(--s3); }
.sympop.is-drawer .sympop-tab { min-height: 44px; font-size: var(--fs-lg); }
.sympop-tab-star { margin-right: 3px; color: var(--accent); }
/* 찾는 동안은 탭과 상관없이 전체에서 찾음 — 눌린 탭 표시를 흐리게(글을 지우면 원래대로) */
.sympop.is-drawer.is-searching .sympop-tab[aria-pressed="true"] { color: var(--muted); border-bottom-color: var(--line); }
/* 세 칸 머리(누르면 정렬 ▼ ▲) */
.sympop-dcols {
  position: sticky; top: 0; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--sp-price) var(--sp-pct) var(--sp-star); column-gap: var(--sp-gap);
  padding: 0 0 0 var(--s2); background: var(--panel); border-bottom: 1px solid var(--line);
}
.sympop-dcol {
  display: flex; align-items: center; justify-content: flex-end; gap: 2px; min-width: 0; min-height: 40px; padding: 0;
  background: transparent; border: 0; color: var(--muted); font: inherit; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer;
}
.sympop-dcol:first-child { justify-content: flex-start; }
.sympop-dcol span { overflow: hidden; text-overflow: ellipsis; }
.sympop-dcol[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.sympop-dcol:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sympop-dir { flex: none; font-style: normal; font-size: var(--fs-sm); }
/* 줄: [로고 | 기호 · 이름 / 거래대금 | 현재가 | 등락률 알약] ★ — 48px */
/* 목록(스크롤 칸)에도 pan-y — 스크롤 칸 안에서는 바깥의 touch-action 이 안 이어져, 이것이 없으면 옆으로 밀 때 브라우저가 포인터를 끊음 */
.sympop.is-drawer .sympop-body { padding: 0 var(--s1) var(--s2); touch-action: pan-y; }
.sympop.is-drawer .sympop-tabs { touch-action: pan-y; }
.sympop.is-drawer .sympop-group { padding: var(--s2) var(--s2) 2px; }
.sympop.is-drawer .sympop-row { border-radius: 6px; }
.sympop.is-drawer .sympop-row:hover, .sympop.is-drawer .sympop-row.is-sel { background: transparent; }
.sympop.is-drawer:has(.sympop-input:focus) .sympop-row.is-sel { background: var(--raised); }
.sympop.is-drawer .sympop-row.is-current { background: var(--accent-soft); }
.sympop.is-drawer .sympop-main {
  min-height: calc(48px * var(--fz)); padding: 3px 0 3px var(--s2);
  grid-template-columns: var(--sp-logo) minmax(0, 1fr) var(--sp-price) var(--sp-pct); grid-template-rows: auto auto;
  column-gap: var(--sp-gap); row-gap: 0;
}
.sympop.is-drawer .sympop-main:active { background: var(--raised); }
.sympop.is-drawer .sympop-logo { grid-column: 1; grid-row: 1 / 3; }
.sympop.is-drawer .sympop-name { grid-column: 2; grid-row: 1; align-self: end; }
.sympop.is-drawer .sympop-sym { font-size: 0.9375rem; }
.sympop.is-drawer .sympop-ko { color: var(--muted); font-size: var(--fs-sm); }
.sympop.is-drawer .sympop-en { display: none; }
.sympop.is-drawer .sympop-vol { display: block; grid-column: 2; grid-row: 2; align-self: start; text-align: left; color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; }
.sympop.is-drawer .sympop-vol i { display: inline; font-size: inherit; }
.sympop.is-drawer .sympop-price { grid-column: 3; grid-row: 1 / 3; font-size: 0.9375rem; font-weight: 600; text-overflow: ellipsis; }
.sympop.is-drawer .sympop-pct {
  grid-column: 4; grid-row: 1 / 3; display: flex; align-items: center; justify-content: center;
  min-height: calc(30px * var(--fz)); padding: 0 4px; border-radius: 6px;
  background: var(--flat); color: var(--on-danger); font-size: var(--fs); font-weight: 700;
}
.sympop.is-drawer .sympop-pct.is-up { background: var(--up); color: var(--on-danger); }
.sympop.is-drawer .sympop-pct.is-down { background: var(--down); color: var(--on-danger); }
.sympop.is-drawer .sympop-pct.is-flat { background: var(--flat); color: var(--on-danger); }
.sympop.is-drawer .sympop-star { width: var(--sp-star); font-size: 1rem; }
/* 크게 · 아주 크게: 로고를 빼고 칸 폭을 줄여 기호 칸을 지킴 */
:root[data-fs="lg"] .sympop.is-drawer, :root[data-fs="xl"] .sympop.is-drawer { --sp-price: calc(70px * var(--fz)); --sp-pct: calc(58px * var(--fz)); --sp-star: calc(26px * var(--fz)); --sp-gap: 6px; width: min(92%, 520px); }
:root[data-fs="lg"] .sympop.is-drawer .sympop-logo, :root[data-fs="xl"] .sympop.is-drawer .sympop-logo { display: none; }
:root[data-fs="lg"] .sympop.is-drawer .sympop-main, :root[data-fs="xl"] .sympop.is-drawer .sympop-main { grid-template-columns: minmax(0, 1fr) var(--sp-price) var(--sp-pct); }
:root[data-fs="lg"] .sympop.is-drawer .sympop-name, :root[data-fs="lg"] .sympop.is-drawer .sympop-vol, :root[data-fs="xl"] .sympop.is-drawer .sympop-name, :root[data-fs="xl"] .sympop.is-drawer .sympop-vol { grid-column: 1; }
:root[data-fs="lg"] .sympop.is-drawer .sympop-price, :root[data-fs="xl"] .sympop.is-drawer .sympop-price { grid-column: 2; }
:root[data-fs="lg"] .sympop.is-drawer .sympop-pct, :root[data-fs="xl"] .sympop.is-drawer .sympop-pct { grid-column: 3; }
:root[data-fs="xl"] .sympop.is-drawer .sympop-ko { display: none; }
:root[data-fs="xl"] .sympop.is-drawer .sympop-vol i { display: none; }
/* 크게 · 아주 크게: 즐겨찾기 탭은 ★ 만(이름은 읽어 주기로) — 네 탭이 한 줄에 들어가게 */
:root[data-fs="lg"] .sympop.is-drawer .sympop-tab-name, :root[data-fs="xl"] .sympop.is-drawer .sympop-tab-name {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
:root[data-fs="lg"] .sympop.is-drawer .sympop-tab-star, :root[data-fs="xl"] .sympop.is-drawer .sympop-tab-star { margin-right: 0; }
.sympop.is-drawer .sympop-tabs { scrollbar-width: none; }
.sympop.is-drawer .sympop-tabs::-webkit-scrollbar { display: none; }
/* 첫 칸 머리(종목/거래대금)는 좁으면 「/」 뒤에서 두 줄로 */
.sympop-dcol:first-child { text-align: left; }
.sympop-dcol:first-child span { white-space: normal; word-break: keep-all; line-height: 1.15; }
/* 찾기 칸: 바깥 테두리 하나만(안쪽 칸의 초점 테두리는 겹치지 않게) */
.sympop .sympop-input:focus, .sympop .sympop-input:focus-visible { outline: none; box-shadow: none; border: 0; }

/* ══════════ 26단계: 차트 위 표시 설명 카드 · 「쓰는 법」 ⓘ ══════════ */
/* 차트 위 작은 카드(이름 · 낱말 하나): 눌리지 않음(차트 끌기 · 확대 · 그리기를 막지 않음), 반투명 바탕, 칸 밖으로 안 나감(자리는 코드가 맞춤) */
.chart-hint {
  position: absolute; z-index: 8; pointer-events: none; max-width: min(calc(260px * var(--fz)), calc(100% - 8px));
  display: flex; flex-direction: column; gap: 1px; padding: 3px var(--s2);
  background: var(--veil); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); font-size: var(--fs-sm); line-height: 1.35; word-break: keep-all;
}
.chart-hint[hidden] { display: none; }
.chart-hint-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 5px; }
.chart-hint-title { font-variant-numeric: tabular-nums; }
.chart-hint-word { color: var(--accent); font-weight: 700; }
.chart-hint-title + .chart-hint-word::before { content: "·"; margin-right: 5px; color: var(--muted); font-weight: 400; }
.chart-hint.is-touch { font-size: var(--fs); padding: var(--s1) var(--s2); }

/* ⓘ 단추: 줄 오른쪽 끝의 작은 동그라미(손가락 화면에서는 누르는 자리를 키움) */
.how-btn {
  flex: none; align-self: center; display: inline-flex; align-items: center; justify-content: center;
  width: calc(26px * var(--fz)); height: calc(26px * var(--fz)); padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: 50%; color: var(--muted); font-size: var(--fs-lg); line-height: 1;
}
.how-btn:hover { color: var(--text); background: var(--panel); }
.how-btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.how-btn:focus-visible { outline: none; box-shadow: var(--focus); }
@media (pointer: coarse) { .how-btn { width: 44px; height: 44px; } }
.method-item { display: flex; align-items: stretch; gap: var(--s1); }
.method-item > .method-row { flex: 1; min-width: 0; }
.wiz-what-row { display: flex; align-items: center; gap: var(--s1); }
.wiz-what-row .wiz-what { flex: 1; min-width: 0; }

/* 3줄 카드: 넓은 화면은 그 줄 바로 아래에 펼쳐짐(판 안) */
.how-card {
  display: flex; flex-direction: column; gap: var(--s2); margin: 2px 0 var(--s1); padding: var(--s2) var(--s3);
  background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); color: var(--text);
  font-size: var(--fs-sm); line-height: var(--lh); word-break: keep-all;
}
.how-card[hidden] { display: none; }
.how-card:focus-visible { outline: none; box-shadow: var(--focus); }
.how-head { display: flex; align-items: center; gap: var(--s2); }
.how-title { flex: 1; min-width: 0; font-size: var(--fs); }
.how-x {
  flex: none; width: var(--ctl-h); height: var(--ctl-h); padding: 0; background: transparent; border: 1px solid transparent;
  border-radius: var(--radius); color: var(--muted); font-size: var(--fs-lg);
}
.how-x:hover { color: var(--text); background: var(--raised); }
.how-rows { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); }
.how-rows dt { color: var(--muted); white-space: nowrap; }
.how-rows dd { margin: 0; }
.how-soon { margin: 0; color: var(--muted); }
.how-go { align-self: flex-start; display: inline-flex; align-items: center; text-decoration: none; }
.how-foot { margin: 0; padding-top: var(--s1); border-top: 1px solid var(--line); color: var(--muted); }
/* 좁은 판(매매법 · 마법사 고르기)에서는 이름표 · 글을 위아래로 */
.method-panel .how-rows, .wiz-menu .how-rows { grid-template-columns: 1fr; gap: 0; }
.method-panel .how-rows dd + dt, .wiz-menu .how-rows dd + dt { margin-top: var(--s1); }
.wiz-menu .how-card { width: min(calc(300px * var(--fz)), calc(100vw - 32px)); }

/* 휴대폰: 같은 카드가 화면 아래에서 올라오는 판(판 위에 한 겹 더) */
@media (max-width: 600px) {
  .how-card {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; margin: 0; max-height: 70vh; overflow-y: auto; max-width: none !important;
    padding: var(--s4) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom));
    background: var(--raised); border: 1px solid var(--line); border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28); animation: sheet-up 0.18s ease-out; font-size: var(--fs);
  }
  .wiz-menu .how-card { width: auto; }
  .how-card::before { content: ""; align-self: center; width: 36px; height: 4px; border-radius: 2px; background: var(--line); }
  .how-rows { grid-template-columns: 1fr; gap: 0; }
  .how-rows dd + dt { margin-top: var(--s2); }
  .how-x { width: 44px; height: 44px; }
  .how-go { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .how-card { animation: none; } }
@media (max-width: 600px) {
  /* 26단계 점검: 아이콘 줄의 흐림(mask)이 그 안에서 아래로 띄우는 「마법사 고르기」 판(+ 「쓰는 법」 카드)까지 가려 휴대폰에서 판이 보이지도 눌리지도 않던 것 — 판이 열려 있는 동안만 흐림을 끔 */
  .m-tools:has(.wiz-menu:not([hidden])) { -webkit-mask-image: none; mask-image: none; }
}

/* ══════════ 30단계: PC 차트 다듬기 — 거래량 칸 · 칸 순서 · 공포지수 범례 · 차트 맞춤 ══════════ */
/* 아래 칸 이름표 뒤 단추: 「?」(색 보기) · ▲▼(칸 순서) · ×(거래량 끄기) — 크기는 「크게 보기」와 같은 작은 단추 */
.sub-btn[hidden] { display: none; }
.sub-help { width: calc(20px * var(--fz)); padding: 0; border-radius: 50%; font-weight: 700; color: var(--text); }
.sub-help[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.sub-move { width: calc(20px * var(--fz)); padding: 0; font-size: calc(var(--fs-sm) * 0.85); }
.sub-x { width: calc(20px * var(--fz)); padding: 0; }
/* 거래량 칸 이름표: 바이낸스 · 트뷰처럼 이름 · 값만 흐리게(지표 칸보다 덜 눈에 띄게) */
.pane-sub.is-vol b { font-weight: 600; color: var(--muted); }
.pane-sub.is-vol .sub-value { color: var(--text); font-variant-numeric: tabular-nums; }
/* 공포지수 색 범례 판(이름표 바로 아래 — 「자동」 판과 같은 자리 · 모양) */
.sub-legend { min-width: calc(200px * var(--fz)); max-width: min(calc(300px * var(--fz)), calc(100% - var(--s2) * 2 - var(--axis-w, 56px))); }
.sub-legend-head { display: flex; align-items: center; gap: var(--s2); }
.sub-legend-head .auto-menu-title { flex: 1; min-width: 0; }
.sub-legend-head .how-x { width: calc(28px * var(--fz)); height: calc(28px * var(--fz)); }
.sub-legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sub-legend-list li { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs); }
.sub-legend-dot { flex: none; width: calc(22px * var(--fz)); height: 4px; border-radius: 2px; }
.sub-legend-note { margin: 0; color: var(--muted); word-break: keep-all; }
.sub-legend-go { align-self: flex-start; display: inline-flex; align-items: center; min-height: calc(var(--row-h) - 4px); text-decoration: none; font-size: var(--fs-sm); }
@media (pointer: coarse) {
  .sub-legend-head .how-x { width: 44px; height: 44px; }
  .sub-legend-go { min-height: 44px; }
}
/* 「차트 맞춤」: 가격 눈금 바로 왼쪽 위(트뷰 auto 단추 자리 쪽) — 캔들이 화면 밖일 때만 뜸 */
.pane-fit {
  position: absolute; z-index: 6; top: calc(52px * var(--fz)); right: calc(var(--axis-w, 56px) + var(--s2));
  display: inline-flex; align-items: center; gap: 4px; height: calc(28px * var(--fz)); padding: 0 var(--s2);
  background: var(--accent); color: var(--on-accent, #111); border: 1px solid var(--accent); border-radius: 14px;
  font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); cursor: pointer;
}
.pane-fit[hidden] { display: none; }
.pane-fit:hover { filter: brightness(1.08); }
.pane-fit-icon { font-size: var(--fs); line-height: 1; }
@media (pointer: coarse) { .pane-fit { min-height: 44px; height: auto; border-radius: 22px; } }
.pane.is-compact .pane-fit { top: calc(30px * var(--fz)); }
/* 거래량을 제 칸에 둔 칸: 거래량 칸 위 경계 손잡이도 다른 칸처럼 */

/* ── 32단계: PC 오른쪽 세로 메뉴 · 호가 · 체결 · 알림 기록 ── */
:root { --rail-w: calc(62px * var(--fz)); }
/* 태블릿 · 휴대폰: 예전 모양 그대로(머리 · 몸이 .side 의 바로 아래 칸처럼 — 세로 줄 · 칸 이름은 숨김) */
.side-main { display: contents; }
.side-rail, .side-title { display: none; }
@media (min-width: 1100px) {
  .side { position: relative; box-sizing: content-box; padding-right: var(--rail-w); }
  .side-main { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; }
  .side-rail {
    display: flex; flex-direction: column; gap: 2px; position: absolute; top: 0; right: 0; bottom: 0; width: var(--rail-w);
    padding: 6px 4px; border-left: 1px solid var(--line); background: var(--panel); overflow-y: auto; scrollbar-width: none;
  }
  .side-rail::-webkit-scrollbar { display: none; }
  .side-head .side-tabs, .side-head .side-fold { display: none; }
  .side-head { min-height: calc(40px * var(--fz)); padding: 0 var(--s3); }
  .side-title { display: block; margin: 0; font-size: var(--fs-lg); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 접힘: 칸은 0 · 세로 줄만 남음(차트가 넓어짐) */
  .side.is-folded { width: 0; }
  .side.is-folded .side-main { display: none; }
  .side.is-folded .side-rail { border-left: 0; }
  /* 호가 칸은 조금 넓게(가격 · 수량 · 합계 세 칸) */
  .side:not(.is-folded):has(#side-panel-book:not([hidden])) { width: min(var(--side-w-econ), 34vw); }
}
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; padding: 8px 2px 6px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: calc(12px * var(--fz)); line-height: 1.15; cursor: pointer;
}
.rail-btn[hidden] { display: none; }
.rail-btn:hover { color: var(--text); background: var(--line-soft); }
.rail-btn.is-on { color: var(--text); background: var(--accent-soft); }
.rail-btn.is-on .m-ico { color: var(--accent); }
.rail-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rail-ico { position: relative; display: block; }
.rail-btn .m-ico { display: block; width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); }
.rail-label { max-width: 100%; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.rail-badge {
  position: absolute; top: -7px; left: 13px; min-width: calc(17px * var(--fz)); height: calc(17px * var(--fz)); padding: 0 4px; border-radius: 9px;
  background: var(--danger); color: var(--on-danger); font-style: normal; font-size: calc(11px * var(--fz)); line-height: calc(17px * var(--fz)); font-weight: 700; text-align: center;
}
.rail-badge[hidden] { display: none; }

/* 호가 · 체결 */
.book { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; font-variant-numeric: tabular-nums; }
.book-live { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ob-row[hidden] { display: none; }
.book-head { flex: none; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.book-head .gap, .book-ctl .gap { flex: 1; }
.book-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); }
.book-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flat); }
.book-dot.is-on { background: var(--up); }
.book-venue { padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: var(--fs-sm); color: var(--text); white-space: nowrap; }
.book-ctl { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); padding: var(--s2) var(--s3); }
.book-chips { display: flex; gap: 2px; }
.book-chips .chip { padding: 0 var(--s2); font-variant-numeric: tabular-nums; }
.book-none { padding: var(--s4); }
.book-none p { margin: 0; color: var(--muted); line-height: var(--lh); }
.book-live[hidden], .book-none[hidden] { display: none; }
.book-wait { margin: 0; padding: var(--s2) var(--s3); color: var(--muted); font-size: var(--fs-sm); }
.book-wait[hidden] { display: none; }
.ob-cols, .ob-row, .tr-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; align-items: center; padding: 0 var(--s3); column-gap: var(--s2); }
.ob-cols { height: calc(24px * var(--fz)); color: var(--muted); font-size: var(--fs-sm); }
.ob-cols span:not(:first-child), .ob-q, .ob-t, .tr-q { text-align: right; }
.tr-cols span:nth-child(2), .tr-p { text-align: right; }
.ob-row { position: relative; height: calc(22px * var(--fz)); font-size: calc(14px * var(--fz)); }
.ob-row > span { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; }
.ob-bar { position: absolute; top: 1px; bottom: 1px; right: 0; width: calc(var(--w, 0) * 100%); pointer-events: none; }
.ob-row.is-ask .ob-p { color: var(--down-text); }
.ob-row.is-bid .ob-p { color: var(--up); }
.ob-row.is-ask .ob-bar { background: color-mix(in srgb, var(--down) 16%, transparent); }
.ob-row.is-bid .ob-bar { background: color-mix(in srgb, var(--up) 16%, transparent); }
.ob-mid { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.ob-mid-price { font-size: var(--fs-xl); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ob-mid-price.is-up { color: var(--up); }
.ob-mid-price.is-down { color: var(--down-text); }
.ob-ratio { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); white-space: nowrap; }
.ob-ratio-sell { color: var(--down-text); }
.ob-ratio-buy { color: var(--up); }
.ob-ratio-bar { flex: 1; min-width: 24px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--down); display: flex; justify-content: flex-end; }
.ob-ratio-fill { display: block; height: 100%; width: calc(var(--w, 0.5) * 100%); background: var(--up); }
.book-trades { flex: 1; min-height: calc(120px * var(--fz)); display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: var(--s1); }
.tr-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tr-head { margin: 0; padding: var(--s2) var(--s3) 0; font-size: var(--fs-sm); }
.tr-row { height: calc(22px * var(--fz)); font-size: calc(14px * var(--fz)); }
.tr-row[hidden] { display: none; }
.tr-t { color: var(--muted); }
.tr-row.is-buy .tr-p { color: var(--up); }
.tr-row.is-sell .tr-p { color: var(--down-text); }
.tr-row.is-big { font-weight: 700; background: var(--warn-soft); }
.tr-row.is-big .tr-q { color: var(--warn); }

/* 알림 기록 */
.al { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.al-head { flex: none; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.al-head h3 { margin: 0; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.al-head .gap { flex: 1; }
.al-clear[hidden] { display: none; }
.al-empty { padding: calc(40px * var(--fz)) var(--s4); text-align: center; }
.al-empty[hidden] { display: none; }
.al-empty p { margin: 0; font-weight: 700; }
.al-day h4 { margin: 0; padding: var(--s2) var(--s3) var(--s1); font-size: var(--fs-sm); color: var(--accent); }
.al-list { list-style: none; margin: 0; padding: 0; }
.al-item {
  display: flex; align-items: center; gap: var(--s2); width: 100%; padding: var(--s2) var(--s3); border: 0; border-bottom: 1px solid var(--line-soft);
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.al-item:hover { background: var(--line-soft); }
.al-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.al-time { flex: none; color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.al-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.al-text small { color: var(--muted); font-size: var(--fs-sm); }
.al-go { flex: none; color: var(--muted); }

/* 36단계 「아레스 텔레그램」 바로가기(11-26) — 머리줄 종이비행기 단추(넓은 화면), 꼬리말 글자 고리(모든 화면) */
.btn-tg { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: var(--ctl-h); padding: 0 var(--s2); color: var(--text); text-decoration: none; }
.btn-tg:hover { color: var(--accent); }
.btn-tg .tg-ico { width: calc(16px * var(--fz)); height: calc(16px * var(--fz)); }
.foot > .foot-tg { flex: none; color: var(--muted); }
.foot > .foot-tg::before { content: "\00a0·\00a0"; display: inline-block; color: var(--muted); }
.foot > .foot-tg:hover { color: var(--accent); }
@media (max-width: 600px) {
  .top .btn-tg { display: none; }
}

/* 29단계 알림함 — 머리줄 종 단추(로그인한 회원만 · [로그인] 바로 왼쪽) + 「알림함」 창(ui/inbox-panel.js). 확성기(공지)의 점과 달리 안 읽은 수를 숫자로 */
.btn-inbox { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: var(--ctl-h); padding: 0 var(--s2); }
.btn-inbox[hidden] { display: none; }
.btn-inbox .ibx-btn-ico { width: calc(17px * var(--fz)); height: calc(17px * var(--fz)); }
.btn-inbox.has-new { color: var(--accent); }
.ibx-ico { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ibx-badge {
  position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; box-sizing: border-box;
  background: var(--danger); color: #fff; font-size: var(--fs-sm); font-weight: 800; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--raised); pointer-events: none;
}
.ibx-badge[hidden] { display: none; }
.ibx-lock main { overflow: hidden; }

.ibx-dlg {
  padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text);
  width: min(480px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 32px)); height: auto; max-width: none; box-shadow: var(--shadow); overflow: hidden;
  margin: 64px 16px auto auto;
}
.ibx-dlg[open] { display: flex; }
.ibx-dlg::backdrop { background: var(--sheet-back); }
.ibx-dlg h2, .ibx-dlg p, .ibx-dlg ul { margin: 0; }
.ibx-box { display: flex; flex-direction: column; width: 100%; min-height: 0; max-height: inherit; }
.ibx-head { flex: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.ibx-head-ico { flex: none; display: flex; align-items: center; justify-content: center; width: calc(36px * var(--fz)); height: calc(36px * var(--fz)); border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.ibx-head-ico .ibx-ico { width: calc(20px * var(--fz)); height: calc(20px * var(--fz)); }
.ibx-head-txt { flex: 1; min-width: 0; }
.ibx-title { font-size: var(--fs-lg); font-weight: 800; }
.ibx-sub { color: var(--muted); font-size: var(--fs-sm); }
.ibx-x { flex: none; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); font-size: var(--fs-xl); line-height: 1; }
.ibx-x:hover { color: var(--text); background: var(--raised); }
.ibx-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; min-height: calc(44px * var(--fz)); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line-soft); }
.ibx-count { font-weight: 700; color: var(--text); }
.ibx-all { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.ibx-all[hidden] { display: none; }
.ibx-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ibx-items { list-style: none; padding: 0; }
.ibx-item { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-soft); }
.ibx-item.is-new { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ibx-card { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; padding: 0; background: transparent; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ibx-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.ibx-card-top { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.ibx-new { padding: 1px 8px; border-radius: 999px; background: var(--danger); color: #fff; font-weight: 800; font-size: var(--fs-sm); }
.ibx-when { margin-left: auto; font-variant-numeric: tabular-nums; }
.ibx-card-title { font-weight: 800; font-size: var(--fs-md, 1rem); line-height: 1.4; overflow-wrap: anywhere; }
.ibx-item:not(.is-new) .ibx-card-title { font-weight: 600; }
.ibx-card-body { white-space: pre-line; line-height: 1.6; overflow-wrap: anywhere; color: var(--text); }
.ibx-item:not(.is-new) .ibx-card-body { color: var(--muted); }
.ibx-go { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; text-decoration: none; border-color: var(--accent); color: var(--accent); font-weight: 700; }
.ibx-go:hover { background: var(--accent); color: var(--on-accent); }
.ibx-status { padding: var(--s4); color: var(--muted); }
.ibx-empty { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: calc(40px * var(--fz)) var(--s4); text-align: center; }
.ibx-empty-art { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--raised); color: var(--muted); }
.ibx-empty-art .ibx-ico { width: 26px; height: 26px; }
.ibx-empty-t { font-weight: 800; }
.ibx-empty-s { color: var(--muted); font-size: var(--fs-sm); }
.ibx-foot { flex: none; padding: var(--s2) var(--s4); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
/* 휴대폰: 화면 가득(위에서 아래로) · 단추는 손가락 크기 */
@media (max-width: 600px) {
  .ibx-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .ibx-head { gap: var(--s2); padding: var(--s2) var(--s3); }
  .ibx-bar, .ibx-item { padding-left: var(--s3); padding-right: var(--s3); }
  .ibx-go, .ibx-all { min-height: 44px; }
}
/* 아주 좁은 머리줄: 종 단추는 「가」(또는 지구) 단추와 [로그인] 사이에 붙음 — 줄 끝 묶음을 깨지 않게 */
@media screen and (max-width: 480px) {
  .top .btn-inbox + #login-btn { margin-left: 0; }
  :root[data-fs="xl"] .top .btn-inbox { min-width: calc(32px * 1.2); padding: 0 6px; }
  :root[data-fs="xl"] .top .btn-inbox .ibx-btn-ico { width: calc(17px * 1.2); height: calc(17px * 1.2); }
  .top .btn-inbox { min-width: calc(30px * var(--fz)); padding: 0 4px; }
}

/* ── 33 · 35 · 37단계(차트 묶음, 11-26) ── */
/* 33: 서버 계산 지표를 더 앞으로 이을 수 없는 자리 — 칸 왼쪽 끝 ~ 지표 값이 시작하는 봉까지 옅은 안내 한 줄 */
.ind-gap { position: absolute; left: 0; z-index: 2; display: flex; justify-content: center; pointer-events: none; overflow: hidden; }
.ind-gap[hidden] { display: none; }
.ind-gap span { max-width: calc(100% - 8px); padding: 1px 8px; border-radius: 3px; background: var(--veil); color: var(--muted); opacity: 0.85; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 35: 보이는 구간의 고가 · 저가 이름표(꼬리 끝 위 · 아래, 오른쪽 끝 가까이는 봉 왼쪽으로) */
.vis-hl { position: absolute; z-index: 2; pointer-events: none; color: var(--muted); font-size: calc(11px * var(--fz)); line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vis-hl[hidden] { display: none; }
.vis-hl.is-hi { transform: translate(4px, calc(-100% - 3px)); }
.vis-hl.is-lo { transform: translate(4px, 3px); }
.vis-hl.is-hi.is-left { transform: translate(calc(-100% - 4px), calc(-100% - 3px)); }
.vis-hl.is-lo.is-left { transform: translate(calc(-100% - 4px), 3px); }
/* 35: 지금가 꼬리표 바로 아래 봉 마감까지 남은 시간(꼬리표와 같은 색 · 같은 폭) */
.bar-clock { position: absolute; right: 0; z-index: 5; width: var(--axis-w, 60px); padding: 1px 0; border-radius: 0 0 2px 2px; color: #fff; text-align: center; font-size: calc(11px * var(--fz)); line-height: 1.25; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; overflow: hidden; }
.bar-clock[hidden] { display: none; }
/* 낮은 캔들 칸(220px 미만 — 아래 칸이 여럿 · 낮은 창): 상태 줄은 접어 둠(꼬리표는 「지표 N」 — chart-pane 이 .is-crowded) */
.pane.is-lowmain .pane-status { display: none; }
/* 37: [지표] 창의 「아레스 전장 지도」 — 즐겨찾기 없는 줄의 빈자리, 지표 묶음을 못 받은 창의 작은 목록 */
.ind-fav.is-none { visibility: hidden; pointer-events: none; }
.ind-list.ind-extra { margin-top: var(--s2); max-height: none; }
/* 37: 「아레스 전장 지도」 줄 — 지표 줄(.ind-row)과 같은 모양 */
.wz-sec { margin-bottom: var(--s2); }
.wz-item { display: flex; flex-direction: column; gap: 2px; }
.wz-item .ind-item-main > .wz-row { flex: 1; min-width: 0; }
.wz-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  min-height: var(--row-h); padding: 0 var(--s2); text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}
button.wz-row:hover { border-color: var(--muted); }
.wz-row[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.wz-row[aria-pressed="true"] .ind-row-state { color: var(--accent); }
.wz-row:not(.wz-opt) { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name state" "desc state"; column-gap: var(--s3); row-gap: 1px; padding: 6px var(--s3); }
.wz-row:not(.wz-opt) .ind-name { grid-area: name; font-weight: 700; }
.wz-row:not(.wz-opt) .ind-desc { grid-area: desc; color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.wz-row:not(.wz-opt) > .ind-row-state { grid-area: state; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wz-row:not(.wz-opt) > .ind-row-state::after {
  content: ""; width: 30px; height: 16px; border-radius: 8px; border: 1px solid var(--line); background-color: var(--bg);
  background-image: radial-gradient(circle at 8px 50%, var(--muted) 5px, transparent 5.5px);
}
.wz-row[aria-pressed="true"]:not(.wz-opt) > .ind-row-state::after { border-color: var(--accent); background-color: var(--accent-soft); background-image: radial-gradient(circle at 21px 50%, var(--accent) 5px, transparent 5.5px); }
.wz-opts { display: flex; flex-wrap: wrap; gap: 4px; margin-left: calc(var(--ctl-h) + var(--s1) + var(--s3)); }
.wz-opts .wz-opt { min-height: calc(var(--row-h) - 4px); font-size: var(--fs-sm); background: transparent; border-style: dashed; }
@media (max-width: 600px) { .wz-opts { margin-left: var(--s4); } }
/* 11-26 검증 묶음 */
/* 휴대폰 폭: 공포지수 「?」 범례는 칸 아래에서 잘리지 않게 화면 아래에서 올라오는 판으로(다섯 구간이 다 보이게) */
@media (max-width: 600px) {
  .pane .sub-legend { position: fixed; left: 0; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none; max-height: 70vh; overflow-y: auto; z-index: 60; border-radius: 12px 12px 0 0; padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px)); }
}
/* 손가락 기기: 칸 이름줄 단추(? · ▲▼ · 크게 보기 · 자동 · ×)는 누르는 자리를 40px 이상으로(보이는 크기는 조금만) */
@media (pointer: coarse) {
  .sub-btn { position: relative; min-width: calc(34px * var(--fz)); }
  .sub-btn::before { content: ""; position: absolute; top: -10px; bottom: -10px; left: -3px; right: -3px; }
}
/* 칸 이름줄(종목 · 시고저종)은 가격 눈금 폭만큼 비움 — 「가」 아주 크게에서 눈금이 넓어져 「종 6…」 이 잘리던 것(폴드 344) */
.pane-legend { right: calc(var(--axis-w, 60px) + 6px); }
.pane.is-compact .pane-title .pt-ko { display: none; }

/* 베타 11-27 로그인 순서 안내(텔레그램 단추 아래 4줄) — 큰 글씨, 번호 목록 */
.login-steps { margin: var(--s3) auto 0; padding-left: 1.4em; max-width: 30em; text-align: left; color: var(--text); font-size: var(--fs-md); line-height: 1.6; }
.login-steps li { margin: 2px 0; }

/* 종목 분류 칩(11-27) — 종목 찾기 창 · 서랍 · 옆 칸 종목 목록의 「전체 · 대장 · 밈 …」 / 「반도체 · 빅테크 …」 칩 줄과 줄의 회색 분류 꼬리표 */
.sympop-subs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.sympop-subs::-webkit-scrollbar, .symlist-secs::-webkit-scrollbar { display: none; }
.sympop-subs .chip { flex: none; white-space: nowrap; }
.symlist-secs { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.symlist-secs .chip { flex: none; padding: 0 var(--s2); white-space: nowrap; }
.sympop-sec, .sym-sec {
  flex: none; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px;
  color: var(--muted); font-size: var(--fs-sm); font-style: normal; font-weight: 400; line-height: 1.4; white-space: nowrap;
}
.sym-sec { margin-left: var(--s1); }
/* 좁은 폭에서는 꼬리표를 숨김: 옆 칸 두 줄 짜임 · 휴대폰(서랍) */
.symlist.is-two .sym-sec { display: none; }
@media (max-width: 600px) { .sympop-sec { display: none; } }

/* 11-27 검증 창 2번: 휴대폰 폭에서 꼬리말 한 줄이 넘침 → 420 이하에서는 텔레그램 고리를 숨기고(지원 화면 맨 위에 있음) 「차트 제공」 앞말을 숨겨 「TradingView ↗」만 */
@media (max-width: 420px) {
  .foot > .foot-tg { display: none; }
  .foot-tv-pre { display: none; }
}

/* 베타 피드백 메일(지원 화면 맨 위, 11-26) */
.help-feedback { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s3) 0; padding: var(--s3) var(--s4); border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); font-size: var(--fs-md); }
.help-feedback a { color: var(--accent); font-weight: 700; word-break: break-all; min-height: 40px; display: inline-flex; align-items: center; }

/* 선생님 11-26 #3548 "종목 바꾸는 ▾ 를 조금만 크게, 눈에 잘 띄게" — 휴대폰·손가락 기기: 종목 이름 칸을 글 길이만큼의 알약 단추로(늘어나지 않게) + 금색 동그라미 ▾, 이름은 말줄임. 아래 큰 가격과 겹치지 않게 아래 여백(11-27 검증 창 1번) */
@media (max-width: 860px), (pointer: coarse) {
  .info-find { align-self: flex-start; width: auto; max-width: 100%; padding: 2px 6px 2px 10px; margin-bottom: 4px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--accent-soft); min-height: 34px; align-items: center; }
  .info-find small { min-width: 0; max-width: 12em; }
  .info-find .info-caret { display: inline-flex; align-items: center; justify-content: center; width: calc(22px * var(--fz)); height: calc(22px * var(--fz)); margin-left: 2px; border-radius: 50%; background: var(--accent); color: var(--bg, #111); font-size: calc(13px * var(--fz)); font-weight: 700; flex: none; }
  .pane-title::after { content: ' ▼'; color: var(--accent); font-size: 1.05em; }
}

/* 40-A 그리기(11-26) — 그림 메뉴 · 설정 창 · 단축키 표 · 지우기 판 안내 · 「지금으로」 · 숫자 봉 바꾸기 · 고가 이름표 옆으로 */
/* 그린 것 메뉴(오른쪽 클릭 · 길게 누르기 · 「더 보기」) — 하위 메뉴는 같은 판 안에서 「‹ 제목」 */
.draw-menu {
  position: absolute; z-index: 70; min-width: 220px; max-width: min(320px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto;
  padding: var(--s1); background: var(--raised, var(--panel)); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.draw-menu[hidden] { display: none; }
.draw-menu-item, .draw-menu-back {
  display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: calc(34px * var(--fz)); padding: 0 var(--s2);
  background: none; border: 0; border-radius: 6px; color: inherit; font: inherit; font-size: var(--fs); text-align: left; cursor: pointer;
}
.draw-menu-item:hover, .draw-menu-item:focus-visible, .draw-menu-back:hover, .draw-menu-back:focus-visible { background: var(--accent-soft); }
.draw-menu-item[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.draw-menu-item.is-danger { color: var(--danger); }
.draw-menu-item[aria-checked="true"] .dm-label { color: var(--accent); font-weight: 700; }
.draw-menu-back { border-bottom: 1px solid var(--line-soft, var(--line)); border-radius: 6px 6px 0 0; margin-bottom: 2px; }
.dm-label { flex: 1; min-width: 0; }
.dm-hint { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.dm-caret { color: var(--muted); font-size: 1.2em; line-height: 1; }
@media (pointer: coarse) { .draw-menu-item, .draw-menu-back { min-height: 44px; } }
@media (max-width: 600px) {
  .draw-menu { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; width: auto; border-radius: 12px 12px 0 0; padding-bottom: calc(var(--s2) + env(safe-area-inset-bottom, 0px)); }
}

/* 설정 창(넓은 화면 = 가운데 창 · 휴대폰 = 아래에서 올라오는 판) · 단축키 표 창 */
.dset-wrap, .keys-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: var(--s3); background: var(--veil, rgba(0, 0, 0, 0.45)); }
.dset-wrap[hidden], .keys-wrap[hidden] { display: none; }
.dset-card, .keys-card {
  width: min(460px, 100%); max-height: min(86vh, 720px); overflow-y: auto; padding: var(--s3);
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.keys-card { width: min(560px, 100%); }
.dset-title, .keys-head h2 { margin: 0 0 var(--s2); font-size: var(--fs-lg); }
.dset-tabs { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s2); }
.dset-tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent, #111); border-color: var(--accent); }
.dset-tab[hidden] { display: none; }
.dset-panel { display: flex; flex-direction: column; gap: var(--s2); }
.dset-panel[hidden] { display: none; }
.dset-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.dset-lab { min-width: 5.5em; color: var(--muted); font-size: var(--fs-sm); }
.dset-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.dset-opt {
  min-width: calc(34px * var(--fz)); min-height: calc(32px * var(--fz)); padding: 0 var(--s2);
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.dset-opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; color: var(--accent); font-weight: 700; }
.dset-opt.dset-sw { width: calc(28px * var(--fz)); min-width: 0; padding: 0; border-radius: 50%; }
.dset-opt.dset-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.dset-flags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.dset-flag { display: inline-flex; align-items: center; gap: 6px; min-height: calc(32px * var(--fz)); padding: 0 var(--s2); background: none; color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.dset-box { width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 3px; flex: none; }
.dset-flag[aria-checked="true"] .dset-box { background: var(--accent); border-color: var(--accent); }
.dset-input { flex: 1; min-width: 10em; min-height: calc(34px * var(--fz)); padding: 0 var(--s2); background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: var(--fs); font-variant-numeric: tabular-nums; }
.dset-point { margin: 0; padding: var(--s2); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: var(--s1); }
.dset-point legend { padding: 0 4px; color: var(--muted); font-size: var(--fs-sm); }
.dset-status { margin: var(--s2) 0 0; color: var(--danger); font-size: var(--fs-sm); }
.dset-status[hidden] { display: none; }
.dset-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s3); position: sticky; bottom: calc(-1 * var(--s3)); padding: var(--s2) 0; background: var(--panel); }
@media (pointer: coarse) { .dset-opt, .dset-flag, .dset-input { min-height: 44px; } }
@media (max-width: 600px) {
  .dset-wrap { align-items: flex-end; padding: 0; }
  .dset-card { width: 100%; max-height: 82vh; border-radius: 14px 14px 0 0; padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px)); }
  .dset-lab { min-width: 100%; }
}
/* 단축키 표 */
.keys-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.keys-group { margin: var(--s3) 0 var(--s1); font-size: var(--fs); color: var(--muted); }
.keys-list { display: grid; grid-template-columns: minmax(8em, auto) 1fr; gap: 4px var(--s3); margin: 0; }
.keys-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 0; }
.keys-what { margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.keys-plus { color: var(--muted); font-size: var(--fs-sm); }
.keys-list kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--bg); color: var(--text); font: 600 var(--fs-sm) var(--font); text-align: center; }
.keys-note { margin: var(--s2) 0 0; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 420px) { .keys-list { grid-template-columns: 1fr; } .keys-what { margin-bottom: var(--s1); } }
.help-keys .keys-group { margin-top: var(--s2); }

/* 지우기 판 아래 한 줄 안내 · 숨긴 그림이 없을 때 흐린 단추 */
.draw-fly-note { margin: var(--s1) 0 0; padding: var(--s1) var(--s2) 0; border-top: 1px solid var(--line-soft, var(--line)); color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; max-width: 240px; white-space: normal; }
.draw-item[aria-disabled="true"] { opacity: 0.45; }

/* 「지금으로 ⇥」: 차트 오른쪽 아래(가격 눈금 왼쪽, 시간 축 위) */
.pane-now {
  position: absolute; z-index: 6; right: calc(var(--axis-w, 56px) + var(--s2)); bottom: calc(34px * var(--fz));
  display: inline-flex; align-items: center; gap: 4px; height: calc(28px * var(--fz)); padding: 0 var(--s2);
  background: var(--panel); color: var(--text); border: 1px solid var(--accent); border-radius: 14px;
  font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); cursor: pointer;
}
.pane-now[hidden] { display: none; }
.pane-now-icon { color: var(--accent); }
.pane.is-low .pane-now { bottom: var(--s2); }
@media (pointer: coarse) { .pane-now { min-height: 44px; height: auto; border-radius: 22px; } }

/* 숫자를 쳐서 봉 바꾸기: 친 글자 */
.itv-typed {
  position: absolute; z-index: 30; left: 50%; top: calc(60px * var(--fz)); transform: translateX(-50%);
  padding: var(--s2) var(--s3); background: var(--panel); color: var(--text); border: 1px solid var(--accent); border-radius: 8px; box-shadow: var(--shadow);
  font-size: var(--fs-lg); font-weight: 700; pointer-events: none;
}
.itv-typed[hidden] { display: none; }

/* 보이는 구간 고가 이름표: 위 이름줄 · 지표 꼬리표 줄에 가리면 봉 옆으로 */
.vis-hl.is-hi.is-side { transform: translate(8px, -50%); }
.vis-hl.is-hi.is-side.is-left { transform: translate(calc(-100% - 8px), -50%); }

/* 11-27 사장님 "트레이딩뷰 표시를 위돔처럼 짧고 작게": 차트 안 로고는 끄고(attributionLogo:false), 꼬리말은 모든 폭에서 작은 「차트 제공 TradingView ↗」 고리 하나.
   저작권 문구 전체는 꼬리말 고리의 title · 숨은 .foot-cr(읽어 주기) · 공지 창 「차트 제공」 줄에 그대로 있음(라이브러리 NOTICE: 사용자에게 보이는 페이지에 문구 + tradingview.com 고리) */
.foot > .foot-cr { display: none; }
.foot > .foot-tv { display: inline; flex: none; font-size: var(--fs-sm); color: var(--muted); }
.foot > .foot-tv:hover { color: var(--accent); }

/* 11-27 검증 창 3번: 설정 창 색 동그라미가 칠해지지 않음 — .dset-opt 의 바탕이 뒤에 와서 .dsw-N 을 덮음 → 더 구체적으로 다시 칠함 */
.dset-opt.dset-sw.dsw-0 { background: var(--dsw-0); } .dset-opt.dset-sw.dsw-1 { background: var(--dsw-1); }
.dset-opt.dset-sw.dsw-2 { background: var(--dsw-2); } .dset-opt.dset-sw.dsw-3 { background: var(--dsw-3); }
.dset-opt.dset-sw.dsw-4 { background: var(--dsw-4); } .dset-opt.dset-sw.dsw-5 { background: var(--dsw-5); }
.dset-opt.dset-sw.dsw-6 { background: var(--dsw-6); } .dset-opt.dset-sw.dsw-7 { background: var(--dsw-7); }
/* 11-27 검증 창 6번: 휴대폰 칸 이름줄 단추(? · 크게 보기)를 누르는 높이 40px 로 */
@media (pointer: coarse) {
  /* 보이는 크기는 그대로, 투명한 누르는 자리만 넓힘(11-27 재검증 A: 커진 단추가 낮은 칸을 가림) */
  .sub-btn { position: relative; }
  .sub-btn::before { content: ""; position: absolute; inset: -10px -6px; }
}
/* 11-27 검증 창 9번: 안내 띠는 한 번에 둘까지만 보이게 */
.toasts > .toast:nth-last-child(n+3) { display: none; }

/* ══════════ 42단계 거래소 고르기: 종목 줄의 「거래소 ▾」 단추 · 판 · 칸의 거래소 이름 · 「바이낸스 기준」 꼬리표 ══════════ */
.exch-btn { display: inline-flex; align-items: center; gap: 2px; flex: none; height: calc(24px * var(--fz)); padding: 0 var(--s2); font-size: var(--fs-sm); white-space: nowrap; }
.exch-btn[hidden] { display: none; }
.exch-btn[aria-expanded="true"] { border-color: var(--accent); }
.exch-caret { font-size: var(--fs-sm); color: var(--muted); }
.exch-panel { width: calc(300px * var(--fz)); }
.exch-rows { display: flex; flex-direction: column; gap: 2px; }
.exch-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: var(--s2);
  min-height: var(--row-h); padding: 0 var(--s2); text-align: left; font-variant-numeric: tabular-nums;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--text);
}
.exch-row:hover:not(:disabled) { background: var(--panel); }
.exch-row[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.exch-row.is-none, .exch-row:disabled { opacity: 0.45; cursor: default; }
.exch-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exch-diff, .exch-state { color: var(--muted); font-size: var(--fs-sm); }
.exch-note, .exch-src { margin: 0; font-size: var(--fs-sm); }
.exch-src { padding-top: var(--s1); border-top: 1px solid var(--line); }
.pane-exch { flex: none; padding: 0 var(--s1); border: 1px solid var(--line); border-radius: 3px; background: var(--veil); color: var(--muted); font-size: var(--fs-sm); pointer-events: auto; }
.pane-exch[hidden] { display: none; }
.ind-basis, .sub-basis { flex: none; padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; white-space: nowrap; }
.ind-basis[hidden], .sub-basis[hidden] { display: none; }
.pane.is-tiny .pane-exch, .pane.is-compact .sub-basis { display: none; }
@media (max-width: 600px) {
  /* 휴대폰: 종목 이름 옆에 작게(가격 줄은 그 아래 그대로) · 판은 아래에서 올라옴 */
  .info-main { flex-flow: row wrap; align-items: center; column-gap: var(--s1); }
  .info-main .info-quote { flex-basis: 100%; }
  /* 11-27 검증(390): 거래소 단추를 종목 알약과 같은 줄에 — 단추가 보이면 왼쪽 묶음을 조금 넓히고 한글 이름을 짧게(넘치면 두 줄) */
  /* 11-27 재검증 3번: 거래소 단추를 알약 옆이 아니라 가격 줄 끝에(오른쪽 24시간 칸 이름을 줄이지 않게) — 줄 순서: 종목 알약 / (줄바꿈) / 가격 · % · 거래소 */
  /* 줄바꿈 흐름(row wrap)은 왼쪽 칸 폭을 「한 줄로 늘어놓은 폭」으로 재서 오른쪽 24시간 이름을 줄였음(11-27 재검증) → 세로로 쌓기: 알약 / 가격 · % / 거래소 */
  .info-main { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; }
  .info-main .info-quote { flex-basis: auto; }
  .info-main .exch-btn { margin-top: 2px; order: 3; }
  .info-main .info-quote { order: 2; }
  .exch-btn { height: auto; min-height: calc(28px * var(--fz)); padding: 0 var(--s2); border: 1.5px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); }
  .exch-panel {
    position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
    transform: none !important; width: auto !important; max-width: none !important; max-height: 82vh !important;
    z-index: 75; border-radius: 14px 14px 0 0;
    padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom));
    box-shadow: 0 0 0 100vmax var(--sheet-back), var(--shadow); animation: sheet-up 0.18s ease-out;
  }
  .exch-panel::before { content: ""; flex: none; align-self: center; width: 36px; height: 4px; margin: 0 0 var(--s1); border-radius: 2px; background: var(--line); }
  .exch-row { min-height: calc(44px * var(--fz)); }
}

/* ── 41단계: 전체 기간 시세(11-27) ── */
/* 옛 시세와 이은 자리: 세로 점선 + 「이전 기간: ○○」(옛 쪽 = 선 왼쪽에 작게). 칸 왼쪽 끝에 가까우면 글자를 선 오른쪽으로(is-right) */
.pane-seam { position: absolute; top: 0; z-index: 1; width: 0; border-left: 1px dashed var(--muted); opacity: 0.75; pointer-events: none; }
.pane-seam[hidden] { display: none; }
.pane-seam-label { position: absolute; bottom: 58px; right: 4px; max-width: 46vw; padding: 1px 6px; border-radius: 3px; background: var(--veil); color: var(--muted); font-size: var(--fs-sm); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-seam.is-right .pane-seam-label { right: auto; left: 4px; }
/* 42단계 · 11-27 검증: 손가락 기기에서 거래소 단추 · 판의 줄은 누르는 높이 40px 이상 */
@media (pointer: coarse) {
  .exch-btn { min-height: 40px; }
  .exch-row { min-height: 44px; }
}
/* 41단계 고침(11-27 검증): 이음 글자는 가격 칸 위쪽 빈 곳(높이는 화면이 정함 — 가까운 이음끼리는 엇갈림), 길이는 화면이 재서 짧은 낱말로 바꿈 */
.pane-seam-label { bottom: auto; top: 0; max-width: none; overflow: visible; }

/* ══════════ 41-B 「전체 기간 보기 ↗」(11-27): 종목 줄 끝의 단추 + 위젯 화면(full.html) ══════════ */
/* 넓은 화면: 종목 줄 오른쪽 끝(줄을 밀어내지 않게 늘 한 덩이). 코인은 차분하게, 주식 · 원자재(is-strong)는 강조색 테두리 */
.full-btn {
  display: inline-flex; align-items: center; flex: none; margin-left: auto;
  height: calc(24px * var(--fz)); padding: 0 var(--s2);
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: var(--fs-sm); text-decoration: none; white-space: nowrap;
}
.full-btn:hover { color: var(--text); border-color: var(--muted); }
.full-btn.is-strong { color: var(--text); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.full-btn[hidden] { display: none; }
/* 11-27 검증 1번: 태블릿(768 · 820)에서 종목 줄이 한 줄로 넘쳐 24시간 거래대금이 잘리고 단추가 화면 밖으로 나감 → 601px 이상은 넘칠 때 줄을 접음.
   24시간 칸(고가 · 저가 · 거래대금)은 한 덩이로 같이 내려가고, 단추는 그 줄 오른쪽 끝. 다 들어가는 넓은 화면은 예전처럼 한 줄(거래소 단추가 켜져 있어도 같은 규칙) */
@media (min-width: 601px) {
  .bar.info { flex-wrap: wrap; row-gap: 2px; overflow: visible; }
  .bar.info > .info-stats { display: flex; align-items: center; gap: var(--s4); flex: none; }
}
@media (max-width: 600px) {
  /* 휴대폰: 왼쪽 묶음(이름 · 가격 · 거래소)을 두 줄 높이로 세우고, 단추는 오른쪽 24시간 칸 아래(줄 높이를 거의 늘리지 않음) */
  .bar.info > .info-main { grid-column: 1; grid-row: 1 / span 2; }
  .bar.info > .info-stats { grid-column: 2; grid-row: 1; }
  .bar.info > .full-btn { grid-column: 2; grid-row: 2; justify-self: end; align-self: end; margin: 2px 0 0; max-width: 100%; }
  /* 11-27 검증 4번: 보이는 크기(24px)는 그대로, 투명한 누르는 자리만 42px — 종목 줄이 아래를 잘라 내므로(overflow: hidden) 위로 더 넓힘(.sub-btn 과 같은 방식) */
  .full-btn { position: relative; }
  .full-btn::before { content: ""; position: absolute; top: -14px; bottom: -4px; left: -6px; right: -6px; }
}
@media (min-width: 601px) and (pointer: coarse) {
  /* 손가락 태블릿: 누르는 자리만 40px(종목 줄이 잘라 내지 않음 — 위 overflow: visible) */
  .full-btn { position: relative; }
  .full-btn::before { content: ""; position: absolute; inset: -8px -4px; }
}

/* 위젯 화면: 위 얇은 줄(돌아가기 · 종목 · 안내 · 출처) + 나머지 전부 위젯 틀 */
.full-body { height: 100%; height: 100dvh; }
.full-top {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3);
  padding: var(--s1) var(--s3); background: var(--panel); border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm); color: var(--muted);
}
.full-back {
  display: inline-flex; align-items: center; min-height: calc(32px * var(--fz)); padding: 0 var(--s3);
  border: 1px solid var(--line); border-radius: 999px; background: var(--raised);
  color: var(--text); font-size: var(--fs); text-decoration: none; white-space: nowrap;
}
.full-back:hover { border-color: var(--muted); }
.full-sym { color: var(--text); font-size: var(--fs-lg); }
.full-credit { margin-left: auto; }
.full-main { flex: 1; min-height: 0; overflow: hidden; display: flex; }
.full-frame { flex: 1; width: 100%; height: 100%; min-height: 0; border: 0; display: block; }
.full-none { margin: auto; padding: var(--s4); color: var(--muted); text-align: center; }
@media (max-width: 600px) {
  .full-top { padding: 4px var(--s2); gap: 2px var(--s2); }
  .full-note { display: none; }
  .full-credit { flex-basis: 100%; margin-left: 0; font-size: calc(11px * var(--fz)); }
}
@media (pointer: coarse) { .full-back { min-height: 40px; } }
/* 41-B 고침(11-27 공개 확인: 344 · 360 · 390 + 「가」 아주 크게): 위 41-B 휴대폰 규칙(왼쪽 묶음 두 줄 높이 · 24시간 칸 둘째 칸)이 A11(420 이하 + 아주 크게 = 한 칸 격자,
   24시간 칸은 가격 아래)을 덮어 없던 둘째 칸이 생김 → 종목 단추가 「B」 한 글자 폭으로 줄고 24시간 글씨가 큰 가격 위에 겹침.
   A11 과 같은 조건에서는 자리 지정을 풀어 차례대로 쌓음: 종목 · 가격 · 거래소 / 24시간 칸 / 「전체 기간 보기」(오른쪽 끝). 종목 단추는 어느 폭에서도 줄어들지 않게 최소 폭 */
@media (max-width: 600px) {
  .bar.info > .info-main { min-width: min(100%, calc(64px * var(--fz))); }
  .bar.info .info-find { flex-shrink: 0; min-width: min(100%, calc(56px * var(--fz))); }
}
@media (max-width: 420px) {
  :root[data-fs="xl"] .bar.info > .info-main,
  :root[data-fs="xl"] .bar.info > .info-stats,
  :root[data-fs="xl"] .bar.info > .full-btn { grid-column: 1; grid-row: auto; }
  :root[data-fs="xl"] .bar.info > .full-btn { justify-self: end; margin-top: 4px; }
}
/* 11-27 사장님 「공포지수 화면상 가장 낮은 · 높은 자리 · 얼마였는지」: 보이는 구간의 가장 낮은 · 높은 점(작은 점) + 낱말 · 값 — 차트 공포지수 칸 · 공포지수 화면 큰 선 차트.
   자리는 chart-pane · fear-page 가 그림 폭 안으로 당겨 정함(눈금 · 칸 끝에서 안 잘림, 칸 이름표와 안 겹침). 눌리지 않음 */
.fear-chart { position: relative; }
.pk-dot { position: absolute; z-index: 2; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 1.5px var(--panel); pointer-events: none; }
.pk-tag { position: absolute; z-index: 2; padding: 0 2px; border-radius: 2px; background: color-mix(in srgb, var(--panel) 72%, transparent); color: var(--text); font-size: calc(11px * var(--fz, 1)); line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.pk-dot[hidden], .pk-tag[hidden] { display: none; }

/* ══════════ 종목 찾기 아래 시트(11-27 사장님 오더 599~601 「메뉴가 짤려」 → 바이낸스 앱처럼 아래에서 올라오는 시트) ══════════
   휴대폰(600px 이하 = ui/symbol-popover.js 의 DRAWER_MEDIA)에서만. 이름표는 옛 서랍과 같은 is-drawer — 위 서랍 묶음을 이 묶음이 덮음.
   전체 폭 · 위쪽 둥근 모서리 · 손잡이 막대 · 위쪽 틈은 어둡게(누르면 닫힘) · 손잡이/머리를 아래로 끌면 닫힘(ui/sym-drawer.js).
   큰 탭은 글자 + 고른 탭 밑줄, 분류는 테두리 없는 글자 칩, 넘치는 줄은 끝 흐림 · ›(JS 가 is-over · more-left · more-right),
   정렬 머리 「이름 / 거래대금」 · 「가격 / 24시간 등락」, 줄은 ☆ · 로고 · 기호/USDT · 이름 | 거래대금 · 굵은 가격 / 색 글자 등락률(구분선 없음).
   색은 아레스 토큰만(다크 · 라이트 함께). PC · 태블릿(601px 이상)은 위 가운데 창 그대로. */
.sympop-grab { display: none; }
:root[data-fs] .sympop.is-drawer, .sympop.is-drawer {
  --sheet-gap: calc(44px + env(safe-area-inset-top, 0px));
  --sp-logo: calc(28px * var(--fz)); --sp-star: calc(38px * var(--fz)); --sp-gap: var(--s3); --fade-w: calc(44px * var(--fz));
  left: 0; right: 0; top: calc(var(--sympop-top, 0px) + var(--sheet-gap));
  width: 100%; height: calc(var(--sympop-vh, 100%) - var(--sheet-gap));
  padding-top: 0;
  border: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
  touch-action: none;
  animation: sympop-sheet-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sympop.is-drawer.is-pulling { animation: none; transition: none; }
.sympop-back.is-drawer.is-leaving { pointer-events: none; animation: sympop-back-out 0.18s ease-in forwards; }
.sympop-back.is-drawer.is-leaving .sympop.is-drawer { animation: sympop-sheet-out 0.18s ease-in forwards; transition: none; }
@keyframes sympop-sheet-in { from { translate: 0 100%; } to { translate: 0 0; } }
@keyframes sympop-sheet-out { to { translate: 0 100%; } }
@keyframes sympop-back-out { to { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
  :root[data-fs] .sympop.is-drawer, .sympop.is-drawer, .sympop.is-drawer:not(.is-pulling),
  .sympop-back.is-drawer.is-leaving, .sympop-back.is-drawer.is-leaving .sympop.is-drawer { animation: none; transition: none; }
}
/* 손잡이 막대(끌어 내리는 자리 — 위아래로 넉넉히) */
.sympop.is-drawer .sympop-grab { flex: none; display: flex; align-items: center; justify-content: center; height: 22px; cursor: grab; }
.sympop.is-drawer .sympop-grab-bar { width: 36px; height: 4px; border-radius: 2px; background: var(--muted); opacity: 0.45; }
/* 찾기 칸 */
.sympop.is-drawer .sympop-search { margin: 2px var(--s4) var(--s2); height: calc(40px * var(--fz)); border-radius: 10px; }
.sympop.is-drawer .sympop-recent { padding: 0 var(--s4) var(--s2); }
/* 옆으로 미는 줄(탭 · 분류 칩 · 최근 본 종목): 손가락 가로 밀기는 브라우저에, 아래 끌기는 시트 닫기. 넘치면 끝 흐림 · › */
.sympop.is-drawer [data-hscroll] { --hs-gap: var(--s1); --hs-pad: var(--s4); gap: var(--hs-gap); touch-action: pan-x; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.sympop.is-drawer [data-hscroll]::-webkit-scrollbar { display: none; }
.sympop.is-drawer [data-hscroll].is-over::before,
.sympop.is-drawer [data-hscroll].is-over::after {
  content: ""; position: sticky; z-index: 1; flex: none; align-self: stretch; width: var(--fade-w);
  pointer-events: none; opacity: 0; transition: opacity 0.12s;
}
.sympop.is-drawer [data-hscroll].is-over::before {
  left: calc(-1 * var(--hs-pad)); margin-right: calc(-1 * (var(--fade-w) + var(--hs-gap)));
  background: linear-gradient(to left, transparent, var(--panel) 70%);
}
.sympop.is-drawer [data-hscroll].is-over::after {
  content: "›"; right: calc(-1 * var(--hs-pad)); margin-left: calc(-1 * (var(--fade-w) + var(--hs-gap)));
  display: flex; align-items: center; justify-content: flex-end; padding-right: 6px;
  background: linear-gradient(to right, transparent, var(--panel) 50%);
  color: var(--text); font-size: var(--fs-lg); font-weight: 700; line-height: 1;
}
.sympop.is-drawer [data-hscroll].more-left::before, .sympop.is-drawer [data-hscroll].more-right::after { opacity: 1; }
/* 큰 탭: 글자만, 고른 탭은 진한 글자 + 짧은 밑줄 */
.sympop.is-drawer .sympop-tabs { --hs-gap: calc(20px * var(--fz)); flex-wrap: nowrap; padding: 0 var(--s4); border-bottom: 1px solid var(--line); }
.sympop.is-drawer .sympop-tab { position: relative; min-height: 44px; padding: 0 0 3px; border: 0; color: var(--muted); font-size: var(--fs-lg); font-weight: 500; }
.sympop.is-drawer .sympop-tab[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.sympop.is-drawer .sympop-tab[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 18px; height: 3px; translate: -50% 0;
  border-radius: 2px; background: var(--accent);
}
.sympop.is-drawer.is-searching .sympop-tab[aria-pressed="true"] { color: var(--muted); font-weight: 500; }
.sympop.is-drawer.is-searching .sympop-tab[aria-pressed="true"]::after { background: var(--line); }
/* 분류: 테두리 없는 글자 칩 한 줄(옆으로 밀기) — 고른 칩은 진한 굵은 글자 */
.sympop.is-drawer .sympop-subs { --hs-gap: calc(18px * var(--fz)); flex-wrap: nowrap; align-items: center; padding: var(--s1) var(--s4) 0; }
.sympop.is-drawer .sympop-subs .chip {
  position: relative; flex: none; height: auto; min-height: calc(36px * var(--fz)); padding: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  color: var(--muted); font-size: var(--fs); font-weight: 500; white-space: nowrap;
}
.sympop.is-drawer .sympop-subs .chip:hover { background: transparent; }
.sympop.is-drawer .sympop-subs .chip[aria-pressed="true"] { background: transparent; border: 0; color: var(--text); font-weight: 700; }
.sympop.is-drawer .sympop-subs .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 정렬 머리: 왼쪽 「이름 / 거래대금」, 오른쪽 「가격 / 24시간 등락」 — 정렬 안 된 칸은 옅은 ↕ */
.sympop.is-drawer .sympop-dcols {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s2);
  padding: var(--s1) var(--s4); background: var(--panel); border-bottom: 0;
}
.sympop.is-drawer .sympop-dgrp { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.sympop.is-drawer .sympop-dgrp.is-end { margin-left: auto; }
.sympop.is-drawer .sympop-dcol { justify-content: flex-start; gap: 1px; min-height: 36px; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }
.sympop.is-drawer .sympop-dcol span { white-space: nowrap; overflow: visible; }
.sympop.is-drawer .sympop-dcol[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.sympop.is-drawer .sympop-dslash { color: var(--muted); font-size: var(--fs-sm); font-style: normal; opacity: 0.6; }
.sympop.is-drawer .sympop-dir { min-width: 0.8em; text-align: center; font-size: calc(10px * var(--fz)); }
.sympop.is-drawer .sympop-dir:empty::before { content: "↕"; opacity: 0.55; }
/* 목록: 구분선 없이 넉넉한 줄 */
.sympop.is-drawer .sympop-body { padding: 0 0 var(--s2); }
.sympop.is-drawer .sympop-group { padding: var(--s3) var(--s4) var(--s1); }
.sympop.is-drawer .sympop-group b { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.sympop.is-drawer .sympop-row { align-items: center; border-radius: 0; }
.sympop.is-drawer .sympop-star { align-self: stretch; width: var(--sp-star); padding: 0 0 0 var(--s2); color: var(--muted); font-size: 1.125rem; }
.sympop.is-drawer .sympop-star[aria-pressed="true"] { color: var(--accent); }
:root[data-fs] .sympop.is-drawer .sympop-main, .sympop.is-drawer .sympop-main {
  min-height: calc(60px * var(--fz)); padding: var(--s2) var(--s4) var(--s2) 2px;
  grid-template-columns: var(--sp-logo) minmax(0, 1fr) auto; grid-template-rows: auto; column-gap: var(--s3); row-gap: 0;
}
:root[data-fs="lg"] .sympop.is-drawer .sympop-main, :root[data-fs="xl"] .sympop.is-drawer .sympop-main { grid-template-columns: minmax(0, 1fr) auto; }
.sympop.is-drawer .sympop-main .sympop-logo { grid-row: 1; align-self: center; }
.sympop.is-drawer .sympop-name { grid-row: 1; align-self: center; gap: 3px; line-height: 1.25; }
.sympop.is-drawer .sympop-line1 { gap: 2px; }
.sympop.is-drawer .sympop-sym { font-size: var(--fs-lg); font-weight: 700; }
.sympop.is-drawer .sympop-quote { flex: none; color: var(--muted); font-size: var(--fs-sm); }
.sympop.is-drawer .sympop-line2 { display: flex; align-items: center; min-width: 0; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
:root[data-fs] .sympop.is-drawer .sympop-ko, .sympop.is-drawer .sympop-ko { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: var(--fs-sm); }
:root[data-fs] .sympop.is-drawer .sympop-vol, .sympop.is-drawer .sympop-vol { display: block; flex: none; overflow: visible; color: var(--muted); font-size: var(--fs-sm); text-align: left; }
.sympop.is-drawer .sympop-ko + .sympop-vol { margin-left: 6px; padding-left: 6px; border-left: 1px solid var(--line); }
.sympop.is-drawer .sympop-right { grid-column: -2 / -1; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 0; line-height: 1.25; }
.sympop.is-drawer .sympop-price { font-size: var(--fs-lg); font-weight: 700; }
.sympop.is-drawer .sympop-pct, .sympop.is-drawer .sympop-pct.is-up, .sympop.is-drawer .sympop-pct.is-down, .sympop.is-drawer .sympop-pct.is-flat {
  display: block; min-height: 0; padding: 0; border-radius: 0; background: none;
  font-size: var(--fs-sm); font-weight: 600;
}
.sympop.is-drawer .sympop-pct.is-up { color: var(--up); }
.sympop.is-drawer .sympop-pct.is-down { color: var(--down-text); }
.sympop.is-drawer .sympop-pct.is-flat { color: var(--muted); }
.sympop.is-drawer .sympop-foot { padding: var(--s2) var(--s4); }
:root[data-fs="lg"] .sympop.is-drawer .sympop-sess-note, :root[data-fs="xl"] .sympop.is-drawer .sympop-sess-note { display: none; }/* 11-27 검증 1번: 좁은 칸(.is-compact — 휴대폰 344 · 360 · 390)은 아래 칸 값 글씨를 숨기는데, 십자선(손가락 고정 포함)이 공포지수 칸의 봉을 가리키는 동안만
   값 · 날짜(「51.5 · 1/5」)를 보임. 평소(십자선 없음) 좁은 칸 모양은 그대로. 이름표 한 줄 안이라 다른 글씨와 겹치지 않음(최저 · 최고점 글씨는 이 이름표를 비켜 감) */
.pane.is-compact .pane-sub.is-probe .sub-value { display: inline; color: var(--text); font-variant-numeric: tabular-nums; }

/* 11-27 「공포 구간 진입」 알림 판(공포지수 화면 — ui/fear-zone.js): 스위치 하나 + 최근 7일 알림 목록. 누르는 자리는 44px 이상, 좁은 폭(344~)에서도 글이 줄바꿈되어 잘리지 않음 */
.fz-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.fz-panel h2 { margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
.fz-panel h3 { margin: 0; font-size: var(--fs); }
.fz-lead, .fz-note, .fz-hint, .fz-msg { margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
.fz-lead, .fz-note, .fz-hint { color: var(--muted); font-size: var(--fs-sm); }
.fz-msg { font-size: var(--fs-sm); font-weight: 600; }
.fz-msg:empty { display: none; }
.fz-member, .fz-lock, .fz-recent { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.fz-lock { align-items: flex-start; }
.fz-lock .btn { min-height: 44px; }
.fz-switch { display: flex; align-items: center; gap: var(--s3); width: 100%; max-width: 420px; min-height: 48px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fz-switch:hover { border-color: var(--muted); }
.fz-switch:focus-visible { outline: none; box-shadow: var(--focus); }
.fz-switch-name { flex: 1 1 auto; min-width: 0; font-weight: 600; word-break: keep-all; overflow-wrap: anywhere; }
.fz-track { flex: 0 0 auto; position: relative; width: 44px; height: 24px; border-radius: 12px; background: var(--line); transition: background-color 0.15s; }
.fz-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--panel); border: 1px solid var(--muted); transition: transform 0.15s; }
.fz-switch[aria-checked="true"] .fz-track { background: var(--accent); }
.fz-switch[aria-checked="true"] .fz-knob { transform: translateX(20px); border-color: var(--accent); }
.fz-state { flex: 0 0 auto; min-width: 2.5em; text-align: right; color: var(--muted); font-size: var(--fs-sm); }
.fz-switch[aria-checked="true"] .fz-state { color: var(--text); font-weight: 600; }
.fz-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s1); }
.fz-empty { color: var(--muted); font-size: var(--fs-sm); word-break: keep-all; }
.fz-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); width: 100%; min-height: 48px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fz-item:hover { border-color: var(--muted); }
.fz-item:focus-visible { outline: none; box-shadow: var(--focus); }
.fz-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fz-item-text b { word-break: keep-all; overflow-wrap: anywhere; }
.fz-item-text small { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.fz-go { flex: 0 0 auto; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .fz-track, .fz-knob { transition: none; } }
@media (max-width: 600px) { .fz-panel { padding: var(--s3); } .fz-switch { max-width: none; } }
/* ── 새 「검색기」 화면(2026-11-27 — 매매법 + 검색기 한 화면 · ui/scan-page.js) ──
   한 목록(묶음 제목 → 줄 → … → 지표 묶음 → 맨 끝 줄). 860 이상은 두 단(왼쪽 목록 + 오른쪽 상세), 미만은 한 단 + 상세는 화면 전환.
   금색(--accent)은 "고름 · 켜짐 · 방금"에만: 고른 줄(띠 + 연한 바탕) · 고른 칩 · 켜진 종 · 방금 시각 · 이름 앞 ★ · 맨 끝 줄의 낱말. 금색으로 꽉 찬 단추는 [로그인] 하나. */
.scn-page { padding: 0 var(--s4) var(--s4); display: flex; flex-direction: column; }
.scn-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); min-height: calc(56px * var(--fz)); }
.scn-head h1 { margin: 0; font-size: var(--fs-xl); line-height: 1.2; }
.scn-note { color: var(--muted); font-size: var(--fs-sm); padding: 2px var(--s2); border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.scn-gap { flex: 1; }
.scn-state { display: inline-flex; align-items: center; gap: 6px; margin-right: var(--s2); color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.scn-state i { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--up); }
.scn-state.has-dot i { display: block; }
.scn-state.is-warn { color: var(--warn); }
.scn-state.is-warn i { background: var(--warn); }
.scn-hbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.scn-hbtn.btn-ico { min-width: var(--ctl-h); padding: 0 var(--s2); }
.scn-hbtn.is-on .scn-ico { color: var(--accent); }
.scn-ico { display: block; flex: none; width: calc(16px * var(--fz)); height: calc(16px * var(--fz)); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scn-ico.is-fill .scn-ico-body { fill: currentColor; }

.scn-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; }
.scn-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* 목록 — 묶음 제목과 줄이 같은 칸 나눔(--scn-cols)을 써서 숫자가 세로로 한 줄에 섬 */
.scn-list { --scn-cols: minmax(0, 1fr) calc(100px * var(--fz)) calc(192px * var(--fz)) calc(60px * var(--fz)); --scn-end: 32px; display: flex; flex-direction: column; }
.scn-grp { flex: none; display: grid; grid-template-columns: var(--scn-cols) var(--scn-end); column-gap: var(--s3); align-items: center; min-height: calc(34px * var(--fz)); padding: 0 var(--s2) 0 var(--s4); background: var(--bg); border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.scn-grp:not(:first-child) { border-top: 1px solid var(--line); }
.scn-grp.is-plain { display: flex; }
.scn-grp-name { white-space: nowrap; }
.scn-grp-name b { color: var(--text); font-size: var(--fs); font-weight: 700; }
.scn-grp-name small { margin-left: 6px; color: var(--muted); font-size: var(--fs-sm); }
.scn-grp-sum { text-align: right; white-space: nowrap; }
.scn-grp-sum b { margin-left: 6px; color: var(--text); font-size: var(--fs); }
.scn-grp-col { white-space: nowrap; }
.scn-grp-col.is-r { text-align: right; }

.scn-row { position: relative; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) var(--scn-end); column-gap: var(--s3); align-items: center; padding-right: var(--s2); border-bottom: 1px solid var(--line-soft); }
.scn-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; pointer-events: none; }
.scn-row:hover { background: var(--raised); }
.scn-row-main { display: grid; grid-template-columns: var(--scn-cols); column-gap: var(--s3); align-items: center; min-width: 0; min-height: calc(56px * var(--fz)); padding: 0 0 0 var(--s4); background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.scn-row-main:focus-visible, .scn-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.scn-name { display: flex; align-items: center; gap: var(--s2); min-width: 0; white-space: nowrap; }
.scn-name b { font-size: 0.875rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.scn-star { flex: none; margin-right: -2px; color: var(--accent); font-size: var(--fs-sm); font-style: normal; }
.scn-tag { flex: none; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: var(--fs-sm); font-style: normal; font-weight: 400; line-height: 1.5; white-space: nowrap; }
.scn-cnt { text-align: right; white-space: nowrap; line-height: 1.2; }
.scn-cnt b { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.2px; }
.scn-parts { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.scn-parts.is-low { display: none; }
.scn-cnt.is-zero b { color: var(--muted); font-weight: 400; font-size: var(--fs-lg); opacity: 0.55; }
.scn-cnt.is-past b { color: var(--muted); font-weight: 400; font-size: var(--fs); }
.scn-sub { display: contents; }
.scn-rec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s1); min-width: 0; }
.scn-tk { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; }
.scn-tk .sym-logo { flex: none; width: calc(18px * var(--fz)); height: calc(18px * var(--fz)); font-size: calc(9px * var(--fz)); letter-spacing: -0.3px; }
.scn-last { text-align: right; white-space: nowrap; font-size: var(--fs-sm); }
.scn-when { font-style: normal; color: var(--muted); }
.scn-when.is-now { color: var(--text); }
.scn-when.is-just { color: var(--accent); font-weight: 700; }
.scn-bell, .scn-info { flex: none; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: var(--radius); color: var(--muted); cursor: pointer; }
.scn-bell { opacity: 0.7; }
.scn-bell.is-on { color: var(--accent); opacity: 1; }
.scn-bell:hover, .scn-info:hover { background: var(--raised); opacity: 1; }
.scn-info[aria-expanded="true"] { color: var(--accent); }
.scn-chev { display: none; justify-content: flex-end; color: var(--muted); opacity: 0.7; }
.scn-chev .scn-ico { width: calc(13px * var(--fz)); height: calc(13px * var(--fz)); }
.scn-row.is-dim .scn-name b { color: var(--muted); font-weight: 600; }
.scn-row.is-dim .scn-tk { color: var(--muted); font-weight: 400; }
.scn-row.is-dim .sym-logo, .scn-item.is-old .sym-logo { opacity: 0.5; }

/* 지표 묶음 줄 · 맨 끝 줄 */
.scn-prow { flex: none; display: flex; align-items: center; gap: var(--s2); min-height: calc(46px * var(--fz)); padding: 0 var(--s2) 0 var(--s4); border-bottom: 1px solid var(--line-soft); }
.scn-prow:last-child { border-bottom: 0; }
.scn-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; font-weight: 700; }
.scn-prow.is-dim .scn-pname { color: var(--muted); font-weight: 600; }
.scn-soon { margin-right: var(--s3); color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.scn-use { flex: none; display: inline-flex; align-items: center; justify-content: center; }
.scn-pick-l { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: var(--s3); }
.scn-pick-l small { flex: none; min-width: calc(80px * var(--fz)); color: var(--accent); font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.scn-pick-l span { display: flex; align-items: baseline; gap: var(--s2); min-width: 0; white-space: nowrap; }
.scn-pick-l b { font-size: 0.875rem; font-weight: 700; }
.scn-pick-l em { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: var(--fs-sm); font-style: normal; }

/* 상세 */
.scn-detail { display: none; flex-direction: column; min-width: 0; }
.scn-dh { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4) 0; }
.scn-back { display: none; align-items: center; gap: 2px; height: 44px; padding: 0 var(--s2) 0 6px; background: none; border: 0; border-radius: var(--radius); color: var(--muted); font: inherit; white-space: nowrap; cursor: pointer; }
.scn-dname { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-lg); line-height: 1.3; word-break: keep-all; }
.scn-dname:focus { outline: none; }
.scn-dtools { flex: none; display: inline-flex; align-items: center; gap: var(--s2); }
.scn-dbell { display: inline-flex; align-items: center; gap: 6px; }
.scn-dbell.is-on { border-color: var(--accent); background: var(--accent-soft); }
.scn-dbell.is-on .scn-ico { color: var(--accent); }
.scn-filter { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.scn-chips { flex: 1; display: inline-flex; flex-wrap: wrap; gap: var(--s1); }
.scn-chip { display: inline-flex; align-items: center; gap: 6px; border-color: var(--line); }
.scn-chip b { color: var(--text); font-weight: 700; }
.scn-chip[aria-pressed="true"] { font-weight: 700; }
.scn-seg { flex: none; display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.scn-seg button { height: calc(26px * var(--fz)); padding: 0 var(--s3); background: transparent; border: 0; color: var(--muted); font: inherit; white-space: nowrap; cursor: pointer; }
.scn-seg button + button { border-left: 1px solid var(--line); }
.scn-seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent); }
.scn-colhead { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--s4); align-items: center; min-height: calc(28px * var(--fz)); padding: 0 var(--s4); background: var(--bg); border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: var(--fs-sm); }
.scn-colhead > span { display: flex; padding: 0 var(--s2); }
.scn-colhead > span > span:first-child { flex: 1; }
.scn-colhead > span + span { display: none; }
.scn-items { padding: var(--s1) var(--s4); }
.scn-item { display: grid; grid-template-columns: calc(24px * var(--fz)) auto minmax(0, 1fr) auto calc(62px * var(--fz)); column-gap: var(--s2); align-items: center; width: 100%; min-height: calc(34px * var(--fz)); padding: 0 var(--s2); background: none; border: 0; border-radius: var(--radius); color: inherit; font: inherit; text-align: left; cursor: pointer; break-inside: avoid; }
.scn-item:hover { background: var(--raised); }
.scn-item .sym-logo { width: calc(22px * var(--fz)); height: calc(22px * var(--fz)); font-size: calc(10px * var(--fz)); }
.scn-item > b { min-width: calc(50px * var(--fz)); font-weight: 700; white-space: nowrap; }
.scn-item > small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--fs-sm); }
.scn-item .scn-when { text-align: right; font-size: var(--fs-sm); white-space: nowrap; }
.scn-item.is-old > b { color: var(--muted); font-weight: 600; }
.scn-more { display: flex; justify-content: center; padding: var(--s2) 0 var(--s3); border-top: 1px solid var(--line-soft); }
.scn-none { margin: var(--s3) var(--s4); min-height: 44px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.scn-none.is-slim { margin-bottom: 0; }
.scn-guide { margin: var(--s3) var(--s4) 0; padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.scn-detail > .scn-guide:last-child { margin-bottom: var(--s4); }
.scn-guide h4 { margin: var(--s1) 0 0; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }
.scn-desc, .scn-why { margin: 0; line-height: var(--lh); word-break: keep-all; }
.scn-notice { margin: 0; padding: var(--s2) var(--s3); background: var(--accent-soft); border-radius: var(--radius); line-height: var(--lh); word-break: keep-all; }
.scn-link { align-self: flex-start; color: var(--accent); text-decoration: none; }
.scn-lock { padding: 72px var(--s4); display: flex; flex-direction: column; align-items: center; gap: var(--s4); text-align: center; }
.scn-lock-ico { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.scn-lock-ico .scn-ico { width: 22px; height: 22px; }
.scn-lock b { font-size: var(--fs-lg); }
.scn-lock .btn { height: calc(36px * var(--fz)); padding: 0 28px; }
.scn-skel .scn-row { display: flex; align-items: center; gap: var(--s3); min-height: calc(56px * var(--fz)); padding: 0 var(--s4); }
.scn-skel .scn-row:hover { background: none; }
.scn-skel-bar { width: 34%; height: 12px; border-radius: 6px; background: var(--raised); }
.scn-skel-bar.is-s { width: 12%; margin-left: auto; }
:root[data-theme="light"] .scn-tag, :root[data-theme="light"] .scn-chip, :root[data-theme="light"] .scn-seg, :root[data-theme="light"] .scn-seg button + button { border-color: color-mix(in srgb, var(--muted) 50%, var(--panel)); }
:root[data-theme="light"] .scn-chip[aria-pressed="true"] { border-color: var(--accent); }
:root[data-theme="light"] .scn-cnt.is-zero b { opacity: 0.8; }
:root[data-theme="light"] .scn-row.is-dim .sym-logo, :root[data-theme="light"] .scn-item.is-old .sym-logo { opacity: 0.75; }
:root[data-theme="light"] .scn-row.is-dim .scn-tk { font-weight: 600; }

/* 넓은 화면(860 이상): 두 단. 고른 줄 표시(띠 + 연한 바탕)는 두 단일 때만 */
@media (min-width: 860px) {
  .scn-body { grid-template-columns: calc(420px * var(--fz)) minmax(0, 1fr); }
  .scn-detail { display: flex; }
  .scn-list { --scn-cols: minmax(0, 1fr) calc(88px * var(--fz)) calc(60px * var(--fz)); }
  .scn-rec, .scn-grp-col:not(.is-r) { display: none; }
  .scn-row.is-sel, .scn-prow.is-sel { background: var(--accent-soft); }
  .scn-row.is-sel::before { background: var(--accent); }
  .scn-row.is-dim.is-sel .scn-name b { color: var(--text); font-weight: 700; }
}
@media (min-width: 1280px) {
  .scn-body { grid-template-columns: calc(560px * var(--fz)) minmax(0, 1fr); }
  .scn-list { --scn-cols: minmax(0, 1fr) calc(100px * var(--fz)) calc(192px * var(--fz)) calc(60px * var(--fz)); }
  .scn-rec { display: grid; }
  .scn-grp-col:not(.is-r) { display: block; }
  .scn-items.is-two { column-count: 2; column-gap: var(--s4); column-rule: 1px solid var(--line-soft); }
  .scn-colhead.is-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .scn-colhead.is-two > span + span { display: flex; }
}
@media (min-width: 1440px) { .scn-body { grid-template-columns: calc(620px * var(--fz)) minmax(0, 1fr); } }
@media (min-width: 1600px) { .scn-body { grid-template-columns: calc(680px * var(--fz)) minmax(0, 1fr); } .scn-items.is-two { column-count: 3; } }
@media (min-width: 1920px) { .scn-page { width: 100%; max-width: 1712px; margin: 0 auto; } }

/* 좁은 화면(860 미만): 한 단 — 목록만, 줄을 누르면 화면이 상세로(뒤로 가기 있음). 누르는 자리 40px 이상 */
@media (max-width: 859px) {
  .scn-page[data-view="detail"] .scn-list, .scn-page[data-view="detail"] .scn-head { display: none; }
  .scn-page[data-view="detail"] .scn-detail { display: flex; }
  .scn-page[data-view="detail"] { padding-top: var(--s2); }
  .scn-list { --scn-cols: minmax(0, 1fr) calc(108px * var(--fz)) calc(216px * var(--fz)) calc(68px * var(--fz)); --scn-end: 72px; }
  .scn-row { grid-template-columns: minmax(0, 1fr) 44px 16px; }
  .scn-row-main { min-height: calc(60px * var(--fz)); }
  .scn-bell, .scn-info { width: 44px; height: 44px; }
  .scn-chev { display: flex; }
  .scn-prow { min-height: calc(56px * var(--fz)); }
  .scn-use, .scn-dbell, .scn-more .btn { height: calc(40px * var(--fz)); }
  .scn-hbtn { height: 40px; min-width: 40px; }
  .scn-back { display: inline-flex; }
  .scn-dh { position: sticky; top: 0; z-index: 2; flex-wrap: wrap; padding: var(--s1) var(--s1) 0; background: var(--panel); }
  .scn-back { order: 1; margin-right: auto; }
  .scn-dtools { order: 2; }
  .scn-dname { order: 3; flex: 0 0 100%; padding: var(--s3) var(--s3) 0; border-top: 1px solid var(--line); font-size: 1.125rem; font-weight: 800; }
  .scn-chip { height: 40px; }
  .scn-seg button { height: 40px; min-width: 44px; }
  .scn-items { padding: 0; }
  .scn-item { grid-template-columns: calc(24px * var(--fz)) auto minmax(0, 1fr) auto calc(62px * var(--fz)) 12px; column-gap: 10px; min-height: calc(48px * var(--fz)); padding: 0 var(--s3) 0 var(--s4); border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .scn-item .sym-logo { width: calc(24px * var(--fz)); height: calc(24px * var(--fz)); }
  .scn-item > b { min-width: 0; font-size: 0.9375rem; }
  .scn-item .scn-when { font-size: var(--fs); }
  .scn-colhead { display: none; }
  .scn-more { padding: var(--s3) var(--s4); border-top: 0; }
  .scn-more .btn { min-width: 140px; height: 44px; }
  .scn-lock .btn { height: 44px; padding: 0 36px; }
}
/* 휴대폰(600 미만): 줄을 두 층으로 — 위 이름, 아래 최근 종목 · 시각, 오른쪽 걸린 수 */
@media (max-width: 599px) {
  .scn-page { padding: 0 0 var(--s4); }
  .scn-head { gap: var(--s1); min-height: 48px; padding: var(--s2) var(--s2) var(--s2) var(--s4); }
  .scn-head h1 { font-weight: 800; }
  .scn-note { order: 9; flex: 0 0 100%; padding: 0; border: 0; border-radius: 0; }
  .scn-state { margin-right: var(--s1); }
  .scn-hbtn { background: transparent; border-color: transparent; padding: 0 var(--s2); color: var(--muted); font-weight: 600; }
  .scn-hbtn.is-on { color: var(--accent); }
  .scn-hbtn .scn-ico { width: calc(19px * var(--fz)); height: calc(19px * var(--fz)); }
  .scn-card { border-left: 0; border-right: 0; border-radius: 0; }
  .scn-lock-card { margin: var(--s2) var(--s4) 0; border: 1px solid var(--line); border-radius: var(--radius); }
  .scn-lock { padding: 56px var(--s4); }
  .scn-grp { display: flex; align-items: baseline; gap: 6px; padding: 7px var(--s4) 6px; background: var(--panel); }
  .scn-grp-col { display: inline; }
  .scn-grp-col::before { content: "· "; }
  .scn-grp-sum { order: 5; margin-left: auto; margin-right: 54px; }
  .scn-grp-sum b { margin-left: 4px; }
  .scn-grp-end { display: none; }
  .scn-row { grid-template-columns: minmax(0, 1fr) 40px 12px; column-gap: 2px; }
  .scn-row-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name cnt" "sub cnt" "low cnt"; row-gap: 5px; column-gap: var(--s3); align-content: center; padding: 7px 6px 7px var(--s4); }
  .scn-name { grid-area: name; gap: 6px; }
  .scn-name b { font-size: 0.9375rem; }
  .scn-cnt { grid-area: cnt; }
  .scn-sub { grid-area: sub; display: flex; align-items: center; gap: var(--s2); min-width: 0; white-space: nowrap; }
  .scn-rec { display: inline-flex; gap: var(--s2); }
  .scn-tk { gap: 4px; overflow: visible; }
  .scn-tk:nth-child(n+3) { display: none; }
  .scn-last { text-align: left; }
  .scn-when::before { content: "·"; margin-right: var(--s2); color: var(--muted); font-weight: 400; }
  .scn-item .scn-when::before { content: none; }
  .scn-parts.is-low { grid-area: low; margin-top: 0; }
  .scn-row.is-dim .scn-row-main { min-height: calc(52px * var(--fz)); }
  .scn-row.is-dim .scn-cnt b { font-size: 0.9375rem; font-weight: 500; opacity: 0.8; }
  .scn-bell, .scn-info { width: 40px; height: 44px; }
  .scn-bell .scn-ico, .scn-info .scn-ico { width: calc(19px * var(--fz)); height: calc(19px * var(--fz)); }
  .scn-pname, .scn-pick-l b { font-size: 0.9375rem; }
  .scn-prow { padding-right: var(--s1); gap: var(--s1); }
  .scn-pick { margin-top: var(--s3); border-top: 1px solid var(--line); }
  .scn-pick-l { flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.3; }
  .scn-pick-l small { min-width: 0; }
  .scn-pick-l span { max-width: 100%; }
  .scn-filter { gap: 6px; padding: var(--s2) var(--s4); }
  .scn-chip { padding: 0 10px; background: var(--panel); }
  .scn-chip[aria-pressed="true"], .scn-chip[aria-pressed="true"] b { color: var(--accent); }
  .scn-seg { background: var(--panel); }
  .scn-seg button { padding: 0 10px; }
  .scn-seg button[aria-pressed="true"] { background: var(--raised); box-shadow: none; }
  .scn-guide { margin: var(--s3) var(--s4) 0; }
}
/* 아주 좁은 폭(360 이하) · 큰 글자: 최근 종목 1개, 부분 숫자는 이름 아래 줄로, 상태는 점과 시각만 넘치지 않게 */
@media (max-width: 360px) {
  .scn-tk:nth-child(n+2) { display: none; }
  .scn-cnt .scn-parts { display: none; }
  .scn-parts.is-low { display: block; }
  .scn-grp-col { display: none; }
  .scn-head h1 { font-size: 1.25rem; }
}
@media (max-width: 599px) {
  :root[data-fs="lg"] .scn-tk:nth-child(n+2), :root[data-fs="xl"] .scn-tk:nth-child(n+2) { display: none; }
  :root[data-fs="lg"] .scn-cnt .scn-parts, :root[data-fs="xl"] .scn-cnt .scn-parts { display: none; }
  :root[data-fs="lg"] .scn-parts.is-low, :root[data-fs="xl"] .scn-parts.is-low { display: block; }
  :root[data-fs="lg"] .scn-grp-col, :root[data-fs="xl"] .scn-grp-col { display: none; }
}
.scn-tk > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.scn-pick-l, .scn-pick-l span { overflow: hidden; }
.scn-pick-l b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) { .scn-page[data-view="detail"] { padding-top: 0; } .scn-detail.scn-card { border-top: 0; } }
@media (max-width: 360px) { .scn-state-w.is-opt { display: none; } .scn-name { flex-wrap: wrap; row-gap: 2px; } }
@media (max-width: 599px) { :root[data-fs="lg"] .scn-state-w.is-opt, :root[data-fs="xl"] .scn-state-w.is-opt { display: none; } :root[data-fs="lg"] .scn-name, :root[data-fs="xl"] .scn-name { flex-wrap: wrap; row-gap: 2px; } }
/* 41단계 2단계(11-27): 유료 시세(Twelve Data) 봉이 화면에 있을 때 칸 아래 왼쪽의 출처 표시(고리) */
.pane-credit { position: absolute; left: 6px; z-index: 3; padding: 0 6px; border-radius: 3px; background: var(--veil); color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }
.pane-credit[hidden] { display: none; }

/* 11-27 「구간 진입」 알림 판의 날짜별 기록(ui/fear-zone.js): [날짜별 기록 보기] → 종류 고르기 · 종목 찾기 · 날짜 묶음 · [더 보기]. 누르는 자리 44px 이상, 344 폭에서도 줄바꿈되어 잘리지 않음 */
.fz-log { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; margin-top: var(--s2); }
.fz-log-open, .fz-log-more { align-self: flex-start; min-height: 44px; }
.fz-log-body { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.fz-log-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); min-width: 0; }
.fz-log-kinds { display: flex; flex-wrap: wrap; gap: var(--s1); }
.fz-log-kinds .chip { min-height: 44px; min-width: 44px; }
.fz-log-search { flex: 1 1 160px; min-width: 0; max-width: 320px; height: 44px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; }
.fz-log-search:focus-visible { outline: none; box-shadow: var(--focus); }
.fz-log-search::placeholder { color: var(--muted); }
.fz-log-days { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.fz-log-day { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.fz-log-day h4 { margin: 0; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.fz-item.is-hot { border-left: 3px solid var(--accent); }
@media (max-width: 600px) { .fz-log-search { max-width: none; flex-basis: 100%; } }
/* 11-27 선생님 휴대폰 화면(dev_3925): 차트 왼쪽 아래에 떠 있던 「◀ ①②③」 · 「마법사 ①~⑤」가 아래 칸(공포지수)과 캔들을 가림 →
   차트 위에는 띄우지 않고(.wiz-pill · .wiz-corner 는 늘 숨김) 「차트 읽기」 줄 머리에 둠. 보이는 크기는 작게, 누르는 자리는 40px 이상 */
.wiz-pill, .wiz-corner { display: none !important; }
.wiz-head .wiz-jump { position: relative; flex: none; font-weight: 700; color: var(--wiz-badge-text); background: var(--wiz-badge); border-color: transparent; white-space: nowrap; }
.wiz-head .wiz-jump::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 40px; transform: translateY(-50%); }
.wiz-head .wiz-jump[hidden], .wiz-corner-tag[hidden] { display: none; }
.wiz-corner-tag { flex: none; padding: 1px 6px; border: 1px solid var(--wiz-level); border-radius: var(--radius); color: var(--text); font-size: var(--fs-sm); white-space: nowrap; }
.wiz-head .wiz-title { white-space: nowrap; }
@media (min-width: 601px) { .wiz-head { flex-wrap: wrap; row-gap: 4px; } }
/* 새 검색기 화면 손질(11-27 검증 뒤): 이름이 줄기 전에 다른 칸이 양보 — 이름 > 걸린 수 > 마지막 > 최근. 기호(티커)는 자르지 않음 */
.scn-rec { display: flex; flex-wrap: wrap; align-content: flex-start; column-gap: var(--s3); height: calc(18px * var(--fz)); overflow: hidden; }
.scn-tk { flex: none; overflow: visible; }
.scn-tk > span:last-child { overflow: visible; text-overflow: clip; }
.scn-item > b { min-width: max-content; overflow: visible; text-overflow: clip; }
@media (min-width: 860px) {
  .scn-name b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; }
  .scn-rec { display: none; }
}
@media (min-width: 1280px) { .scn-rec { display: flex; } }
/* 한국어가 아닌 화면은 이름이 길어 1600 미만 두 단에서는 「최근」 칸을 이름에 내줌 */
@media (min-width: 1280px) and (max-width: 1599px) {
  :root:not(:lang(ko)) .scn-list { --scn-cols: minmax(0, 1fr) calc(100px * var(--fz)) calc(60px * var(--fz)); }
  :root:not(:lang(ko)) .scn-rec, :root:not(:lang(ko)) .scn-grp-col:not(.is-r) { display: none; }
}
@media (min-width: 1600px) { :root:not(:lang(ko)) .scn-list { --scn-cols: minmax(0, 1fr) calc(100px * var(--fz)) calc(128px * var(--fz)) calc(60px * var(--fz)); } }
@media (max-width: 599px) { .scn-rec { display: inline-flex; flex-wrap: nowrap; height: auto; overflow: visible; column-gap: var(--s2); } }
@media (min-width: 860px) { .scn-name b { overflow-wrap: normal; } }
@media (min-width: 1280px) and (max-width: 1439px) { .scn-list { --scn-cols: minmax(0, 1fr) calc(100px * var(--fz)) calc(128px * var(--fz)) calc(60px * var(--fz)); } }
@media (min-width: 860px) and (max-width: 1279px) { :root:not(:lang(ko)) .scn-list { --scn-cols: minmax(0, 1fr) calc(88px * var(--fz)) calc(92px * var(--fz)); } }
@media (min-width: 1280px) and (max-width: 1599px) { :root:not(:lang(ko)) .scn-list { --scn-cols: minmax(0, 1fr) calc(100px * var(--fz)) calc(92px * var(--fz)); } }
@media (min-width: 1600px) { :root:not(:lang(ko)) .scn-list { --scn-cols: minmax(0, 1fr) calc(100px * var(--fz)) calc(128px * var(--fz)) calc(92px * var(--fz)); } }
:root:not(:lang(ko)) .scn-item { grid-template-columns: calc(24px * var(--fz)) auto minmax(0, 1fr) auto minmax(calc(62px * var(--fz)), max-content); }
@media (max-width: 859px) { :root:not(:lang(ko)) .scn-item { grid-template-columns: calc(24px * var(--fz)) auto minmax(0, 1fr) auto minmax(calc(62px * var(--fz)), max-content) 12px; } }
/* 11-27 사장님 PC 깜빡임(공포지수 칸 이름표 줄): 값 자리 폭은 chart-pane 이 글자 수(ch)로 늘 잡아 둠 — 숫자는 같은 폭(tabular)이라 값 · 날짜가 붙었다 떨어져도
   이름표 폭과 뒤 단추(? · ▲ · 크게 보기 · 원래대로) 자리가 그대로. 줄은 마우스를 차트로 통과시키고(.pane-subs) 단추만 눌림 */
.pane-sub .sub-value { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pane.is-compact .pane-sub .sub-value { min-width: 0 !important; } /* 좁은 칸(휴대폰 · 마우스 없음)은 값을 손가락 고정 때만 보이므로 폭을 잡아 두지 않음 */
/* 11-27 검증: 344 「아주 크게」에서 「차트 읽기」 줄 끝 ▴ 가 화면 밖으로 잘림 → 휴대폰 폭에서는 「◀ ①②③」 · 제목이 먼저 줄어듦(「◀ ①…」 · 「차트…」),
   「다시 읽기」 · 「끄기」 · ▴ 는 그대로(▴ 는 늘 오른쪽 끝에 보임) */
@media (max-width: 600px) {
  .wiz-head { min-width: 0; max-width: 100%; }
  .wiz-head .wiz-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .wiz-head .wiz-jump { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 3.4em; }
  .wiz-head .wiz-jump-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wiz-head .wiz-fold { flex: none; margin-left: auto; }
}

/* ── MD1(11-28) 휴대폰 그리기: 터치패드식 점 옮기기의 안내 띠 · 고른 그림의 아래 얇은 설정 줄 — 둘 다 화면 맨 아래에 고정(차트를 가리지 않게 — 선생님 11-27 "설정 창이 차트를 덮음")
   색 · 굵기 · 잠금 · ⋯ · 지우기 한 줄. 색 · 굵기를 누르면 그 줄 위로 한 줄 펼쳐짐. 넓은 화면(PC · 태블릿)의 띠는 예전 그대로(.is-strip 은 손가락 기기 + 좁은 칸에서만 붙음) */
.dfb-wbtn { display: none; }
.dfb-wnum { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.draw-float.is-strip {
  position: fixed; z-index: 45; left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  width: auto; max-width: none; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 14px; container-type: normal;
}
.draw-float.is-strip .dfb-sep, .draw-float.is-strip .dfb-set, .draw-float.is-strip .dfb-widths, .draw-float.is-strip > .dfb-btn[data-st="d"] { display: none; }
.draw-float.is-strip .dfb-btn, .draw-float.is-strip .dfb-w { width: 44px; height: 44px; border-radius: var(--radius); }
.draw-float.is-strip .dfb-wbtn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; min-width: 56px; padding: 0 8px; }
.draw-float.is-strip .dfb-wbtn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.draw-float.is-strip .dfb-wbtn .dfb-line { height: 2px; }
.draw-float.is-strip .dfb-btn[data-st="del"] { width: 52px; min-width: 52px; margin-left: auto; padding: 0; }
.draw-float.is-strip .dfb-del-text { display: none; }
/* 펼친 줄(색 여덟 · 굵기 넷 + 점선)은 한 줄 위에 */
.draw-float.is-strip.is-colors .dfb-colors { display: flex; order: -1; flex: 1 0 100%; justify-content: space-between; gap: 4px; padding: 2px 0 4px; }
.draw-float.is-strip.is-colors .dfb-sw { flex: 1 1 0; width: auto; max-width: 44px; height: 40px; border-radius: var(--radius); }
.draw-float.is-strip.is-widths .dfb-widths { display: flex; order: -1; flex: 0 0 auto; gap: 6px; padding: 2px 0 4px; }
.draw-float.is-strip.is-widths > .dfb-btn[data-st="d"] { display: inline-flex; order: -1; margin: 0 auto 2px 6px; }
.draw-float.is-strip.is-widths::before { content: ""; order: -1; flex: 1 0 100%; height: 0; }
.draw-float.is-strip.is-widths .dfb-widths { order: -3; }
.draw-float.is-strip.is-widths > .dfb-btn[data-st="d"] { order: -2; }
/* 안내 띠: 「1/2 · 밀어서 점을 옮기고, 한 번 눌러 찍으세요」 + ↶ + 그만 */
.draw-hint-step[hidden], .draw-hint-undo[hidden] { display: none; }
.draw-hint-step {
  flex: none; min-width: 40px; padding: 3px 8px; border-radius: 999px; text-align: center;
  background: var(--accent); color: var(--on-accent); font-size: var(--fs-sm); font-weight: 800; font-variant-numeric: tabular-nums;
}
.draw-hint-undo {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
}
.draw-hint.is-strip {
  position: fixed; z-index: 45; left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  transform: none; max-width: none; white-space: normal; line-height: 1.3; border-radius: 14px; padding: 5px 6px 5px 10px; min-height: 54px;
}
.draw-hint.is-strip .draw-hint-text { flex: 1 1 auto; overflow: visible; text-overflow: clip; word-break: keep-all; overflow-wrap: anywhere; }
.draw-hint.is-strip .draw-hint-stop { height: 44px; min-width: 52px; }
@media (pointer: coarse) { .draw-hint-undo:active { background: var(--accent-soft); } }
/* 그리는 도구가 켜진 동안(손가락 기기)에는 칸 높이 손잡이가 손가락을 가로채지 않게 — 터치패드식은 아무 데서나 밀므로 손잡이 줄(높이 44px)에서 시작하면 칸 높이가 바뀌었음 */
@media (pointer: coarse) { .pane-chart.is-drawing ~ .pane-grips .sub-grip { pointer-events: none; } }
/* 그리기 판(휴대폰): 맨 위 「자주」 줄(추세선 · 수평선 · 되돌림 · 지우개) · 「계속 그리기」 단추는 뺌(켜 둔 채 잊으면 터치마다 그려짐 — 11-28 사장님). 넓은 화면의 세로 도구 줄은 그대로 */
.draw-quick { display: none; }
@media (max-width: 600px) {
  .draw-box.is-open .draw-quick { display: block; }
  .draw-box.is-open .draw-slot[data-group="keep"] { display: none; }
  /* 「차트 크게」(js/ui/m-chart.js — <html data-chart-full>)에서는 차트가 화면 끝까지 차므로, 아래 고정 줄이 떠 있는 동안(<html data-draw-strip>) 차트가 그만큼 자리를 비켜 줌 */
  :root[data-route="/chart"][data-chart-full][data-draw-strip] .chart-zone { margin-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
}

/* ── KH1(11-28) 단축키를 쓰는 자리에 보이기(사장님: "도구창 열었을 때 각 도구별로 나오게") — 그리기 묶음 판 항목 오른쪽 끝의 키 모양 · 도구 단추 말풍선 · 분할 메뉴 아래 한 줄.
   마우스가 있는 넓은 화면에서만: 손가락 기기 · 휴대폰 폭에서는 키 글을 보이지 않음(맨 아래 조건). 키 이름은 js/util/draw-keys.js 의 표 그대로 */
.kcaps { display: inline-flex; flex: none; align-items: center; gap: 2px; margin-left: auto; padding-left: var(--s3); }
.kcaps kbd {
  display: inline-block; min-width: 1.5em; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px;
  background: var(--bg); color: var(--muted); font: 600 calc(11px * var(--fz)) var(--font); line-height: 1.5; text-align: center;
}
.kcaps-plus { color: var(--muted); font-size: calc(10px * var(--fz)); }
.draw-item:hover .kcaps kbd, .draw-item[aria-pressed="true"] .kcaps kbd { color: var(--text); }
.split-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); margin: var(--s3) 0 0; padding-top: var(--s2); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.split-keys .kcaps { margin: 0 var(--s3) 0 0; padding-left: 0; }
/* 도구 단추 말풍선: 이름 뒤에 키(「추세선 · Alt+T」) — 키가 있는 단추만 */
@media (hover: hover) and (pointer: fine) {
  .draw-btn[data-tip][data-keys]:hover::after, .draw-btn[data-tip][data-keys]:focus-visible::after { content: attr(data-tip) " · " attr(data-keys); }
}
@media (hover: none), (pointer: coarse), (max-width: 600px) { .kcaps, .split-keys { display: none; } }

/* ── LBL(11-27) 선생님 dev_4027 · dev_4031: 손가락으로 아래 칸 경계 손잡이를 한 번 누르면 "올림" 상태가 남아 그 손잡이만 짙고 굵은 선으로 보였음
   (손가락 기기는 누른 자리에 올림 상태가 다음 누름까지 남음) → 손가락 기기에서는 끄는 동안 · 키보드 초점일 때만 강조, 평소에는 다른 경계와 같은 모양 ── */
@media (hover: none), (pointer: coarse) {
  .sub-grip:hover:not(.is-dragging):not(:focus-visible)::after { background: transparent; }
  .sub-grip:hover:not(.is-dragging):not(:focus-visible)::before { opacity: 0.9; border-color: var(--line); }
}

/* ── SA1(11-28) 「검색기」 시안 A(사장님이 고름 — "처음 보는 사람이 5초 안에 아는가") · ui/scan-page.js ──
   넓은 화면(860 이상): 매매법 카드(단타 상자 · 스윙 상자) → 고른 매매법의 종목 표(폭에 따라 여러 단) → 오른쪽에 지표 묶음 · 표시 읽는 법.
   좁은 화면(860 미만): 같은 카드를 한 줄 모양으로(한 화면에 매매법이 다 들어오는 목록) → 누르면 종목 화면. 휴대폰(600 이하)은 짧은 글(.sa-m)만.
   색의 뜻(이 화면에서는 하나씩만): 청록 = 단타 · 보라 = 스윙 · 금색 = 고름/알림 켜짐 · 주황 띠 = 공시 확인 · 파랑/주황 점 = 부분(첫째/둘째). 오름 · 내림 색(초록 · 빨강)은 쓰지 않음.
   글자 · 간격은 .sa-page 의 글자 크기(em)를 따라감 — 1920 이상 · 2400 이상에서 한 단계씩 키움. 색은 tokens.css 변수만.
   다른 폭의 @media 가 있어 M1 묶음(파일 끝까지 휴대폰 조건만) 바로 앞에 둠. 옛 .scn-* 묶음은 그대로(작은 부품 .scn-ico · .scn-use · .scn-tag · .scn-info · .scn-lock · .scn-guide · .scn-none · .scn-state 는 같이 씀) */
.sa-page {
  --k: var(--fz); --sa-scalp: var(--logo-3); --sa-swing: var(--logo-2);
  --sa-t0: var(--dsw-4); --sa-t1: var(--dsw-2); --sa-t2: var(--dsw-7); --sa-t3: var(--dsw-5); --sa-bell: 7.8em; --pw: 4.4em;
  display: flex; flex-direction: column; gap: 1em; padding: 0 var(--s4) var(--s4); font-size: var(--fs);
}
:root:not(:lang(ko)) .sa-page { --sa-bell: 10em; --pw: 7.2em; }
:root:lang(ja) .sa-page { --sa-bell: 12em; }
.sa-m { display: none; }
.sa-page .is-t0 { --tc: var(--sa-t0); }
.sa-page .is-t1 { --tc: var(--sa-t1); }
.sa-page .is-t2 { --tc: var(--sa-t2); }
.sa-page .is-t3 { --tc: var(--sa-t3); }
.sa-page .scn-ico { width: 1.25em; height: 1.25em; }
.sa-page .sym-logo { flex: none; width: calc(var(--lg, 22px) * var(--k)); height: calc(var(--lg, 22px) * var(--k)); font-size: calc(var(--lg, 22px) * var(--k) * 0.42); letter-spacing: -0.3px; }
/* 밝은 화면: 흰 그림 로고가 흰 바탕에 묻히지 않게 어두운 원 위에 */
:root[data-theme="light"] .sa-page .sym-logo.has-img:not(.on-plate) { background: var(--text); }

/* 머리 */
.sa-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5em 1em; min-height: 4.2em; }
.sa-title { flex: 1 1 auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3em 1em; min-width: 0; }
.sa-title h1 { margin: 0; font-size: 1.7em; line-height: 1.2; }
.sa-lead { margin: 0; font-size: 1.08em; line-height: 1.4; word-break: keep-all; }
.sa-page .scn-note { align-self: center; font-size: 0.92em; }
.sa-tools { display: inline-flex; align-items: center; gap: 0.6em; margin-left: auto; }
.sa-page .scn-state { margin-right: 0.2em; font-size: 0.92em; }
.sa-allbell, .sa-sound, .sa-dbell { display: inline-flex; align-items: center; justify-content: center; gap: 0.45em; height: 2.4em; font-size: 1em; }
/* [차트에 켜기]: 휴대폰에서는 글자 크기 0 + 짧은 글(data-short)이라 높이를 em 으로 잡지 않음 */
.sa-page .scn-use { height: calc(31px * var(--k)); }
.sa-page .scn-use:not([data-short]) { font-size: 1em; }
.sa-sound { min-width: 2.4em; padding: 0 0.6em; }
.sa-allbell.is-on, .sa-dbell.is-on { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.sa-allbell.is-on .scn-ico, .sa-dbell.is-on .scn-ico, .sa-sound.is-on .scn-ico { color: var(--accent); }
.sa-onoff { padding-left: 0.5em; border-left: 1px solid var(--line); color: var(--muted); font-style: normal; font-weight: 400; }
.sa-allbell.is-on .sa-onoff { border-left-color: var(--accent); color: var(--accent); font-weight: 700; }

/* 매매법 상자(단타 · 스윙) */
.sa-body { display: flex; flex-direction: column; gap: 1.3em; min-width: 0; }
.sa-groups { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.sa-grp { --g: var(--muted); --n: 3; --h: 2; flex: 1 1 0; min-width: 0; padding: 0.8em; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--g); border-radius: var(--radius); }
.sa-grp.is-scalp { --g: var(--sa-scalp); }
.sa-grp.is-swing { --g: var(--sa-swing); }
.sa-grp[data-n="1"] { --n: 1; --h: 1; }
.sa-grp[data-n="2"] { --n: 2; --h: 1; }
.sa-grp[data-n="4"] { --n: 4; --h: 2; }
.sa-grp[data-n="5"] { --n: 5; --h: 3; }
.sa-grp[data-n="6"] { --n: 6; --h: 3; }
.sa-grp[data-n="7"] { --n: 7; --h: 4; }
.sa-grp[data-n="8"] { --n: 8; --h: 4; }
.sa-grp-h { display: flex; align-items: center; gap: 0.6em; min-width: 0; margin-bottom: 0.8em; white-space: nowrap; }
.sa-grp-name { font-size: 1.35em; font-weight: 800; }
.sa-pill { flex: none; padding: 0.1em 0.7em; border-radius: 999px; background: var(--raised); color: var(--text); font-size: 0.92em; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.sa-pill.is-scalp { --g: var(--sa-scalp); }
.sa-pill.is-swing { --g: var(--sa-swing); }
.sa-grp.is-scalp .sa-pill, .sa-grp.is-swing .sa-pill, .sa-pill.is-scalp, .sa-pill.is-swing { background: var(--g); color: var(--logo-text); }
.sa-grp-d { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 0.95em; }
.sa-grp-sum { flex: none; display: inline-flex; align-items: baseline; gap: 0.35em; margin-left: auto; color: var(--muted); font-size: 0.95em; }
.sa-grp-sum b { color: var(--text); font-size: 1.3em; font-variant-numeric: tabular-nums; }
.sa-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8em; }

/* 매매법 카드 */
.sa-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); }
.sa-card:hover { border-color: var(--muted); }
.sa-main {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "line line" "cnt last" "parts parts" "foot foot"; grid-template-rows: auto auto 1fr auto auto;
  align-items: end; gap: 0.25em 0.6em; min-width: 0; padding: 0.9em 1em 0.7em; background: none; border: 0; border-radius: inherit; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.sa-main:focus-visible, .sa-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.sa-name { grid-area: name; align-self: start; display: flex; align-items: center; flex-wrap: wrap; gap: 0.25em 0.5em; min-width: 0; min-height: 1.9em; margin-right: var(--sa-bell); }
.sa-card.no-bell .sa-name { margin-right: 0; }
.sa-name b { font-size: 1.3em; font-weight: 800; line-height: 1.25; word-break: keep-all; }
.sa-star { margin-right: -0.2em; color: var(--accent); font-size: 1.1em; font-style: normal; }
.sa-page .sa-tag { font-size: 0.88em; }
.sa-page .sa-tag.is-doc { border-color: var(--warn); color: var(--warn); }
.sa-line { grid-area: line; align-self: start; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-height: 1.35em; overflow: hidden; color: var(--muted); font-size: 0.95em; line-height: 1.35; word-break: keep-all; }
.sa-cnt { grid-area: cnt; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.35em; margin-top: 0.5em; white-space: nowrap; line-height: 1.05; }
.sa-cnt small { color: var(--muted); font-size: 0.95em; }
.sa-cnt small:first-child { flex: 0 0 100%; margin-bottom: 0.25em; font-size: 0.9em; }
.sa-cnt b { font-size: 2.5em; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sa-cnt.is-zero b { color: var(--muted); font-weight: 600; }
.sa-last { grid-area: last; display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; line-height: 1.3; }
.sa-last small { color: var(--muted); font-size: 0.85em; }
.sa-when { color: var(--muted); font-style: normal; }
.sa-when.is-now { color: var(--text); font-weight: 700; }
.sa-when.is-just { color: var(--accent); font-weight: 700; }
.sa-parts { grid-area: parts; display: flex; flex-direction: column; gap: 0.4em; min-width: 0; margin-top: 0.2em; }
.sa-bar { display: flex; gap: 2px; height: 0.4em; overflow: hidden; border-radius: 999px; background: var(--line); }
.sa-seg { display: block; flex: 1 1 0; min-width: 3px; background: var(--tc); }
.sa-pts { display: flex; flex-wrap: wrap; gap: 0.2em 0.9em; font-size: 0.92em; }
.sa-pt { display: inline-flex; align-items: center; gap: 0.35em; color: var(--text); font-style: normal; white-space: nowrap; }
.sa-pt::before { content: ""; flex: none; width: 0.6em; height: 0.6em; border-radius: 2px; background: var(--tc); }
.sa-pt b { font-weight: 700; }
.sa-foot { grid-area: foot; display: flex; align-items: center; gap: 0.6em; min-width: 0; min-height: 2.3em; margin-top: 0.5em; padding-top: 0.5em; overflow: hidden; border-top: 1px solid var(--line-soft); white-space: nowrap; }
.sa-foot small { flex: none; color: var(--muted); font-size: 0.85em; }
.sa-rec { display: flex; flex-wrap: wrap; gap: 0 0.8em; min-width: 0; height: 1.6em; overflow: hidden; }
.sa-tk { --lg: 18px; display: inline-flex; align-items: center; gap: 0.35em; height: 1.6em; font-size: 0.92em; font-weight: 700; }
.sa-past { padding: 0.15em 0.8em; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 0.92em; }
.sa-past.is-none { border-style: dashed; color: var(--muted); }
.sa-bell {
  position: absolute; top: 0.85em; right: 0.8em; z-index: 1; display: inline-flex; align-items: center; gap: 0.3em; max-width: var(--sa-bell); height: 2em; padding: 0 0.7em;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: inherit; font-size: 0.88em; white-space: nowrap; cursor: pointer;
}
.sa-page .sa-bell .scn-ico { width: 1.1em; height: 1.1em; }
.sa-bell:hover { border-color: var(--muted); color: var(--text); }
.sa-bell.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.sa-bell > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sa-bell.is-sample { position: static; max-width: none; cursor: default; }
.sa-chev { display: none; }
.sa-watch { position: absolute; top: -0.85em; left: 0.9em; z-index: 1; display: inline-flex; align-items: center; gap: 0.3em; padding: 0.05em 0.7em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 0.85em; font-weight: 700; white-space: nowrap; }
.sa-page .sa-watch .scn-ico { width: 1.05em; height: 1.05em; }
.sa-card.is-dim { background: transparent; border-style: dashed; }
.sa-card.is-dim .sa-name b { color: var(--muted); }
.sa-skel .sa-card { min-height: 9em; padding: 1em; display: flex; flex-direction: column; gap: 0.8em; }
.sa-skel-bar { width: 60%; height: 12px; border-radius: 6px; background: var(--line); }
.sa-skel-bar.is-s { width: 30%; }
.sa-lock-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* 종목 표 */
.sa-lower { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.sa-detail { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); }
.sa-dh { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6em 1em; padding: 1em 1.2em 0.4em; }
.sa-back { display: none; }
.sa-dtitle { flex: 1 1 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 0.4em 0.8em; min-width: 0; }
.sa-dname { margin: 0; font-size: 1.5em; font-weight: 800; line-height: 1.25; word-break: keep-all; }
.sa-dname:focus { outline: none; }
.sa-dtitle .sa-line { display: block; min-height: 0; font-size: 1.05em; }
.sa-dtools { flex: none; display: inline-flex; align-items: center; gap: 0.6em; margin-left: auto; }
.sa-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6em 1em; padding: 0.6em 1.2em 0.9em; border-bottom: 1px solid var(--line); }
.sa-chips { display: inline-flex; flex-wrap: wrap; gap: 0.4em; }
.sa-chip { display: inline-flex; align-items: center; gap: 0.45em; height: 2.2em; padding: 0 0.9em; border-color: var(--line); border-radius: 999px; font-size: 1em; }
.sa-chip b { color: var(--text); font-weight: 700; }
.sa-chip[class*="is-t"]::before { content: ""; flex: none; width: 0.6em; height: 0.6em; border-radius: 2px; background: var(--tc); }
.sa-chip[aria-pressed="true"] { font-weight: 700; }
.sa-mkt { padding-left: 1em; border-left: 1px solid var(--line); }
.sa-seg { flex: none; display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.sa-seg button { display: inline-flex; align-items: center; gap: 0.4em; height: 2.2em; padding: 0 1em; background: transparent; border: 0; color: var(--muted); font: inherit; white-space: nowrap; cursor: pointer; }
.sa-seg button + button { border-left: 1px solid var(--line); }
.sa-seg button[aria-pressed="true"] { background: var(--raised); color: var(--text); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.sa-hint { margin: 0 0 0 auto; color: var(--muted); font-size: 0.95em; }
.sa-doc { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5em; margin: 0.9em 1.2em 0; padding: 0.6em 0.9em; background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius); line-height: 1.4; }
.sa-doc b, .sa-doc .scn-ico { flex: none; color: var(--warn); }
.sa-colhead, .sa-items { --col: 27em; --gap: 2em; }
/* 머리 줄: 표의 단 수와 같은 수만 보임(같은 폭 계산) — 넘치는 것은 높이 0 인 둘째 줄로 가서 가려짐 */
.sa-colhead { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--col), 1fr)); grid-template-rows: auto; grid-auto-rows: 0; column-gap: var(--gap); overflow: hidden; padding: 0 1.2em; background: var(--bg); border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.sa-colhead > span { display: grid; grid-template-columns: minmax(0, 1fr) var(--pw) 5.6em 4.2em; column-gap: 0.7em; align-items: center; min-height: 2.2em; padding: 0 0.5em; }
.sa-colhead > span > span { font-size: 0.9em; white-space: nowrap; }
.sa-colhead > span > span:nth-child(n+3) { text-align: right; }
.sa-items { columns: var(--col) auto; column-gap: var(--gap); column-rule: 1px solid var(--line-soft); padding: 0 1.2em 0.4em; }
.sa-item {
  --lg: 24px; display: grid; grid-template-columns: calc(var(--lg) * var(--k)) max-content minmax(0, 1fr) var(--pw) 5.6em 4.2em; column-gap: 0.7em; align-items: center; width: 100%; min-height: 2.9em; padding: 0 0.5em;
  background: none; border: 0; border-bottom: 1px solid var(--line-soft); color: inherit; font: inherit; text-align: left; cursor: pointer; break-inside: avoid;
}
.sa-item:hover { background: var(--raised); }
.sa-item:hover .sa-go { color: var(--accent); }
.sa-item > b { font-size: 1.08em; font-weight: 700; white-space: nowrap; }
.sa-item > small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.95em; }
.sa-item > .sa-pt { justify-self: start; max-width: 100%; padding: 0.1em 0.65em; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--tc) 16%, transparent); font-size: 0.92em; font-weight: 700; }
.sa-item .sa-when { text-align: right; white-space: nowrap; }
.sa-go { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.15em; color: var(--muted); font-size: 0.92em; white-space: nowrap; }
.sa-page .sa-go .scn-ico { width: 0.95em; height: 0.95em; }
.sa-item.is-old > b { color: var(--muted); }
.sa-item.is-old .sym-logo { opacity: 0.6; }
.sa-more { display: flex; justify-content: center; padding: 0.8em 0 1em; }
.sa-more .btn { height: 2.4em; min-width: 9em; font-size: 1em; }
.sa-page .scn-none { margin: 1em 1.2em; }
.sa-page .scn-guide { margin: 0.8em 1.2em 0; }
.sa-detail > .scn-guide:last-child { margin-bottom: 1.2em; }
/* 지금 걸린 종목이 몇 개뿐(또는 없음): 큰 카드 + 이 매매법 한눈 정리 + 지난 것 */
.sa-few { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2em; padding: 1em 1.2em 1.2em; }
.sa-few-main { display: flex; flex-direction: column; gap: 0.8em; min-width: 0; }
.sa-few .sa-colhead, .sa-few .sa-items { padding-left: 0; padding-right: 0; }
.sa-few .sa-colhead { margin-bottom: -0.8em; border: 1px solid var(--line-soft); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.sa-few .sa-items { padding-bottom: 0; border: 1px solid var(--line-soft); border-radius: 0 0 var(--radius) var(--radius); }
.sa-few .sa-items .sa-item:last-child { border-bottom: 0; }
.sa-few .scn-none { margin: 0; }
.sa-sub { display: flex; align-items: center; gap: 0.5em; margin: 0; font-size: 1.1em; font-weight: 700; }
.sa-sub b { font-variant-numeric: tabular-nums; }
.sa-sub small { color: var(--muted); font-size: 0.85em; font-weight: 400; }
.sa-few-main > .sa-sub + .sa-sub, .sa-few-main > .sa-bigs + .sa-sub, .sa-few-main > .scn-none + .sa-sub { margin-top: 0.6em; }
.sa-bigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(21em, 1fr)); gap: 0.8em; }
.sa-item.is-big {
  --lg: 44px; grid-template-columns: auto max-content minmax(0, 1fr) auto; grid-template-areas: "logo tk name go" "logo pt when go"; row-gap: 0.35em; column-gap: 0.8em; min-height: 5.4em; padding: 0.8em 1em;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
}
.sa-item.is-big:hover { border-color: var(--accent); }
.sa-item.is-big > .sym-logo { grid-area: logo; }
.sa-item.is-big > b { grid-area: tk; font-size: 1.5em; font-weight: 800; }
.sa-item.is-big > small { grid-area: name; font-size: 1em; }
.sa-item.is-big > i { grid-area: pt; }
.sa-item.is-big > i:empty { display: none; }
.sa-item.is-big > i:empty + .sa-when { grid-column: 2 / 4; }
.sa-item.is-big > .sa-when { grid-area: when; text-align: left; }
.sa-item.is-big > .sa-go { grid-area: go; height: 2.3em; padding: 0 0.8em; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-weight: 700; }
.sa-about { align-self: start; display: flex; flex-direction: column; gap: 0.7em; padding: 1em 1.1em; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.sa-about dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4em 1.2em; margin: 0; }
.sa-about dt { color: var(--muted); }
.sa-about dd { margin: 0; font-weight: 700; }
.sa-about ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 0.95em; line-height: 1.5; word-break: keep-all; }

/* 오른쪽: 차트에 켜는 지표 묶음 · 맨 끝 줄 · 표시 읽는 법 */
.sa-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(21em, 1fr)); gap: 1em; align-items: start; min-width: 0; }
.sa-box { min-width: 0; padding: 0.9em 1em; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }
.sa-box-h { display: flex; align-items: center; gap: 0.45em; margin: 0 0 0.3em; font-size: 1.08em; font-weight: 800; }
.sa-box-d { margin: 0 0 0.2em; color: var(--muted); font-size: 0.92em; line-height: 1.45; word-break: keep-all; }
.sa-prow { display: flex; align-items: center; gap: 0.5em; min-height: 3.3em; margin-top: 0.5em; padding: 0.3em 0.3em 0.3em 0.9em; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); }
.sa-prow.is-dim { background: transparent; border-style: dashed; }
.sa-prow.is-sel { border-color: var(--accent); }
.sa-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05em; }
.sa-prow.is-dim .sa-pname { color: var(--muted); }
.sa-page .scn-soon { margin-right: 0.8em; font-size: 0.92em; }
.sa-pick.sa-box { margin-top: 0; padding: 0.6em 0.3em 0.6em 1em; background: var(--panel); border-style: solid; }
.sa-pick-l { flex: 1; display: flex; flex-direction: column; gap: 0.1em; min-width: 0; overflow: hidden; line-height: 1.35; }
.sa-pick-l small { color: var(--accent); font-size: 0.85em; font-weight: 700; }
.sa-pick-l span { display: flex; align-items: baseline; gap: 0.5em; min-width: 0; white-space: nowrap; }
.sa-pick-l b { font-size: 1.05em; }
.sa-pick-l em { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 0.92em; font-style: normal; }
.sa-legend.sa-box { padding: 0.3em 0.4em; background: transparent; border-color: transparent; }
.sa-legend ul { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 0.6em 1em; margin: 0.5em 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.95em; line-height: 1.35; }
.sa-legend li { display: contents; }
.sa-leg-s { display: inline-flex; }
.sa-leg-box { display: block; width: 3em; height: 1.5em; background: var(--raised); border: 1px solid var(--line); border-radius: 4px; }
.sa-leg-box.is-sel { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sa-leg-box.is-dim { background: transparent; border-style: dashed; }
:root[data-theme="light"] .sa-card.is-dim, :root[data-theme="light"] .sa-box, :root[data-theme="light"] .sa-prow.is-dim, :root[data-theme="light"] .sa-past, :root[data-theme="light"] .sa-bell, :root[data-theme="light"] .sa-chip, :root[data-theme="light"] .sa-leg-box.is-dim { border-color: color-mix(in srgb, var(--muted) 45%, var(--panel)); }
:root[data-theme="light"] .sa-bell.is-on, :root[data-theme="light"] .sa-chip[aria-pressed="true"] { border-color: var(--accent); }
:root[data-theme="light"] .sa-legend.sa-box { border-color: transparent; }
:root[data-theme="light"] .sa-card { background: var(--bg); }
:root[data-theme="light"] .sa-card.is-dim { background: transparent; }

/* 넓은 화면(860 이상): 고른 카드 = 금색 테 + 「보는 중」 + 아래 표를 가리키는 꼭지 */
@media (min-width: 860px) {
  .sa-card.is-sel { background: color-mix(in srgb, var(--accent) 13%, var(--raised)); border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
  .sa-card.is-sel .sa-name b { color: var(--text); }
  .sa-card.is-sel::after { content: ""; position: absolute; left: 50%; bottom: -0.68em; width: 1em; height: 1em; border-radius: 2px; background: var(--accent); transform: translateX(-50%) rotate(45deg); pointer-events: none; }
  /* 카드가 좁으면(이름과 알림 단추가 한 줄에 못 섬) 알림 단추를 카드 아래 줄 오른쪽으로 — 이름은 늘 한 줄 */
  .sa-card { container-type: inline-size; }
  @container (max-width: 17.5em) {
    .sa-name { margin-right: 0; }
    .sa-bell { top: auto; bottom: 0.62em; }
    .sa-card:not(.no-bell) .sa-foot { padding-right: calc(var(--sa-bell) + 0.2em); }
    .sa-card:not(.no-bell) .sa-foot small { display: none; }
    :root:not(:lang(ko)) .sa-card:not(.no-bell) .sa-rec { display: none; }
  }
}
/* 1280 ~ 1599: 왼쪽에 매매법 상자(단타 한 줄 · 스윙 두 줄) + 지표 묶음 · 읽는 법, 오른쪽에 종목 표(한 화면에 같이 보임) */
@media (min-width: 1280px) and (max-width: 1599px) {
  .sa-body { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); grid-template-areas: "g d" "r d"; grid-template-rows: auto 1fr; gap: 1em; align-items: start; }
  .sa-groups { grid-area: g; }
  .sa-lower { display: contents; }
  .sa-detail { grid-area: d; }
  .sa-rail { grid-area: r; }
  .sa-lower.no-detail .sa-rail { grid-column: 1 / -1; }
  .sa-card.is-sel::after { display: none; }
  .sa-hint { flex: 0 0 100%; margin: 0; }
}
/* 1600 이상: 단타 · 스윙 상자가 나란히, 카드가 한 줄에 다 펼쳐짐. 표 오른쪽에 묶음 · 읽는 법 */
@media (min-width: 1600px) {
  .sa-groups { flex-direction: row; align-items: stretch; }
  .sa-grp { flex: var(--n) 1 0; display: flex; flex-direction: column; }
  .sa-cards { flex: 1; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
  .sa-lower { display: grid; grid-template-columns: minmax(0, 1fr) 23em; align-items: start; }
  .sa-lower.no-detail { grid-template-columns: minmax(0, 1fr); }
  .sa-lower:not(.no-detail) .sa-rail { grid-template-columns: minmax(0, 1fr); }
  .sa-few { grid-template-columns: minmax(0, 1fr) 24em; }
}
@media (min-width: 1920px) { .sa-page { --k: calc(var(--fz) * 1.12); font-size: calc(var(--fs) * 1.12); } }
@media (min-width: 2400px) { .sa-page { --k: calc(var(--fz) * 1.25); font-size: calc(var(--fs) * 1.25); gap: 1.1em; padding: 0 24px 24px; } }

/* 좁은 화면(860 미만): 카드가 한 줄 모양으로 — 한 화면에 매매법이 다 들어오는 목록. 누르는 자리 44px */
@media (max-width: 859px) {
  .sa-page { gap: 0.8em; padding: 0 var(--s3) var(--s4); }
  .sa-page[data-view="detail"] .sa-head, .sa-page[data-view="detail"] .sa-groups, .sa-page[data-view="detail"] .sa-rail { display: none; }
  .sa-page[data-view="list"] .sa-detail { display: none; }
  .sa-page[data-view="detail"] { padding-top: var(--s2); }
  .sa-body, .sa-groups, .sa-lower { gap: 0.8em; }
  .sa-grp { flex: none; padding: 0; overflow: hidden; border-top-width: 1px; border-left: 3px solid var(--g); }
  .sa-grp-h { margin: 0; padding: 0.55em 0.9em; background: color-mix(in srgb, var(--g) 20%, var(--panel)); border-bottom: 1px solid var(--line); }
  .sa-grp-name { font-size: 1.15em; }
  .sa-cards { display: block; }
  .sa-card, .sa-card.is-dim { grid-template-columns: minmax(0, 1fr) 44px 1.5em; align-items: center; background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .sa-card:last-child { border-bottom: 0; }
  .sa-main { grid-column: 1; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name cnt" "line parts"; grid-template-rows: auto auto; align-items: center; gap: 0.15em 0.8em; min-height: calc(58px * var(--fz)); padding: 0.5em 0 0.5em 0.9em; }
  .sa-name { flex-wrap: nowrap; min-height: 0; margin-right: 0; }
  .sa-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.15em; }
  .sa-line { display: block; min-height: 0; text-overflow: ellipsis; white-space: nowrap; }
  .sa-cnt { flex-wrap: nowrap; justify-content: flex-end; margin: 0; }
  .sa-cnt small:first-child { flex: none; margin: 0; }
  .sa-cnt b { font-size: 1.6em; }
  .sa-last, .sa-bar, .sa-foot small, .sa-rec, .sa-past.is-none, .sa-watch { display: none; }
  .sa-parts { justify-self: end; margin: 0; }
  .sa-pts { flex-wrap: nowrap; gap: 0.7em; font-size: 0.88em; }
  .sa-foot { grid-area: parts; justify-self: end; min-height: 0; margin: 0; padding: 0; border: 0; }
  .sa-past { padding: 0.05em 0.6em; font-size: 0.85em; }
  .sa-bell, .sa-bell.is-on { grid-column: 2; position: static; justify-content: center; width: 44px; max-width: none; height: 44px; padding: 0; background: transparent; border-color: transparent; }
  .sa-bell.is-sample { width: auto; height: 2em; padding: 0 0.7em; border-color: var(--line); }
  .sa-bell.is-sample.is-on { border-color: var(--accent); background: var(--accent-soft); }
  .sa-card .sa-bell .sa-w { display: none; }
  .sa-page .sa-card .sa-bell .scn-ico { width: calc(21px * var(--fz)); height: calc(21px * var(--fz)); }
  .sa-chev { grid-column: 3; display: flex; color: var(--muted); }
  .sa-page .sa-chev .scn-ico { width: 1em; height: 1em; }
  .sa-detail { border-top-width: 1px; }
  .sa-dh { gap: 0.3em 0.8em; padding: 0.2em 0.9em 0.4em; }
  .sa-back { flex: 0 0 100%; display: inline-flex; align-items: center; gap: 2px; height: 44px; margin-left: -6px; padding: 0; background: none; border: 0; color: var(--muted); font: inherit; white-space: nowrap; cursor: pointer; }
  .sa-dtools { flex: 1 1 100%; margin: 0.3em 0 0; }
  .sa-dtools .btn { flex: 1 1 0; height: 44px; }
  .sa-page .scn-info { flex: none; }
  .sa-page .scn-use { height: 44px; }
  .sa-filter { gap: 0.5em; padding: 0.5em 0.9em 0.7em; }
  .sa-chip, .sa-seg button { height: 40px; }
  .sa-mkt { padding-left: 0; border-left: 0; }
  .sa-seg { margin-left: auto; }
  .sa-hint { flex: 0 0 100%; margin: 0; }
  .sa-colhead { display: none; }
  .sa-items { columns: auto; padding: 0; }
  .sa-item { grid-template-columns: calc(var(--lg) * var(--k)) max-content minmax(0, 1fr) auto auto auto; min-height: calc(52px * var(--fz)); padding: 0 0.7em 0 0.9em; }
  .sa-few { padding: 0.8em 0.9em 1em; }
  .sa-few .sa-items .sa-item { padding: 0 0.6em; }
  .sa-bigs { grid-template-columns: minmax(0, 1fr); }
  .sa-doc { margin: 0.7em 0.9em 0; }
  .sa-page .scn-none { margin: 0.8em 0.9em; }
  .sa-page .scn-guide { margin: 0.7em 0.9em 0; }
  .sa-more .btn { height: 44px; min-width: 140px; }
}
/* 휴대폰(600 이하): 글자는 짧은 것만(.sa-w 숨김 · .sa-m 보임), 종목 줄은 기호 위 · 이름 아래 */
@media (max-width: 600px) {
  .sa-page .sa-w { display: none; }
  .sa-page .sa-m { display: inline; }
  .sa-head { flex-wrap: nowrap; align-items: center; gap: 0.3em 0.6em; min-height: 0; padding-top: 0.5em; }
  .sa-title { flex: 1 1 0; flex-direction: column; align-items: flex-start; gap: 0.1em; }
  .sa-title h1 { font-size: 1.5em; font-weight: 800; white-space: nowrap; }
  .sa-page .scn-note { align-self: flex-start; padding: 0; border: 0; white-space: nowrap; }
  .sa-tools { gap: 0.3em; }
  .sa-allbell, .sa-sound { height: 40px; min-width: 40px; }
  .sa-about, .sa-legend { display: none; }
  .sa-rail { grid-template-columns: minmax(0, 1fr); gap: 0.8em; }
  .sa-dname { font-size: 1.3em; }
  .sa-item:not(.is-big) { grid-template-columns: calc(var(--lg) * var(--k)) minmax(0, 1fr) auto auto 1em; grid-template-areas: "logo tk pt when go" "logo name pt when go"; row-gap: 0; column-gap: 0.6em; --lg: 28px; }
  .sa-item:not(.is-big) > .sym-logo { grid-area: logo; }
  .sa-item:not(.is-big) > b { grid-area: tk; align-self: end; overflow: hidden; text-overflow: ellipsis; }
  .sa-item:not(.is-big) > small { grid-area: name; align-self: start; }
  .sa-item:not(.is-big) > i { grid-area: pt; }
  .sa-item:not(.is-big) > .sa-when { grid-area: when; }
  .sa-item:not(.is-big) > .sa-go { grid-area: go; }
  .sa-item.is-big { --lg: 36px; padding: 0.7em 0.8em; }
  .sa-item.is-big > .sa-go { padding: 0 0.5em; border: 0; }
}
@media (max-width: 379px) {
  .sa-page { padding-left: var(--s2); padding-right: var(--s2); }
  .sa-page .scn-state-w.is-opt { display: none; }
  .sa-pts { gap: 0.5em; }
  .sa-main { padding-left: 0.7em; column-gap: 0.5em; }
}
@media (pointer: coarse) and (min-width: 860px) { .sa-bell { height: 2.6em; } .sa-chip, .sa-seg button, .sa-allbell, .sa-sound, .sa-dbell, .sa-page .scn-use { height: 2.8em; } .sa-item { min-height: 3.4em; } }

/* ── S3(11-28) 검증 창이 찾은 작은 것 둘(화면) — 저가 글자 높이 · 휴대폰 「차트 크게」 단추 자리 ── */
/* ① 고가 · 저가 글자: 글자 상자의 아래 끝(고가)을 꼬리 끝 3px 위에, 위 끝(저가)을 3px 아래에 붙여, 글자 가운데가 가격 눈금 꼬리표보다 약 10px 위(고가) · 아래(저가)에 있었음
   (지표를 켜면 고가는 위쪽 글줄을 피해 봉 옆 · 그 가격 높이로 옮겨져 맞았음 — 지표가 없는 화면에서만 위로 뜸) → 둘 다 옆으로 옮긴 고가와 같은 기준: 봉 옆 · 글자 가운데 = 그 가격 높이. 모든 폭 */
.vis-hl.is-hi { transform: translate(8px, -50%); }
.vis-hl.is-hi.is-left { transform: translate(calc(-100% - 8px), -50%); }
.vis-hl.is-lo { transform: translate(8px, -50%); }
.vis-hl.is-lo.is-left { transform: translate(calc(-100% - 8px), -50%); }
/* ② 휴대폰 폭: 「차트 크게」는 아이콘 줄 밖, 줄 바로 뒤(js/ui/m-chart.js)에 두고 차트 칸 오른쪽 위에 놓음. 아이콘 줄은 그 폭만큼 짧게 —
   줄이 옆으로 밀려도 단추가 「차트 크게」 밑으로 들어가지 않음(줄 끝에서 잘림 · 왼쪽 그림자로 "더 있음") */
@media (max-width: 600px) {
  :root[data-route="/chart"] .chart-zone > .m-tools { margin-right: min(calc(44px * var(--fz)), 48px); }
  :root[data-route="/chart"] .chart-zone > .m-full {
    position: absolute; top: 0; right: 0; z-index: 3; display: inline-flex; align-items: center; justify-content: center;
    width: min(calc(44px * var(--fz)), 48px); height: min(calc(40px * var(--fz)), 44px); min-height: 0; padding: 0; margin: 0;
    border: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0;
    background: var(--panel); color: var(--text); box-shadow: -10px 0 10px -6px var(--panel);
  }
  :root[data-route="/chart"] .chart-zone > .m-full .m-ico { display: block; }
  :root[data-route="/chart"] .chart-zone > .m-full[aria-pressed="true"] { color: var(--accent); }
}

/* ── KY2(11-28) 가격 눈금 메뉴(사장님 O) — 칸의 가격 눈금 아래 모서리(가격 눈금 × 시간 눈금이 만나는 빈칸)의 작은 단추 · 눈금 오른쪽 클릭.
   판은 그림 메뉴(.draw-menu) 모양을 같이 씀(휴대폰 폭이면 아래에서 올라오는 판). 키 모양(.kcaps)은 KH1 규칙대로 손가락 기기 · 휴대폰 폭에서 숨김. 휴대폰 폭은 낱말 하나(.sm-short) ── */
.pane-scale-btn {
  position: absolute; right: 0; bottom: 0; z-index: 6; width: var(--axis-w, 56px); height: var(--ts-h, 28px);
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 0 2px;
  background: transparent; border: 0; border-radius: 0; color: var(--muted); font: inherit; font-size: calc(10px * var(--fz)); line-height: 1; cursor: pointer;
}
.pane-scale-btn:hover, .pane-scale-btn:focus-visible, .pane-scale-btn[aria-expanded="true"] { color: var(--text); background: var(--accent-soft); }
.pane-scale-btn.is-on { color: var(--accent); }
.pane-scale-ico { flex: none; }
.pane-scale-on { font-weight: 700; white-space: nowrap; overflow: hidden; }
.pane-scale-on:empty { display: none; }
.scale-menu { min-width: 240px; }
.scale-menu-title { margin: 0; padding: var(--s1) var(--s2); color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.sm-check { flex: none; width: 1.1em; color: var(--accent); font-weight: 700; text-align: center; }
.sm-short { display: none; }
@media (max-width: 600px) { .scale-menu { min-width: 0; } .sm-long { display: none; } .sm-short { display: inline; } }

/* ── FX2(11-28 sharp 덧패치 — 8915 검증): PC 가격 눈금 모서리 단추 폭 고정. 폭은 가격 눈금 폭(--axis-w)을 따라가는데, 눈금을 로그 · % 로 바꾸면 눈금 글자가 짧아져
   폭이 74 → 68 → 66px(사본 64 · 70 · 74px)로 바뀌며 단추 왼쪽 끝이 움직였음 → 넓은 화면은 가장 좁아도 80px(% 눈금의 가장 넓은 폭보다 조금 넉넉히 — 눈금이 더 넓으면 그 폭). 휴대폰(세로 600px 이하 · 눕힌 높이 500px 이하)은 지금대로 ── */
.pane-scale-btn { min-width: 80px; }
@media (max-width: 600px), (max-height: 500px) { .pane-scale-btn { min-width: 0; } }

/* ── CH28(11-28) 28단계 채팅 작은 판: 옆 칸 「채팅」 탭의 몸(web/js/ui/chat-panel.js). 글은 줄 바꿈 그대로 · 긴 낱말은 칸 안에서 꺾음 ── */
.chat { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-body.is-under { visibility: hidden; }
.chat-head { flex: none; display: flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); }
.chat-edu { flex: 1; min-width: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.3; }
.chat-rules-btn { flex: none; }
.chat-short { display: none; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: var(--s1) 0; list-style: none; }
.chat-item { padding: 6px var(--s2); border-bottom: 1px solid var(--line); }
.chat-item.is-op { background: var(--veil); }
.chat-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }
.chat-op { flex: none; padding: 0 6px; border: 1px solid var(--accent); border-radius: var(--radius); color: var(--accent); font-size: var(--fs-sm); font-weight: 700; line-height: 1.5; }
.chat-me { flex: none; color: var(--muted); font-size: var(--fs-sm); }
.chat-when { flex: none; margin-left: auto; color: var(--muted); font-size: var(--fs-sm); }
.chat-more { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; padding: 0; background: transparent; border: 0; border-radius: var(--radius); color: var(--muted); }
.chat-more:hover, .chat-more[aria-expanded="true"] { background: var(--veil); color: var(--text); }
.chat-ico { fill: currentColor; }
.chat-text { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; }
.chat-empty { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4) var(--s2); color: var(--muted); text-align: center; }
.chat-empty b { color: var(--text); }
.chat-status { flex: none; padding: var(--s1) var(--s2); color: var(--muted); font-size: var(--fs-sm); }
.chat-menu { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); }
.chat-menu-t { flex: 1 0 100%; color: var(--muted); font-size: var(--fs-sm); }
.chat-why, .chat-why-x { padding: 0 var(--s2); }
.chat-form { flex: none; display: flex; flex-direction: column; gap: 4px; padding: var(--s1) var(--s2) var(--s2); border-top: 1px solid var(--line); }
.chat-input { width: 100%; min-height: calc(44px * var(--fz)); max-height: 30vh; resize: vertical; padding: 6px 8px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.chat-input:focus-visible { border-color: var(--accent); }
.chat-input:disabled { opacity: .6; }
.chat-form-bar { display: flex; align-items: center; gap: var(--s2); }
.chat-form-bar .gap { flex: 1; }
.chat-count { color: var(--muted); font-size: var(--fs-sm); }
.chat-count.is-over { color: var(--warn); font-weight: 700; }
.chat-send { min-width: calc(72px * var(--fz)); }
.chat-err { color: var(--warn); font-size: var(--fs-sm); }
.chat-err:empty { display: none; }
.chat-note { padding: 6px 8px; background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius); color: var(--warn); font-size: var(--fs-sm); }
.chat-join { padding: var(--s4) var(--s2); display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.chat-join-go { text-decoration: none; display: inline-flex; align-items: center; }
.chat-rules { position: absolute; inset: 0; z-index: 3; overflow-y: auto; padding: var(--s3) var(--s2); background: var(--panel); display: flex; flex-direction: column; gap: var(--s2); }
.chat-rules-t { margin: 0; font-size: var(--fs-lg); }
.chat-rules-list { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.chat-rules-ok { align-self: stretch; min-height: calc(40px * var(--fz)); }
/* 휴대폰 · 좁은 태블릿: 단추 글은 낱말 하나 · 누르는 자리 40 이상 · 입력 칸 글자 1rem 이상(16px — 아이폰이 확대하지 않게) */
@media (max-width: 600px) {
  .chat-long { display: none; }
  .chat-short { display: inline; }
  .chat-more { width: 40px; height: 40px; }
  .chat-send, .chat-rules-btn, .chat-why, .chat-why-x { min-height: 40px; }
  .chat-input { font-size: max(1rem, var(--fs)); }
}

/* ── S5(11-28) 작은 고침 묶음 — 화면(M1 묶음 앞: 조건 없는 줄) ──
   고가 · 저가 글씨에 칸 바탕색 테두리를 둘러, 그 자리를 지나는 선(아레스 전장 지도 추세선 · 가격대 선)이 글자를 가로질러 보이지 않게(QQQ 일 「저가 607.76」 · TSLA 4시간).
   선은 그대로 그리고 글자 둘레만 바탕색 — 선이 없는 곳에서는 전과 똑같이 보임 */
.vis-hl { text-shadow: 0 0 2px var(--panel), 0 0 2px var(--panel), 0 0 3px var(--panel); }

/* ── S6(11-28 선생님 #4126): 옆 칸 닫기(×) · 세로 메뉴 맨 위 「넓게」 · 「차트 읽기」 칸 숨김 ──
   칸이 차트 옆에 놓이는 폭(861px 이상)에서만 보임. 그 아래(위아래로 쌓이는 화면)는 예전 그대로 — × · 「넓게」 없음 */
.side-head .side-x, .wiz-head .wiz-x, .side-rail .rail-wide { display: none; }
@media (min-width: 861px) {
  .wiz-head .wiz-x {
    display: inline-flex; align-items: center; justify-content: center; flex: none; order: 99;
    min-width: var(--ctl-h); padding: 0 var(--s1); font-size: calc(18px * var(--fz)); line-height: 1;
  }
  .work.is-wiz-shut > .wiz-panel { display: none; }
}
/* 휴대폰: 「차트 읽기」를 펼치면 화면 아래로 나가던 것(390 에서 판 위 776px · 높이 236px) — 펼친 동안만 다른 판처럼 아래에서 올라오는 판으로.
   화면 안 최대 높이 · 안에서 밀어 봄 · 머리 줄(제목 · 다시 · 끄기 · ▾ 접기)은 위에 붙어 있음. 차트 높이는 --chart-h 라 판이 빠져도 흔들리지 않음.
   어둡게 덮지 않아(선과 목록을 같이 봄) · 다른 판(z 75)보다 아래 */
@media (max-width: 600px) {
  .work > .wiz-panel.is-open {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; width: auto;
    max-height: 62vh; max-height: min(62vh, calc(100dvh - 140px)); overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: calc(var(--s2) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: var(--shadow); animation: sheet-up 0.18s ease-out;
  }
  .work > .wiz-panel.is-open > .wiz-head { position: sticky; top: calc(-1 * var(--s2)); z-index: 1; margin: calc(-1 * var(--s2)) calc(-1 * var(--s3)) 0; padding: var(--s2) var(--s3) var(--s1); background: var(--panel); }
}
@media (min-width: 1100px) {
  .side-head .side-x {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: var(--ctl-h); height: var(--ctl-h); margin-left: auto; padding: 0; font-size: calc(20px * var(--fz)); line-height: 1;
  }
  .side-rail .rail-wide {
    display: flex; flex: none; flex-direction: column; align-items: center; gap: 3px; width: 100%; margin-bottom: 4px; padding: 8px 2px 6px;
    border: 0; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; background: transparent; color: var(--muted);
    font: inherit; font-size: calc(12px * var(--fz)); line-height: 1.15; cursor: pointer;
  }
  .side-rail .rail-wide:hover { color: var(--text); background: var(--line-soft); }
  .side-rail .rail-wide.is-on { color: var(--text); background: var(--accent-soft); }
  .side-rail .rail-wide:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .rail-wide-ico { display: block; height: calc(20px * var(--fz)); font-size: calc(18px * var(--fz)); line-height: calc(20px * var(--fz)); }
  .rail-wide.is-on .rail-wide-ico { color: var(--accent); }
}

/* ── LA1(11-28) 공포지수 칸 가로선 알림: 설정 띠의 종 단추 · 작은 판(방향 · 켜기 · 끄기) · 공포지수 화면 판(js/ui/line-alert-bell.js) ──
   PC 는 오른쪽 위(차트 · 선을 덮지 않게), 휴대폰(600px 이하)은 아래 설정 줄 바로 위. M1 묶음 앞(이 묶음의 @media 는 600px 이하 하나). 있던 줄은 안 바꿈 */
.dfb-bell-text { display: none; }
.dfb-bell[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.draw-float.is-dock .dfb-bell, .draw-float.is-strip .dfb-bell { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: auto; min-width: 44px; padding: 0 8px; }
.draw-float.is-dock .dfb-bell[hidden], .draw-float.is-strip .dfb-bell[hidden] { display: none; }
.draw-float.is-dock .dfb-bell-text, .draw-float.is-strip .dfb-bell-text { display: inline; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.la-pop {
  position: fixed; z-index: 60; top: calc(96px * var(--fz)); right: 16px;
  width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); color: var(--text);
}
.la-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs); }
.la-ico { flex: none; width: calc(18px * var(--fz)); height: calc(18px * var(--fz)); color: var(--accent); }
.la-info { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.la-body { display: flex; flex-direction: column; gap: var(--s2); }
.la-dirs { display: flex; flex-wrap: wrap; gap: 6px; }
.la-dirs .chip { border: 1px solid var(--line); }
.la-dirs .chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 700; }
.la-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.la-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.la-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-width: 0; }
.la-list .btn-sm { flex: none; height: calc(30px * var(--fz)); padding: 0 var(--s2); font-size: var(--fs-sm); }
.la-go { flex: 1 1 auto; min-width: 0; padding: 6px 0; background: none; border: 0; color: var(--text); font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.la-go:hover { color: var(--accent); }
.la-msg { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--accent); }
.la-msg:empty { display: none; }
.la-note, .la-lock { margin: 0; font-size: var(--fs-sm); color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
.la-close { align-self: flex-end; }
.la-panel h3 { margin: var(--s3) 0 var(--s1); font-size: var(--fs); }
.la-member { display: flex; flex-direction: column; gap: var(--s1); }
@media (max-width: 600px) {
  .la-pop { top: auto; left: 8px; right: 8px; width: auto; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); max-height: calc(100vh - 100px); }
  .la-dirs .chip, .la-acts .btn, .la-close { min-height: 44px; }
  .la-dirs .chip { flex: 1 1 0; min-width: 0; padding: 2px 6px; white-space: normal; line-height: 1.2; }
  .la-list .btn-sm { height: 44px; min-width: 44px; }
}

/* ── RL1(11-28 사장님 「추천대로」): 그리기 도구 줄 바이낸스 구성 — 판 안 작은 제목 · 칸 사이 구분선 · 휴지통(판만) · 되돌리기 · 다시는 줄 맨 아래.
   색 · 아이콘은 우리 것 그대로. 휴대폰 판(600px 이하)은 같은 묶음 순서, 작은 제목은 숨김(줄이 길어져서) ── */
.draw-fly-sec { padding: 6px var(--s2) 2px; color: var(--muted); font-size: calc(11px * var(--fz)); font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.draw-fly-sec + .draw-item { margin-top: 1px; }
.draw-fly-title + .draw-fly-sec { padding-top: 2px; }
.draw-item + .draw-fly-sec { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (min-width: 601px) {
  .draw-rail .draw-group { flex: 1 1 auto; min-height: 0; }
  .draw-slot.sep-top { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px solid var(--line); }
  .draw-slot.is-bottom { margin-top: auto; padding-top: var(--s1); border-top: 1px solid var(--line); }
  .draw-fly.has-sec > .draw-fly-title { display: none; }
  .draw-fly.has-sec > .draw-fly-title + .draw-fly-sec { padding-top: 4px; }
  .draw-fly { min-width: calc(210px * var(--fz)); }
  .draw-slot.fly-only.is-fly > .draw-btn { color: var(--text); background: var(--raised); }
}
@media (max-width: 600px) {
  .draw-box.is-open .draw-fly-sec { display: none; }
  .draw-box.is-open .draw-slot.sep-top, .draw-box.is-open .draw-slot.is-bottom { margin-top: 0; border-top: 0; }
}

/* ── RL2(11-28 사장님 「추천대로」): 그리기 2묶음 — ☆ 즐겨찾기 · 차트 위 즐겨찾기 막대(끌어 옮김) · 설정 막대 바이낸스 칸 순서 + ⋮⋮ 손잡이 · 색판 70색 + 투명도.
   색 · 아이콘은 우리 것. 휴대폰(600px 이하 · 손가락 기기)은 ☆ · 즐겨찾기 막대 · 손잡이 없음(「자주」 줄 · 아래 고정 줄 그대로) ── */
/* 도구 판 줄 + ☆ */
.draw-row { display: flex; align-items: center; }
.draw-row > .draw-item { flex: 1 1 auto; min-width: 0; }
.draw-star {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: calc(26px * var(--fz)); height: calc(26px * var(--fz)); padding: 0;
  background: transparent; border: 0; border-radius: var(--radius); color: var(--muted); cursor: pointer; opacity: 0;
}
.draw-row:hover .draw-star, .draw-star:focus-visible, .draw-star[aria-pressed="true"] { opacity: 1; }
.draw-star:hover { color: var(--text); background: var(--panel); }
.draw-star[aria-pressed="true"] { color: var(--accent); }
.draw-star[aria-pressed="true"] .di-line { fill: currentColor; }
.draw-slot[hidden] { display: none; }
/* 차트 위 즐겨찾기 막대(차트 영역 안 — 손잡이로 끌어 옮김) */
.draw-favbar {
  position: absolute; z-index: 13; display: flex; align-items: center; gap: 2px; padding: 3px 4px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.draw-favbar[hidden] { display: none; }
.draw-favbar.is-drag { opacity: 0.85; }
.dfav-grip, .dfb-grip { padding: 0 3px; color: var(--muted); letter-spacing: -2px; cursor: grab; user-select: none; touch-action: none; align-self: stretch; display: inline-flex; align-items: center; }
.draw-favbar.is-drag .dfav-grip { cursor: grabbing; }
.dfav-list { display: flex; gap: 2px; }
.dfav-btn {
  display: inline-flex; align-items: center; justify-content: center; width: calc(30px * var(--fz)); height: calc(30px * var(--fz)); padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); cursor: pointer;
}
.dfav-btn:hover { color: var(--text); background: var(--panel); }
.dfav-btn[aria-pressed="true"] { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
/* 붙인 띠(좁은 칸) · 휴대폰 줄: 손잡이 없음 · 지우기는 예전처럼 맨 끝 */
.draw-float.is-strip .dfb-grip, .draw-float.is-dock .dfb-grip { display: none; }
.draw-float.is-strip > .dfb-btn[data-st="del"], .draw-float.is-dock > .dfb-btn[data-st="del"] { order: 9; }
/* 설정 막대: 색판(70색) · 투명도 — 「색」을 누르면 막대 아래 한 덩이로 펼침 */
.dfb-pal { display: none; }
.draw-float.is-colors .dfb-pal { display: flex; flex-direction: column; gap: 6px; order: 11; flex: 1 0 100%; padding: 4px 2px 2px; }
.dfb-pal-grid { display: grid; grid-template-columns: repeat(10, calc(18px * var(--fz))); gap: 3px; }
.dfb-pc { width: calc(18px * var(--fz)); height: calc(18px * var(--fz)); padding: 0; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.dfb-pc[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.dfb-op { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); }
.dfb-op-in { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }
.dfb-op-out { min-width: 3.2em; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
@media (min-width: 601px) {
  /* 넓은 화면 막대 = 바이낸스 칸 순서: ⋮⋮ · 색(하나) · 굵기(하나) · 선 모양 · 설정 · 잠금 · 지우기 · 더 보기. 색 8 · 굵기 4 는 눌러야 펼침 */
  .draw-float:not(.is-dock):not(.is-strip) .dfb-sep,
  .draw-float:not(.is-dock):not(.is-strip) .dfb-colors,
  .draw-float:not(.is-dock):not(.is-strip) .dfb-widths { display: none; }
  .draw-float:not(.is-dock):not(.is-strip) .dfb-color { display: inline-flex; }
  .draw-float:not(.is-dock):not(.is-strip) .dfb-color[aria-expanded="true"],
  .draw-float:not(.is-dock):not(.is-strip) .dfb-wbtn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
  .draw-float:not(.is-dock):not(.is-strip) .dfb-wbtn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; padding: 0 8px; }
  .draw-float:not(.is-dock):not(.is-strip) .dfb-wbtn .dfb-line { height: 2px; }
  .draw-float:not(.is-dock):not(.is-strip) .dfb-cur { width: calc(18px * var(--fz)); height: calc(18px * var(--fz)); }
  .draw-float:not(.is-dock):not(.is-strip) .dfb-del-text { display: none; }
  .draw-float:not(.is-dock):not(.is-strip).is-colors .dfb-colors { display: flex; order: 10; flex: 1 0 100%; gap: 4px; padding: 4px 2px 0; }
  .draw-float:not(.is-dock):not(.is-strip).is-widths .dfb-widths { display: flex; order: 10; flex: 1 0 100%; gap: 4px; padding: 4px 2px 0; }
}
@media (max-width: 600px), (pointer: coarse) {
  .draw-star { display: none; }
  .draw-row { display: contents; }
  .draw-favbar, .draw-slot[data-group="favbar"] { display: none; }
}
@media (max-width: 600px) {
  /* 휴대폰 줄 · 붙인 띠: 손잡이 없음, 지우기는 예전처럼 맨 끝, 색판은 펼친 줄 위(10칸이 화면 폭에 맞게) */
  .draw-float.is-strip.is-colors .dfb-pal { order: -1; }
  .dfb-pal-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); width: 100%; }
  .dfb-pc { width: auto; height: 26px; }
}

/* ── WH(11-28) 전장 지도 자동 선 골라 숨기기 — 「차트 읽기」 판의 보이기 줄 · 칸 위 「자동 선」 작은 판(web/js/ui/wizard-panel.js · chart-pane.js). 넓은 화면은 넉넉한 글(wh-l), 휴대폰은 낱말 하나(wh-s — 끝 묶음) ── */
.wh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wh-row[hidden] { display: none; }
.wh-cap { color: var(--muted); font-size: var(--fs-sm); margin-right: 2px; }
.wh-row .chip { padding: 0 var(--s2); font-size: var(--fs-sm); }
.wh-kind[aria-pressed="true"] { color: var(--text); border-color: var(--wiz-level); }
.wh-kind[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; }
.wh-unhide { color: var(--accent); border-style: dashed; }
.wh-unhide[hidden] { display: none; }
.wh-s { display: none; }
.wh-pick {
  position: absolute; z-index: 9; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 8px);
  padding: 4px 4px 4px var(--s2); background: var(--panel); border: 1px dashed var(--wiz-level); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); font-size: var(--fs-sm); line-height: 1.3;
}
.wh-pick[hidden] { display: none; }
.wh-pick-tag { flex: none; padding: 0 5px; border-radius: 8px; background: var(--raised); color: var(--muted); white-space: nowrap; }
.wh-pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wh-pick .chip { flex: none; padding: 0 var(--s2); font-size: var(--fs-sm); }
.wh-pick .wh-pick-hide { color: var(--text); border-color: var(--accent); font-weight: 600; }
.wh-pick-x { min-width: 28px; }

/* ══════════ M1: 휴대폰 차트 크게(11-27 사장님 "차트가 차지하는 공간이 너무 작다 — 더 크고 잘 호환되게") ══════════
   머리 한 줄은 휴대폰의 모든 화면, 나머지는 차트 화면(data-route="/chart")에서만. 넓은 화면(601px 이상 · 높이 501px 이상)은 그대로.
   머리 한 줄(메뉴는 옆으로 밀어 봄 · 밝은 화면/글자 크기/언어는 「⋯」로 폄) · 종목 줄 두 줄(이름+가격+거래소 / 24시간 값+전체 기간) ·
   봉 줄 · 아이콘 줄을 낮게(보이는 높이만 — 누르는 자리는 40px) · 차트 칸은 화면 끝까지. 단추 둘은 js/ui/m-chart.js */
.top-more, .m-full { display: none; }
@media (max-width: 600px) {
  @supports (height: 100dvh) { :root[data-route="/chart"] body { height: 100dvh; } }

  /* ── 머리: 한 줄 — 휴대폰의 모든 화면(11-27 사장님 O). 「⋯」 단추가 붙은 머리(.has-more — js/ui/m-chart.js)에서만: 단추가 없으면 접지 않음 ── */
  .top.has-more { flex-wrap: nowrap; align-items: center; height: calc(min(40px * var(--fz), 46px) + 1px); padding: 0 var(--s2); gap: 0; row-gap: 0; }
  .top.has-more .logo { align-self: stretch; padding: 0 6px 0 2px; border-radius: 0; }
  .top.has-more .nav { order: 0; flex: 1 1 0; align-self: stretch; justify-content: flex-start; gap: 0; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
  .top.has-more .nav a { display: flex; align-items: center; align-self: stretch; padding: 0 var(--s2); border-radius: 0; background: transparent; }
  .top.has-more .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
  .top.has-more .btn { flex: none; height: min(calc(40px * var(--fz)), 46px); min-width: 36px; padding: 0 6px; background: transparent; border-color: transparent; border-radius: 0; }
  .top.has-more .btn-notice, .top.has-more .btn-theme, .top.has-more .font-pick,
  .top.has-more .lang-pick, .top.has-more #login-btn { margin-left: 0; }
  .top.has-more #login-btn {
    position: relative; height: min(calc(28px * var(--fz)), 34px); min-width: 0; padding: 0 10px; margin: 0 2px 0 4px;
    background: var(--accent); border-color: var(--accent); border-radius: 999px; font-size: var(--fs-sm);
  }
  .top.has-more #login-btn.is-member { background: transparent; border-color: var(--line); max-width: min(calc(64px * var(--fz)), 80px); padding: 0 var(--s2); }
  .top.has-more .btn-inbox { margin-left: 0; }
  .top.has-more #login-btn::after { content: ""; position: absolute; left: -2px; right: -2px; top: -6px; bottom: -6px; }
  .top.has-more .top-more { display: inline-flex; align-items: center; justify-content: center; order: 5; font-size: calc(18px * var(--fz)); line-height: 1; color: var(--muted); }
  .top.has-more .top-more[aria-expanded="true"] { color: var(--accent); }
  .top.has-more:not(.is-more) .btn-theme, .top.has-more:not(.is-more) .font-pick, .top.has-more:not(.is-more) .lang-pick { display: none; }
  /* 「⋯」를 펴면: 둘째 줄 오른쪽에 밝은 화면 · 글자 크기 · 언어 */
  .top.has-more.is-more { flex-wrap: wrap; height: auto; }
  .top.has-more.is-more::after { content: ""; order: 9; flex: 0 0 100%; height: 0; border-top: 1px solid var(--line); }
  .top.has-more.is-more .btn-theme, .top.has-more.is-more .font-pick, .top.has-more.is-more .lang-pick { order: 10; }
  .top.has-more.is-more .btn-theme { margin-left: auto; }
  .top.has-more.is-more .btn-theme, .top.has-more.is-more .font-pick .btn, .top.has-more.is-more .lang-pick .btn { min-width: 44px; }

  /* ── 종목 줄: 첫 줄 = 종목 알약 · 가격 · % · 거래소, 둘째 줄 = 24시간 값(옆으로 밀어 봄) · 「전체 기간 보기」 ──
     알약은 자리가 모자라면 한글 이름부터 줄어듦(첫 줄이 접히지 않게 바탕 폭을 작게 잡고 남는 만큼만 늘림) */
  :root[data-route="/chart"] .bar.info { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s2); min-height: 0; padding: 3px var(--s3) 1px; overflow: visible; }
  :root[data-route="/chart"] .bar.info::before { content: ""; order: 4; flex: 0 0 100%; height: 0; }
  :root[data-route="/chart"] .bar.info > .info-main { display: contents; }
  :root[data-route="/chart"] .bar.info .info-find {
    position: relative; order: 1; align-self: center; flex: 1 1 calc(62px * var(--fz)); width: auto; max-width: max-content; min-width: 0;
    min-height: min(calc(30px * var(--fz)), 34px); padding: 0 4px 0 10px; margin: 0;
  }
  :root[data-route="/chart"] .bar.info .info-find::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
  :root[data-route="/chart"] .bar.info .info-find b { flex: none; }
  :root[data-route="/chart"] .bar.info .info-quote { order: 2; display: flex; flex-wrap: nowrap; align-items: baseline; gap: 0 6px; flex: none; min-width: 0; }
  :root[data-route="/chart"] .bar.info .info-price { font-size: calc(19px * var(--fz)); line-height: 1.2; letter-spacing: -0.3px; }
  :root[data-route="/chart"] .bar.info .info-quote .info-pct { font-size: var(--fs-sm); }
  :root[data-route="/chart"] .bar.info .exch-btn { position: relative; order: 3; flex: none; margin: 0 0 0 auto; height: auto; min-height: min(calc(26px * var(--fz)), 28px); padding: 0 var(--s2); }
  :root[data-route="/chart"] .bar.info .exch-btn::after { content: ""; position: absolute; left: -4px; right: -4px; top: -7px; bottom: -7px; }
  /* 「가」 아주 크게: 거래소 단추는 둘째 줄 앞으로(첫 줄 = 알약 · 가격 · %) */
  :root[data-route="/chart"][data-fs="xl"] .bar.info .exch-btn { order: 5; margin: 0; }
  :root[data-route="/chart"] .bar.info > .info-stats {
    order: 5; flex: 1 1 0; min-width: 0; display: flex; flex-flow: row nowrap; align-items: baseline; gap: 0 10px; justify-self: auto;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; white-space: nowrap;
    font-size: calc(11px * var(--fz)); line-height: min(calc(22px * var(--fz)), 26px);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
  }
  :root[data-route="/chart"] .bar.info > .info-stats::-webkit-scrollbar { display: none; }
  :root[data-route="/chart"] .bar.info > .info-stats::after { content: ""; flex: 0 0 14px; }
  :root[data-route="/chart"] .bar.info .info-stats .info-item { display: inline-flex; align-items: baseline; gap: 4px; flex: none; }
  :root[data-route="/chart"] .bar.info .info-stats .info-lab { overflow: visible; }
  :root[data-route="/chart"] .bar.info .info-stats .info-item b { font-size: inherit; }
  :root[data-route="/chart"] .bar.info > .full-btn { order: 6; flex: none; margin: 0; height: calc(20px * var(--fz)); padding: 0 6px; font-size: calc(11px * var(--fz)); }
  :root[data-route="/chart"] .bar.info > .full-btn::before { top: -10px; bottom: -10px; left: -4px; right: -4px; }

  /* ── 봉 줄: 보이는 높이 30px(누르는 자리는 위아래로 5px 씩 넓힘) ── */
  :root[data-route="/chart"] .bar.tools { padding: 2px var(--s2); min-height: 0; }
  :root[data-route="/chart"] .bar.tools .bar-chips { padding: 5px 0; margin: -5px 0; }
  :root[data-route="/chart"] .bar.tools .bar-chips .chip, :root[data-route="/chart"] .bar.tools .bar-more, :root[data-route="/chart"] .bar.tools .style-btn { position: relative; height: min(calc(30px * var(--fz)), 34px); min-height: 0; }
  :root[data-route="/chart"] .bar.tools .bar-chips .chip::after, :root[data-route="/chart"] .bar.tools .bar-more::after, :root[data-route="/chart"] .bar.tools .style-btn::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }

  /* ── 차트 위 아이콘 줄: 줄 높이 40px(= 누르는 자리), 단추는 30px 로 보임. 「차트 크게」는 오른쪽 끝에 붙어 있음 ── */
  :root[data-route="/chart"] .m-tools { gap: 6px; padding: 0 0 0 var(--s2); min-height: min(calc(40px * var(--fz)), 44px); -webkit-mask-image: none; mask-image: none; }
  :root[data-route="/chart"] .m-tools::after { content: none; }
  :root[data-route="/chart"] .m-tools > .btn, :root[data-route="/chart"] .m-tools > .chip, :root[data-route="/chart"] .m-tools .wiz-box > .chip { position: relative; height: min(calc(30px * var(--fz)), 34px); }
  :root[data-route="/chart"] .m-tools > .btn::after, :root[data-route="/chart"] .m-tools > .chip::after { content: ""; position: absolute; left: -3px; right: -3px; top: -5px; bottom: -5px; }
  :root[data-route="/chart"] .m-tools > .m-full {
    display: inline-flex; justify-content: center; position: sticky; right: 0; margin-left: auto; z-index: 2;
    width: min(calc(44px * var(--fz)), 48px); height: min(calc(40px * var(--fz)), 44px); padding: 0;
    border: 0; border-left: 1px solid var(--line); border-radius: 0; background: var(--panel); color: var(--text);
    box-shadow: -10px 0 10px -6px var(--panel);
  }
  :root[data-route="/chart"] .m-tools > .m-full::after { content: none; }
  :root[data-route="/chart"] .m-tools > .m-full[aria-pressed="true"] { color: var(--accent); }

  /* ── 차트 칸: 화면 끝까지(둘레 여백 · 둥근 모서리 없음) · 칸 이름 줄은 조금 작게 ── */
  :root[data-route="/chart"] .grid { padding: 0; gap: 2px; }
  :root[data-route="/chart"] .pane { border-left: 0; border-right: 0; border-radius: 0; }
  :root[data-route="/chart"] .pane-legend { left: 4px; }
  :root[data-route="/chart"] .pane-ind { left: 4px; }
}

/* ── 눕힌 휴대폰(폭 601px 이상 · 높이 500px 이하): 머리 · 종목 줄을 낮게, 지수 띠는 숨김(휴대폰 세로와 같은 규칙), 차트는 남은 높이 전부 ── */
@media (min-width: 601px) and (max-height: 500px) {
  @supports (height: 100dvh) { :root[data-route="/chart"] body { height: 100dvh; } }
  :root[data-route="/chart"] .top { height: calc(36px * var(--fz)); }
  :root[data-route="/chart"] .top .btn { height: calc(30px * var(--fz)); }
  :root[data-route="/chart"] .idx-band { display: none; }
  :root[data-route="/chart"] .bar.info { flex-wrap: nowrap; row-gap: 0; min-height: 0; padding-top: 2px; padding-bottom: 2px; overflow-x: auto; }
  :root[data-route="/chart"] .bar.info { align-items: center; }
  :root[data-route="/chart"] .bar.info .info-find { align-self: center; margin: 0; padding-top: 0; padding-bottom: 0; min-height: calc(28px * var(--fz)); }
  :root[data-route="/chart"] .bar.tools { padding-top: 2px; padding-bottom: 2px; min-height: 0; }
  :root[data-route="/chart"] .bar.tools .chip, :root[data-route="/chart"] .bar.tools .btn { height: calc(30px * var(--fz)); min-height: 0; }
  :root[data-route="/chart"] .bar.tools > .m-full { display: inline-flex; align-items: center; justify-content: center; order: 2; width: calc(40px * var(--fz)); padding: 0; }
  :root[data-route="/chart"] .bar.tools > .m-full .m-ico { display: block; }
  :root[data-route="/chart"] .bar.tools > .m-full[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
  :root[data-route="/chart"] .foot { padding-top: 1px; padding-bottom: 1px; }
  /* 보이는 높이는 30px, 누르는 자리는 위아래로 5px 씩 넓힘 */
  :root[data-route="/chart"] .top .btn, :root[data-route="/chart"] .bar.tools .chip, :root[data-route="/chart"] .bar.tools .btn, :root[data-route="/chart"] .bar.info .info-find { position: relative; }
  :root[data-route="/chart"] .top .btn::after, :root[data-route="/chart"] .bar.tools .chip::after, :root[data-route="/chart"] .bar.tools .btn::after, :root[data-route="/chart"] .bar.info .info-find::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
  :root[data-route="/chart"] .bar.info { overflow-y: visible; }
}
@media (min-width: 601px) and (max-width: 860px) and (max-height: 500px) {
  /* 차트 = 화면 높이 − 머리 · 종목 줄 · 봉 줄 · 꼬리말(어림 128px). 오른쪽 칸 · 시세 띠는 그 아래(밀어 내려 봄) */
  :root[data-route="/chart"] .chart-zone { height: max(160px, calc(100vh - 128px * var(--fz))); height: max(160px, calc(100dvh - 128px * var(--fz))); }
}

/* ── 「차트 크게」를 켠 동안(휴대폰 세로 · 눕힌 휴대폰): 머리 · 종목 줄 · 아래 칸을 접고 차트만. 봉 줄 · 아이콘 줄 · 꼬리말(교육용 · 출처)은 그대로 ── */
@media (max-width: 600px), (max-height: 500px) {
  :root[data-route="/chart"][data-chart-full] .top, :root[data-route="/chart"][data-chart-full] .idx-band,
  :root[data-route="/chart"][data-chart-full] .bar.info, :root[data-route="/chart"][data-chart-full] .chart-page > .strip,
  :root[data-route="/chart"][data-chart-full] .work > .side { display: none; }
  :root[data-route="/chart"][data-chart-full] .chart-page { height: 100%; min-height: 0; }
  :root[data-route="/chart"][data-chart-full] .chart-page > .work { flex: 1 1 0; min-height: 0; }
  :root[data-route="/chart"][data-chart-full] .chart-zone { flex: 1 1 0; height: auto; min-height: 0; }
}

/* ── 아래 칸 이름표를 작게(11-27 선생님 "차트 볼 때 걸립니다" — 「공포지수 · ? · 크게 보기」 묶음이 선과 캔들 아래쪽을 가림) ──
   휴대폰 폭에서만: 바탕을 비우고(글자 둘레만 살짝), 글자 10px 대, 「?」는 테두리 없는 작은 글자, 「크게 보기」는 낱말 대신 작은 네모 그림.
   누르는 자리는 투명하게 위아래 40px(::before). 십자선 · 손가락 고정 때의 값 · 날짜(.is-probe)는 지금처럼 보이고 그때만 바탕을 다시 깖.
   RSI · 거래량 등 모든 아래 칸이 같은 규칙. 값 자리 폭(min-width: Nch — chart-pane.js 가 넣는 것)은 건드리지 않음 */
@media (max-width: 600px) {
  :root[data-route="/chart"] .pane-sub { left: 2px; gap: 2px; padding: 0 2px; background: transparent; font-size: calc(10px * var(--fz)); line-height: 16px; }
  :root[data-route="/chart"] .pane-sub > b { font-size: calc(10.5px * var(--fz)); text-shadow: 0 0 3px var(--panel), 0 0 3px var(--panel), 0 0 2px var(--panel); }
  :root[data-route="/chart"] .pane-sub.is-probe { background: var(--veil); }
  :root[data-route="/chart"] .pane-sub .sub-btn { position: relative; height: 16px; min-width: 14px; padding: 0 2px; background: transparent; border-color: transparent; font-size: calc(10px * var(--fz)); }
  :root[data-route="/chart"] .pane-sub .sub-btn::after { content: none; }
  :root[data-route="/chart"] .pane-sub .sub-btn::before { content: ""; position: absolute; top: -12px; bottom: -12px; left: -8px; right: -8px; }
  :root[data-route="/chart"] .pane-sub .sub-help { width: 14px; margin-right: 12px; border-radius: 0; color: var(--muted); }
  :root[data-route="/chart"] .pane-sub .sub-big { display: inline-flex; align-items: center; justify-content: center; width: 16px; min-width: 16px; padding: 0; font-size: 0; color: var(--muted); }
  :root[data-route="/chart"] .pane-sub .sub-big::before { left: -12px; right: -12px; }
  :root[data-route="/chart"] .pane-sub .sub-big::after { content: ""; position: static; box-sizing: border-box; width: 11px; height: 9px; border: 1.5px solid currentColor; border-top-width: 3px; border-radius: 1.5px; }
  :root[data-route="/chart"] .pane-sub .sub-big[aria-pressed="true"] { background: transparent; border-color: transparent; color: var(--accent); }
  :root[data-route="/chart"] .pane-sub .sub-big[aria-pressed="true"]::after { width: 8px; height: 7px; }
  :root[data-route="/chart"] .pane-sub .sub-btn[hidden] { display: none; }
}

/* ── 아래 칸 「크게 보기」 · 「?」를 차트 밖으로(11-28 선생님 「워치는」 = "크게 보기를 이쪽 빈칸으로" — 사장님 풀이) ──
   휴대폰 폭에서만: 종목 줄 둘째 줄, 「전체 기간 보기」 바로 앞에 단추 묶음(.sub-ctl — js/ui/m-chart.js 가 「지금 칸」의 아래 칸을 따라 만듦).
   아래 칸이 하나면 「크게 보기 ▢」(크게 보는 중엔 「원래대로」), 둘 이상이면 칸 이름마다 하나(「공포지수 ▢」 「RSI ▢」), 「?」는 그 옆 작은 동그라미.
   차트 안 이름표에는 이름과 값만 남김 — 단추가 밖에 있을 때만(<html data-sub-out>) 숨기고, 「차트 크게」 동안은 종목 줄이 접히므로 차트 안 단추(작은 네모)가 다시 보임 */
.sub-ctl { display: none; }
@media (max-width: 600px) {
  :root[data-route="/chart"] .bar.info > .sub-ctl {
    display: flex; align-items: center; gap: 4px; order: 6; flex: 0 1 auto; min-width: 0; max-width: 62%;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding: 10px 0; margin: -10px 0;
  }
  :root[data-route="/chart"] .bar.info > .sub-ctl[hidden] { display: none; }
  :root[data-route="/chart"] .bar.info > .sub-ctl::-webkit-scrollbar { display: none; }
  :root[data-route="/chart"] .sub-ctl .chip {
    position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    height: min(calc(20px * var(--fz)), 26px); padding: 0 6px; font-size: calc(11px * var(--fz)); color: var(--text); white-space: nowrap;
  }
  :root[data-route="/chart"] .sub-ctl .chip::before { content: ""; position: absolute; top: -10px; bottom: -10px; left: -2px; right: -2px; }
  :root[data-route="/chart"] .sub-ctl .sc-ico { flex: none; box-sizing: border-box; width: 11px; height: 9px; border: 1.5px solid currentColor; border-top-width: 3px; border-radius: 1.5px; }
  :root[data-route="/chart"] .sub-ctl .sc-big[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
  :root[data-route="/chart"] .sub-ctl .sc-big[aria-pressed="true"] .sc-ico { width: 8px; height: 7px; }
  :root[data-route="/chart"] .sub-ctl .sc-help { width: min(calc(20px * var(--fz)), 26px); padding: 0; border-radius: 50%; font-weight: 700; }
  :root[data-route="/chart"] .sub-ctl .sc-help::before { left: -3px; right: -7px; }
  /* 「가」 아주 크게: 아래 칸이 하나면 그림만(이름은 aria-label · title) */
  :root[data-route="/chart"][data-fs="xl"] .sub-ctl[data-n="1"] .sc-text { display: none; }
  /* 차트 안: 이름과 값만 */
  :root[data-route="/chart"][data-sub-out]:not([data-chart-full]) .pane-sub .sub-big,
  :root[data-route="/chart"][data-sub-out]:not([data-chart-full]) .pane-sub .sub-help { display: none; }
  /* 「차트 읽기」 줄(344 · 아주 크게): 「◀ ①②③」이 「◀ …」까지 줄지 않게 번호 하나는 남김(「◀ ①…」) — 제목이 대신 더 줄어듦 */
  .wiz-head .wiz-jump-t { min-width: 3.6em; }
}
/* 아주 좁은 화면(380px 미만): 아래 칸이 하나면 그림만 */
@media (max-width: 379px) {
  :root[data-route="/chart"] .sub-ctl[data-n="1"] .sc-text { display: none; }
}

/* ── 휴대폰용 짧은 글(11-28 사장님 "모바일용은 「크게 보기」 말고 「크게」 — 단축시켜서") ──
   js/ui/m-chart.js 가 붙인 data-short(다섯 언어 — i18n mshort.* · sidePanel.econShort)를 휴대폰 폭에서만 대신 보임: 원래 글은 크기 0 으로 두고(읽어 주는 이름 · title 은 그대로)
   ::after 로 짧은 글. PC · 태블릿은 지금 글자 그대로. 누르는 자리(::before)는 건드리지 않음 */
@media (max-width: 600px) {
  :root[data-route="/chart"] .bar.info > .full-btn[data-short],
  :root[data-route="/chart"] .info-stats .info-lab[data-short],
  :root[data-route="/chart"] .wiz-head .chip[data-short],
  :root[data-route="/chart"] .side-tab > span[data-short],
  .scn-use[data-short] { font-size: 0; }
  /* 24시간 값 줄은 줄 높이가 px 로 잡혀 있어, 글자 크기 0 인 칸이 줄을 키우지 않게(줄 높이도 0 — 짧은 글 쪽에서 다시 줌) */
  :root[data-route="/chart"] .info-stats .info-lab[data-short] { line-height: 0; }
  :root[data-route="/chart"] .info-stats .info-lab[data-short]::after { line-height: min(calc(22px * var(--fz)), 26px); }
  :root[data-route="/chart"] .bar.info > .full-btn[data-short]::after,
  :root[data-route="/chart"] .info-stats .info-lab[data-short]::after { content: attr(data-short); font-size: calc(11px * var(--fz)); }
  :root[data-route="/chart"] .wiz-head .chip[data-short]::after { content: attr(data-short); font-size: var(--fs-sm); }
  :root[data-route="/chart"] .side-tab > span[data-short]::after,
  .scn-use[data-short]::after { content: attr(data-short); font-size: var(--fs); }
}

/* ── 휴대폰용 짧은 글 2(11-28 사장님 O): 다른 화면 — 검색기(묶음 · 회원 · 안내 · 공시) · 실시간 데이터(청산 · 30일) · 첫 화면(상승 · 하락) · 차트 연동 표시(↔ 종목 · ↔ 봉) ──
   위 「휴대폰용 짧은 글」과 같은 방식(data-short — js/ui/m-chart.js 가 그 자리 글이 정확히 그 긴 글일 때만 붙임). 글자 크기는 그 자리의 원래 크기 그대로 */
@media (max-width: 600px) {
  .link-badge[data-short], .scn-grp-name b[data-short], .scn-lock b[data-short], .scn-lock a[data-short], .scn-tag[data-short],
  .dnav-btn[data-short], .dfng-hist h3[data-short], .seg-btn[data-short] { font-size: 0; }
  .link-badge[data-short]::after { content: "↔ " attr(data-short); font-size: var(--fs-sm); }
  .scn-tag[data-short]::after, .dfng-hist h3[data-short]::after, .seg-btn[data-short]::after { content: attr(data-short); font-size: var(--fs-sm); }
  .scn-grp-name b[data-short]::after, .scn-lock a[data-short]::after, .dnav-btn[data-short]::after { content: attr(data-short); font-size: var(--fs); }
  .scn-lock b[data-short]::after { content: attr(data-short); font-size: var(--fs-lg); }
}

/* ── 종목 줄은 어느 언어 · 글자 크기에서도 두 줄(11-28 검증: en · hi 360, ja 390, vi 344 「크게」에서 세 줄처럼 접혀 차트가 60% 아래로) ──
   첫 줄이 접히지 않게: 종목 알약은 바탕 폭 0 에서 남는 만큼만 늘어남(모자라면 이름이 말줄임), 가격 · 거래소는 줄바꿈 없음.
   「가」 크게 · 아주 크게는 거래소 단추를 둘째 줄 앞으로. 둘째 줄도 접히지 않게: 24시간 값 · 아래 칸 단추 묶음은 바탕 폭 0 에서 나눠 가짐(넘치면 그 안에서 옆으로 밀림) */
@media (max-width: 600px) {
  :root[data-route="/chart"] .bar.info .info-find { flex: 1 1 0; min-width: calc(44px * var(--fz)); }
  :root[data-route="/chart"] .bar.info .info-quote { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
  :root[data-route="/chart"] .bar.info .exch-btn { flex: 0 1 auto; min-width: 0; white-space: nowrap; }
  :root[data-route="/chart"][data-fs="lg"] .bar.info .exch-btn, :root[data-route="/chart"][data-fs="xl"] .bar.info .exch-btn { order: 5; flex: none; margin: 0; }
  :root[data-route="/chart"] .bar.info > .info-stats { flex: 1 1 0; min-width: 22%; }
  :root[data-route="/chart"] .bar.info > .sub-ctl { flex: 1 1 0; max-width: max-content; }
  :root[data-route="/chart"] .bar.info > .full-btn { flex: none; white-space: nowrap; }
}

/* ── 누르는 자리 세로 40px(11-28 검증: 봉 줄 30~36 · 도구 줄 30~37 · 종목 단추 30 · 거래소 31 · 「전체 ↗」 29 · 로그인 37 — 넓힌 투명 자리가 잘리거나 이웃 줄에 가로채였음) ──
   줄 다섯(머리 · 종목 첫 줄 · 둘째 줄 · 봉 줄 · 도구 줄)이 180px 안에 쌓여 있어, 위아래로 맞닿는 단추끼리는 자리가 모자람 → 눌리지 않는 것(가격 · 24시간 값) 쪽으로 넓힘:
   첫 줄 차례를 종목 알약 · 거래소 · (오른쪽 끝) 가격으로 — 거래소 아래는 24시간 값, 둘째 줄 오른쪽 단추(크게 · ? · 전체 ↗) 위는 가격이라 서로 가로채지 않음.
   종목 알약은 제 넘침 자르기를 풀어(이름만 말줄임) 넓힌 자리가 잘리지 않게. 보이는 크기 · 줄 높이는 그대로 */
@media (max-width: 600px) {
  :root[data-route="/chart"] .bar.info .info-find { overflow: visible; z-index: 1; }
  :root[data-route="/chart"] .bar.info .exch-btn { z-index: 1; }
  :root[data-route="/chart"] .bar.info .info-find::after { top: -3px; bottom: -8px; }
  :root[data-route="/chart"]:not([data-fs="lg"]):not([data-fs="xl"]) .bar.info .exch-btn { order: 2; margin: 0; }
  :root[data-route="/chart"] .bar.info .info-quote { order: 3; margin-left: auto; }
  /* 거래소: 아래로는 줄 끝까지만(바로 아래에 아래 칸 단추가 올 수 있음) — 아래 칸 단추가 하나뿐이거나 없을 때는 24시간 값 위로 더 넓힘 */
  :root[data-route="/chart"] .bar.info .exch-btn::after { top: -5px; bottom: -2px; }
  :root[data-route="/chart"] .bar.info:has(> .sub-ctl[data-n="1"]) .exch-btn::after, :root[data-route="/chart"] .bar.info:has(> .sub-ctl[hidden]) .exch-btn::after { bottom: -10px; }
  /* 「가」 크게 · 아주 크게: 거래소가 알약 바로 아래 줄이라 서로의 보이는 자리를 넘지 않게 */
  :root[data-route="/chart"][data-fs="lg"] .bar.info .exch-btn::after, :root[data-route="/chart"][data-fs="xl"] .bar.info .exch-btn::after { top: 0; bottom: 0; }
  :root[data-route="/chart"][data-fs="lg"] .bar.info .info-find::after, :root[data-route="/chart"][data-fs="xl"] .bar.info .info-find::after { bottom: 0; }
  :root[data-route="/chart"] .bar.info > .sub-ctl { padding: 21px 0 0; margin: -21px 0 0; }
  :root[data-route="/chart"] .sub-ctl .chip::before, :root[data-route="/chart"] .bar.info > .full-btn::before { top: -21px; bottom: 0; }
  /* 둘째 줄의 것은 줄 위쪽에 맞춤(단추끼리 높이가 어긋나지 않게 — 아래 봉 줄과 나눠 갖는 금이 한 줄로) */
  :root[data-route="/chart"] .bar.info > .info-stats, :root[data-route="/chart"] .bar.info > .sub-ctl, :root[data-route="/chart"] .bar.info > .full-btn { align-self: flex-start; }
  :root[data-route="/chart"] .bar.tools .bar-chips { padding: 8px 0 3px; margin: -8px 0 -3px; }
  :root[data-route="/chart"] .bar.tools .bar-chips .chip::after, :root[data-route="/chart"] .bar.tools .bar-more::after, :root[data-route="/chart"] .bar.tools .style-btn::after { top: -8px; bottom: -3px; }
  :root[data-route="/chart"] .m-tools > .btn::after, :root[data-route="/chart"] .m-tools > .chip::after { top: -6px; bottom: -6px; }
  .top.has-more #login-btn::after { top: -7px; bottom: -7px; }
}

/* ── 둘째 줄 넘침 · 잘림 고침 + 누르는 자리 다시(11-28 검증 2차: 390 에서 대금 값이 잘림 · 큰 글자에서 24시간 값이 거의 안 보임 · 누르는 자리가 실제 화면에서 34~38) ──
   자리 벌기: 대금 단위(USDT)는 생략(data-short — m-chart.js), 값 사이 간격을 줄이고, 「크게」 낱말은 420px 이상에서만(그 아래 · 「가」 크게/아주 크게는 네모 그림만).
   그래도 넘치는 폭(360 이하 · 큰 글자)은 24시간 값 묶음만 옆으로 밀리고 끝이 흐려짐("더 있음") — 단추들은 줄어들지도 화면 밖으로 나가지도 않음.
   누르는 자리: 줄마다 겹침 순서를 정해(봉 줄 > 종목 줄, 도구 줄 > 봉 줄 · 차트) 이웃 줄이 덮지 못하게 하고, 눌리지 않는 쪽으로 더 넓힘 */
@media (max-width: 600px) {
  :root[data-route="/chart"] .bar.info > .info-stats { gap: 0 6px; min-width: 0; }
  :root[data-route="/chart"] .bar.info .info-stats .info-item { gap: 2px; }
  :root[data-route="/chart"] .bar.info .info-stats .info-item b[data-short] { font-size: 0; line-height: 0; }
  :root[data-route="/chart"] .bar.info .info-stats .info-item b[data-short]::after { content: attr(data-short); font-size: calc(11px * var(--fz)); line-height: min(calc(22px * var(--fz)), 26px); }
  :root[data-route="/chart"][data-fs="lg"] .sub-ctl[data-n="1"] .sc-text { display: none; }
  /* 단추들은 줄어들지 않음(24시간 값 묶음만 줄어듦) — 아래 칸이 둘 이상이라 묶음이 길면 그 묶음 안에서 밀림 */
  :root[data-route="/chart"] .bar.info > .sub-ctl[data-n="1"] { flex: none; }
  :root[data-route="/chart"] .bar.info > .sub-ctl { max-width: 58%; }
  /* 겹침 순서 */
  :root[data-route="/chart"] .bar.tools { position: relative; z-index: 1; }
  :root[data-route="/chart"] .m-tools { position: relative; z-index: 2; }
  :root[data-route="/chart"] .bar.info > .full-btn, :root[data-route="/chart"] .bar.info > .sub-ctl[data-n="1"] { z-index: 2; }
  :root[data-route="/chart"] .bar.info > .sub-ctl[data-n="1"] { position: relative; }
  /* 눌리지 않는 쪽으로 더: 종목 알약 · 거래소는 24시간 값 위로, 둘째 줄 단추는 가격 위로 */
  :root[data-route="/chart"]:not([data-fs="lg"]):not([data-fs="xl"]) .bar.info .info-find::after { bottom: -12px; }
  :root[data-route="/chart"]:not([data-fs="lg"]):not([data-fs="xl"]) .bar.info:has(> .sub-ctl[data-n="1"]) .exch-btn::after,
  :root[data-route="/chart"]:not([data-fs="lg"]):not([data-fs="xl"]) .bar.info:has(> .sub-ctl[hidden]) .exch-btn::after { bottom: -12px; }
  :root[data-route="/chart"] .bar.info > .sub-ctl { padding-top: 24px; margin-top: -24px; }
  :root[data-route="/chart"] .sub-ctl .chip::before, :root[data-route="/chart"] .bar.info > .full-btn::before { top: -24px; }
  .top.has-more #login-btn::after { top: -8px; bottom: -8px; }
  /* 봉 줄: 위로 9px(둘째 줄 단추 바로 아래까지). 「가」 크게 · 아주 크게는 바로 위가 거래소 단추라 3px 만 */
  :root[data-route="/chart"] .bar.tools .bar-chips { padding-top: 9px; margin-top: -9px; }
  :root[data-route="/chart"] .bar.tools .bar-chips .chip::after, :root[data-route="/chart"] .bar.tools .bar-more::after, :root[data-route="/chart"] .bar.tools .style-btn::after { top: -9px; }
  :root[data-route="/chart"][data-fs="lg"] .bar.tools .bar-chips .chip::after, :root[data-route="/chart"][data-fs="xl"] .bar.tools .bar-chips .chip::after { top: -3px; }
  :root[data-route="/chart"][data-fs="lg"] .bar.tools .bar-chips, :root[data-route="/chart"][data-fs="xl"] .bar.tools .bar-chips { padding-top: 3px; margin-top: -3px; }
  /* 아래 칸이 둘 이상: 단추 묶음이 거래소 바로 아래까지 올 수 있어 위로는 넓히지 않고(거래소를 덮지 않게) 아래로 4px 만 — 봉 줄보다는 위 */
  :root[data-route="/chart"] .bar.info > .sub-ctl:not([data-n="1"]) { position: relative; z-index: 2; padding: 0 0 4px; margin: 0 0 -4px; }
  :root[data-route="/chart"] .sub-ctl:not([data-n="1"]) .chip::before { top: 0; bottom: -4px; }
}
/* 「크게」 낱말은 넓은 휴대폰(420px 이상)에서만 — 그 아래는 네모 그림만(24시간 값 셋이 다 보이게) */
@media (max-width: 419px) {
  :root[data-route="/chart"] .sub-ctl[data-n="1"] .sc-text { display: none; }
}

/* ══════════ 카카오 준비 묶음(11-27): 로그인 화면 — 두 방식(텔레그램 + 카카오)이 같이 보일 때의 안내 · 가입 확인 끝 화면의 카카오 안내 ══════════
   카카오가 꺼져 있으면 아래 요소는 전부 숨김(hidden) 그대로라 로그인 화면은 예전과 같음. 색은 토큰만 */
.login-page .login-lead-short { display: none; color: var(--text); }
.login-page .login-same { font-size: var(--fs-sm); }
.login-page .login-same[hidden] { display: none; }
.join-done .join-via { max-width: 30em; }
@media (max-width: 600px) {
  /* 휴대폰: 긴 안내 줄 대신 낱말 하나(사장님 규칙 — 모바일은 짧게). 실패 · 한도 안내에는 data-short 를 달지 않으므로 그대로 보임 */
  .login-page .login-lead[data-short] { display: none; }
  .login-page .login-lead-short:not([hidden]) { display: block; }
}

/* ── S5(11-28) 좁은 휴대폰 큰 글자 — 도구 줄 끝 단추가 「차트 크게」(▢) 밑으로 들어가던 것(344 ja 아주 크게 · 360 en 아주 크게 · 344 en 크게)
   (M1 묶음 뒤 · S4 묶음 바로 앞 — 조건은 380px 미만만(test/m1-mobile.test.js), 선택자가 S4 의 칸 수 줄보다 무거워 S4 보다 앞이어도 이김. 있던 줄은 안 바꿈)
   [화면 분할] 단추의 칸 수 글자(「1칸」 · 「1-pane」 · 「1分割」)를 숫자만(「1」 — js/ui/split-menu.js 가 data-n 에 적음). 글자는 크기 0 으로 남겨 읽어 주는 기능 · 말풍선은 그대로 */
@media (max-width: 379px) {
  :root[data-route="/chart"] .m-tools > .split-btn > .split-btn-count[data-n] { font-size: 0; letter-spacing: 0; }
  :root[data-route="/chart"] .m-tools > .split-btn > .split-btn-count[data-n]::before { content: attr(data-n); font-size: calc(11px * var(--fz)); font-weight: 700; line-height: 1; }
}

/* ── SG1(11-28) 잠긴 자리 「무료 · 텔레그램으로 10초 가입」 한 줄 + 바깥 브라우저 안내(사장님 · 총괄 O — 가입 문턱 낮추기) ──
   보이는지는 맨 위 표식만 봄: data-signup="1"(로그인 켜진 서버 · 로그인 안 한 사람) · data-inapp="1"(ARES_INAPP_HINT=on + 텔레그램 앱 안 브라우저). 표식이 없으면 숨김(회원 · 가입 확인 전 · 묻는 중)
   넓은 화면은 긴 글, 휴대폰(600px 이하)은 짧은 글(낱말 하나 원칙). 글은 줄바꿈되어 칸 밖으로 넘치지 않음 */
.signup-nudge { display: none; }
:root[data-signup="1"] .signup-nudge:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); max-width: 100%; min-width: 0; margin: 0;
  font-size: var(--fs-sm); line-height: 1.35; color: var(--muted);
}
.signup-nudge .sn-free { min-width: 0; overflow-wrap: anywhere; word-break: keep-all; font-weight: 700; color: var(--accent); }
.signup-nudge .sn-short, .signup-nudge .ia-short, .login-inapp .ia-short { display: none; }
.signup-nudge .sn-login { flex: none; }
.scn-lock .signup-nudge { justify-content: center; text-align: center; }
.signup-nudge .inapp-hint { display: none; }
:root[data-inapp="1"] .signup-nudge .inapp-hint { display: block; flex-basis: 100%; min-width: 0; overflow-wrap: anywhere; color: var(--warn); font-weight: 700; }
.login-page .login-inapp { margin: 0; padding: var(--s2) var(--s3); border: 1px solid var(--warn); border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: var(--fs-sm); overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .signup-nudge .sn-long, .signup-nudge .ia-long, .login-inapp .ia-long { display: none; }
  .signup-nudge .sn-short, .signup-nudge .ia-short, .login-inapp .ia-short { display: inline; }
}
/* ── BK1(11-29) 목록 → 차트 「← 목록」(그룹1 #20492 수강생 건의 — 텔레그램 앱 안 브라우저엔 뒤로 단추가 없음) ──
   목록(검색기 · 옛 매매법 · 실시간 데이터)에서 종목을 눌러 왔을 때만 종목 줄 맨 앞에(js/ui/chart-page.js). 넓은 화면은 목록 이름(「← 검색기」), 휴대폰(600px 이하)은 낱말 하나(「← 목록」).
   보이는 높이는 종목 단추와 비슷하게, 휴대폰 누르는 자리는 투명하게 세로 40px 남짓(종목 알약과 같은 방식). 색은 토큰만 */
.chart-back { display: inline-flex; align-items: center; gap: 4px; flex: none; height: calc(26px * var(--fz)); padding: 0 10px 0 8px; margin-right: var(--s2); border-radius: 999px; font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.chart-back .cb-arr { font-size: 1.1em; line-height: 1; color: var(--accent); }
.chart-back .cb-m { display: none; }
.chart-back:hover { border-color: var(--accent); }
@media (max-width: 600px) {
  .chart-back .cb-w { display: none; }
  .chart-back .cb-m { display: inline; }
  :root[data-route="/chart"] .bar.info .chart-back { position: relative; order: 0; flex: none; align-self: center; height: min(calc(28px * var(--fz)), 32px); padding: 0 8px 0 6px; margin: 0; gap: 2px; z-index: 1; }
  :root[data-route="/chart"] .bar.info .chart-back::after { content: ""; position: absolute; left: -4px; right: -2px; top: -5px; bottom: -10px; }
}

/* ── WH(11-28) 휴대폰: 보이기 줄 · 자동 선 판의 글은 낱말 하나(wh-s), 누르는 자리 40px ── */
@media (max-width: 600px) {
  .wh-l { display: none; }
  .wh-s { display: inline; }
  .wh-cap { display: none; }
  .wh-row { gap: 6px; }
  .wh-row .chip, .wh-pick .chip { position: relative; height: calc(30px * var(--fz)); }
  .wh-row .chip::after, .wh-pick .chip::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 40px; transform: translateY(-50%); }
  .wh-pick { gap: 8px; padding: 4px 6px; }
  .wh-pick-tag { display: none; }
  .wh-pick-x { min-width: 36px; }
}

/* ── S4(11-28 사장님 O) 작은 것 둘(화면) — BB 좁은 휴대폰 도구 줄은 그림만 · BD 가격 눈금 모서리 단추 누르는 자리 40px ──
   (M1 묶음 뒤라 조건은 380px 미만 · 휴대폰 폭/낮은 높이만 — test/m1-mobile.test.js. 있던 줄은 안 바꿈) */
/* BB: 380px 미만(344 · 360 세로)은 차트 위 도구 줄(매매법 · 지표 · 공포지수 · 그리기 · 화면 분할)의 글자를 화면에서만 숨기고 그림만 — 줄이 넘치지 않음.
   읽어 주는 이름(aria-label)은 그대로, 길게 누르면 이름 말풍선(js/ui/m-tip.js). 지표 수 · 칸 수는 남김. 390 이상 · 가로 · PC 는 그대로.
   단추는 보이는 30px · 가로 40px 이상, 줄 높이를 2px 늘려 누르는 자리(위아래 투명 자리)가 세로 40px 넘게 */
@media (max-width: 379px) {
  :root[data-route="/chart"] .m-tools { min-height: calc(min(40px * var(--fz), 44px) + 2px); }
  :root[data-route="/chart"] .m-tools > .btn, :root[data-route="/chart"] .m-tools > .chip {
    min-width: 40px; justify-content: center; padding: 0 8px; gap: 3px;
    -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  }
  :root[data-route="/chart"] .m-tools > .method-btn > span,
  :root[data-route="/chart"] .m-tools > .ind-btn > span:not(.ind-btn-count),
  :root[data-route="/chart"] .m-tools > .m-fear > span,
  :root[data-route="/chart"] .m-tools > .m-draw > span,
  :root[data-route="/chart"] .m-tools > .split-btn > span:not(.split-btn-thumb):not(.split-btn-count) {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  :root[data-route="/chart"] .m-tools .ind-btn-count, :root[data-route="/chart"] .m-tools .split-btn-count { font-size: calc(11px * var(--fz)); font-weight: 700; }
  :root[data-route="/chart"] .chart-zone > .m-full { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  /* 길게 누르면 뜨는 이름(그 단추 바로 아래 · 화면 밖으로 나가지 않게 — 자리는 m-tip.js) */
  .m-tip {
    position: fixed; z-index: 60; max-width: calc(100vw - 12px); padding: 4px 10px; border-radius: 6px;
    background: var(--raised); border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow);
    font-size: var(--fs-sm); font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  }
  .m-tip[hidden] { display: none; }
}
/* BD: 휴대폰(세로 600px 이하 · 눕힌 높이 500px 이하)의 가격 눈금 모서리 단추 — 보이는 모양은 그대로(시간 눈금 높이 약 28px · 눈금 폭) 두고
   누르는 자리만 투명하게 넓혀 가로 · 세로 40px 이상: 위로(가격 눈금 맨 아래 띠 12px 쯤 — 눈금 글자가 없는 아래 끝), 폭이 40px 보다 좁으면 왼쪽으로.
   아래(칸 밖 — 옆 칸 · 아래 칸 단추)로는 넓히지 않음 */
@media (max-width: 600px), (max-height: 500px) {
  .pane-scale-btn::after {
    content: ""; position: absolute; right: 0; bottom: 0;
    left: min(0px, calc(var(--axis-w, 56px) - 40px)); top: min(0px, calc(var(--ts-h, 28px) - 40px));
  }
}


/* ══════════ 구글 로그인 준비 묶음(11-28): 로그인 화면의 「Google 계정으로 로그인」 단추 — 구글이 꺼져 있으면 단추는 hidden 그대로라 화면은 예전과 같음 ══════════
   구글 로그인 단추 지침: 표준 색 「G」(구글이 내주는 모양 그대로 · 크기만 맞춤) + "Google 계정으로 로그인" · 흰 바탕(밝은 화면)/어두운 바탕(어두운 화면) · 1px 테두리 · 모서리 4px.
   카카오 단추와 같은 폭 · 높이로 위아래로 나란히. 색은 토큰만(tokens.css 의 --google-*). 글꼴은 받지 않음(구글 글꼴 Roboto 가 기기에 있으면 그것, 없으면 사이트 글꼴). 화면 폭 조건 없음(어느 폭에서나 같은 단추) */
.login-page a.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 220px; height: 44px; padding: 0 var(--s4); box-sizing: border-box; border: 1px solid var(--google-border); border-radius: 4px; background: var(--google-bg); color: var(--google-label); font-family: "Roboto", var(--font); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.25px; text-decoration: none; white-space: nowrap; }
.login-page a.google-btn[hidden] { display: none; }
.login-page a.google-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.google-btn svg { width: 18px; height: 18px; flex: none; }
.google-btn .g-b { fill: var(--google-g-blue); }
.google-btn .g-g { fill: var(--google-g-green); }
.google-btn .g-y { fill: var(--google-g-yellow); }
.google-btn .g-r { fill: var(--google-g-red); }
