/* Groww/915-inspired chrome — MINT-like tokens (dark default + light) */
.cx-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  background: var(--cx-bg);
  color: var(--cx-text);
  font-family: "Plus Jakarta Sans", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01" on, "cv11" on;
  letter-spacing: -0.01em;
  --cx-bg: #121212;
  --cx-panel: #1b1b1b;
  --cx-panel-2: #252525;
  --cx-border: #2e2e2e;
  --cx-border-2: #363b3d;
  --cx-text: #f2f5f7;
  --cx-muted: #989ea0;
  --cx-muted-2: #696e70;
  --cx-btn-bg: #1e2224;
  --cx-chart-bg: #121212;
  --cx-hover: #252a2c;
  /* Same green as candles (#4caf50). Chrome uses soft tints — not solid floods. */
  --cx-accent: #4caf50;
  --cx-accent-hover: #43a047;
  --cx-accent-soft: rgba(76, 175, 80, 0.12);
  --cx-accent-soft-2: rgba(76, 175, 80, 0.2);
  --cx-mint: #4caf50;
  --cx-mint-soft: rgba(76, 175, 80, 0.12);
  --cx-up: #4caf50;
  --cx-up-strong: #66bb6a;
  --cx-down: #e53935;
  --cx-down-strong: #ef5350;
  --cx-chg-up: #4caf50;
  --cx-chg-down: #e53935;
  --cx-gold: #e8b86d;
  --cx-gold-2: #f4d19a;
  --cx-blue: #617bff;
  --cx-focus: #4caf50;
  --cx-radius-sm: 6px;
  --cx-radius-md: 12px;
  --cx-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.cx-shell.theme-light {
  background: var(--cx-bg);
  color: var(--cx-text);
  --cx-bg: #f7f7f7;
  --cx-panel: #ffffff;
  --cx-panel-2: #f8f8f8;
  --cx-border: #e9e9eb;
  --cx-border-2: #dddee1;
  --cx-text: #353839;
  --cx-muted: #7f8283;
  --cx-muted-2: #898c8e;
  --cx-btn-bg: #ffffff;
  --cx-chart-bg: #ffffff;
  --cx-hover: #f0f0f2;
  --cx-accent: #4caf50;
  --cx-accent-hover: #43a047;
  --cx-accent-soft: rgba(76, 175, 80, 0.1);
  --cx-accent-soft-2: rgba(76, 175, 80, 0.16);
  --cx-mint: #4caf50;
  --cx-mint-soft: rgba(76, 175, 80, 0.1);
  --cx-up: #4caf50;
  --cx-up-strong: #43a047;
  --cx-down: #c62828;
  --cx-down-strong: #b71c1c;
  --cx-chg-up: #4caf50;
  --cx-chg-down: #c62828;
  --cx-gold: #c9a227;
  --cx-gold-2: #b8860b;
  --cx-blue: #3b6fd4;
  --cx-focus: #4caf50;
  --cx-shadow: 0 8px 24px rgba(53, 56, 57, 0.08);
}
.cx-shell.theme-light .cx-btn-primary {
  border-color: rgba(76, 175, 80, 0.35);
  background: var(--cx-accent-soft);
  color: var(--cx-accent-hover);
}
.cx-shell.theme-light .cx-btn-primary:hover {
  background: var(--cx-accent-soft-2);
  border-color: rgba(76, 175, 80, 0.5);
  color: var(--cx-accent-hover);
}
.cx-shell.theme-light .cx-btn.is-on {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent-hover);
}
.cx-shell.theme-light .cx-layout-chip.is-active {
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.4);
  color: var(--cx-accent-hover);
}
.cx-shell.theme-light .cx-status {
  color: var(--cx-muted);
}
.cx-shell.theme-light .cx-top {
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  border-bottom-color: var(--cx-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 4px 16px rgba(53, 56, 57, 0.04);
}
.cx-shell.theme-light .wl-cols,
.cx-shell.theme-light .wl-sym,
.cx-shell.theme-light .wl-meta {
  color: var(--cx-text);
}
.cx-shell.theme-light .wl-meta.flat,
.cx-shell.theme-light .wl-chg.flat { color: var(--cx-muted-2); background: transparent; }
.cx-shell.theme-light .wl-meta.up,
.cx-shell.theme-light .wl-chg.up { color: var(--cx-chg-up); background: transparent; }
.cx-shell.theme-light .wl-meta.down,
.cx-shell.theme-light .wl-chg.down { color: var(--cx-chg-down); background: transparent; }
.cx-shell.theme-light .wl-source-tabs button {
  color: var(--cx-muted);
}
.cx-shell.theme-light .cx-pane-head {
  background: var(--cx-panel-2);
  border-bottom-color: var(--cx-border);
}
.cx-shell.theme-light .cx-split:not([data-layout="1"]) .cx-pane.is-active-pane::after {
  border-color: var(--cx-accent);
  box-shadow: 0 0 0 1px var(--cx-accent);
}
.cx-shell.theme-light .cx-split:not([data-layout="1"]) .cx-pane:hover:not(.is-active-pane)::after {
  border-color: color-mix(in srgb, var(--cx-accent) 55%, transparent);
}
.cx-shell.theme-light .cx-autosave { color: var(--cx-accent); }
/* Center chart overlay toast — disabled; autosave lives in header badge only */
.cx-autosave-toast {
  display: none !important;
}

/* Favorite indicators — bottom-right float */
.bc-fav-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 88;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.bc-fav-fab,
.bc-fav-panel {
  pointer-events: auto;
}
.bc-fav-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(4, 180, 136, 0.45);
  background: linear-gradient(145deg, #1e2224, #151819);
  color: var(--cx-accent);
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
}
.bc-fav-fab:hover,
.bc-fav-fab[aria-expanded="true"] {
  border-color: var(--cx-accent);
  box-shadow: 0 0 0 3px rgba(4, 180, 136, 0.2);
}
.cx-shell.theme-light .bc-fav-fab {
  background: #fff;
  border-color: var(--cx-accent);
  color: var(--cx-accent-hover);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.bc-fav-panel {
  width: min(220px, calc(100vw - 2rem));
  border-radius: 12px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.bc-fav-panel[hidden] { display: none !important; }
.bc-fav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--cx-border);
}
.bc-fav-head strong {
  font-size: 0.78rem;
  font-weight: 750;
}
.bc-fav-add {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--cx-border-2);
  background: transparent;
  color: var(--cx-text);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}
.bc-fav-add:hover {
  border-color: var(--cx-accent);
  color: var(--cx-accent);
}
.bc-fav-list {
  max-height: 260px;
  overflow: auto;
  padding: 0.3rem;
}
.bc-fav-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}
.bc-fav-item button.bc-fav-apply {
  flex: 1;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--cx-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.45rem 0.5rem;
  border-radius: 7px;
  cursor: pointer;
}
.bc-fav-item button.bc-fav-apply:hover {
  background: rgba(4, 180, 136, 0.12);
  color: var(--cx-accent);
}
.bc-fav-item button.bc-fav-x {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--cx-muted-2);
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}
.bc-fav-item button.bc-fav-x:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}
.bc-fav-hint {
  margin: 0;
  padding: 0.35rem 0.65rem 0.55rem;
  font-size: 0.62rem;
  color: var(--cx-muted);
  line-height: 1.3;
}
.cx-shell.theme-light .bc-fav-panel {
  background: #fff;
  border-color: var(--cx-border-2);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}
@media (max-width: 640px) {
  .bc-fav-dock { right: 12px; bottom: 64px; }
}
.cx-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.75rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cx-panel) 88%, #fff 12%) 0%, var(--cx-panel) 100%);
  border-bottom: 1px solid var(--cx-border);
  flex-shrink: 0;
  min-height: 40px;
  flex-wrap: nowrap;
  position: relative;
  z-index: 40;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}
.cx-shell.theme-dark .cx-top {
  background: linear-gradient(180deg, #1e2224 0%, var(--cx-panel) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 4px 18px rgba(0,0,0,0.28);
}
.cx-main,
.cx-stage,
.cx-split,
.cx-pane,
#tv_chart_container,
#tv_sector_chart {
  background: var(--cx-chart-bg);
  transition: background 0.3s ease;
}
.cx-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  margin-right: 0.25rem;
}
.cx-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cx-accent-soft-2);
  color: var(--cx-accent);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  border: 1px solid rgba(76, 175, 80, 0.35);
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cx-brand:hover .cx-brand-mark {
  transform: translateY(-1px);
  background: var(--cx-accent-soft-2);
  border-color: rgba(76, 175, 80, 0.5);
}
.cx-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.cx-brand-text strong {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--cx-text);
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.cx-brand-text span {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--cx-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.cx-active-sym {
  display: none;
}
.cx-sym-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 160px;
  max-width: min(280px, 32vw);
  height: 30px;
  flex: 0 1 220px;
}
.cx-sym-search-ico {
  position: absolute;
  left: 0.55rem;
  width: 14px;
  height: 14px;
  color: var(--cx-muted);
  pointer-events: none;
}
.cx-sym-search-input {
  width: 100%;
  height: 30px;
  padding: 0 0.65rem 0 1.85rem;
  border-radius: 6px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.cx-sym-search-input:focus {
  border-color: var(--cx-accent);
  box-shadow: 0 0 0 3px rgba(4, 180, 136, 0.22);
}
.cx-sym-search-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 240px;
  max-height: 280px;
  overflow: auto;
  z-index: 80;
  background: var(--cx-panel);
  border: 1px solid var(--cx-border-2);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.cx-sym-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 0;
  background: transparent;
  color: var(--cx-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.cx-sym-search-item:hover,
.cx-sym-search-item.is-active {
  background: var(--cx-hover);
}
.cx-sym-search-item small {
  color: var(--cx-muted);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}
.cx-sym-search-empty {
  padding: 0.65rem 0.75rem;
  color: var(--cx-muted);
  font-size: 0.75rem;
}
.cx-shell.theme-light .cx-sym-search-input {
  background: #fff;
  border-color: var(--cx-border-2);
}
.cx-shell.theme-light .cx-sym-search-drop {
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.cx-hud-vol, .cx-hud-clock {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cx-muted);
  white-space: nowrap;
}
.cx-hud-clock { min-width: 3.2rem; color: var(--cx-up-strong); }
.cx-compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}
.cx-compare-btn:hover {
  border-color: var(--cx-accent);
  color: var(--cx-accent);
  background: rgba(4, 180, 136, 0.1);
}
.cx-shell.theme-light .cx-brand-mark {
  background: var(--cx-accent-soft);
  color: var(--cx-accent-hover);
  border-color: rgba(76, 175, 80, 0.35);
  box-shadow: none;
}
.cx-shell.theme-light .cx-brand-text strong { color: var(--cx-text); }
.cx-shell.theme-light .cx-active-sym {
  background: #fff;
  border-color: var(--cx-border-2);
  color: var(--cx-text);
}
.cx-shell.theme-light .cx-compare-btn {
  background: #fff;
  border-color: var(--cx-border-2);
}
.cx-top-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}
.cx-top-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  margin-left: auto;
}
.cx-top-spacer { display: none; }
.cx-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 30px;
  padding: 0 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.cx-back:hover { background: var(--cx-hover); border-color: var(--cx-border-2); }
.cx-layout-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.cx-layout-chips {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  overflow-x: auto;
  min-width: 0;
  flex: 1 1 120px;
  scrollbar-width: none;
}
.cx-layout-chips::-webkit-scrollbar { display: none; }
.cx-layout-chip {
  flex: 0 0 auto;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cx-layout-chip:hover { border-color: var(--cx-muted); color: var(--cx-text); }
.cx-layout-chip.is-active {
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.4);
  color: var(--cx-accent);
}
.cx-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.cx-btn:hover { border-color: var(--cx-muted); background: var(--cx-hover); }
.cx-btn-primary {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
}
.cx-btn-primary:hover { background: var(--cx-accent-soft-2); border-color: rgba(76, 175, 80, 0.55); color: var(--cx-accent); }
.cx-btn.is-on {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
}
.cx-btn.cx-wl-toggle.is-on {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
}
.cx-shell.theme-light .cx-btn.cx-wl-toggle.is-on {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent-hover);
}
.wl-dock-toggle.is-on .cx-hamburger span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.wl-dock-toggle.is-on .cx-hamburger span:nth-child(2) {
  opacity: 0;
}
.wl-dock-toggle.is-on .cx-hamburger span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}
.wl-dock-toggle.is-on {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
}
.cx-shell.theme-light .wl-dock-toggle.is-on {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent-hover);
}
.cx-autosave {
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--cx-muted);
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.15s, max-width 0.15s, padding 0.15s;
  white-space: nowrap;
  pointer-events: none;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
  letter-spacing: 0;
}
.cx-autosave.is-show {
  opacity: 1;
  max-width: 96px;
  padding: 0;
}
.cx-autosave.is-saving {
  color: var(--cx-up-strong);
  border-color: transparent;
}
.cx-autosave.is-saved {
  color: var(--cx-up);
  border-color: transparent;
}
.cx-shell.theme-light .cx-autosave {
  background: transparent;
  border-color: transparent;
  color: var(--cx-muted-2);
}
.cx-shell.theme-light .cx-autosave.is-saving {
  background: transparent;
  border-color: transparent;
  color: var(--cx-accent);
}
.cx-shell.theme-light .cx-autosave.is-saved {
  background: transparent;
  border-color: transparent;
  color: var(--cx-up);
}
.cx-user {
  font-size: 0.75rem;
  margin-left: 0.25rem;
  color: var(--cx-muted);
  white-space: nowrap;
}
.cx-status {
  font-size: 0.68rem;
  color: var(--cx-muted-2);
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.cx-layout-wrap { position: relative; z-index: 45; flex-shrink: 0; }
.cx-layout-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: min(420px, calc(100vw - 1rem));
  background: #121212;
  border: 1px solid var(--cx-border-2);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  z-index: 60;
  overflow: hidden;
  max-height: min(78vh, 720px);
  overflow-y: auto;
}
.cx-layout-menu.is-open { display: block; }
.cx-layout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 32px;
  min-width: 36px;
  padding: 0 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  cursor: pointer;
  flex-shrink: 0;
}
.cx-layout-btn:hover { border-color: var(--cx-accent); color: var(--cx-accent); }
.cx-layout-btn.is-open {
  border-color: var(--cx-accent);
  color: var(--cx-accent);
  background: rgba(4, 180, 136, 0.08);
}
.cx-layout-btn svg { width: 18px; height: 18px; display: block; }
.cx-layout-btn .cx-layout-btn-label {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.cx-shell.theme-light .cx-layout-btn {
  background: #ffffff;
  border-color: var(--cx-border-2);
}
.cx-shell.theme-light .cx-layout-btn.is-open {
  background: var(--cx-accent-soft);
  border-color: var(--cx-accent);
  color: var(--cx-accent);
}
.cx-layout-menu-head {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #1f2937;
  background: #111827;
}
.cx-layout-menu-head strong {
  display: block;
  font-size: 0.8rem;
  color: var(--cx-panel-2);
}
.cx-layout-menu-head span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--cx-muted-2);
}
.cx-layout-menu-body { padding: 0.45rem; }
.cx-layout-menu-body > p {
  margin: 0.35rem 0.35rem 0.25rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cx-muted-2);
}
.cx-settings-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.cx-settings-item:hover { background: #1e2224; }
.cx-settings-item.is-danger { color: #fca5a5; }
.cx-settings-item.is-danger:hover { background: #450a0a; }
.cx-settings-item .cx-auto-tag {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--cx-accent);
  border: 1px solid rgba(4, 180, 136, 0.45);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}
.cx-settings-item .cx-auto-tag.is-off {
  color: var(--cx-muted-2);
  border-color: var(--cx-muted-2);
}
.cx-settings-ico {
  width: 1.1rem;
  text-align: center;
  color: var(--cx-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.cx-grid-btns {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.15rem 0.2rem 0.35rem;
}
.cx-grid-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}
.cx-grid-btn {
  border: 1px solid var(--cx-border-2);
  background: #1e2224;
  color: var(--cx-border-2);
  border-radius: 6px;
  padding: 0.35rem 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 42px;
  min-height: 34px;
  flex: 0 0 auto;
}
.cx-grid-btn:hover { border-color: var(--cx-muted-2); background: var(--cx-border-2); }
.cx-grid-btn.is-active {
  border-color: rgba(76, 175, 80, 0.55);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.35);
}
.cx-grid-btn svg {
  width: 28px;
  height: 20px;
  display: block;
}
.cx-grid-btn .cx-grid-caption { display: none; }
.cx-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  /* Must stay BELOW .cx-top (z-index 40) or menu clicks never reach the dropdown */
  z-index: 30;
  background: transparent;
}
.cx-menu-backdrop.is-open { display: block; }
.cx-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.65);
  padding: 1rem;
}
.cx-modal.is-open { display: flex; }
.cx-modal-card {
  width: 100%;
  max-width: 380px;
  background: #121212;
  border: 1px solid var(--cx-border-2);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}
.cx-modal-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--cx-panel-2);
}
.cx-modal-card label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cx-muted-2);
  margin-bottom: 0.85rem;
}
.cx-modal-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--cx-border-2);
  background: #111827;
  color: #f1f5f9;
  font-size: 0.85rem;
  padding: 0 0.65rem;
}
.cx-modal-card input:focus {
  outline: none;
  border-color: var(--cx-accent);
  box-shadow: 0 0 0 2px rgba(4, 180, 136, 0.25);
}
.cx-modal-hint {
  font-size: 0.72rem;
  color: var(--cx-muted-2);
  margin: 0.35rem 0 0.85rem;
}
.cx-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}
.cx-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
}
.cx-split {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 1px;
  background: var(--cx-border);
  position: relative;
}
.cx-split[data-layout="1"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.cx-split[data-layout="1"] .cx-pane-stock,
.cx-split[data-layout="1"] .cx-pane-extra { display: none; }

.cx-split[data-layout="2"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.cx-split[data-layout="2"] .cx-pane-extra { display: none; }
.cx-split[data-layout="2v"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.cx-split[data-layout="2v"] .cx-pane-extra { display: none; }

.cx-split[data-layout="3v"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}
.cx-split[data-layout="3v"] .cx-pane-extra[data-extra="1"],
.cx-split[data-layout="3v"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="3v"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="3v"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="3v"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="3s"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.cx-split[data-layout="3s"] .cx-pane-extra[data-extra="1"],
.cx-split[data-layout="3s"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="3s"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="3s"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="3s"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="3"] {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.cx-split[data-layout="3"] .cx-pane-sector { grid-row: 1 / span 2; }
.cx-split[data-layout="3"] .cx-pane-extra[data-extra="1"],
.cx-split[data-layout="3"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="3"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="3"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="3"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="3r"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.cx-split[data-layout="3r"] .cx-pane-sector { grid-column: 2; grid-row: 1 / span 2; }
.cx-split[data-layout="3r"] .cx-pane-extra[data-extra="1"],
.cx-split[data-layout="3r"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="3r"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="3r"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="3r"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="3h"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr);
}
.cx-split[data-layout="3h"] .cx-pane-sector { grid-column: 1 / span 2; }
.cx-split[data-layout="3h"] .cx-pane-extra[data-extra="1"],
.cx-split[data-layout="3h"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="3h"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="3h"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="3h"] .cx-pane-extra[data-extra="5"] { display: none; }

.cx-split[data-layout="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="4"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="4"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="4"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="4"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="4v"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}
.cx-split[data-layout="4v"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="4v"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="4v"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="4v"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="4h"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
}
.cx-split[data-layout="4h"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="4h"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="4h"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="4h"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="4l"] {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.cx-split[data-layout="4l"] .cx-pane-sector { grid-row: 1 / span 3; }
.cx-split[data-layout="4l"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="4l"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="4l"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="4l"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="4r"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.cx-split[data-layout="4r"] .cx-pane-sector { grid-column: 2; grid-row: 1 / span 3; }
.cx-split[data-layout="4r"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="4r"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="4r"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="4r"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="4t"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr);
}
.cx-split[data-layout="4t"] .cx-pane-sector { grid-column: 1 / span 3; }
.cx-split[data-layout="4t"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="4t"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="4t"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="4t"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="4b"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) minmax(0, 1.2fr);
}
.cx-split[data-layout="4b"] .cx-pane-extra[data-extra="0"] { grid-column: 1 / span 3; }
.cx-split[data-layout="4b"] .cx-pane-extra[data-extra="2"],
.cx-split[data-layout="4b"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="4b"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="4b"] .cx-pane-extra[data-extra="5"] { display: none; }

.cx-split[data-layout="5a"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="5a"] .cx-pane-sector { grid-column: 1 / span 3; }
.cx-split[data-layout="5a"] .cx-pane-stock { grid-column: 4 / span 3; }
.cx-split[data-layout="5a"] .cx-pane-extra[data-extra="0"] { grid-column: 1 / span 2; }
.cx-split[data-layout="5a"] .cx-pane-extra[data-extra="1"] { grid-column: 3 / span 2; }
.cx-split[data-layout="5a"] .cx-pane-extra[data-extra="2"] { grid-column: 5 / span 2; }
.cx-split[data-layout="5a"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="5a"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="5a"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="5b"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="5b"] .cx-pane-sector { grid-column: 1 / span 2; }
.cx-split[data-layout="5b"] .cx-pane-stock { grid-column: 3 / span 2; }
.cx-split[data-layout="5b"] .cx-pane-extra[data-extra="0"] { grid-column: 5 / span 2; }
.cx-split[data-layout="5b"] .cx-pane-extra[data-extra="1"] { grid-column: 1 / span 3; }
.cx-split[data-layout="5b"] .cx-pane-extra[data-extra="2"] { grid-column: 4 / span 3; }
.cx-split[data-layout="5b"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="5b"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="5b"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="5l"] {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="5l"] .cx-pane-sector { grid-row: 1 / span 2; }
.cx-split[data-layout="5l"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="5l"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="5l"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="5r"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="5r"] .cx-pane-extra[data-extra="2"] { grid-column: 3; grid-row: 1 / span 2; }
.cx-split[data-layout="5r"] .cx-pane-extra[data-extra="3"],
.cx-split[data-layout="5r"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="5r"] .cx-pane-extra[data-extra="5"] { display: none; }

.cx-split[data-layout="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="6"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="6"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="6v"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.cx-split[data-layout="6v"] .cx-pane-extra[data-extra="4"],
.cx-split[data-layout="6v"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="6l"] {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.cx-split[data-layout="6l"] .cx-pane-sector { grid-row: 1 / span 3; }
.cx-split[data-layout="6l"] .cx-pane-extra[data-extra="4"] { grid-column: 2 / span 2; }
.cx-split[data-layout="6l"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="6r"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.cx-split[data-layout="6r"] .cx-pane-extra[data-extra="4"] { grid-column: 1 / span 2; }
.cx-split[data-layout="6r"] .cx-pane-extra[data-extra="3"] { grid-column: 3; grid-row: 1 / span 3; }
.cx-split[data-layout="6r"] .cx-pane-extra[data-extra="5"] { display: none; }

.cx-split[data-layout="7a"] {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="7a"] .cx-pane-sector { grid-column: 1 / span 4; }
.cx-split[data-layout="7a"] .cx-pane-stock { grid-column: 5 / span 4; }
.cx-split[data-layout="7a"] .cx-pane-extra[data-extra="0"] { grid-column: 9 / span 4; }
.cx-split[data-layout="7a"] .cx-pane-extra[data-extra="1"] { grid-column: 1 / span 3; }
.cx-split[data-layout="7a"] .cx-pane-extra[data-extra="2"] { grid-column: 4 / span 3; }
.cx-split[data-layout="7a"] .cx-pane-extra[data-extra="3"] { grid-column: 7 / span 3; }
.cx-split[data-layout="7a"] .cx-pane-extra[data-extra="4"] { grid-column: 10 / span 3; }
.cx-split[data-layout="7a"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="7b"] {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="7b"] .cx-pane-sector { grid-column: 1 / span 3; }
.cx-split[data-layout="7b"] .cx-pane-stock { grid-column: 4 / span 3; }
.cx-split[data-layout="7b"] .cx-pane-extra[data-extra="0"] { grid-column: 7 / span 3; }
.cx-split[data-layout="7b"] .cx-pane-extra[data-extra="1"] { grid-column: 10 / span 3; }
.cx-split[data-layout="7b"] .cx-pane-extra[data-extra="2"] { grid-column: 1 / span 4; }
.cx-split[data-layout="7b"] .cx-pane-extra[data-extra="3"] { grid-column: 5 / span 4; }
.cx-split[data-layout="7b"] .cx-pane-extra[data-extra="4"] { grid-column: 9 / span 4; }
.cx-split[data-layout="7b"] .cx-pane-extra[data-extra="5"] { display: none; }
.cx-split[data-layout="7l"] {
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="7l"] .cx-pane-sector { grid-row: 1 / span 2; }
.cx-split[data-layout="7l"] .cx-pane-extra[data-extra="5"] { display: none; }

.cx-split[data-layout="8"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.cx-split[data-layout="8v"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
}
.cx-split[data-layout="8l"] {
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.cx-split[data-layout="8l"] .cx-pane-sector { grid-row: 1 / span 3; }
.cx-split[data-layout="8l"] .cx-pane-extra[data-extra="5"] { grid-column: 2 / span 3; }
.cx-split[data-layout="8r"] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.cx-split[data-layout="8r"] .cx-pane-extra[data-extra="5"] { grid-column: 4; grid-row: 1 / span 3; }
.cx-split[data-layout="8r"] .cx-pane-extra[data-extra="4"] { grid-column: 1 / span 3; }
.cx-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--cx-bg);
  position: relative;
}
/* Selection ring sits ABOVE the TradingView iframe so it is always visible.
   Only for multi-pane grids — single chart never shows a selection border. */
.cx-pane::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
  box-sizing: border-box;
  border: 2px solid transparent;
  pointer-events: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.cx-split:not([data-layout="1"]) .cx-pane:hover:not(.is-active-pane)::after {
  border-color: rgba(4, 180, 136, 0.55);
}
.cx-pane.is-active-pane {
  z-index: 3;
}
.cx-split:not([data-layout="1"]) .cx-pane.is-active-pane::after {
  border-color: var(--cx-accent);
  box-shadow: 0 0 0 1px var(--cx-accent);
}
.cx-split[data-layout="1"] .cx-pane::after {
  display: none;
}
.cx-pane-head {
  display: none !important; /* Symbol name is already on the TV legend — free vertical space */
}
.cx-pane-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cx-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cx-chart {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--cx-chart-bg);
  isolation: isolate;
  cursor: pointer;
}
.cx-pane.is-active-pane .cx-chart { cursor: default; }
.cx-chart > div:not(.cx-empty) { height: 100% !important; width: 100% !important; }
/* Inactive panes: clicks pass through iframe → select that grid.
   Active pane: chart is fully interactive.
   Single-pane layout: always interactive (no grid switching). */
.cx-chart iframe {
  position: relative;
  z-index: 2;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  pointer-events: none;
}
.cx-pane.is-active-pane .cx-chart iframe,
.cx-split[data-layout="1"] .cx-chart iframe {
  pointer-events: auto;
}
/* Boot / theme cover: snaps on, fades off so the chart eases in instead of popping. */
.cx-split::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 60;
  background: var(--cx-chart-bg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}
.cx-split.is-theme-switching::after,
.cx-split.is-booting::after {
  opacity: 1;
  visibility: visible;
  transition: none;
}
.cx-split.is-theme-switching .cx-chart,
.cx-split.is-booting .cx-chart {
  opacity: 1;
  filter: none;
  pointer-events: none;
  background: var(--cx-chart-bg);
}
.cx-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 28px;
  padding: 0 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  flex-shrink: 0;
  white-space: nowrap;
}
.cx-live-badge .cx-live-ico {
  width: 14px;
  height: 14px;
  display: inline-flex;
}
.cx-live-badge .cx-live-ico svg { width: 100%; height: 100%; }
.cx-live-badge[data-state="live"] {
  color: var(--cx-accent);
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.35);
}
.cx-live-badge[data-state="stale"] {
  color: #e7a61a;
  background: rgba(231, 166, 26, 0.12);
  border-color: rgba(231, 166, 26, 0.4);
}
.cx-live-badge[data-state="closed"] {
  color: var(--cx-muted-2);
  background: rgba(105, 110, 112, 0.14);
  border-color: rgba(100, 116, 139, 0.35);
}
.cx-live-badge[data-state="unknown"],
.cx-live-badge[data-state="unavailable"] {
  color: var(--cx-down);
  background: rgba(255, 94, 59, 0.12);
  border-color: rgba(255, 94, 59, 0.4);
}
.cx-shell.theme-light .cx-live-badge[data-state="live"] {
  color: var(--cx-accent);
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.35);
}
.cx-shell.theme-light .cx-live-badge[data-state="stale"] {
  color: #5d4037;
  background: #efebe9;
  border-color: #bcaaa4;
}
.cx-shell.theme-light .cx-live-badge[data-state="closed"] {
  color: #616161;
  background: #eeeeee;
  border-color: #e0e0e0;
}
.cx-shell.theme-light .cx-live-badge[data-state="unknown"],
.cx-shell.theme-light .cx-live-badge[data-state="unavailable"] {
  color: #b71c1c;
  background: #ffebee;
  border-color: #ef9a9a;
}
.cx-user-wrap { position: relative; z-index: 80; }
.cx-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(76, 175, 80, 0.35);
  background: var(--cx-accent-soft-2);
  color: var(--cx-accent);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0;
  overflow: hidden;
}
.cx-user-btn .cx-ident { width: 32px; height: 32px; display: block; }
.cx-user-btn:hover { border-color: var(--cx-accent); color: #fff; filter: brightness(1.08); }
.cx-shell.theme-light .cx-user-btn {
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.35);
  color: var(--cx-accent-hover);
}
.cx-user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  background: var(--cx-panel);
  border: 1px solid var(--cx-border-2);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 1200;
}
.cx-user-menu.is-open,
.cx-user-menu:not([hidden]) {
  display: block;
}
.cx-user-menu[hidden] {
  display: none !important;
}
.cx-user-menu-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--cx-border);
  background: var(--cx-panel-2);
}
.cx-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cx-accent-soft-2);
  color: var(--cx-accent);
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.cx-user-menu-head strong {
  display: block;
  font-size: 0.8rem;
  color: var(--cx-text);
  line-height: 1.2;
}
.cx-user-menu-head span {
  display: block;
  font-size: 0.68rem;
  color: var(--cx-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.cx-user-menu a, .cx-user-menu button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--cx-text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.cx-user-menu a:hover, .cx-user-menu button:hover { background: var(--cx-hover); }
.cx-user-menu .is-danger { color: #f87171; }
.cx-menu-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
  color: var(--cx-muted);
}
.cx-menu-ico svg { width: 100%; height: 100%; display: block; }
.cx-user-menu a:hover .cx-menu-ico { color: var(--cx-accent); }
.cx-user-menu .is-danger .cx-menu-ico { color: #f87171; }
.cx-shell.theme-light .cx-user-menu {
  background: #ffffff;
  border-color: var(--cx-border-2);
  box-shadow: 0 12px 28px rgba(19, 23, 34, 0.12);
}
.cx-shell.theme-light .cx-user-menu-head { background: var(--cx-panel-2); border-bottom-color: var(--cx-border); }
.cx-wl-top-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--cx-border-2);
  border-radius: 6px;
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  cursor: pointer;
  flex-shrink: 0;
}
.cx-wl-top-toggle:hover { color: var(--cx-accent); border-color: var(--cx-accent); }
.cx-wl-top-toggle.is-on {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
}
.cx-shell.theme-light .cx-wl-top-toggle {
  background: #ffffff;
  border-color: var(--cx-border-2);
}
.cx-shell.theme-light .cx-wl-top-toggle.is-on {
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.4);
  color: var(--cx-accent-hover);
}
.cx-wl-top-toggle.is-on .cx-hamburger span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.cx-wl-top-toggle.is-on .cx-hamburger span:nth-child(2) { opacity: 0; }
.cx-wl-top-toggle.is-on .cx-hamburger span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}
.wl-head-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.wl-dock-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid var(--cx-border-2);
  border-radius: 6px;
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  cursor: pointer;
}
.wl-dock-toggle:hover { background: var(--cx-hover); color: var(--cx-accent); }
.cx-shell.theme-light .wl-dock-toggle {
  background: #ffffff;
  border-color: var(--cx-border-2);
}
.wl-head-row .wl-search-wrap { flex: 1; min-width: 0; }
.cx-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--cx-muted-2);
  font-size: 0.85rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  background: var(--cx-chart-bg);
}
.cx-empty[hidden] { display: none !important; }
.cx-menu-backdrop[hidden] { display: none !important; }

/* Watchlist dock — side-by-side with chart (not overlay). Collapsed = narrow rail. */
.wl-dock {
  position: relative;
  display: flex;
  flex-shrink: 0;
  width: 340px;
  max-width: min(340px, 42vw);
  background: var(--cx-panel);
  border-left: 1px solid var(--cx-border);
  min-height: 0;
  z-index: 20;
  transition: width 0.2s ease, max-width 0.2s ease, background 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}
.cx-shell.wl-collapsed .wl-dock {
  width: 26px;
  max-width: 26px;
  border-left: 1px solid var(--cx-border);
}
.cx-shell.wl-collapsed .wl-panel {
  display: none;
}
.wl-rail {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 26px;
  min-width: 26px;
  height: 100%;
  padding: 0.55rem 0 0.6rem;
  border: 0;
  background: var(--cx-panel-2);
  color: var(--cx-accent);
  cursor: pointer;
  flex-shrink: 0;
}
.cx-shell.wl-collapsed .wl-rail {
  display: flex;
}
.wl-rail-top,
.wl-rail-bot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.wl-rail-top svg,
.wl-rail-bot svg {
  width: 13px;
  height: 13px;
}
.wl-edge-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--cx-accent);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.35rem 0;
}
.wl-rail:hover {
  background: rgba(4, 180, 136, 0.1);
  color: var(--cx-accent-hover);
}
.wl-rail:hover .wl-edge-label {
  color: var(--cx-accent-hover);
}
.cx-shell.theme-light .wl-rail {
  background: #f7f4ef;
  color: var(--cx-accent);
}
.cx-shell.theme-light .wl-rail:hover {
  background: var(--cx-accent-soft);
}
.cx-shell.theme-light.wl-collapsed .wl-dock {
  background: #f7f4ef;
}
.cx-hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
  height: 14px;
}
.cx-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.cx-btn.cx-wl-toggle.is-on .cx-hamburger span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.cx-btn.cx-wl-toggle.is-on .cx-hamburger span:nth-child(2) {
  opacity: 0;
}
.cx-btn.cx-wl-toggle.is-on .cx-hamburger span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}
/* legacy class kept for any old markup */
.wl-edge-toggle { display: none !important; }
.wl-row-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--cx-muted);
}
.wl-logo {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}
.cx-shell.theme-light .wl-logo {
  background: rgba(0, 0, 0, 0.05);
}
.wl-row-ico svg { width: 12px; height: 12px; }
.cx-shell.theme-light .wl-row-ico {
  background: var(--cx-text);
  color: var(--cx-accent);
}
.wl-row-ico[class*="ico-"] {
  background: rgba(4, 180, 136, 0.2);
  color: var(--cx-accent);
}
.cx-shell.theme-light .wl-row-ico[class*="ico-"] {
  background: var(--cx-text);
  color: var(--cx-accent);
}
.wl-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  --wl-pad-x: 0.65rem;
  --wl-grid-cols: minmax(7.5rem, 1.7fr) 3.6rem 3.1rem 3.3rem 1.05rem;
  --wl-grid-gap: 0.28rem;
  --wl-row-y: 0.42rem;
  background: var(--cx-panel);
}
.wl-sheet-handle {
  display: none;
}
.wl-head {
  padding: 0.55rem var(--wl-pad-x) 0.4rem;
  border: 0;
  flex-shrink: 0;
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}
.wl-list-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.wl-list-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.wl-list-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 32px;
  padding: 0.25rem 0.45rem 0.25rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
}
.wl-list-btn:hover {
  border-color: var(--cx-accent);
  color: var(--cx-up-strong);
}
.wl-list-btn-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-list-btn-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.75;
}
.wl-list-btn[aria-expanded="true"] .wl-list-btn-chevron {
  transform: rotate(180deg);
}
.wl-list-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: min(70vh, 420px);
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 0.35rem;
}
.wl-list-menu[hidden] { display: none !important; }
.wl-list-menu-section {
  padding: 0.2rem 0.35rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cx-muted);
}
.wl-list-menu-item,
.wl-list-menu-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cx-text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.55rem;
  cursor: pointer;
  text-align: left;
}
.wl-list-menu-left {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.wl-list-menu-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--cx-hover) 80%, transparent);
  color: var(--cx-muted);
}
.wl-list-menu-ico svg {
  width: 15px;
  height: 15px;
  display: block;
}
.wl-list-menu-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-list-menu-item:hover,
.wl-list-menu-action:hover {
  background: var(--cx-accent-soft);
}
.wl-list-menu-item:hover .wl-list-menu-ico {
  color: var(--cx-accent);
  background: var(--cx-mint-soft);
}
.wl-list-menu-item.is-active {
  background: var(--cx-mint-soft);
  color: var(--cx-text);
  box-shadow: inset 2px 0 0 var(--cx-accent);
}
.wl-list-menu-item.is-active .wl-list-menu-ico {
  color: var(--cx-accent);
  background: var(--cx-accent-soft-2);
}
.wl-list-menu-item.is-active .wl-list-menu-count {
  color: var(--cx-accent);
  font-weight: 750;
}
.wl-list-menu-count {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--cx-muted);
  font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cx-border) 55%, transparent);
}
.wl-list-menu-item.is-active .wl-list-menu-count {
  background: var(--cx-mint-soft);
}
.wl-list-menu-action {
  justify-content: flex-start;
  color: var(--cx-muted);
  font-weight: 600;
}
.wl-list-menu-action.is-danger { color: #f87171; }
.wl-list-menu-divider {
  height: 1px;
  margin: 0.3rem 0.25rem;
  background: var(--cx-border);
}
.wl-add-sym-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  cursor: pointer;
  flex-shrink: 0;
}
.wl-add-sym-btn svg { width: 15px; height: 15px; display: block; }
.wl-add-sym-btn:hover {
  border-color: var(--cx-accent);
  color: var(--cx-up-strong);
  background: rgba(4, 180, 136, 0.12);
}
.cx-shell.theme-light .wl-list-btn,
.cx-shell.theme-light .wl-add-sym-btn {
  background: #fff;
  border-color: var(--cx-border-2);
  color: var(--cx-text);
}
.cx-shell.theme-light .wl-list-menu {
  background: #fff;
  border-color: var(--cx-border-2);
  box-shadow: 0 12px 28px rgba(19, 23, 34, 0.14);
}
.cx-shell.theme-light .wl-list-menu-item.is-active {
  background: var(--cx-accent-soft);
  color: var(--cx-text);
  box-shadow: inset 2px 0 0 var(--cx-accent);
}
.cx-shell.theme-light .wl-list-menu-item.is-active .wl-list-menu-ico {
  color: var(--cx-accent-hover);
  background: var(--cx-accent-soft-2);
}
.cx-shell.theme-light .wl-list-menu-item:hover {
  background: var(--cx-accent-soft);
}
.wl-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.1rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.wl-collapse-btn:hover {
  background: var(--cx-hover);
  border-color: var(--cx-accent);
  color: var(--cx-accent);
}
.wl-collapse-btn.is-collapsed { transform: scaleX(-1); }
.cx-shell.wl-collapsed .wl-collapse-btn span { transform: scaleX(-1); }
.wl-search-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--cx-border);
  border-radius: 10px;
  padding: 0 0.7rem;
  height: 36px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.wl-search-wrap:focus-within {
  background: rgba(4, 180, 136, 0.12);
  border-color: rgba(4, 180, 136, 0.35);
  box-shadow: 0 0 0 3px rgba(4, 180, 136, 0.12);
}
.wl-custom-tabs {
  display: flex;
  gap: 0.22rem;
  width: 100%;
}
.wl-custom-tabs > .wl-custom-tab {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-custom-tabs > .wl-custom-tab.is-default {
  flex: 1.6 1 0;
}
.wl-custom-tabs > .wl-custom-tab-new {
  flex: 0 0 26px;
  padding: 0;
  font-size: 0.8rem;
}

/* Default-page ad slot (Stock Hunter display ad — creative wired later) */
/* Short panels: the ad collapses before the five Default rows lose any height. */
.cx-shell .wl-panel.is-default-wl .wl-body {
  flex: 1 1 auto;
}
.wl-ad {
  flex: 0 1000 auto;
  min-height: 0;
  overflow: hidden;
  margin: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wl-ad[hidden] {
  display: none;
}
.wl-ad-tag {
  align-self: flex-end;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cx-muted);
}
.wl-ad-box {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 6 / 5;
  max-height: 250px;
  margin-left: auto;
  border-radius: 10px;
  border: 1px dashed var(--cx-border-2);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.2rem;
  color: var(--cx-muted);
  text-align: center;
  box-sizing: border-box;
}
.wl-ad-box strong {
  font-size: 0.85rem;
  color: var(--cx-text);
}
.wl-ad-box span {
  font-size: 0.66rem;
}
.cx-shell.theme-light .wl-ad-box {
  background: rgba(0, 0, 0, 0.02);
}
.wl-custom-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 0.25rem;
  border-radius: 5px;
  border: 1px solid var(--cx-border-2);
  background: transparent;
  color: var(--cx-muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.wl-custom-tab.is-named {
  font-size: 0.62rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
}
.wl-custom-tab:hover {
  border-color: var(--cx-accent);
  color: var(--cx-up-strong);
}
.wl-custom-tab.is-active {
  background: rgba(4, 180, 136, 0.2);
  border-color: var(--cx-accent);
  color: var(--cx-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(4, 180, 136, 0.25);
}
.cx-shell.theme-light .wl-custom-tab {
  background: transparent;
  border-color: var(--cx-border);
  color: var(--cx-muted-2);
}
.cx-shell.theme-light .wl-custom-tab.is-active {
  background: #e8f0ff;
  border-color: var(--cx-accent);
  color: var(--cx-accent);
}
.wl-empty-custom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 1.1rem 0.85rem 1.25rem;
  text-align: center;
}
.wl-empty-custom strong {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--cx-text);
}
.wl-empty-custom > p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--cx-muted);
  line-height: 1.35;
}
.wl-empty-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(4, 180, 136, 0.45);
  background: linear-gradient(180deg, rgba(4, 180, 136, 0.28), rgba(4, 180, 136, 0.14));
  color: var(--cx-accent-soft);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}
.wl-empty-add:hover {
  border-color: var(--cx-accent);
  background: linear-gradient(180deg, rgba(4, 180, 136, 0.4), rgba(4, 180, 136, 0.2));
}
.wl-empty-rename {
  border: 0;
  background: transparent;
  color: var(--cx-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem;
}
.wl-empty-rename:hover { color: var(--cx-up-strong); }
.wl-empty-hint {
  font-size: 0.68rem !important;
  opacity: 0.9;
}
.wl-empty-hint b { color: var(--cx-text); font-weight: 700; }
.cx-shell.theme-light .wl-empty-add {
  background: linear-gradient(180deg, #eef4ff, #e4ecff);
  border-color: #b6c9ef;
  color: var(--cx-accent);
}
.cx-shell.theme-light .wl-empty-rename:hover { color: var(--cx-accent); }
.wl-add-suggest-head {
  padding: 0.45rem 0.75rem 0.25rem;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cx-muted);
}
.wl-add-suggest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--cx-border) 70%, transparent);
  background: transparent;
  color: var(--cx-text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  text-align: left;
}
.wl-add-suggest:hover {
  background: rgba(4, 180, 136, 0.1);
}
.wl-add-suggest-act {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--cx-border-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cx-up-strong);
  font-weight: 700;
  flex-shrink: 0;
}
.wl-add-suggest.is-in .wl-add-suggest-act {
  border-color: var(--cx-up);
  color: var(--cx-up);
  background: rgba(34, 197, 94, 0.12);
}
.wl-search {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--cx-text);
  font-size: 0.8rem;
  outline: none;
  height: 36px;
  transition: color 0.3s ease;
}
.wl-source-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 0.2rem;
  margin: 0;
  padding: 0.35rem var(--wl-pad-x) 0.45rem;
  border: 0;
  border-bottom: 1px solid var(--cx-border);
  border-radius: 0;
  background: transparent;
}
.wl-source-tabs button {
  appearance: none;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--cx-muted);
  border-radius: 9px;
  padding: 0.5rem 0.15rem;
  margin-bottom: 0;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.wl-source-tabs button:hover { color: var(--cx-text); background: var(--cx-hover); }
.wl-source-tabs button.active {
  background: rgba(4, 180, 136, 0.16);
  color: var(--cx-up-strong);
  box-shadow: inset 0 0 0 1px rgba(4, 180, 136, 0.28);
  border-bottom-color: transparent;
  font-weight: 800;
}
.cx-shell.theme-light .wl-source-tabs button.active {
  background: rgba(4, 180, 136, 0.1);
  color: var(--cx-accent);
  box-shadow: inset 0 0 0 1px rgba(4, 180, 136, 0.22);
}
.wl-tab-ico {
  display: inline-flex;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.85;
}
.wl-tab-ico svg { width: 100%; height: 100%; display: block; }
.wl-tab-label { display: inline; }
.wl-source-tabs button { gap: 0.32rem; }
.wl-cols {
  display: grid;
  grid-template-columns: var(--wl-grid-cols);
  gap: var(--wl-grid-gap);
  padding: 0.5rem var(--wl-pad-x) 0.4rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cx-muted-2);
  border-bottom: 1px solid var(--cx-border);
  background: transparent;
  flex-shrink: 0;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.wl-sector-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem var(--wl-pad-x);
  border-bottom: 1px solid var(--cx-border);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--cx-panel-2) 55%, transparent);
}
.wl-sector-nav[hidden] { display: none !important; }
.wl-sector-back {
  border: 0;
  background: transparent;
  color: var(--cx-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.wl-sector-back:hover { color: var(--cx-up-strong); text-decoration: none; }
.wl-sector-nav-meta {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-left: auto;
}
.wl-sector-nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cx-text);
}
.wl-sector-nav-chg, .wl-chg, .wl-meta {
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
}
.wl-chg.up, .wl-sector-nav-chg.up, .wl-meta.up { color: var(--cx-chg-up); }
.wl-chg.down, .wl-sector-nav-chg.down, .wl-meta.down { color: var(--cx-chg-down); }
.wl-chg.flat, .wl-sector-nav-chg.flat, .wl-meta.flat { color: var(--cx-muted-2); }
.wl-ltp {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--cx-muted);
  text-align: right;
  justify-self: end;
}
.wl-col-ltp, .wl-col-chg, .wl-col-chg-abs, .wl-last, .wl-chg, .wl-chg-abs, .wl-meta { text-align: right; justify-self: end; }
.wl-col-chg { cursor: pointer; user-select: none; }
.wl-col-chg:hover { color: var(--cx-border-2); }
.wl-col-chg.is-sort { color: var(--cx-up-strong); }
.wl-col-chg.is-asc,
.wl-col-chg.is-desc { color: var(--cx-up-strong); }
.wl-col-add, .wl-add-custom { justify-self: end; }
.wl-chg-abs {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 650;
}
.wl-chg-abs.up { color: var(--cx-chg-up); }
.wl-chg-abs.down { color: var(--cx-chg-down); }
.wl-chg-abs.flat { color: var(--cx-muted-2); }
.cx-shell.theme-light .wl-chg-abs.up { color: var(--cx-chg-up); }
.cx-shell.theme-light .wl-chg-abs.down { color: var(--cx-chg-down); }
.cx-shell.theme-light .wl-chg-abs.flat { color: var(--cx-muted-2); }
.wl-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--cx-border-2) transparent;
}
.wl-row, .wl-sector-row {
  display: grid;
  grid-template-columns: var(--wl-grid-cols);
  gap: var(--wl-grid-gap);
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--cx-border) 70%, transparent);
  background: transparent;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  user-select: none;
  color: var(--cx-text);
  padding: 0.55rem var(--wl-pad-x);
  cursor: pointer;
  text-align: left;
  font: inherit;
  box-sizing: border-box;
  position: relative;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.2s ease;
  min-height: 40px;
}
.wl-sector-row {
  grid-template-columns: minmax(0, 1fr) 3.6rem 1.1rem;
  width: calc(100% - 0.9rem);
  margin: 0.12rem 0.45rem;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  border: 1px solid transparent;
  border-bottom-color: transparent;
  min-height: 44px;
}
.wl-sector-row:hover {
  border-color: color-mix(in srgb, var(--cx-accent) 28%, var(--cx-border));
}
.wl-sector-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wl-sector-ico {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cx-muted);
  background: color-mix(in srgb, var(--cx-border) 70%, transparent);
  line-height: 1;
}
.wl-sector-row.is-up .wl-sector-ico {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.14);
}
.wl-sector-row.is-down .wl-sector-ico {
  color: #f87171;
  background: rgba(242, 54, 69, 0.14);
}
.wl-sector-row-name {
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cx-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.wl-sector-row-count {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--cx-muted);
  font-variant-numeric: tabular-nums;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  line-height: 1.2;
}
.wl-sector-row-chg {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  justify-self: end;
  line-height: 1.2;
}
.wl-sector-row-chg.up { color: var(--cx-chg-up); }
.wl-sector-row-chg.down { color: var(--cx-chg-down); }
.wl-sector-row-chg.flat { color: var(--cx-muted-2); }
.wl-sector-row-chevron {
  justify-self: end;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--cx-muted-2);
  display: inline-flex;
  align-items: center;
}
.wl-sector-row-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}
.wl-sector-row:hover .wl-sector-row-chevron { color: var(--cx-muted); }
.cx-shell.theme-light .wl-sector-ico {
  color: #1e40af;
  background: rgba(4, 180, 136, 0.12);
}
.cx-shell.theme-light .wl-sector-row.is-up .wl-sector-ico {
  color: var(--cx-up);
  background: rgba(22, 163, 74, 0.12);
}
.cx-shell.theme-light .wl-sector-row.is-down .wl-sector-ico {
  color: var(--cx-down);
  background: rgba(220, 38, 38, 0.10);
}
.cx-shell.theme-light .wl-sector-row-name { color: var(--cx-text); }
.cx-shell.theme-light .wl-sector-row-count {
  color: var(--cx-muted-2);
  background: #f1f5f9;
}
.cx-shell.theme-light .wl-sector-row-chg.up { color: var(--cx-chg-up); }
.cx-shell.theme-light .wl-sector-row-chg.down { color: var(--cx-chg-down); }
.cx-shell.theme-light .wl-sector-row-chevron { color: var(--cx-muted); }
.wl-last {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--cx-muted);
  text-align: right;
  justify-self: end;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.wl-add-custom {
  justify-self: end;
  width: 1.1rem;
  height: 1.1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cx-muted-2);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.wl-add-custom:hover {
  background: transparent;
  border: 0;
  color: var(--cx-accent);
}
.wl-row:hover, .wl-sector-row:hover {
  background: rgba(4, 180, 136, 0.08);
  border-color: rgba(4, 180, 136, 0.2);
}
.wl-row.active, .wl-sector-row.active {
  background: rgba(4, 180, 136, 0.15);
  box-shadow: inset 3px 0 0 var(--cx-accent);
  border-color: rgba(4, 180, 136, 0.3);
}
.wl-sym {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cx-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
.wl-sym-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  display: block;
}
.wl-ltp,
.wl-chg,
.wl-chg-abs {
  font-size: 0.7rem;
}
.wl-row-ico,
.wl-qtag { display: none !important; }
.wl-row-remove {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cx-muted-2);
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  opacity: 0;
}
.wl-row:hover .wl-row-remove { opacity: 1; }
.wl-row-remove:hover { background: #7f1d1d; color: #fff; }
.cx-shell.theme-light .wl-add-custom {
  background: var(--cx-accent-soft);
  border-color: var(--cx-accent);
  color: var(--cx-accent-hover);
}
.cx-shell.theme-light .wl-add-custom:hover {
  background: var(--cx-accent-soft-2);
  border-color: rgba(76, 175, 80, 0.45);
  color: var(--cx-accent-hover);
}
.wl-empty {
  padding: 1.25rem 0.75rem;
  text-align: center;
  color: var(--cx-muted-2);
  font-size: 0.78rem;
}
.cx-shell.wl-collapsed .wl-toggle-hint::after { content: none; }

@media (max-width: 1280px) {
  .wl-dock { width: 320px; max-width: min(320px, 38vw); }
  .cx-layout-btn .cx-layout-btn-label { display: none; }
}

@media (max-width: 1100px) {
  .cx-brand-text { display: none; }
  .cx-active-sym { max-width: min(180px, 36vw); min-width: 96px; }
  .cx-top {
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.28rem 0.45rem;
    min-height: 38px;
  }
  .cx-top-left { flex: 1 1 auto; order: 0; min-width: 0; }
  .cx-top-right { flex: 0 0 auto; order: 0; margin-left: auto; width: auto; justify-content: flex-end; }
  .cx-layout-chips { display: none; }
  .cx-version { display: none; }
  .wl-dock { width: 300px; max-width: min(300px, 40vw); }
  .cx-shell.wl-collapsed .wl-dock,
  .cx-shell.wl-collapsed .wl-rail { width: 24px; max-width: 24px; min-width: 24px; }
  .wl-cols,
  .wl-row,
  .wl-sector-row { grid-template-columns: minmax(6.5rem, 1.6fr) 52px 44px 48px 20px; }
  .cx-oc-btn span,
  .cx-tool-btn span { display: none; }
  .cx-oc-btn,
  .cx-tool-btn { padding: 0; width: 32px; justify-content: center; }
}

@media (max-width: 900px) {
  .cx-shell { height: 100dvh; max-height: 100dvh; }
  .cx-split[data-layout="2"],
  .cx-split[data-layout="2v"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
  .cx-split[data-layout="3"],
  .cx-split[data-layout="3h"],
  .cx-split[data-layout="3r"],
  .cx-split[data-layout="3v"],
  .cx-split[data-layout="3s"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr);
  }
  .cx-split[data-layout="3"] .cx-pane-sector,
  .cx-split[data-layout="3h"] .cx-pane-sector,
  .cx-split[data-layout="3r"] .cx-pane-sector {
    grid-row: 1;
    grid-column: 1 / -1;
  }
  .cx-split[data-layout="4"],
  .cx-split[data-layout="4v"],
  .cx-split[data-layout="4h"],
  .cx-split[data-layout="4l"],
  .cx-split[data-layout="4r"],
  .cx-split[data-layout="4t"],
  .cx-split[data-layout="4b"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
  .cx-split[data-layout="4l"] .cx-pane-sector,
  .cx-split[data-layout="4r"] .cx-pane-sector,
  .cx-split[data-layout="4t"] .cx-pane-sector,
  .cx-split[data-layout="4b"] .cx-pane-extra[data-extra="0"] {
    grid-row: auto;
    grid-column: auto;
  }
  .cx-split[data-layout="5a"],
  .cx-split[data-layout="5b"],
  .cx-split[data-layout="5l"],
  .cx-split[data-layout="5r"],
  .cx-split[data-layout="6"],
  .cx-split[data-layout="6v"],
  .cx-split[data-layout="6l"],
  .cx-split[data-layout="6r"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
  .cx-split[data-layout="5a"] .cx-pane-sector,
  .cx-split[data-layout="5a"] .cx-pane-stock,
  .cx-split[data-layout="5a"] .cx-pane-extra,
  .cx-split[data-layout="5b"] .cx-pane-sector,
  .cx-split[data-layout="5b"] .cx-pane-stock,
  .cx-split[data-layout="5b"] .cx-pane-extra,
  .cx-split[data-layout="5l"] .cx-pane-sector,
  .cx-split[data-layout="5r"] .cx-pane-extra[data-extra="2"],
  .cx-split[data-layout="6l"] .cx-pane-sector,
  .cx-split[data-layout="6l"] .cx-pane-extra[data-extra="4"],
  .cx-split[data-layout="6r"] .cx-pane-extra[data-extra="3"],
  .cx-split[data-layout="6r"] .cx-pane-extra[data-extra="4"] {
    grid-column: auto;
    grid-row: auto;
  }
  .cx-split[data-layout="7a"],
  .cx-split[data-layout="7b"],
  .cx-split[data-layout="7l"],
  .cx-split[data-layout="8"],
  .cx-split[data-layout="8v"],
  .cx-split[data-layout="8l"],
  .cx-split[data-layout="8r"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }
  .cx-split[data-layout="7a"] .cx-pane-sector,
  .cx-split[data-layout="7a"] .cx-pane-stock,
  .cx-split[data-layout="7a"] .cx-pane-extra,
  .cx-split[data-layout="7b"] .cx-pane-sector,
  .cx-split[data-layout="7b"] .cx-pane-stock,
  .cx-split[data-layout="7b"] .cx-pane-extra,
  .cx-split[data-layout="7l"] .cx-pane-sector,
  .cx-split[data-layout="8l"] .cx-pane-sector,
  .cx-split[data-layout="8l"] .cx-pane-extra[data-extra="5"],
  .cx-split[data-layout="8r"] .cx-pane-extra[data-extra="4"],
  .cx-split[data-layout="8r"] .cx-pane-extra[data-extra="5"] {
    grid-column: auto;
    grid-row: auto;
  }
  .cx-status { display: none; }
  .cx-live-badge #cxLiveLabel { max-width: 6.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wl-dock { width: 280px; max-width: min(280px, 42vw); }
  .wl-source-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.28rem 0.35rem;
    gap: 0.15rem;
  }
  .wl-source-tabs button { padding: 0.28rem 0.15rem; font-size: 0.62rem; }
  .wl-source-tabs .wl-tab-ico { width: 14px; height: 14px; }
  .wl-head { padding: 0.35rem 0.4rem 0.25rem; }
  .wl-search-wrap { height: 28px; }
  .wl-row, .wl-sector-row { padding: 0.35rem 0.45rem; min-height: 36px; }
  .wl-cols { padding: 0.15rem 0.45rem; font-size: 0.62rem; }
  .wl-body { -webkit-overflow-scrolling: touch; }
}

/* Phones — compact header + push bottom sheet (no overlay) */
@media (max-width: 640px) {
  .cx-top {
    min-height: 40px !important;
    height: 40px;
    padding: 0.15rem 0.4rem !important;
    gap: 0.3rem !important;
    flex-wrap: nowrap;
  }
  .cx-brand,
  .cx-layout-chips,
  .cx-version,
  .cx-oc-btn,
  .cx-top-actions,
  .cx-layout-wrap { display: none !important; }
  .cx-autosave {
    display: inline-flex !important;
    align-items: center;
    font-size: 0.58rem;
    order: -5;
  }
  .cx-autosave.is-show {
    max-width: 72px;
    padding: 0;
  }
  .cx-top-left {
    display: none;
  }
  .cx-top-right {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 0.28rem;
    flex-wrap: nowrap;
  }
  .cx-wl-top-toggle {
    order: -20;
    width: 32px;
    height: 32px;
  }
  .cx-top-spacer {
    display: block;
    order: -10;
    margin-right: auto;
  }
  .cx-live-badge {
    order: -10;
    margin-right: auto;
    padding: 0.14rem 0.45rem;
    font-size: 0.62rem;
    max-width: 7.2rem;
  }
  .cx-live-badge #cxLiveLabel {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cx-icon-btn,
  .cx-user-btn {
    width: 32px;
    height: 32px;
  }
  .cx-user-avatar {
    width: 26px !important;
    height: 26px !important;
    font-size: 10px !important;
  }
  .cx-user-menu { right: 0; left: auto; min-width: 200px; max-width: calc(100vw - 1rem); }
  .cx-layout-menu { right: 0; left: auto; max-width: calc(100vw - 1rem); }

  /* Chart + watchlist: full-screen watchlist when Watchlist tab is active */
  .cx-workspace {
    flex-direction: column;
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
  }
  .cx-main {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }
  .wl-dock {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    height: min(30vh, 240px);
    max-height: min(30vh, 240px);
    flex: 0 0 auto;
    border-left: 0;
    border-top: 1px solid var(--cx-border);
    border-radius: 12px 12px 0 0;
    z-index: 30;
    box-shadow: none;
    overflow: hidden;
    transition: height 0.2s ease, max-height 0.2s ease, opacity 0.15s ease;
  }
  .cx-shell.wl-expanded .wl-dock {
    height: min(46vh, 360px);
    max-height: min(46vh, 360px);
  }
  .cx-shell.wl-collapsed .wl-dock {
    width: 100%;
    max-width: none;
    height: 0 !important;
    max-height: 0 !important;
    min-height: 0;
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
    border-top: 0;
  }
  .cx-shell.wl-collapsed .wl-panel {
    display: flex;
  }
  /* Full-screen watchlist (TradingView-style) */
  .cx-shell[data-mnav="watchlist"] .cx-mticker {
    display: none !important;
  }
  .cx-shell[data-mnav="watchlist"] .cx-main {
    display: none !important;
  }
  .cx-shell[data-mnav="watchlist"] .wl-dock,
  .cx-shell[data-mnav="watchlist"].wl-collapsed .wl-dock,
  .cx-shell[data-mnav="watchlist"].wl-expanded .wl-dock {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    border-radius: 0;
    border-top: 0;
    display: flex;
    flex-direction: column;
  }
  .cx-shell[data-mnav="watchlist"] .wl-panel {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }
  .cx-shell[data-mnav="watchlist"] .wl-sheet-handle {
    display: none !important;
  }
  .cx-shell[data-mnav="watchlist"] .wl-collapse-btn {
    display: none !important;
  }
  .cx-shell[data-mnav="watchlist"] .wl-body {
    flex: 1 1 auto;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .cx-shell:not([data-mnav="watchlist"]) .wl-ad {
    display: none;
  }
  .cx-shell[data-mnav="watchlist"] .wl-ad-box {
    margin: 0 auto;
  }
  .cx-shell[data-mnav="watchlist"] .wl-row,
  .cx-shell[data-mnav="watchlist"] .wl-sector-row {
    min-height: 48px;
    padding: 0.55rem 0.75rem;
    font-size: 0.92rem;
  }
  .cx-shell.theme-light .wl-dock {
    box-shadow: none;
  }
  .wl-rail,
  .wl-edge-toggle { display: none !important; }

  /* Compact sheet chrome */
  .wl-sheet-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
  }
  .wl-sheet-grip {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cx-muted) 55%, transparent);
  }
  .wl-head {
    padding: 0.2rem 0.55rem 0.25rem;
  }
  .wl-source-tabs {
    padding: 0.1rem 0.35rem 0.3rem;
    gap: 0.1rem;
  }
  .wl-source-tabs .wl-tab-label { display: none; }
  .wl-source-tabs button {
    padding: 0.35rem 0.2rem;
    min-height: 32px;
  }
  .wl-cols { display: grid; font-size: 0.55rem; padding: 0.2rem 0.45rem; }
  .wl-row,
  .wl-sector-row {
    padding: 0.32rem 0.55rem;
    min-height: 34px;
    grid-template-columns: minmax(0, 1fr) 52px 44px 48px 20px;
  }
  .wl-list-menu {
    max-height: min(50vh, 320px);
  }
}
.cx-shell.theme-light .wl-source-tabs {
  background: transparent;
  border-bottom-color: #e8eaf0;
}
.cx-shell.theme-light .wl-source-tabs button.active {
  background: transparent;
  color: var(--cx-accent);
  box-shadow: none;
  border-bottom-color: var(--cx-accent);
}
.cx-shell.theme-light .wl-row,
.cx-shell.theme-light .wl-sector-row {
  color: var(--cx-text);
  border-bottom-color: #e8eaf0;
  background: transparent;
  transition: background 0.15s ease, border-color 0.2s ease;
}
.cx-shell.theme-light .wl-row:hover,
.cx-shell.theme-light .wl-sector-row:hover {
  background: rgba(4, 180, 136, 0.06);
  border-color: rgba(4, 180, 136, 0.15);
}
.cx-shell.theme-light .wl-row.active,
.cx-shell.theme-light .wl-sector-row.active {
  background: rgba(4, 180, 136, 0.1);
  box-shadow: inset 3px 0 0 var(--cx-accent);
  border-color: rgba(4, 180, 136, 0.2);
}
.cx-shell.theme-light .wl-search {
  background: transparent;
  color: var(--cx-text);
  transition: color 0.3s ease;
}
.cx-shell.theme-light .wl-search::placeholder {
  color: var(--cx-muted-2);
}
.cx-shell.theme-light .wl-search-wrap {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--cx-border-2);
  border-radius: 0;
}
.cx-shell.theme-light .wl-last { color: var(--cx-muted); }
.cx-shell.theme-light .wl-sym { color: var(--cx-text); }
.cx-shell.theme-light .wl-cols {
  background: rgba(0,0,0,0.02);
  color: var(--cx-muted-2);
  border-bottom-color: var(--cx-border);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.cx-shell.theme-light .wl-search::placeholder { color: var(--cx-muted-2); }
.cx-shell.theme-light .wl-dock {
  background: #fafbfc;
  border-left-color: var(--cx-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.cx-shell.theme-light .cx-layout-menu {
  background: #ffffff;
  border-color: var(--cx-border-2);
  box-shadow: 0 8px 24px rgba(19, 23, 34, 0.12);
}
.cx-shell.theme-light .cx-layout-menu-head {
  background: var(--cx-panel-2);
  border-bottom-color: var(--cx-border);
}
.cx-shell.theme-light .cx-layout-menu-head strong { color: var(--cx-text); }
.cx-shell.theme-light .cx-layout-menu-head span { color: var(--cx-muted); }
.cx-shell.theme-light .cx-settings-item { color: var(--cx-text); }
.cx-shell.theme-light .cx-settings-item:hover { background: #f0f3fa; }
.cx-shell.theme-light .cx-grid-btn {
  background: #ffffff;
  border-color: var(--cx-border-2);
  color: var(--cx-text);
}
.cx-shell.theme-light .cx-grid-btn.is-active {
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.4);
  color: var(--cx-accent-hover);
  box-shadow: none;
}
.cx-shell.theme-light .cx-modal-card {
  background: #ffffff;
  border-color: var(--cx-border-2);
  color: var(--cx-text);
}
.cx-shell.theme-light .cx-modal-card input {
  background: #ffffff;
  border-color: var(--cx-border-2);
  color: var(--cx-text);
}
.cx-shell.theme-light .cx-split { background: var(--cx-border); }
.cx-shell.theme-light .wl-head,
.cx-shell.theme-light .wl-source-tabs,
.cx-shell.theme-light .wl-sector-nav,
.cx-shell.theme-light .wl-cols {
  border-color: var(--cx-border);
}
.cx-shell.theme-light .wl-search-wrap {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--cx-border-2);
  border-radius: 0;
}
.cx-shell.theme-light .wl-source-tabs button:hover {
  color: var(--cx-accent);
  background: transparent;
}
.cx-shell.theme-light .wl-source-tabs button.active {
  color: var(--cx-accent);
}
}
.cx-shell.theme-light .wl-sector-back { color: var(--cx-accent); }
.cx-shell.theme-light .wl-sector-back:hover { color: var(--cx-accent); }
.cx-shell.theme-light .wl-sector-nav-label { color: var(--cx-text); }
.cx-shell.theme-light .wl-body { scrollbar-color: var(--cx-border-2) transparent; }
.cx-shell.theme-light .wl-sym { color: var(--cx-text); }
.cx-shell.theme-light .cx-back {
  background: #ffffff;
  border-color: var(--cx-border-2);
  color: var(--cx-text);
}
.cx-shell.theme-light .cx-user { color: var(--cx-muted); }
.cx-shell.theme-light .cx-btn {
  background: #ffffff;
  border-color: var(--cx-border-2);
  color: var(--cx-text);
}
.cx-shell.theme-light .cx-layout-chip {
  background: #ffffff;
  border-color: var(--cx-border-2);
  color: var(--cx-muted);
}
.cx-shell.theme-light .cx-modal-hint { color: var(--cx-muted); }
html.theme-light, html.theme-light body, body.theme-light {
  background: #ffffff;
  color: var(--cx-text);
}

/* ── Option OI Analysis panel ─────────────────────────── */
.cx-analysis-wrap { position: relative; z-index: 55; }
.cx-analysis-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(420px, calc(100vw - 24px));
  background: var(--cx-panel, #0c1220);
  border: 1px solid var(--cx-border-2, var(--cx-border-2));
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  padding: 12px 14px 10px;
  z-index: 1300;
  color: var(--cx-text, #e8edf5);
}
.cx-analysis-panel.is-open,
.cx-analysis-panel:not([hidden]) { display: block; }
.cx-analysis-panel[hidden] { display: none !important; }
.cx-analysis-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cx-analysis-head strong { font-size: 13px; font-weight: 750; }
.cx-analysis-head span { font-size: 11px; color: var(--cx-muted); }
.cx-analysis-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.cx-analysis-metrics div {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cx-analysis-metrics span { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cx-muted); }
.cx-analysis-metrics b { font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 750; }
.cx-analysis-bias {
  font-size: 11.5px;
  color: var(--cx-border-2);
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(4, 180, 136, 0.1);
  border: 1px solid rgba(4, 180, 136, 0.2);
  margin-bottom: 10px;
  line-height: 1.35;
}
.cx-analysis-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.cx-analysis-col h4 {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cx-analysis-col.is-support h4 { color: var(--cx-up-strong); }
.cx-analysis-col.is-resist h4 { color: #f87171; }
.cx-analysis-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cx-analysis-col li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.cx-analysis-col.is-support li {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.18);
}
.cx-analysis-col.is-resist li {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.18);
}
.cx-analysis-col li:hover { filter: brightness(1.12); }
.cx-analysis-col li strong { font-weight: 750; }
.cx-analysis-col li span { font-size: 10px; color: var(--cx-muted); }
.cx-analysis-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.cx-analysis-actions .cx-btn { font-size: 11.5px; padding: 4px 9px; }
.cx-analysis-actions .is-on {
  border-color: var(--cx-up-strong);
  color: #6ee7b7;
}
.cx-analysis-note {
  margin: 0;
  font-size: 10px;
  color: var(--cx-muted-2);
  line-height: 1.35;
}
.cx-shell.theme-light .cx-analysis-panel {
  background: #ffffff;
  border-color: var(--cx-border-2);
  color: var(--cx-text);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}
.cx-shell.theme-light .cx-analysis-head span,
.cx-shell.theme-light .cx-analysis-metrics span,
.cx-shell.theme-light .cx-analysis-col li span,
.cx-shell.theme-light .cx-analysis-note { color: var(--cx-muted); }
.cx-shell.theme-light .cx-analysis-metrics div {
  background: #f4f6fb;
  border-color: var(--cx-border);
}
.cx-shell.theme-light .cx-analysis-bias {
  background: #eff6ff;
  border-color: var(--cx-accent-soft);
  color: #1e3a5f;
}


/* —— Header / watchlist polish (v0.5.161) —— */
.cx-top {
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  min-height: 54px;
}
.cx-oc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 34px;
  padding: 0 0.85rem 0 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(76, 175, 80, 0.4);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.cx-oc-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 1;
  color: inherit;
}
.cx-oc-btn:hover {
  border-color: rgba(76, 175, 80, 0.55);
  color: var(--cx-accent);
  background: var(--cx-accent-soft-2);
  box-shadow: none;
}
.cx-shell.theme-light .cx-oc-btn {
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.35);
  color: var(--cx-accent-hover);
  box-shadow: none;
}
.cx-shell.theme-light .cx-oc-btn:hover {
  border-color: rgba(76, 175, 80, 0.5);
  color: var(--cx-accent-hover);
  background: var(--cx-accent-soft-2);
  box-shadow: none;
}
.cx-version {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(76, 175, 80, 0.28);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.cx-shell.theme-light .cx-version {
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.28);
  color: var(--cx-accent-hover);
}
.cx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cx-icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.cx-icon-btn:hover {
  border-color: var(--cx-accent);
  color: var(--cx-accent);
  background: rgba(4, 180, 136, 0.1);
}
.cx-icon-btn.is-spin svg {
  animation: cx-spin 0.7s linear;
}
@keyframes cx-spin {
  to { transform: rotate(360deg); }
}
.cx-shell.theme-light .cx-icon-btn {
  background: #ffffff;
  border-color: var(--cx-border-2);
}
.cx-shell.theme-light .cx-icon-btn:hover {
  background: var(--cx-accent-soft);
  border-color: var(--cx-accent);
}
.wl-search-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--cx-muted);
  margin-right: 0.45rem;
  opacity: 0.85;
}
.wl-collapse-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.wl-head {
  padding: 0.55rem var(--wl-pad-x) 0.4rem;
}
.wl-cols {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 750;
  opacity: 0.9;
}
@media (max-width: 1100px) {
  .cx-oc-btn span,
  .cx-tool-btn span { display: none; }
  .cx-oc-btn,
  .cx-tool-btn { padding: 0; width: 34px; justify-content: center; }
  .cx-brand-text span { display: none; }
  .cx-version { display: none; }
}

/* —— Watchlist panel toggle (no hamburger) —— */
.cx-wl-top-toggle .cx-wl-panel-ico {
  width: 16px;
  height: 16px;
  display: block;
}
.cx-wl-top-toggle.is-on {
  border-color: var(--cx-accent);
  background: rgba(4, 180, 136, 0.16);
  color: var(--cx-up-strong);
}
.cx-shell.theme-light .cx-wl-top-toggle.is-on {
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
}
.wl-edge-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Keep generic row icons hidden — stock logos stay visible with breathing room */
.wl-row-ico {
  display: none !important;
}
.cx-shell.theme-light .wl-row-ico {
  display: none !important;
}
.wl-sym {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding-right: 0.1rem;
}
.wl-logo {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: 0;
  background: rgba(255, 255, 255, 0.08);
}
.cx-shell.theme-light .wl-logo {
  background: rgba(0, 0, 0, 0.05);
}
.wl-sym-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  line-height: 1.2;
}
.wl-sector-ico svg {
  width: 14px;
  height: 14px;
  display: block;
}
.wl-add-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--cx-border-2);
  background: rgba(255,255,255,0.04);
  color: var(--cx-muted);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  justify-self: end;
}
.wl-add-custom:hover {
  border-color: var(--cx-accent);
  color: var(--cx-up-strong);
  background: rgba(4, 180, 136, 0.15);
}
.wl-add-custom.is-in {
  border-color: var(--cx-up);
  color: var(--cx-up);
  background: rgba(34, 197, 94, 0.12);
}
.wl-add-custom.is-in:hover {
  border-color: var(--cx-down);
  color: var(--cx-down);
  background: rgba(239, 68, 68, 0.12);
}
.cx-shell.theme-light .wl-add-custom {
  background: #ffffff;
  border-color: var(--cx-border-2);
  color: var(--cx-muted-2);
}
.cx-shell.theme-light .wl-add-custom:hover {
  background: var(--cx-accent-soft);
  border-color: var(--cx-accent);
  color: var(--cx-accent);
}
.cx-shell.theme-light .wl-add-custom.is-in {
  border-color: var(--cx-up);
  color: var(--cx-up);
  background: #f0fdf4;
}
.cx-shell.theme-light .wl-add-custom.is-in:hover {
  border-color: var(--cx-down);
  color: var(--cx-down);
  background: #fef2f2;
}
.wl-sector-ico svg { width: 14px; height: 14px; display: block; }
.wl-row-remove {
  position: static;
  transform: none;
  opacity: 1;
  justify-self: end;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--cx-border-2);
  background: transparent;
  color: var(--cx-muted);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wl-row:hover .wl-row-remove { opacity: 1; color: #f87171; border-color: rgba(248,113,113,0.4); }

/* ── Market ticker tape (under header, above charts) — VC / 915 style ── */
.cx-mticker {
  flex-shrink: 0;
  width: 100%;
  border-bottom: 1px solid rgba(76, 175, 80, 0.16);
  background:
    linear-gradient(90deg, rgba(76, 175, 80, 0.06) 0%, transparent 22%, transparent 78%, rgba(229, 57, 53, 0.04) 100%),
    linear-gradient(180deg, #1c2022 0%, #141718 100%);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.cx-shell.theme-light .cx-mticker {
  border-bottom-color: #e4e7ec;
  background:
    linear-gradient(90deg, rgba(76, 175, 80, 0.05) 0%, transparent 22%, transparent 78%, rgba(198, 40, 40, 0.04) 100%),
    linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
  box-shadow: inset 0 -1px 0 rgba(53, 56, 57, 0.04);
}
.cx-mticker-wrap {
  position: relative;
  overflow: hidden;
  height: 2.75rem;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}
.cx-mticker-wrap::before,
.cx-mticker-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3.25rem;
  z-index: 2;
  pointer-events: none;
}
.cx-mticker-wrap::before {
  left: 0;
  background: linear-gradient(90deg, #141718, transparent);
}
.cx-mticker-wrap::after {
  right: 0;
  background: linear-gradient(270deg, #141718, transparent);
}
.cx-shell.theme-light .cx-mticker-wrap::before {
  background: linear-gradient(90deg, #ffffff, transparent);
}
.cx-shell.theme-light .cx-mticker-wrap::after {
  background: linear-gradient(270deg, #f6f7f9, transparent);
}
.cx-mticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  flex-shrink: 0;
  white-space: nowrap;
  will-change: transform;
  backface-visibility: hidden;
  transition: opacity 0.2s ease;
}
/* Fallback only — the tape is normally driven by a px-based Web Animation from charts.js. */
.cx-mticker-track.is-css {
  animation: cx-mticker-scroll 110s linear infinite;
}
.cx-mticker-wrap:hover .cx-mticker-track.is-css {
  animation-play-state: paused;
}
.cx-mticker-track.is-swapping {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .cx-mticker-track.is-css { animation: none; }
}
@keyframes cx-mticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.cx-mticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.05rem;
  flex-shrink: 0;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.cx-mticker-item:hover {
  background: var(--cx-accent-soft);
}
.cx-mticker-item.is-index .cx-mticker-sym {
  color: var(--cx-accent);
  letter-spacing: 0.03em;
}
.cx-shell.theme-light .cx-mticker-item {
  border-right-color: #e8eaed;
}
.cx-shell.theme-light .cx-mticker-item:hover {
  background: var(--cx-accent-soft);
}
.cx-shell.theme-light .cx-mticker-item.is-index .cx-mticker-sym {
  color: var(--cx-accent-hover);
}
.cx-mticker-logo {
  width: 18px;
  height: 18px;
  margin-right: -0.15rem;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}
.cx-shell.theme-light .cx-mticker-logo {
  background: rgba(0, 0, 0, 0.05);
}
.cx-mticker-track.is-entering .cx-mticker-item {
  animation: cxMtickerIn 0.35s ease both;
}
@keyframes cxMtickerIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cx-mticker-sym {
  font-size: 0.74rem;
  font-weight: 800;
  color: #f2f5f7;
  letter-spacing: 0.02em;
}
.cx-mticker-px {
  font-size: 0.74rem;
  font-weight: 600;
  color: #aeb4b6;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cx-mticker-chg {
  box-sizing: border-box;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.01em;
}
.cx-mticker-chg.up {
  color: var(--cx-chg-up);
  background: rgba(76, 175, 80, 0.16);
}
.cx-mticker-chg.down {
  color: var(--cx-chg-down);
  background: rgba(229, 57, 53, 0.18);
}
.cx-mticker-chg.flat {
  color: #989ea0;
  background: transparent;
}
.cx-shell.theme-light .cx-mticker-sym { color: #1a1d1f; }
.cx-shell.theme-light .cx-mticker-px { color: #6b7280; }
.cx-shell.theme-light .cx-mticker-chg.up {
  color: var(--cx-chg-up);
  background: rgba(76, 175, 80, 0.12);
}
.cx-shell.theme-light .cx-mticker-chg.down {
  color: var(--cx-chg-down);
  background: rgba(198, 40, 40, 0.1);
}
.cx-shell.theme-light .cx-mticker-chg.flat { color: #9ca3af; background: transparent; }
.cx-mticker-empty {
  padding: 0 1rem;
  font-size: 0.72rem;
  color: var(--cx-muted);
}

/* ── Bar replay ── */
.cx-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 34px;
  padding: 0 0.85rem 0 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cx-replay-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.cx-replay-btn:hover,
.cx-replay-btn.is-on {
  border-color: var(--cx-accent);
  color: var(--cx-accent);
  background: var(--cx-accent-soft);
}
.cx-shell.theme-light .cx-replay-btn {
  background: #fff;
  border-color: var(--cx-border);
}
.cx-replay-hint {
  position: fixed;
  top: 4.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.92);
  border: 1px solid rgba(76, 175, 80, 0.35);
  color: #c8e6c9;
  font-size: 0.78rem;
  font-weight: 650;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100vw - 1rem);
  box-sizing: border-box;
}
.cx-replay-hint[hidden] {
  display: none;
}
.cx-replay-hint-touch {
  display: none;
}
.cx-replay-hint-close {
  pointer-events: auto;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-right: -0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.cx-replay-hint-close:hover {
  background: rgba(255, 255, 255, 0.16);
}
.cx-shell.theme-light .cx-replay-hint {
  background: rgba(255, 255, 255, 0.96);
  color: var(--cx-accent-hover);
  border-color: rgba(76, 175, 80, 0.3);
}
.cx-shell.theme-light .cx-replay-hint-close {
  border-color: var(--cx-border-2);
  background: rgba(0, 0, 0, 0.04);
}
@media (hover: none) and (pointer: coarse) {
  .cx-replay-hint-desk { display: none; }
  .cx-replay-hint-touch { display: inline; }
}
.cx-shell.is-replay-pick {
  cursor: crosshair;
}
.cx-shell.is-replay-pick .chart-container,
.cx-shell.is-replay-pick #tv_sector_chart,
.cx-shell.is-replay-pick #tv_stock_chart,
.cx-shell.is-replay-pick [id^="tv_extra"],
.cx-shell.is-replay-pick .cx-chart {
  cursor: crosshair !important;
}
.cx-autosave {
  display: none !important;
}
.cx-replay-vline {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px !important;
  max-width: 2px !important;
  right: auto !important;
  margin-left: -1px;
  background: rgba(76, 175, 80, 0.7);
  box-shadow: none;
  pointer-events: none;
  z-index: 40;
  display: none;
}
.cx-replay-vline.is-on {
  display: block;
}
.cx-shell.theme-light .cx-replay-vline {
  background: rgba(76, 175, 80, 0.65);
  box-shadow: none;
}
.cx-replay-bar {
  position: fixed;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 85;
  width: min(720px, calc(100% - 1.5rem));
  pointer-events: none;
}
.cx-replay-bar-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: rgba(27, 27, 27, 0.94);
  border: 1px solid rgba(76, 175, 80, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}
.cx-shell.theme-light .cx-replay-bar-inner {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(76, 175, 80, 0.25);
  box-shadow: 0 12px 32px rgba(53, 56, 57, 0.12);
}
.cx-replay-badge {
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  color: var(--cx-accent);
  background: var(--cx-accent-soft-2);
  padding: 0.22rem 0.45rem;
  border-radius: 5px;
}
.cx-replay-time {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cx-text);
  min-width: 9.5rem;
}
.cx-replay-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.cx-replay-ctl {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--cx-border);
  background: var(--cx-panel-2);
  color: var(--cx-text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.cx-replay-ctl:hover { border-color: var(--cx-accent); color: var(--cx-accent); }
.cx-replay-play {
  width: 40px;
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.4);
  color: var(--cx-accent);
}
.cx-replay-play:hover { background: var(--cx-accent-soft-2); border-color: rgba(76, 175, 80, 0.55); color: var(--cx-accent); }
.cx-replay-play.is-playing,
.cx-replay-play.is-playing:hover { background: #ffffff; border-color: #ffffff; color: #121212; }
.cx-shell.theme-light .cx-replay-play.is-playing,
.cx-shell.theme-light .cx-replay-play.is-playing:hover { border-color: var(--cx-border-2); }
.cx-replay-speed {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--cx-muted);
}
.cx-replay-speed select {
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--cx-border);
  background: var(--cx-panel-2);
  color: var(--cx-text);
  font: inherit;
  font-weight: 700;
  padding: 0 0.4rem;
}
.cx-replay-pick,
.cx-replay-exit {
  height: 32px;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--cx-border);
  background: transparent;
  color: var(--cx-text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.cx-replay-pick:hover { border-color: var(--cx-accent); color: var(--cx-accent); }
.cx-replay-exit {
  background: var(--cx-accent-soft);
  border-color: rgba(76, 175, 80, 0.4);
  color: var(--cx-accent);
}
.cx-replay-exit:hover { background: var(--cx-accent-soft-2); border-color: rgba(76, 175, 80, 0.55); }
.cx-replay-close {
  width: 32px;
  height: 32px;
  margin-left: auto;
  border-radius: 8px;
  border: 1px solid var(--cx-border);
  background: transparent;
  color: var(--cx-muted);
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.cx-replay-close:hover { border-color: var(--cx-border-2); color: var(--cx-text); background: var(--cx-hover); }
@media (max-width: 720px) {
  .cx-replay-btn span,
  .cx-tool-btn span { display: none; }
  .cx-replay-btn,
  .cx-tool-btn { padding: 0; width: 34px; justify-content: center; }
  .cx-replay-time { min-width: 0; flex: 1 1 100%; order: 5; }
}
@media (max-width: 640px) {
  .cx-replay-bar {
    bottom: calc(56px + 0.5rem + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 1rem);
  }
  .cx-replay-bar-inner { gap: 0.4rem; padding: 0.45rem 0.5rem; }
  .cx-replay-badge,
  .cx-replay-speed > span { display: none; }
  .cx-replay-time { order: 0; flex: 1 1 0; min-width: 0; }
  .cx-replay-close { order: 1; margin-left: 0; width: 34px; height: 34px; }
  .cx-replay-controls,
  .cx-replay-speed,
  .cx-replay-pick,
  .cx-replay-exit { order: 2; }
  .cx-replay-controls { flex-basis: auto; }
  .cx-replay-bar-inner::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
  .cx-replay-pick,
  .cx-replay-exit { padding: 0 0.55rem; height: 34px; }
  .cx-replay-ctl { width: 34px; height: 34px; }
  .cx-replay-play { width: 40px; }
  .cx-replay-hint { top: 3.6rem; width: max-content; white-space: normal; text-align: left; }
}

/* —— Mobile bottom nav (TradingView-style) —— */
.cx-mobile-nav,
.cx-mobile-menu {
  display: none;
}
.cx-mobile-nav {
  flex-shrink: 0;
  align-items: stretch;
  justify-content: space-around;
  gap: 0;
  height: 56px;
  padding: 0 2px env(safe-area-inset-bottom, 0);
  background: #0a0a0a;
  border-top: 1px solid var(--cx-border);
  z-index: 50;
}
.cx-shell.theme-light .cx-mobile-nav {
  background: #ffffff;
  border-top-color: var(--cx-border);
}
.cx-mnav-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 6px 2px 4px;
  border: 0;
  background: transparent;
  color: var(--cx-muted);
  font: inherit;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cx-mnav-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}
.cx-mnav-btn span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}
.cx-mnav-btn.is-active {
  color: var(--cx-text);
}
.cx-shell.theme-light .cx-mnav-btn.is-active {
  color: var(--cx-accent);
}
.cx-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.45);
  align-items: flex-end;
  justify-content: stretch;
}
.cx-mobile-menu:not([hidden]) {
  display: flex;
}
.cx-mobile-menu-sheet {
  width: 100%;
  max-height: min(72vh, 520px);
  overflow: auto;
  background: var(--cx-panel);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--cx-border);
  padding: 0 0 calc(56px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}
.cx-mobile-menu-handle {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}
.cx-mobile-menu-handle span {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cx-muted) 55%, transparent);
}
.cx-mobile-menu-head {
  padding: 0.35rem 1rem 0.75rem;
  border-bottom: 1px solid var(--cx-border);
}
.cx-mobile-menu-head strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}
.cx-mobile-menu-head span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--cx-muted);
}
.cx-mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--cx-border) 70%, transparent);
  background: transparent;
  color: var(--cx-text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cx-mobile-menu-item:active {
  background: var(--cx-hover);
}
.cx-mobile-menu-item.is-danger {
  color: #f87171;
}
.cx-mobile-menu-close {
  justify-content: center;
  color: var(--cx-muted);
  border-bottom: 0;
  font-weight: 500;
}
@media (max-width: 640px) {
  .cx-mobile-nav {
    display: flex;
  }
  .cx-wl-top-toggle {
    display: none !important;
  }
  .cx-shell {
    height: 100dvh;
    height: 100vh;
  }
  .bc-fav-dock {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  /* Block ghost taps into TradingView left toolbar after watchlist pick */
  .cx-shell.cx-block-chart-hit .cx-main,
  .cx-shell.cx-block-chart-hit .cx-main iframe {
    pointer-events: none !important;
  }
}

/* —— Full-view symbol search —— */
.cx-search-view {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 75;
  flex-direction: column;
  background: var(--cx-bg);
}
.cx-search-view.is-open,
.cx-search-view:not([hidden]) {
  display: flex;
}
.cx-search-view[hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  .cx-search-view.is-open,
  .cx-search-view:not([hidden]) {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 641px) {
  .cx-search-view.is-open,
  .cx-search-view:not([hidden]) {
    inset: 8vh 12vw auto;
    bottom: auto;
    max-width: 560px;
    max-height: min(72vh, 640px);
    margin: 0 auto;
    left: 0;
    right: 0;
    border: 1px solid var(--cx-border);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    overflow: hidden;
  }
  .cx-search-view.is-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
  }
}
.cx-search-view-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--cx-border);
  background: var(--cx-panel);
  flex-shrink: 0;
}
.cx-search-view-ico {
  width: 18px;
  height: 18px;
  color: var(--cx-muted);
  flex-shrink: 0;
}
.cx-search-view-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--cx-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}
.cx-search-view-cancel {
  border: 0;
  background: transparent;
  color: var(--cx-accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.35rem 0.25rem;
  flex-shrink: 0;
}
.cx-search-view-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.cx-search-view-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--cx-border) 65%, transparent);
  background: transparent;
  color: var(--cx-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cx-search-view-row:active {
  background: var(--cx-hover);
}
.cx-search-view-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
}
.cx-search-view-logo.is-empty {
  display: inline-block;
  background: color-mix(in srgb, var(--cx-border) 55%, transparent);
}
.cx-search-view-sym {
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
  min-width: 0;
}
.cx-search-view-kind {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cx-muted);
  flex-shrink: 0;
  margin-left: auto;
}
.cx-search-view-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--cx-muted);
}
.cx-search-view-empty strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--cx-text);
  font-size: 1rem;
}
.cx-search-view-empty p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ── Alerts (TradingView-like) ── */
.cx-alerts-btn,
.cx-heatmap-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 34px;
  padding: 0 0.75rem 0 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(76, 175, 80, 0.35);
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.cx-alerts-btn svg,
.cx-heatmap-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.cx-alerts-btn:hover,
.cx-heatmap-btn:hover {
  background: var(--cx-accent-soft-2);
  border-color: rgba(76, 175, 80, 0.5);
}
.cx-alerts-badge {
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--cx-accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cx-alerts-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 86;
  background: rgba(0,0,0,0.35);
}
.cx-alerts-backdrop.is-open { display: block; }
.cx-alerts-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100vw);
  z-index: 87;
  background: var(--cx-panel);
  border-left: 1px solid var(--cx-border);
  box-shadow: -12px 0 40px rgba(0,0,0,0.35);
  transform: translateX(105%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}
.cx-alerts-panel.is-open { transform: translateX(0); }
.cx-alerts-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.65rem;
  border-bottom: 1px solid var(--cx-border);
}
.cx-alerts-head strong { display: block; font-size: 1rem; }
.cx-alerts-sub { display: block; margin-top: 0.15rem; font-size: 0.72rem; color: var(--cx-muted); }
.cx-alerts-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--cx-border);
}
.cx-alerts-tab {
  flex: 1;
  appearance: none;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--cx-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.35rem;
  cursor: pointer;
}
.cx-alerts-tab.is-on {
  background: var(--cx-accent-soft);
  color: var(--cx-accent);
}
.cx-alerts-body {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1rem 1.25rem;
}
.cx-alert-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cx-muted);
}
.cx-alert-form input,
.cx-alert-form select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  font: inherit;
  font-size: 0.85rem;
  padding: 0 0.65rem;
  box-sizing: border-box;
}
.cx-alert-price-row { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.3rem; }
.cx-alert-price-row input { margin-top: 0; flex: 1; }
.cx-alert-mini {
  appearance: none;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-panel-2);
  color: var(--cx-text);
  border-radius: 7px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  white-space: nowrap;
}
.cx-alert-mini.is-danger { color: var(--cx-down); }
.cx-alert-submit { width: 100%; justify-content: center; margin-top: 0.35rem; height: 38px; }
.cx-alert-live {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: #81c784;
  min-height: 1em;
}
.cx-shell.theme-light .cx-alert-live { color: #2e7d32; }
.cx-alert-test-row {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.55rem;
  align-items: stretch;
}
.cx-alert-test {
  flex: 1;
  height: 36px;
  justify-content: center;
  background: transparent;
  border: 1px dashed rgba(76,175,80,0.55);
  color: #81c784;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}
.cx-alert-test:hover { background: rgba(76,175,80,0.1); }
.cx-shell.theme-light .cx-alert-test { color: #2e7d32; border-color: rgba(46,125,50,0.45); }
.cx-alert-hint { margin: 0.75rem 0 0; font-size: 0.72rem; color: var(--cx-muted); line-height: 1.4; }
.cx-alerts-empty { padding: 1.5rem 0.5rem; text-align: center; color: var(--cx-muted); font-size: 0.82rem; line-height: 1.45; }
.cx-alert-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--cx-border);
}
.cx-alert-row-main { min-width: 0; }
.cx-alert-row-main strong { display: block; font-size: 0.85rem; }
.cx-alert-meta { display: block; font-size: 0.7rem; color: var(--cx-muted); margin-top: 0.15rem; }
.cx-alert-row-acts { display: flex; flex-direction: column; gap: 0.25rem; }
.cx-alert-log-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--cx-border);
  font-size: 0.78rem;
  line-height: 1.35;
}
.cx-alert-log-ts { display: block; font-size: 0.65rem; color: var(--cx-muted); margin-bottom: 0.1rem; }
.cx-alert-toasts {
  position: fixed;
  left: 50%;
  bottom: 1.35rem;
  transform: translateX(-50%);
  z-index: 96;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: min(440px, calc(100vw - 1.5rem));
  pointer-events: none;
}
.cx-alert-toast {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(18,18,18,0.96);
  border: 1px solid rgba(76,175,80,0.45);
  color: #e8f5e9;
  font-size: 0.86rem;
  font-weight: 650;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  transition: opacity 0.28s ease, transform 0.28s ease;
  text-align: left;
}
.cx-alert-toast-title {
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #81c784;
  margin-bottom: 0.2rem;
}
.cx-alert-toast-body { line-height: 1.35; }
.cx-alert-toast.is-in { animation: cxAlertIn 0.28s ease; }
.cx-alert-toast.is-out { opacity: 0; transform: translateY(10px); }
@keyframes cxAlertIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.cx-shell.theme-light .cx-alert-toast {
  background: #ffffff;
  color: #1b5e20;
  border-color: rgba(76,175,80,0.4);
}
.cx-shell.theme-light .cx-alert-toast-title { color: #2e7d32; }
.cx-alert-enable-notify {
  flex: 1;
  margin-top: 0;
  justify-content: center;
  height: 36px;
}
.cx-hm-tile .cx-hm-pct,
.cx-hm-tile .cx-hm-sym,
.cx-hm-tile .cx-hm-px { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.cx-shell.theme-light .cx-hm-tile .cx-hm-pct,
.cx-shell.theme-light .cx-hm-tile .cx-hm-sym,
.cx-shell.theme-light .cx-hm-tile .cx-hm-px { text-shadow: none; }
.cx-heatmap-legend { display: none !important; }

/* ── Heatmap color-axis screen ── */
.cx-heatmap {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 88;
  background: var(--cx-bg);
  flex-direction: column;
  padding: 0.75rem 1rem 1rem;
  box-sizing: border-box;
}
.cx-heatmap.is-open { display: flex; }
.cx-heatmap-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.cx-heatmap-title strong { display: block; font-size: 1.05rem; }
.cx-heatmap-title span { font-size: 0.75rem; color: var(--cx-muted); }
.cx-heatmap-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
}
.cx-heatmap-controls label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cx-muted);
}
.cx-heatmap-controls select {
  display: block;
  margin-top: 0.25rem;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--cx-border-2);
  background: var(--cx-btn-bg);
  color: var(--cx-text);
  font: inherit;
  font-size: 0.8rem;
  padding: 0 0.55rem;
}
.cx-heatmap-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 6px;
  align-content: start;
}
.cx-hm-tile {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  min-height: 78px;
  padding: 0.55rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.15rem;
  text-align: left;
  cursor: pointer;
  color: var(--cx-text);
  font: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cx-hm-tile > * { flex-shrink: 0; }
.cx-hm-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.cx-hm-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 5px;
  object-fit: contain;
  background: rgba(255,255,255,0.12);
}
.cx-hm-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  z-index: 1;
}
.cx-hm-sym {
  min-width: 0;
  line-height: 1.2;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cx-hm-pct { font-size: 0.92rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cx-hm-tile.tone-up .cx-hm-pct,
.cx-hm-tile.tone-down .cx-hm-pct,
.cx-hm-tile.tone-flat .cx-hm-pct { color: #fff; }
.cx-shell.theme-light .cx-hm-tile.tone-up .cx-hm-pct,
.cx-shell.theme-light .cx-hm-tile.tone-down .cx-hm-pct,
.cx-shell.theme-light .cx-hm-tile.tone-flat .cx-hm-pct { color: #fff; }
.cx-hm-px { font-size: 0.68rem; color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; }
.cx-shell.theme-light .cx-hm-px { color: rgba(0,0,0,0.55); }
.cx-hm-empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--cx-muted);
}
.cx-heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--cx-border);
}
.cx-hm-leg {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--cx-text);
  cursor: pointer;
  flex: 1 1 0;
  min-width: 4.5rem;
  text-align: center;
}
.cx-hm-leg.is-off { opacity: 0.28; text-decoration: line-through; }
.cx-shell.theme-light .cx-hm-tile { border-color: rgba(0,0,0,0.06); }
.cx-shell.theme-light .cx-hm-leg { border-color: rgba(0,0,0,0.08); }

@media (max-width: 720px) {
  .cx-alerts-btn span,
  .cx-heatmap-btn span,
  .cx-tool-btn span { display: none; }
  .cx-alerts-btn,
  .cx-heatmap-btn,
  .cx-tool-btn { padding: 0; width: 34px; justify-content: center; }
  .cx-alerts-badge { position: absolute; top: -3px; right: -3px; }
  .cx-heatmap-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* —— Header redesign (v0.5.278) —— */
.cx-top {
  gap: 0.65rem;
  padding: 0.4rem 0.9rem;
  min-height: 52px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cx-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cx-panel) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--cx-border) 80%, transparent);
}
.cx-shell.theme-dark .cx-top-actions {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.cx-shell.theme-light .cx-top-actions {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.06);
}
.cx-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  height: 32px;
  padding: 0 0.72rem 0 0.55rem;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cx-muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.cx-tool-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.92;
}
.cx-tool-btn:hover {
  color: var(--cx-text);
  background: var(--cx-hover);
  border-color: color-mix(in srgb, var(--cx-border-2) 70%, transparent);
}
.cx-tool-btn.is-on {
  color: var(--cx-accent);
  background: var(--cx-accent-soft);
  border-color: color-mix(in srgb, var(--cx-accent) 35%, transparent);
}
.cx-tool-btn--accent {
  color: var(--cx-accent);
  background: var(--cx-accent-soft);
  border-color: color-mix(in srgb, var(--cx-accent) 32%, transparent);
  font-weight: 700;
}
.cx-tool-btn--accent:hover,
.cx-tool-btn--accent.is-on {
  background: var(--cx-accent-soft-2);
  border-color: color-mix(in srgb, var(--cx-accent) 48%, transparent);
  color: var(--cx-accent);
}
.cx-shell.theme-light .cx-tool-btn--accent {
  color: var(--cx-accent-hover);
}

/* Keep legacy class hooks for any remaining references */
.cx-replay-btn.is-on,
.cx-alerts-btn.is-on,
.cx-heatmap-btn.is-on,
.cx-oc-btn.is-on {
  color: var(--cx-accent);
}

.cx-top-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cx-panel) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--cx-border) 80%, transparent);
}
.cx-shell.theme-dark .cx-top-tools {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.cx-shell.theme-light .cx-top-tools {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.06);
}
.cx-top-tools .cx-layout-wrap {
  position: relative;
}
.cx-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cx-muted);
}
.cx-icon-btn:hover {
  color: var(--cx-text);
  background: var(--cx-hover);
  border-color: color-mix(in srgb, var(--cx-border-2) 70%, transparent);
}
.cx-shell.theme-light .cx-icon-btn {
  background: transparent;
  border-color: transparent;
}
.cx-shell.theme-light .cx-icon-btn:hover {
  background: var(--cx-hover);
  border-color: color-mix(in srgb, var(--cx-border-2) 70%, transparent);
}
.cx-theme-ico {
  width: 15px;
  height: 15px;
  display: none;
}
.cx-shell.theme-dark #cx-theme-toggle .cx-theme-ico-sun,
html.theme-dark #cx-theme-toggle .cx-theme-ico-sun {
  display: block;
}
.cx-shell.theme-light #cx-theme-toggle .cx-theme-ico-moon,
html.theme-light #cx-theme-toggle .cx-theme-ico-moon {
  display: block;
}
.cx-layout-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 0.55rem;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cx-muted);
  gap: 0.32rem;
}
.cx-layout-btn svg { width: 15px; height: 15px; }
.cx-layout-btn .cx-layout-btn-label {
  font-size: 0.7rem;
  font-weight: 650;
}
.cx-layout-btn:hover {
  color: var(--cx-text);
  background: var(--cx-hover);
  border-color: color-mix(in srgb, var(--cx-border-2) 70%, transparent);
}
.cx-layout-btn.is-open {
  color: var(--cx-accent);
  background: var(--cx-accent-soft);
  border-color: color-mix(in srgb, var(--cx-accent) 35%, transparent);
}
.cx-shell.theme-light .cx-layout-btn {
  background: transparent;
  border-color: transparent;
}
.cx-shell.theme-light .cx-layout-btn.is-open {
  background: var(--cx-accent-soft);
  border-color: color-mix(in srgb, var(--cx-accent) 35%, transparent);
  color: var(--cx-accent-hover);
}
.cx-alerts-badge {
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1rem;
  border-radius: 999px;
  background: var(--cx-accent);
  color: #fff;
  position: absolute;
  top: -4px;
  right: -4px;
}
.cx-version {
  height: 24px;
  padding: 0 0.5rem;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.9;
}
@media (max-width: 1100px) {
  .cx-top-actions { padding: 0.12rem; gap: 0.15rem; }
  .cx-top-tools { padding: 0.12rem; }
}
