/* Chart slot. Agent 2. Tools and chips are 1px-gap grid cells (v2-style), not v1 chrome. */
[data-tile="chart"] .v2-body {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--v2-tile);
}
.v2-chart-lower {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  position: relative;
}
/* pu-7: left drawing rail matches preview .ctools (44px, hatch fill, kit SVG). */
.v2-chart-tools {
  width: 44px;
  flex: 0 0 44px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--tile);
  border-right: 1px solid var(--line);
  z-index: 2;
  user-select: none;
}
/* U10: in-grid square buttons (not underline tabs). Active = inverted block. */
.v2-chart-tools .v2-btn {
  height: 44px;
  min-height: 44px;
  width: 100%;
  padding: 0;
  flex: 0 0 44px;
  aspect-ratio: 1 / 1;
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  background: transparent;
  color: var(--mute);
  /* Kit SVG icons — JetBrains ≥12px for any text (Departure has no tool glyphs). */
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-weight: 400;
  letter-spacing: var(--v2-track-label);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.v2-chart-tools .v2-btn .x-ico {
  width: 16px;
  height: 16px;
}
.v2-chart-tools .v2-tool-label {
  display: none;
}
/* Phone-only pen that folds / opens the strip (mobile.css). */
.v2-chart-tools .v2-chart-pen {
  display: none;
}
.v2-chart-tools .x-tip {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: flex;
}
.v2-chart-tools .x-tip .v2-btn {
  width: 44px;
  flex: 0 0 44px;
}
/* Left rail: tip opens to the right. Delay is ~300ms; focus and .v2-tip-on (touch hold) match hover. */
.v2-chart-tools .v2-tip-delay [role="tooltip"] {
  left: calc(100% + 8px);
  right: auto;
  bottom: auto;
  top: 0;
  /* The 44px .x-tip wrapper is the containing block: without max-content the tip
     shrink-wraps to 44px and breaks after every word. */
  width: max-content;
  max-width: 280px;
  white-space: normal;
}
.v2-tip-delay [role="tooltip"] {
  transition: clip-path 120ms var(--st-3);
  transition-delay: 0ms;
}
.v2-tip-delay:hover [role="tooltip"],
.v2-tip-delay:focus-within [role="tooltip"] {
  clip-path: inset(0);
  transition-delay: 300ms;
}
/* The 300ms wait already happened in the touch hold. Open as soon as the class lands. */
.v2-tip-delay.v2-tip-on [role="tooltip"] {
  clip-path: inset(0);
  transition-delay: 0ms;
}
.v2-chart-more .x-tip [role="tooltip"] {
  display: none;
}
.v2-chart-tools .v2-btn:active,
.v2-chart-tools .v2-btn.pr {
  transform: none;
  box-shadow: none;
}
/* Re-assert .on after the idle fill above: same specificity as .v2-btn.on in shell.css,
   and this sheet loads later, so without these rules active TF/tool buttons stay dark-on-dark. */
.v2-chart-tools .v2-btn.on,
.v2-chart-tools .v2-btn.on:hover {
  background: var(--acc-hi);
  color: var(--ink);
  font-weight: 400;
  box-shadow: none;
}
/* Keep interval labels as 1m / 1h / 1d — uppercase would make 1m look like 1 month. */
.v2-chart-tools .v2-btn[data-tf] {
  text-transform: none;
}
/* Stay-in-drawing lock (double-click a tool). Inverted --bone block — never an underline. */
.v2-chart-tools .v2-btn.sticky {
  background: var(--bone);
  color: var(--ink);
  font-weight: 400;
  box-shadow: none;
}
.v2-chart-tools .v2-btn.sticky.on,
.v2-chart-tools .v2-btn.sticky.on:hover {
  background: var(--acc-hi);
  color: var(--ink);
}
/* pu-7: leftover rail column (preview .ctools .sp): tall area → plain tile, no diagonal hatch. */
.v2-chart-gap {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--tile);
}
/* Timeframes live in the chip row (desktop + phone). Portrait phones also
   park indicator chips here (chart.js placeInd). */
.v2-chart-tfs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  flex: 0 0 auto;
  min-width: 0;
  background: transparent;
}
.v2-chart-tfs .v2-btn[data-tf] {
  width: auto;
  min-width: 44px;
  height: 33px;
  min-height: 33px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--line);
  box-shadow: none;
  background: transparent;
  font-family: var(--pix);
  font-size: var(--fs-pix-label, 11px);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  text-transform: uppercase;
  color: var(--mute);
}
.v2-chart-tfs .v2-btn[data-tf]:active,
.v2-chart-tfs .v2-btn[data-tf].pr {
  transform: none;
  box-shadow: none;
}
.v2-chart-tfs .v2-btn[data-tf].on,
.v2-chart-tfs .v2-btn[data-tf].on:hover {
  position: relative;
  background: transparent;
  color: var(--tx);
  font-weight: 400;
  box-shadow: none;
}
.v2-chart-tfs .v2-btn[data-tf].on::after,
.v2-chart-tfs .v2-btn[data-ind].on::after,
.v2-chart-tfs .v2-chart-plus.on::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 2px;
  background: var(--acc);
  pointer-events: none;
}
/* Overflow tools that do not fit the 44px rail (⋯ → x-ddm).
   Fixed layer so the tile overflow:hidden cannot clip lock/trash. */
.v2-chart-more.x-ddm {
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 160px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  background: var(--v2-tile);
  border: 1px solid var(--acc);
  box-shadow: var(--v2-shadow-4) var(--acc);
  clip-path: inset(0 0 100% 0);
  pointer-events: auto;
}
.v2-chart-more .x-tip {
  display: flex;
  width: 100%;
}
.v2-chart-more.x-ddm:not([hidden]) {
  animation: x-pop 160ms var(--st) forwards;
}
.v2-chart-more[hidden] {
  display: none;
}
.v2-chart-more .v2-btn {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border: 0;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  gap: 8px;
  background: var(--v2-header);
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-weight: 400;
  letter-spacing: var(--v2-track-label);
  text-transform: uppercase;
}
.v2-chart-more .v2-btn .x-ico {
  width: 16px;
  height: 16px;
  flex: none;
}
.v2-chart-more .v2-tool-label {
  display: inline;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-chart-more .v2-btn.on,
.v2-chart-more .v2-btn.on:hover {
  background: var(--acc-hi);
  color: var(--ink);
  font-weight: 400;
}
.v2-chart-more .v2-btn.sticky {
  background: var(--bone);
  color: var(--ink);
  font-weight: 400;
}
.v2-chart-more .v2-btn.sticky.on,
.v2-chart-more .v2-btn.sticky.on:hover {
  background: var(--acc-hi);
  color: var(--ink);
}
@keyframes x-pop {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
.v2-chart-gutter {
  flex: 0 0 0;
  width: 0;
  background: var(--v2-tile);
  touch-action: none;
}
.v2-chart-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  z-index: 5;
  touch-action: none;
  pointer-events: none;
}
.v2-chart-main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  touch-action: none;
}
.v2-chart-chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  height: 33px;
  min-height: 33px;
  max-height: 33px;
  flex: 0 0 33px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 0;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  user-select: none;
  touch-action: none;
}
.v2-chart-tfsep {
  flex: 1 1 auto;
  min-width: 8px;
  align-self: stretch;
  background: var(--hatch);
  border-right: 1px solid var(--line);
  pointer-events: none;
}
.v2-chart-chips .v2-btn {
  border: 0;
  border-right: 1px solid var(--line);
  box-shadow: none;
  background: transparent;
  width: auto;
  min-width: 44px;
  height: 33px;
  min-height: 33px;
  padding: 0 10px;
  letter-spacing: 0;
  font-family: var(--pix);
  font-size: var(--fs-pix-label);
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: none;
  text-transform: uppercase;
  color: var(--mute);
}
.v2-chart-chips .v2-btn:active,
.v2-chart-chips .v2-btn.pr {
  transform: none;
  box-shadow: none;
}
/* Active chip (VOL / EMA / VWAP / VIEW / panels) = bright label + accent underline,
   same as the timeframe chips (user ask 2026-10-15). */
.v2-chart-chips .v2-btn.on,
.v2-chart-chips .v2-btn.on:hover {
  position: relative;
  background: transparent;
  color: var(--tx);
  font-weight: 400;
  box-shadow: none;
}
.v2-chart-chips .v2-btn.on::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 2px;
  background: var(--acc);
  pointer-events: none;
}
/* VIEW on the chip bar is the way back from wide only; the split view turns it on from the ticket's
   VIEW chip beside SUPER (ticket/viewmode.js, owner ask 2026-10-20). */
body:not([data-v2-view="wide"]) .v2-chart-chips .v2-chart-view {
  display: none;
}
/* pu-7: + indicator picker cell stays 44×33 square. */
.v2-chart-chips .v2-chart-plus {
  width: 44px;
  min-width: 44px;
  padding: 0;
}
.v2-chart-pick {
  position: absolute;
  z-index: 6;
  display: flex;
  flex-direction: column;
  min-width: 148px;
  background: var(--v2-line);
  border: var(--v2-rule) solid var(--v2-rose);
  gap: 1px;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.v2-chart-pick[hidden] {
  display: none;
}
.v2-chart-pick .v2-btn {
  width: 100%;
  height: 30px;
  min-height: 30px;
  border: 0;
  box-shadow: none;
  justify-content: flex-start;
  padding: 0 8px;
  background: var(--v2-tile);
}
.v2-chart-pick .v2-btn:active,
.v2-chart-pick .v2-btn.pr {
  transform: none;
  box-shadow: none;
}
/* Same cascade fix as chips: idle tile fill must not beat .on rose fill. */
.v2-chart-pick .v2-btn.on,
.v2-chart-pick .v2-btn.on:hover {
  background: var(--acc-hi);
  color: var(--ink);
  font-weight: 700;
  box-shadow: none;
}
/* pu-7: OHLC in tile header (preview .ohlc) — mono 12, not over the canvas.
   flex-shrink 0 so the hatch fill yields before OHLC disappears on narrow tiles. */
[data-tile="chart"] > .v2-hd .v2-chart-ohlc {
  margin-left: 0;
  flex: 0 0 auto;
  min-width: 0;
  max-width: min(55%, 100%);
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  background: transparent;
  overflow: hidden;
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-weight: 400;
  font-feature-settings: "zero" 1, "tnum" 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--mute);
}
.v2-chart-ohlc {
  margin-left: auto;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  height: 33px;
  min-height: 33px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-feature-settings: "zero" 1, "tnum" 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--mute);
  background: transparent;
  touch-action: none;
}
.v2-chart-ohlc-line {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-chart-ohlc b {
  font-weight: 500;
  color: var(--tx);
}
.v2-chart-ohlc b.v2-up {
  color: var(--v2-buy-hi);
}
.v2-chart-ohlc b.v2-dn {
  color: var(--v2-sell-text);
}
/* Placeholder digits from paintOhlc(null) keep glyph width; hide until a real bar. */
.v2-chart-ohlc[data-empty],
.v2-chart-ohlc[data-empty] .v2-chart-ohlc-line,
.v2-chart-ohlc[data-empty] b {
  color: transparent;
}
.v2-chart-pane {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--v2-tile);
  touch-action: none;
  overscroll-behavior: contain;
}
.v2-chart-pane:focus {
  outline: none;
}
.v2-chart-pane:focus-visible {
  outline: 1px solid var(--v2-rose);
  outline-offset: -1px;
  z-index: 2;
}
.v2-chart-cv,
.v2-chart-ov {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  overscroll-behavior: contain;
}
.v2-chart-ov {
  pointer-events: none;
  z-index: 2;
  touch-action: none;
}
/* Portrait phones move this below the legend strip in mobile.css. */
.v2-chart-msg {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  color: var(--v2-muted);
  background: var(--v2-tile);
  letter-spacing: var(--v2-track-label);
  text-transform: uppercase;
  pointer-events: none;
}
.v2-chart-msg[hidden] {
  display: none;
}
.v2-chart-msg .v2-btn {
  height: 26px;
  min-height: 26px;
  border: var(--v2-rule) solid var(--v2-line);
  box-shadow: var(--v2-shadow-2) var(--line);
  pointer-events: auto;
}
/* Coarse pointers only. Fine pointers keep the 26px rule above. Not a page breakpoint. */
@media (pointer: coarse) {
  .v2-chart-msg .v2-btn {
    height: 44px;
    min-height: 44px;
  }
}
/* Back to the live edge: inverted rose block over the plot, left of the price axis (right set in chart.js). */
.v2-chart-live {
  position: absolute;
  right: 62px;
  bottom: 34px;
  z-index: 6;
  width: auto;
  min-width: 44px;
  height: 22px;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--acc);
  background: var(--acc-hi);
  color: var(--ink);
  box-shadow: var(--v2-shadow-2) var(--line);
  font-family: var(--pix);
  font-size: var(--fs-pix-label);
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: none;
  letter-spacing: 0;
  text-transform: uppercase;
}
.v2-chart-live:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}
.v2-chart-live[hidden] {
  display: none;
}
.v2-chart-range {
  position: absolute;
  z-index: 4;
  display: none;
  pointer-events: none;
  padding: 4px 6px;
  text-align: center;
  font-family: var(--pix);
  font-size: var(--fs-pix-label, 12px);
  font-weight: 700;
  font-synthesis: none;
  letter-spacing: var(--v2-track-label);
  -webkit-font-smoothing: none;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--acc-hi);
}
.v2-chart-range.on {
  display: block;
}
/* Grid / Super panel measure (chart/pmeasure.js): label colour follows the move, like panel 1. */
.v2-chart-range[data-dir="up"] {
  background: var(--v2-buy-hi);
}
.v2-chart-range[data-dir="down"] {
  background: var(--v2-sell);
}
.v2-chart-range i {
  display: block;
  font-style: normal;
}
/* pu-7: market suffix beside [01] CHART (Departure 11). */
.v2-chart-meta {
  margin-left: 0;
  font-family: var(--pix);
  font-size: var(--fs-pix-label);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  text-transform: uppercase;
  color: var(--tx);
}
.v2-chart-pane > .tvmark {
  position: absolute;
  left: 10px;
  bottom: 34px;
  width: 40px;
  height: 40px;
  z-index: 4;
  opacity: 0.5;
  user-select: none;
  image-rendering: pixelated;
}
/* The tiger opens the Discord card on click (discord.js): full strength on hover and while
   its card is open. */
.v2-chart-pane > .tvmark[data-v2-discord-mark]:hover,
.v2-chart-pane > .tvmark[aria-expanded="true"] {
  opacity: 1;
}
.v2-chart-pane > .tvmark[data-v2-discord-mark] {
  cursor: var(--cur-pointer);
}
.v2-chart-pane > .tvcredit {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 4;
  color: var(--v2-muted);
  font-family: var(--pix);
  font-size: var(--fs-22);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
/* Chart grid (chart/grid.js): 1–4 panels in the lower row. Panel 1 = .v2-chart-main (ticket-linked).
   1px line gaps between panels (bento seams). Desktop only; mobile.css hides it below 1280px. */
.v2-cgrid {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
}
.v2-cgrid > .v2-chart-main {
  min-height: 0;
  background: var(--v2-tile);
}
.v2-cgrid[data-n="2"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.v2-cgrid[data-n="3"] {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
/* Places 1–4 (data-v2-cslot): the focused full chart and the other panels swap places on click. */
.v2-cgrid > [data-v2-cslot="1"] {
  order: 1;
}
.v2-cgrid > [data-v2-cslot="2"] {
  order: 2;
}
.v2-cgrid > [data-v2-cslot="3"] {
  order: 3;
}
.v2-cgrid > [data-v2-cslot="4"] {
  order: 4;
}
.v2-cgrid[data-n="3"] > [data-v2-cslot="1"] {
  grid-row: 1 / 3;
}
.v2-cgrid[data-n="4"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.v2-cgrid-hd1[hidden] {
  display: none;
}
/* Static labels in panel headers (panel 1 mirrors the tile coin / TF). */
.v2-cpanel-lab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  font-family: var(--pix);
  font-size: var(--fs-pix-label);
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: none;
  text-transform: uppercase;
  color: var(--mute);
}
.v2-cpanel-lab-coin {
  min-width: 66px;
  color: var(--tx);
}
/* Split view: smaller watermark so it does not crowd a half / quarter chart. */
.v2-cgrid:not([data-n="1"]) .v2-chart-pane > .tvmark {
  width: 20px;
  height: 20px;
}
.v2-cgrid:not([data-n="1"]) .v2-chart-pane > .tvcredit {
  left: 38px !important;
  font-size: var(--fs-11);
}
.v2-cpanel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--v2-tile);
}
.v2-cpanel-hd .v2-btn.v2-cpanel-coin {
  color: var(--tx);
  min-width: 66px;
}
.v2-cpanel-hd .v2-btn[aria-expanded="true"] {
  background: var(--acc-hi);
  color: var(--ink);
}
/* Split: the focused panel (the full chart, data-v2-focus) gets the accent bar under its coin, same
   underline as the active chips. The others show a pointer: a click focuses them. */
.v2-cgrid:not([data-n="1"]) > [data-v2-focus] .v2-cpanel-coin {
  position: relative;
}
.v2-cgrid:not([data-n="1"]) > [data-v2-focus] .v2-cpanel-coin::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 2px;
  background: var(--acc);
  pointer-events: none;
}
.v2-cgrid:not([data-n="1"]) > [data-v2-focus]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border: 2px solid var(--acc);
  pointer-events: none;
}
.v2-cgrid:not([data-n="1"]) > .v2-cpanel:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border: 1px solid var(--mute);
  pointer-events: none;
}
.v2-cpanel-last {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--tx);
}
.v2-cpanel-last[data-dir="up"] {
  color: var(--acc-hi);
}
.v2-cpanel-last[data-dir="down"] {
  color: var(--bone);
}
.v2-cpanel-pane {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  touch-action: none;
}
.v2-cpanel-msg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding: 6px 10px;
  background: var(--v2-tile);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--mute);
  text-transform: uppercase;
}
.v2-cpanel-msg[hidden] {
  display: none;
}
/* Layout chip: 44×33 square, number in Departure. */
.v2-chart-chips .v2-chart-grid {
  width: 44px;
  min-width: 44px;
  padding: 0;
}
.v2-cgrid-menu {
  min-width: 112px;
}
.v2-cgrid-menu .v2-btn {
  gap: 10px;
  font-family: var(--pix);
  font-size: var(--fs-pix-label);
  font-weight: 400;
  font-synthesis: none;
}
.v2-cgrid-menu .v2-btn.on,
.v2-cgrid-menu .v2-btn.on:hover {
  font-weight: 400;
}
/* Pixel glyph of the layout: 16×12, 1px seams, one cell per panel. */
.v2-cgrid-ico {
  width: 16px;
  height: 12px;
  flex: 0 0 16px;
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  background: currentColor;
  border: 1px solid currentColor;
}
.v2-cgrid-ico i {
  background: var(--v2-tile);
}
.v2-btn.on .v2-cgrid-ico i {
  background: var(--acc);
}
.v2-cgrid-ico[data-n="2"] {
  grid-template-columns: 1fr 1fr;
}
.v2-cgrid-ico[data-n="3"] {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.v2-cgrid-ico[data-n="3"] i:first-child {
  grid-row: 1 / 3;
}
.v2-cgrid-ico[data-n="4"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.v2-cgrid-coins {
  width: 176px;
  max-height: 320px;
}
.v2-cgrid-coins .x-field {
  flex: 0 0 auto;
}
.v2-cgrid-coins .x-field input {
  text-align: left;
}
.v2-cgrid-tfmenu {
  min-width: 88px;
}
.v2-cgrid-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.v2-cgrid-list .v2-btn {
  flex: 0 0 30px;
  font-family: var(--mono);
  font-size: var(--fs-12);
}
.v2-cgrid-none {
  padding: 8px;
  background: var(--v2-tile);
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--mute);
  text-transform: uppercase;
}
/* Rail arrow: first chip cell, same 44px as the rail below it. Points left = hide, right = show. */
.v2-chart-chips .v2-chart-rail {
  width: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.v2-chart-chips .v2-chart-rail .x-ico {
  width: 16px;
  height: 16px;
  transform: scaleX(-1);
}
.v2-chart-chips .v2-chart-rail.off .x-ico {
  transform: none;
}
.v2-rail-off .v2-chart-tools {
  display: none;
}
/* Per-drawing bar. Hidden until exactly one drawing is selected. */
.v2-draw-bar {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--tile);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.v2-draw-bar[hidden] {
  display: none;
}
.v2-draw-bar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.v2-draw-bar .v2-btn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  box-shadow: none;
  background: transparent;
  color: var(--mute);
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}
.v2-draw-bar .v2-btn[data-dash] {
  flex: 0 0 auto;
  width: auto;
  padding: 0 8px;
}
.v2-draw-bar .v2-btn .x-ico {
  width: 16px;
  height: 16px;
}
.v2-draw-bar .v2-btn.on {
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.v2-draw-bar .v2-draw-swatch[data-swatch="rose"] {
  background: var(--v2-rose);
}
.v2-draw-bar .v2-draw-swatch[data-swatch="bone"] {
  background: var(--v2-bone);
}
.v2-draw-bar .v2-draw-swatch[data-swatch="scan"] {
  background: var(--v2-scan);
}
.v2-draw-bar .v2-draw-swatch.on {
  box-shadow: inset 0 0 0 2px var(--ink);
}
.v2-draw-note-slot {
  flex: 1 1 140px;
  min-width: 140px;
  display: flex;
  align-items: stretch;
}
.v2-draw-note-slot[hidden] {
  display: none;
}
.v2-draw-note-slot .x-field,
.v2-draw-note-slot .v2-field {
  flex: 1 1 auto;
  margin: 0;
  height: 44px;
  min-height: 44px;
}
.v2-draw-note-slot .v2-lbl {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.v2-draw-note-slot input {
  text-align: left;
  height: 44px;
  min-height: 44px;
  font-size: var(--fs-16);
}
.v2-cpanel-pane:focus {
  outline: none;
}

/* Position chart popup (chart/popchart.js). A position name opens one chart window centered over the
   chart area; that area is dimmed with a flat --bg layer (no blur) and takes no input. Ticket, portfolio
   and account stay live. Window = modal frame: 1px accent border, hard accent offset shadow. */
.v2-pchart-dim {
  position: fixed;
  z-index: 92;
  background: var(--bg);
  opacity: 0.5;
  cursor: var(--cur-pointer);
}
.v2-pchart {
  position: fixed;
  z-index: 93;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--v2-tile);
  border: 1px solid var(--acc);
  box-shadow: var(--v2-shadow-4) var(--acc);
  animation: x-mod-in 200ms var(--st);
}
.v2-pchart-dim[hidden],
.v2-pchart[hidden] {
  display: none;
}
.v2-pchart-hd {
  border-bottom: 1px solid var(--line);
}
.v2-pchart-tfs {
  flex: 0 1 auto;
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}
.v2-chart-chips .v2-btn.v2-pchart-x {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-right: 0;
  border-left: 1px solid var(--line);
  color: var(--tx);
  font-size: var(--fs-22);
  line-height: 1;
}
.v2-chart-chips .v2-btn.v2-pchart-x:hover {
  background: var(--acc-hi);
  color: var(--ink);
}
