/* ============================================================
   KLineChart Renderer 전용 스타일
   ------------------------------------------------------------
   디자이너의 widgets.css 를 수정하지 않기 위해 별도 파일로 분리한다.

   왜 별도 래퍼 클래스인가:
   widgets.css 의 `.chart-canvas-wrap canvas { position:absolute; inset:0;
   width:100%; height:100% }` 규칙은 자체 엔진의 캔버스 2장을 겹치기 위한
   것이다. KLineChart 는 페인마다 캔버스를 만들고 위치를 자체 계산하므로,
   저 규칙이 적용되면 모든 페인이 전체 영역에 겹쳐 그려져 화면이 깨진다.
   그래서 래퍼 클래스를 분리하고, 방어적으로 리셋도 걸어둔다.

   레이아웃 수치는 .chart-canvas-wrap 과 동일하게 맞춰 시각 차이를 없앤다.
   ============================================================ */

.chart-kline-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--color-bg-panel);
}

.chart-kline-host {
  position: absolute;
  inset: 0;
}

/* KLineChart 내부 캔버스는 스스로 배치한다. 전역 규칙이 새어들어와도 무력화. */
.chart-kline-wrap .chart-kline-host canvas {
  position: static;
  inset: auto;
  width: auto;
  height: auto;
}

/* KLineChart 기본 배경을 패널 색으로 맞춘다 (테마 전환 시에도 따라가도록). */
.chart-kline-host,
.chart-kline-host > div {
  background: transparent;
}

/* HUD / 레전드가 차트 위에 오도록 (widgets.css 의 z-index 3 과 동일 맥락) */
.chart-kline-wrap .chart-hud,
.chart-kline-wrap .chart-legend,
.chart-kline-wrap .chart-topleft {
  z-index: 3;
}

/* ★★★ HUD·범례를 한 왼쪽 열에 쌓는다(chart-kline.jsx `chart-topleft` 주석).
     예전에는 범례를 `right: 68px`(Y축 폭만큼 왼쪽)에 띄웠다 — 가격 배지와는 안 겹쳤지만
     그 자리가 보호주문·진입 라벨의 열이라 라벨이 범례를 피해 자기 선에서 떨어졌다.
   ★ 두 요소는 이 열 안에서 흐름대로 쌓인다(static) — HUD 높이가 바뀌어도 범례가 따라 내려간다.
   ★ 열은 클릭을 받지 않는다(widgets.css 의 HUD·범례와 같다) — 아래 차트를 끌 수 있어야 한다. */
.chart-kline-wrap .chart-topleft {
  position: absolute;
  top: 10px;
  left: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
}
.chart-kline-wrap .chart-topleft > .chart-hud,
.chart-kline-wrap .chart-topleft > .chart-legend {
  position: static;
}
/* ★ HUD 줄이 가장 긴 줄(OHLC) 폭으로 늘어나지 않게 — 라벨이 피하는 상자는 줄마다 재므로
     (legendRectsOf) 늘어난 빈 폭까지 장애물이 된다. 심볼 줄이 OHLC 폭으로 재지던 것을 막는다. */
.chart-kline-wrap .chart-topleft > .chart-hud {
  align-items: flex-start;
}


/* ─────────────── 수평선 가격 입력 ───────────────
   ★ 차트 위에 뜨는 작은 창이다. 차트 위이므로 z-index 를 올리고, 클릭이 차트로
     새어 들어가지 않게 pointer-events 를 받는다.
   ★ 위치를 고정한다(왼쪽 위). 클릭 지점에 띄우면 화면 밖으로 나가는 경우를
     따로 다뤄야 하고, 이 창은 작아서 고정 위치로 충분하다. */
.chart-price-edit {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 30;
  min-width: 168px;
  padding: 9px var(--sp-5);
  border-radius: 7px;
  border: 1px solid var(--color-border-strong, rgba(255,255,255,.16));
  background: var(--color-bg-elevated, var(--n-850));
  box-shadow: 0 8px 22px rgba(0,0,0,.38);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.chart-price-edit__title {
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: .02em;
}
.chart-price-edit__input {
  width: 100%;
  padding: var(--sp-3) 8px;
  border-radius: 5px;
  border: 1px solid var(--color-border-strong, rgba(255,255,255,.16));
  background: var(--color-bg-surface, var(--n-900));
  color: var(--color-text-primary);
  font-family: var(--font-num, inherit);
  font-size: 13px;
}
.chart-price-edit__row { display: flex; gap: var(--sp-3); }
.chart-price-edit__note,
.chart-price-edit__err {
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.chart-price-edit__note { color: var(--color-text-tertiary); }
/* ★ 오류는 읽을 수 있어야 한다. 너무 흐리면 왜 적용이 안 됐는지 모른다. */
.chart-price-edit__err { color: var(--color-danger, #e5484d); }

/* ============================================================================
   포지션 라인의 TP/SL 버튼

   ★★★ 캔버스에 그려지는 포지션 라인 옆에 DOM 버튼을 얹는다. 라벨은 캔버스라
     버튼을 직접 붙일 수 없다.

   ★★ 층 전체는 `pointer-events: none` 이고 **버튼만** 받는다. 층이 클릭을 먹으면
     차트를 끌 수 없다 — 이 저장소에서 이미 겪은 실패 방식이다.

   ★ 왼쪽에 둔다. 오른쪽은 Y축 가격 라벨과 겹친다.
   ============================================================================ */
.chart-posbtns {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.chart-posbtns__row {
  position: absolute;
  left: 8px;
  /* ★ 선 중앙에 맞춘다 — 버튼 높이의 절반만큼 올린다. */
  transform: translateY(-50%);
  display: inline-flex;
  gap: 4px;
}
.chart-posbtns__btn {
  pointer-events: auto;
  min-width: 26px;
  height: 18px;
  padding: 0 var(--sp-3);
  border-radius: 4px;
  border: 1px solid var(--color-border-default);
  background: color-mix(in srgb, var(--color-bg-surface) 88%, transparent);
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  /* ★ 차트 위에 있으므로 배경이 비쳐야 캔들을 가리지 않는다. */
  backdrop-filter: blur(2px);
}
.chart-posbtns__btn:hover {
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}
/* ★ 익절은 롱 색, 손절은 숏 색 — 차트의 다른 요소와 같은 의미 체계를 쓴다. */
.chart-posbtns__btn.is-tp:hover { border-color: var(--color-trade-long); color: var(--color-trade-long); }
.chart-posbtns__btn.is-sl:hover { border-color: var(--color-trade-short); color: var(--color-trade-short); }

@media (prefers-reduced-motion: reduce) {
  .chart-posbtns__btn { transition: none; }
}

/* ============================================================================
   ★★★ 손가락으로 누를 수 있는 크기

     운영자 지적: 차트 버튼이 18px 라 손가락으로 누르기 어렵다.

   ★★ 데스크톱에서는 작게 유지한다 — 캔들을 가리지 않는 것이 원래 이유였고,
     마우스는 18px 를 정확히 누른다. **입력 방식으로 나눈다**(`pointer: coarse`).
     화면 폭으로 나누면 좁은 데스크톱 창에서 버튼만 커진다.
   ★ 권장 44px 를 그대로 쓰면 봉을 덮는다. **보이는 크기는 조금만 키우고
     누를 수 있는 범위를 넓힌다** — `::after` 로 투명한 판을 깐다.
   ============================================================================ */
@media (pointer: coarse) {
  .chart-posbtns__btn {
    min-width: 34px;
    height: 26px;
    font-size: 11px;
    position: relative;
  }
  /* ★ 보이지 않는 44px 판. 시각적 크기를 키우지 않고 오조작만 줄인다. */
  .chart-posbtns__btn::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 44px; height: 44px;
    transform: translate(-50%, -50%);
  }
  .chart-posbtns__row { gap: 8px; }
}

/* ============================================================================
   ★★★ 초안 TP/SL 선의 비율 선택창 (차트 위)

     전에는 초안 선이 차트에 생기고 **비율 버튼은 아래 포지션 탭**에 나왔다.
     차트에서 시작한 동작인데 눈과 손이 화면 아래로 내려가야 끝났다 —
     급한 순간에 가장 나쁜 흐름이다.

   ★ 층은 클릭을 통과시키고 창만 받는다. 층이 먹으면 차트를 끌 수 없다.
   ★★ 오른쪽에 붙인다. 왼쪽에는 포지션 라인의 TP/SL 버튼이 있어 겹친다.
     Y축 가격 라벨을 피하려고 오른쪽 여백(68px)만큼 띄운다.
   ============================================================================ */
.chart-draftpop-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}
.chart-draftpop {
  position: absolute;
  right: 76px;
  transform: translateY(-50%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px var(--sp-3);
  border-radius: 7px;
  border: 1px solid var(--color-border-strong);
  background: color-mix(in srgb, var(--color-bg-surface) 94%, transparent);
  backdrop-filter: blur(3px);
  box-shadow: 0 2px 10px oklch(0 0 0 / 0.28);
  white-space: nowrap;
}
/* ★ 익절은 롱 색, 손절은 숏 색 — 차트의 다른 요소와 같은 의미 체계. */
.chart-draftpop.is-tp { border-color: var(--color-trade-long); }
.chart-draftpop.is-sl { border-color: var(--color-trade-short); }
.chart-draftpop__kind {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.chart-draftpop.is-tp .chart-draftpop__kind { color: var(--color-trade-long); }
.chart-draftpop.is-sl .chart-draftpop__kind { color: var(--color-trade-short); }
.chart-draftpop__px {
  font-family: var(--font-num);
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  margin-right: var(--sp-1);
}
.chart-draftpop__btn {
  min-width: 30px;
  height: 20px;
  padding: 0 var(--sp-3);
  border-radius: 4px;
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.chart-draftpop__btn:hover { border-color: var(--color-border-strong); }
.chart-draftpop__x {
  width: 18px; height: 20px;
  border: 0; background: none;
  color: var(--color-text-tertiary);
  font-size: 12px; line-height: 1; cursor: pointer;
  border-radius: 4px;
  position: relative;
}
.chart-draftpop__x:hover,
.chart-draftpop__x:focus-visible {
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 14%, transparent);
}

/* ★★ 터치에서는 누를 수 있게 키운다. 데스크톱은 작게 유지 — 캔들을 가리지 않는다. */
@media (pointer: coarse) {
  .chart-draftpop { right: 72px; gap: var(--sp-3); padding: var(--sp-3) 8px; }
  .chart-draftpop__btn { min-width: 40px; height: 30px; font-size: 12px; }
  .chart-draftpop__x { width: 28px; height: 30px; font-size: 15px; }
  .chart-draftpop__x::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: 40px; height: 40px; transform: translate(-50%, -50%);
  }
}

/* ★ 좁은 화면에서는 가격을 생략한다 — 창이 차트를 가로지르면 봉을 못 본다. */
@media (max-width: 520px) {
  .chart-draftpop__px { display: none; }
  .chart-draftpop { right: 60px; }
}

/* 포지션 TP/SL 단추를 끄는 동안의 안내선 — 놓으면 그 가격에 초안이 생긴다 */
.chart-posbtns__btn { touch-action: none; }
.chart-posdrag {
  position: absolute;
  left: 0; right: 0;
  height: 0;
  border-top: 1px dashed var(--color-text-secondary);
  pointer-events: none;
  z-index: 7;
}
.chart-posdrag--tp { border-top-color: var(--color-trade-long); }
.chart-posdrag--sl { border-top-color: var(--color-trade-short); }
.chart-posdrag__tag {
  position: absolute;
  left: 8px;
  transform: translateY(-50%);
  padding: 1px var(--sp-3);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  background: var(--color-bg-elevated);
  border: 1px solid currentColor;
}
.chart-posdrag--tp .chart-posdrag__tag { color: var(--color-trade-long); }
.chart-posdrag--sl .chart-posdrag__tag { color: var(--color-trade-short); }

/* ═══ 168차 — 차트 위젯이 아무리 줄어도 **가격 영역이 사라지지 않게** 하한을 둔다 ═══
   증상(고객): "차트가 잘리고 거래량만 보인다". 위젯이 작아지면 고정 높이였던 거래량
   페인이 남고 가격 영역이 0 에 가까워진다. 위 수정(비율화)의 바닥 방어선이다.
   ★ 이 값은 '쓸 수 있는 최소' 다 — 더 줄이고 싶으면 레이아웃(행 수)을 줄여야 한다. */
.chart-kline-wrap { min-height: 240px; }

/* (2026-10-30) 지표 이름 목록 접기 단추 — 목록 글자와 같은 크기, 테두리 없이 */
.chart-legend__toggle { background: transparent; border: 0; padding: 4px 4px; margin: -4px 0; min-height: 24px; min-width: 24px; cursor: pointer; color: var(--color-text-tertiary); font: inherit; text-align: left; pointer-events: auto; }   /* 누르는 자리 24px(접근성) — 보이는 크기는 그대로 */
.chart-legend__toggle:hover { color: var(--color-text-primary); }
/* (2026-11-13 design) the fold mark is an SVG chevron (was ▴ / ▸ text) */
.chart-legend__toggle { display: inline-flex; align-items: center; gap: 2px; }
.chart-legend__chev { flex: none; }

/* ============================================================================
   (2026-11-08, ledger #114 Part A) v1.1 chart chrome around the canvas — behind the brand gate only.
     · watermark   faint symbol · timeframe in the centre, under the transparent canvases (the host is painted after it);
                   hidden in compact charts (chart-kline.jsx sets data-compact on the wrap from its ResizeObserver)
     · HUD time    the bar under the crosshair, YYYY.MM.DD HH:mm UTC
     · text editor the inline box of the text tool (ChartTextEditor) — 44 px on touch, 16 px text on phones (no zoom)
   ============================================================================ */
.chart-watermark { display: none; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-watermark {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .4em;
  pointer-events: none; user-select: none; white-space: nowrap; overflow: hidden;
  font-family: var(--cc-font); font-weight: 650; font-size: clamp(28px, 5.2vw, 64px); line-height: 1; letter-spacing: -0.025em;
  color: color-mix(in srgb, var(--cc-ink) 5%, transparent);
}
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-watermark__tf { font-weight: 550; opacity: .85; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap[data-compact="1"] .chart-watermark { display: none; }

html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud__time { margin-left: 6px; font-variant-numeric: tabular-nums; }

/* ============================================================================
   (2026-11-20, design audit CH-01) v1.1 chart header (symbol · timeframe · time, O-H-L-C) and indicator legend.
     They were the old overlay: 10 / 11 px text from widgets.css printed straight on the candles, the legend one name per
     line (six lines over the oldest candles). The v1.1 rule in v11-trade.css is scoped to .trade-body — the old trade grid —
     and never matched on the v1.1 screen. Now, wherever the chart is drawn under the gate (.chart-kline-wrap):
     · caption type (12 / 18, Pretendard, tabular figures), keys muted, values ink — two text levels
     · every header row and every legend name sits on its own quiet chip (the surface at 92 %, the control corner), like
       the sub-pane heads (.v11-pane-head), so it reads on top of candles and lines
     · the legend runs in a row and wraps, instead of one name per line: one row on a wide chart, less of the chart covered
     · the fold button keeps its place at the end, its test id and both states (a phone starts folded — chart-kline.jsx)
   Same markup and classes: chart labels and the drawing edit bar keep measuring .chart-hud__row / .chart-legend__item to
   stay clear of them. Phone sizes (44 px fold button, the compact header) are in v11-trade-panels.css.
   ★ The right end of the price pane is where the chart's own tags and price labels stand (zone tags: a column about
     76 px wide left of the 79 px price axis — measured at 390, 1024 and 1440). A legend in a row reaches further right
     than the old column of names did, so it wraps before that column: its right edge stays 160 px from the chart's
     right edge. For that the header column has a definite width (it takes no clicks and draws nothing itself — only its
     rows and chips do), so the legend's limit can be written against the chart's width.
   ============================================================================ */
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-topleft { width: calc(100% - 96px); max-width: calc(100% - 96px); }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud {
  gap: 2px; max-width: 100%;
  font-family: var(--cc-font); font-size: var(--cc-text-caption, 12px); line-height: var(--cc-leading-caption, 18px);
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0;
}
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud__row {
  align-items: baseline; gap: 4px; max-width: 100%; padding: 0 6px; overflow: hidden; white-space: nowrap;
  border-radius: var(--cc-control-radius, 8px); background: color-mix(in srgb, var(--cc-surface) 92%, transparent);
  color: var(--cc-muted);
}
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud__row .k { color: var(--cc-muted); }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud__row .v { color: var(--cc-ink); font-weight: var(--cc-weight-control, 550); }
/* a value and the next key are one step further apart than a key and its own value: O 68,000.0 · H 68,120.5 */
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud__row .v + .k { margin-left: 8px; }
/* the "CCAI candles are not shown on this timeframe" note is a header row too (chart labels keep clear of it): a sentence
   that wraps, drawn as a v1.1 warning note (the ticket's .v11t-od__msg--warn) — at every width */
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud .chart-hud__row.chart-hud__row--ccai {
  display: block; max-width: min(46ch, 100%); padding: 4px 8px 4px 10px; overflow: visible; white-space: normal;
  border: 0; border-radius: var(--cc-control-radius, 8px); background: var(--cc-warning-soft); box-shadow: inset 3px 0 0 var(--cc-warning);
  color: var(--cc-ink); font-family: var(--cc-font); line-height: var(--cc-leading-caption, 18px);
}
/* (2026-11-22, design audit CH-22) The header stops before the tag column as well — the limit the legend below already
   has (the zone tags stand in the last 76px of the pane). On a 360px phone its first line — "BTC/USDT · 15m 2026.11.21
   17:30 UTC", 229px — ran 19px into the first tag ("Resistance"). A line that does not fit breaks between its parts
   inside its own chip (the time goes under the pair), so nothing is cut and nothing is moved in the tags: only where
   the header sits changes. The phone's own limit is in v11-trade-panels.css (at 390 the line fits, as it did). */
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud { max-width: calc(100% - 76px); }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-hud__row:not(.chart-hud__row--ccai) { flex-wrap: wrap; row-gap: 0; }
/* a narrow chart (CCAI docked beside it, a split layout — chart-kline.jsx marks it data-compact): the rows are a step
   tighter, as on a phone, so the O-H-L-C row ends before the tag column instead of running into its first tag */
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap[data-compact="1"] .chart-hud__row { gap: 3px; padding: 0 4px; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap[data-compact="1"] .chart-hud__row .v + .k { margin-left: 3px; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap[data-compact="1"] .chart-hud__time { margin-left: 3px; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-legend {
  flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 4px; max-width: calc(100% - 76px);
  font-family: var(--cc-font); font-size: var(--cc-text-caption, 12px); line-height: var(--cc-leading-caption, 18px); letter-spacing: 0;
}
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-legend__item {
  flex: none; gap: 6px; max-width: 100%; padding: 0 6px; white-space: nowrap;
  border-radius: var(--cc-control-radius, 8px); background: color-mix(in srgb, var(--cc-surface) 92%, transparent);
  color: var(--cc-muted);
}
/* a CCScript indicator's chip also holds its settings and remove buttons (ccscript.css): they stay close to the name */
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-legend__item--ccs { gap: 2px; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-legend__toggle {
  justify-content: center; min-width: 24px; min-height: 24px; margin: 0; padding: 0 4px; color: var(--cc-muted);
}
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-legend__toggle[aria-expanded="false"] { padding: 0 4px 0 6px; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-legend__toggle:hover { color: var(--cc-ink); }
/* a ring only for keyboard focus — no box after a mouse click */
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-legend__toggle:focus { outline: none; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-legend__toggle:focus-visible { outline: var(--cc-focus-width, 2px) solid var(--cc-accent); outline-offset: 1px; }

.chart-texted { display: none; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted {
  position: absolute; z-index: 41; display: flex; align-items: center; gap: 6px; box-sizing: border-box; padding: 4px 8px 4px 4px;
  border: 1px solid var(--cc-line); border-radius: 10px; background: var(--cc-surface); box-shadow: var(--cc-shadow);
}
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted__input {
  flex: 1; min-width: 0; height: 32px; margin: 0; padding: 0 8px; box-sizing: border-box;
  border: 1px solid var(--cc-control-line); border-radius: 6px; background: var(--cc-surface); color: var(--cc-ink);
  font: 450 13px/20px var(--cc-font); box-shadow: none;
}
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted__input::placeholder { color: var(--cc-muted); }
/* (2026-11-22, design audit CH-11) the text drawing's field is the compact control — 36px, the control corner — and shows
   focus with ONE line: its own border steps back under the 2px focus line (it was 32px with 6px corners, and an ink border
   plus a magenta ring 1px outside it). The box around it takes the panel corner; its "Enter" hint is caption size. */
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted { border-radius: var(--cc-panel-radius, 12px); }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted__input { height: var(--cc-compact-height, 36px); border-radius: var(--cc-control-radius, 8px); }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted__input:focus,
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted__input:focus-visible { border-color: transparent; outline: var(--cc-focus-width, 2px) solid var(--cc-accent); outline-offset: 0; }
html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted__hint {
  flex: none; padding: 1px 5px; border: 1px solid var(--cc-line); border-radius: 4px; background: var(--cc-soft);
  color: var(--cc-muted); font: 500 var(--cc-text-caption, 12px)/16px var(--cc-font); white-space: nowrap;   /* (2026-11-22, CH-11) caption size — was 11px */
}
@media (pointer: coarse), (max-width: 700px) {
  html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted__input { height: 44px; font-size: 16px; }
  html[data-cc-brand="v11"]:not([data-app-design="v1"]) .chart-kline-wrap .chart-texted__hint { display: none; }
}
