/* —— 自定义产品 / 训练弹窗（一期） —— */


.binding-grid.is-custom-product {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.binding-grid.is-custom-product > .pro-field {
  min-width: 0;
}
.binding-custom-name input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8ee;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  min-height: 0;
}
html[data-theme="dark"] .binding-custom-name input {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e8eef2;
}
.holding-custom-train-btn {
  margin-left: 8px;
  vertical-align: middle;
  border: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.holding-custom-train-exit {
  margin-left: 6px;
  vertical-align: middle;
  border: 0;
  background: transparent;
  color: var(--down, #d4535c);
  box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.35);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  cursor: pointer;
  flex-shrink: 0;
}
/* 手机：训练卡标题+Train/Exit 与右侧图标挤在一行时，限宽让按钮可折行 + 略缩字号 */

@media (max-width: 720px) {
  .holding.is-custom-product .holding-title-row .hn,
  .holding[data-train="1"] .holding-title-row .hn,
  .holding[data-custom="1"] .holding-title-row .hn {
    max-width: calc(100% - 128px);
    gap: 4px 5px;
    padding-right: 2px;
  }
  .holding-custom-train-btn,
  .holding-custom-train-exit {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }
  .holding-custom-train-btn {
    margin-left: 5px;
  }
  .holding-custom-train-exit {
    margin-left: 3px;
  }
}
.train-mode-tag {
  /* 与 #sim-tag / .tag.soft 同款中性描边，勿单独青绿 */
  color: var(--muted) !important;
  box-shadow: inset 0 0 0 1px var(--line) !important;
  background: transparent !important;
  font-weight: 600;
}
html[data-theme="dark"] .holding-custom-train-btn {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
html[data-theme="dark"] .holding-custom-train-exit {
  border-color: transparent;
  color: #e8909c;
  box-shadow: inset 0 0 0 1px rgba(229, 84, 109, 0.45);
}
html[data-theme="dark"] .train-mode-tag {
  color: var(--muted) !important;
  box-shadow: inset 0 0 0 1px var(--line) !important;
  background: transparent !important;
}
.custom-train-layer {
  z-index: 80 !important;
  pointer-events: none;
}
.custom-train-layer.on {
  pointer-events: none;
}
.custom-train-panel {
  width: min(max(560px, 68vw), calc(100vw - 24px));
  height: min(max(420px, 76vh), calc(100vh - 48px));
  min-width: min(420px, calc(100vw - 24px));
  min-height: min(360px, calc(100vh - 48px));
  max-width: min(1200px, calc(100vw - 16px));
  max-height: calc(100vh - 24px);
  left: 50%;
  top: 6%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  background: var(--panel, #fff);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  z-index: 1;
  /* 弹层也跟分辨率缩放字号（导图继承） */
  --ct-mm-fs: clamp(11px, 0.55vw + 9px, 14px);
  --ct-mm-fs-sm: clamp(10px, 0.45vw + 8px, 12.5px);
  --ct-mm-fs-xs: clamp(9px, 0.35vw + 7.5px, 11px);
  --ct-mm-fs-title: clamp(11px, 0.5vw + 9px, 13.5px);
  --ct-mm-dock-w: clamp(196px, 16.5vw, 280px);
  --ct-mm-chip-h: clamp(28px, 2.2vh + 18px, 36px);
  --ct-mm-node-min-w: clamp(76px, 6.5vw, 108px);
  --ct-mm-node-max-w: clamp(112px, 9.5vw, 148px);
  --ct-mm-node-pad-y: clamp(6px, 0.55vh + 4px, 10px);
  --ct-mm-node-pad-x: clamp(8px, 0.55vw + 5px, 12px);
}
.custom-train-panel.is-fullscreen {
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  border-radius: 0;
  --ct-mm-fs: clamp(12px, 0.65vw + 9px, 15px);
  --ct-mm-fs-sm: clamp(11px, 0.5vw + 8px, 13px);
  --ct-mm-fs-xs: clamp(10px, 0.4vw + 7.5px, 12px);
  --ct-mm-dock-w: clamp(220px, 15vw, 300px);
  --ct-mm-node-min-w: clamp(84px, 6vw, 120px);
  --ct-mm-node-max-w: clamp(120px, 9vw, 160px);
}
/* 手机端：自定义训练 = 独立全屏页（自适应字号/间距） */


@media (max-width: 720px) {
  body.custom-train-page-open {
    overflow: hidden;
  }
  body.custom-train-page-open .dock {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body.custom-train-page-open .shell,
  body.custom-train-page-open .app {
    pointer-events: none;
  }
  .custom-train-layer.on.is-page,
  .custom-train-layer.is-page {
    position: fixed !important;
    inset: 0 !important;
    z-index: 12040 !important;
    pointer-events: auto !important;
    background: var(--bg, #0b1220);
    display: block !important;
  }
  .custom-train-layer.is-page .custom-train-panel,
  .custom-train-panel.is-page {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0);
    --ct-page-pad-x: clamp(10px, 3.2vw, 16px);
    --ct-page-fs: clamp(12px, 3.45vw, 14px);
    --ct-page-fs-sm: clamp(11px, 3.1vw, 12.5px);
    --ct-page-fs-xs: clamp(10px, 2.8vw, 11.5px);
    --ct-page-fs-title: clamp(13px, 3.7vw, 15px);
    --ct-page-ctrl-h: clamp(32px, 9vw, 38px);
    font-size: var(--ct-page-fs);
  }
  .custom-train-panel.is-page .pos-resize,
  .custom-train-panel.is-page .custom-train-fs-btn,
  .custom-train-layer.is-page .pos-resize,
  .custom-train-layer.is-page .custom-train-fs-btn {
    display: none !important;
  }
  .custom-train-panel.is-page .custom-train-drag {
    cursor: default;
    flex-shrink: 0;
    padding: 10px var(--ct-page-pad-x);
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    gap: 8px;
    border-bottom: 1px solid var(--line);
  }
  .custom-train-panel.is-page .custom-train-head-text {
    flex: 1 1 auto;
    gap: clamp(4px, 1.5vw, 8px);
    min-width: 0;
  }
  .custom-train-panel.is-page .custom-train-back {
    margin-left: -6px;
    flex-shrink: 0;
  }
  .custom-train-panel.is-page .custom-train-head-name {
    flex: 0 0 auto;
    max-width: min(148px, 42vw);
    margin-left: auto;
  }
  .custom-train-panel.is-page .custom-train-head-name input {
    height: var(--ct-page-ctrl-h);
    font-size: var(--ct-page-fs-sm);
    padding: 0 8px;
    border-radius: 9px;
  }
  .custom-train-panel.is-page .custom-train-head-sym {
    flex: 0 0 auto;
    max-width: min(132px, 40vw);
  }
  .custom-train-panel.is-page .ct-mm-dock-sym-slot .custom-train-head-sym,
  .custom-train-panel.is-page .custom-train-head-sym.is-on-dock-head {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
  .custom-train-panel.is-page .custom-train-head-sym.is-on-page-head .custom-train-sym-hit {
    height: 26px;
    max-width: 100%;
    font-size: 11px;
    font-weight: 650;
    padding: 0 6px 0 7px;
    border-radius: 7px;
    gap: 3px;
  }
  .custom-train-panel.is-page .custom-train-head-sym select {
    height: var(--ct-page-ctrl-h);
    max-width: none;
    width: 100%;
    font-size: clamp(9.5px, 2.7vw, 11.5px);
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 0 18px 0 6px;
    border-radius: 9px;
  }
  .custom-train-panel.is-page .custom-train-head-acts {
    gap: 4px;
  }
  .custom-train-panel.is-page .custom-train-close-btn {
    display: none !important;
  }
  .custom-train-panel.is-page .custom-train-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 10px var(--ct-page-pad-x) 6px;
    overflow: hidden;
  }
  .custom-train-panel.is-page .ct-tabs.ct-tabs-tool {
    margin-bottom: 8px;
    padding: 2px;
    border-radius: 11px;
  }
  .custom-train-panel.is-page .ct-tabs.ct-tabs-tool .ct-tab {
    font-size: var(--ct-page-fs-sm);
    padding: clamp(7px, 2vw, 10px) 4px;
    border-radius: 9px;
  }
  .custom-train-panel.is-page .custom-train-scroll {
    padding-bottom: 4px;
  }
  .custom-train-panel.is-page .ct-guide-card,
  .custom-train-panel.is-page .ct-mem-ops,
  .custom-train-panel.is-page .ct-api-simple,
  .custom-train-panel.is-page .ct-mem-guide-card {
    font-size: var(--ct-page-fs);
  }
  .custom-train-panel.is-page .ct-guide-card-head b,
  .custom-train-panel.is-page .ct-mem-ops-lead,
  .custom-train-panel.is-page .ct-guide-dl dd,
  .custom-train-panel.is-page .ct-guide-dl dt {
    font-size: var(--ct-page-fs-sm);
    line-height: 1.45;
  }
  .custom-train-panel.is-page .ct-guide-card-head b {
    font-size: var(--ct-page-fs-title);
  }
  .custom-train-panel.is-page .ct-guide-dl {
    gap: 8px;
  }
  .custom-train-panel.is-page .btn,
  .custom-train-panel.is-page .yx-btn,
  .custom-train-panel.is-page .ct-mem-ops .btn {
    min-height: var(--ct-page-ctrl-h);
    font-size: var(--ct-page-fs-sm);
    padding: 0 12px;
    border-radius: 10px;
  }
  .custom-train-panel.is-page .custom-train-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px var(--ct-page-pad-x);
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--panel);
  }
  .custom-train-panel.is-page .custom-train-foot .btn {
    width: 100%;
    justify-content: center;
    min-height: clamp(40px, 11vw, 46px);
    font-size: var(--ct-page-fs);
    font-weight: 750;
  }
  .custom-train-panel.is-page .custom-train-params,
  .custom-train-panel.is-page .ct-api-add-fields {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .custom-train-panel.is-page .custom-train-params label,
  .custom-train-panel.is-page .custom-train-api-card label,
  .custom-train-panel.is-page .custom-train-form .pro-field {
    font-size: var(--ct-page-fs-xs);
  }
  .custom-train-panel.is-page .custom-train-params input:not(.pro-toggle),
  .custom-train-panel.is-page .custom-train-api-card input:not(.pro-toggle),
  .custom-train-panel.is-page .custom-train-form .pro-field input:not(.pro-toggle),
  .custom-train-panel.is-page .custom-train-form .pro-field select {
    min-height: var(--ct-page-ctrl-h);
    font-size: var(--ct-page-fs-sm);
  }
  html[data-theme="dark"] .custom-train-layer.is-page {
    background: var(--bg, #0b1220);
  }
  html[data-theme="dark"] .custom-train-panel.is-page {
    background: var(--bg, #0b1220);
    box-shadow: none;
    border: 0;
  }
  html[data-theme="dark"] .custom-train-panel.is-page .custom-train-foot {
    background: var(--panel, #121a22);
    border-top-color: var(--line);
  }
}
.custom-train-drag {
  cursor: grab;
}
.custom-train-drag:active {
  cursor: grabbing;
}
.custom-train-head-text {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.custom-train-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  color: var(--ink);
  background: none;
  border-radius: 0;
}
.custom-train-logo .logo-mc {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}
.custom-train-head-name {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex: 0 1 160px;
  max-width: min(180px, 32vw);
  margin: 0 0 0 auto;
  cursor: text;
}
.custom-train-head-acts {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}
.custom-train-head-sym {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
}
/* 全屏也保持：LOGO · 产品名 · 品种 紧挨；工具按钮仍靠右 */

.custom-train-panel.is-fullscreen .custom-train-head-sym {
  margin-left: 0;
}
.custom-train-panel.is-fullscreen .custom-train-head-acts {
  margin-left: auto;
}
.custom-train-head-sym .custom-train-sym-hit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  max-width: min(168px, 36vw);
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  box-sizing: border-box;
}
.custom-train-head-sym .custom-train-sym-hit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.custom-train-head-sym select.ct-symbol-native {
  display: none !important;
}
.custom-train-head-sym select {
  height: 32px;
  width: 100%;
  max-width: min(168px, 36vw);
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
/* 窄屏：缩小字号并略加宽，保证「ETH 永续 · 未配置」完整可见 */

@media (max-width: 720px) {
  .custom-train-head-text {
    gap: 6px;
  }
  .custom-train-head-sym {
    flex: 1 1 auto;
    max-width: min(210px, 52vw);
  }
  .custom-train-head-sym .custom-train-sym-hit {
    height: 30px;
    max-width: none;
    font-size: 10px;
  }
  .custom-train-head-sym select {
    height: 30px;
    max-width: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 0 20px 0 6px;
  }
  .custom-train-head-sym.is-on-dock-head select {
    font-size: 9.5px;
    letter-spacing: -0.025em;
    padding: 0 16px 0 5px;
  }
}
@media (max-width: 390px) {
  .custom-train-head-sym {
    max-width: min(200px, 56vw);
  }
  .custom-train-head-sym select {
    font-size: 9.5px;
    letter-spacing: -0.03em;
    padding: 0 18px 0 5px;
  }
}
.custom-train-head-sym select:focus {
  outline: none;
  border-color: var(--line);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .custom-train-head-sym select {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
/* 画布全屏：品种在工作栏标题行右侧（勿挂画布顶角） */

.custom-train-head-sym.is-on-board-tr {
  display: none !important;
}
.custom-train-head-name-lab {
  display: none;
}
.custom-train-head-name input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}
.custom-train-head-name input:focus {
  outline: none;
  border-color: var(--line);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .custom-train-head-name input {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
/* 电脑端：顶栏用返回关闭，不展示 ×；全屏时保留缩小钮（.is-restore） */
@media (min-width: 900px) {
  .custom-train-close-btn:not(.is-restore) {
    display: none !important;
  }
}
.custom-train-fs-btn,
.custom-train-close-btn.is-restore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.custom-train-fs-btn svg,
.custom-train-close-btn.is-restore svg {
  width: 18px;
  height: 18px;
  display: block;
}
.custom-train-panel.is-fullscreen .custom-train-fs-btn {
  display: none !important;
}
.custom-train-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 16px 8px;
  min-height: 0;
}
.custom-train-form.is-simple {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.custom-train-form.is-simple > .ct-tabs.ct-tabs-tool {
  flex-shrink: 0;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}
.custom-train-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
/* 看规则：画布撑满剩余高度，外层不再下拉 */

.custom-train-scroll:has(#ct-panel-rules:not([hidden])) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#ct-panel-rules:not([hidden]) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.custom-train-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.custom-train-bt-result {
  flex-shrink: 0;
  max-height: 42%;
  overflow: auto;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-2, #f4f7f9);
}
.custom-train-bt-result[hidden] {
  display: none !important;
}
.ct-bt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ct-bt-head b {
  font-size: 13px;
}
.ct-bt-meta {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-bt-disc,
.ct-bt-err,
.ct-bt-loading {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}
.ct-bt-err {
  color: #d4535c;
}
.ct-bt-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.ct-bt-kpis > div {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}
.ct-bt-kpis span {
  font-size: 10px;
  color: var(--muted);
}
.ct-bt-kpis b {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.ct-bt-kpis b.pos { color: var(--up); }
.ct-bt-kpis b.neg { color: #d4535c; }
.ct-bt-spark {
  display: block;
  width: 100%;
  height: 56px;
  margin: 0 0 8px;
  color: var(--up);
}
.ct-bt-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 11px;
  max-height: 120px;
  overflow: auto;
}
.ct-bt-events li {
  line-height: 1.4;
}
.ct-bt-events .ct-bt-t {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}
.ct-bt-events b {
  font-weight: 650;
}
html[data-theme="dark"] .custom-train-bt-result {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: rgba(127, 222, 200, 0.05);
}
html[data-theme="dark"] .ct-bt-kpis > div {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .ct-bt-spark {
  color: #7fdec8;
}
@media (max-width: 720px) {
  .ct-bt-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.custom-train-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.custom-train-form {
  display: grid;
  gap: 12px;
}
.custom-train-params {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.custom-train-params label,
.custom-train-api-card label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}
.custom-train-params input:not(.pro-toggle),
.custom-train-api-card input:not(.pro-toggle),
.custom-train-form .pro-field input:not(.pro-toggle),
.custom-train-form .pro-field select {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
}
.custom-train-apis {
  display: grid;
  gap: 10px;
}
.custom-train-api-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
}
.custom-train-api-card b {
  font-size: 13px;
}
.custom-prod-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.custom-prod-editor-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.custom-prod-kind {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}
.custom-prod-kind.soft {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 500;
  color: var(--muted);
}
html[data-theme="dark"] .custom-prod-kind {
  background: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .custom-prod-kind.soft {
  background: rgba(255, 255, 255, 0.06);
}
.custom-prod-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.custom-prod-row-main span {
  font-size: 11px;
  color: var(--muted);
}
.custom-prod-row-acts {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
/* 产品编辑：官方目录风格 */


.fee-tip-modal.custom-prod-modal.custom-prod-drawer {
  z-index: 29000;
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-desk-pop {
  display: grid !important;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
}
.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-mobile-drawer {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  place-items: unset !important;
  padding: 0 !important;
}
#custom-prod-edit-layer.fee-tip-modal.custom-prod-modal.custom-prod-drawer,
#pro-ops-instances-sheet.fee-tip-modal.custom-prod-modal.custom-prod-drawer {
  touch-action: none;
}
#custom-prod-edit-layer.fee-tip-modal.custom-prod-modal.custom-prod-drawer .custom-prod-sheet,
#pro-ops-instances-sheet.fee-tip-modal.custom-prod-modal.custom-prod-drawer .custom-prod-sheet {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  min-width: 0;
  min-height: 0;
  max-height: min(86vh, calc(100vh - 32px));
  margin: 0;
  padding: 6px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: 0 20px 56px rgba(12, 22, 32, 0.22);
  background: var(--sheet, var(--panel, #fff));
  border-radius: 18px;
}
#custom-prod-edit-layer.fee-tip-modal.custom-prod-modal.custom-prod-drawer .custom-prod-sheet::-webkit-scrollbar,
#pro-ops-instances-sheet.fee-tip-modal.custom-prod-modal.custom-prod-drawer .custom-prod-sheet::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#custom-prod-edit-layer.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-desk-pop .custom-prod-sheet,
#pro-ops-instances-sheet.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-desk-pop .custom-prod-sheet {
  width: min(520px, calc(100vw - 32px));
  border-radius: 18px;
}
#custom-prod-edit-layer.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-mobile-drawer .custom-prod-sheet,
#pro-ops-instances-sheet.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-mobile-drawer .custom-prod-sheet {
  width: 100% !important;
  max-height: min(86vh, calc(100vh - 72px)) !important;
  border-radius: 18px 18px 0 0 !important;
  align-self: flex-end;
  animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -12px 40px rgba(12, 20, 28, 0.22);
}
.custom-prod-grab {
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  margin: 6px auto 8px;
  background: color-mix(in srgb, var(--ink, #111) 18%, transparent);
  flex-shrink: 0;
}
#custom-prod-edit-layer.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-mobile-drawer .custom-prod-grab,
#pro-ops-instances-sheet.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-mobile-drawer .custom-prod-grab {
  display: block;
}
.fee-tip-modal.custom-prod-modal .custom-prod-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 12px;
  flex-shrink: 0;
}
.fee-tip-modal.custom-prod-modal .custom-prod-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex: 1 1 auto;
  min-width: 0;
}
.custom-prod-head-end {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}
.custom-prod-head-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.custom-prod-head-add:hover,
.custom-prod-head-add:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
}
.custom-prod-head-add:active {
  opacity: 0.55;
}
.custom-prod-head-add-ico {
  display: block;
  margin-top: -2px;
}
.fee-tip-modal.custom-prod-modal .custom-prod-close {
  flex-shrink: 0;
}
.fee-tip-modal.custom-prod-modal .custom-prod-body {
  flex: 0 0 auto;
  overflow: visible;
  padding: 0 2px 4px;
}
.fee-tip-modal.custom-prod-modal.custom-prod-drawer.is-desk-pop .custom-prod-body {
  max-height: none;
}
.custom-prod-list {
  display: grid;
  gap: 10px;
}
.custom-prod-card {
  margin: 0;
  border: 1px solid rgba(19, 33, 46, 0.08);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.custom-prod-card.cp-swipe {
  padding: 0;
  background: transparent;
  border: none;
  overflow: visible;
}
.cp-swipe-track {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(19, 33, 46, 0.08);
  background: #fff;
}
.cp-swipe-actions {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  z-index: 0;
}
.cp-swipe-act {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 0 14px;
  border: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
.cp-swipe-act.is-edit {
  background: #2f7cf6;
}
.cp-swipe-act.is-ver {
  background: #1f9d63;
}
.cp-swipe-act.is-del {
  background: #e5484d;
}
.cp-swipe-act.is-reset {
  background: #d97706;
}
.cp-swipe-act:active {
  filter: brightness(0.92);
}
.cp-swipe-panel {
  position: relative;
  z-index: 1;
  transform: translateX(var(--cp-swipe-x, 0));
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  background: #fff;
  touch-action: pan-y;
  min-width: 0;
}
.cp-swipe.is-dragging .cp-swipe-panel {
  transition: none;
}
.cp-swipe.is-dragging .cp-swipe-panel,
.cp-swipe.is-dragging .cp-swipe-panel * {
  user-select: none;
  -webkit-user-select: none;
}
.custom-prod-card-face {
  padding: 14px 16px;
  min-width: 0;
}
button.custom-prod-card-face.custom-prod-inst-hit {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button.custom-prod-card-face.custom-prod-inst-hit:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 12px;
}
.custom-prod-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.custom-prod-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #5a6570;
  background: rgba(21, 32, 43, 0.06);
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.custom-prod-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  word-break: break-word;
}
.custom-prod-card-meta {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}
.custom-prod-ver-static {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--muted);
  cursor: default;
  user-select: none;
}
.custom-prod-link {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.custom-prod-link:hover {
  color: var(--ink);
}
.custom-prod-link.is-danger:hover {
  color: var(--danger, #d4535c);
}
.custom-prod-hist {
  border-top: 1px solid rgba(19, 33, 46, 0.06);
  padding: 10px 14px 12px;
  background: rgba(21, 32, 43, 0.02);
}
.fee-tip-modal.custom-prod-modal .custom-prod-empty {
  margin: 24px 0 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  text-align: center;
}
html[data-theme="dark"] .fee-tip-modal.custom-prod-modal .cp-swipe-track,
html[data-theme="dark"] .fee-tip-modal.custom-prod-modal .cp-swipe-panel {
  background: var(--panel-2, #151c24);
}
html[data-theme="dark"] .fee-tip-modal.custom-prod-modal .cp-swipe-track {
  border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .custom-prod-pill {
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .custom-prod-hist {
  background: rgba(0, 0, 0, 0.2);
  border-top-color: rgba(255, 255, 255, 0.08);
}
@media (max-width: 720px) {
  .binding-grid.is-custom-product,
  .custom-train-params {
    grid-template-columns: 1fr;
  }
}
/* 训练会话条 */


.custom-train-banner {
  margin: 0 0 12px;
}
.custom-train-banner[hidden] {
  display: none !important;
}
.custom-train-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
}
.custom-train-banner-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.custom-train-banner-text b {
  font-size: 13px;
  color: var(--up);
}
.custom-train-banner-text span {
  font-size: 11px;
  color: var(--muted);
}
.custom-train-banner-acts {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.custom-train-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 10px;
}
.custom-train-params label span {
  display: block;
  margin-bottom: 4px;
}
html[data-theme="dark"] .custom-train-banner-inner {
  border-color: rgba(127, 222, 200, 0.28);
  background: rgba(127, 222, 200, 0.1);
}
html[data-theme="dark"] .custom-train-banner-text b {
  color: #7fdec8;
}
html[data-theme="dark"] .custom-train-panel {
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .custom-train-foot {
  border-top-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .custom-train-api-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
html[data-theme="dark"] .custom-train-params input:not(.pro-toggle),
html[data-theme="dark"] .custom-train-api-card input:not(.pro-toggle),
html[data-theme="dark"] .custom-train-form .pro-field input:not(.pro-toggle),
html[data-theme="dark"] .custom-train-form .pro-field select {
  border-color: rgba(255, 255, 255, 0.1);
  color: #e8eef2;
  background: rgba(255, 255, 255, 0.04);
}
@media (max-width: 720px) {
  .custom-train-top,
  .custom-train-banner-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  .custom-train-form.is-simple .custom-train-top.is-simple.ct-api-row3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* 二期：受限规则链路 —— 页签跟参数设置同款中性分段 */


.ct-tabs {
  display: flex;
  gap: 6px;
  margin: 4px 0 10px;
}
.ct-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
}
.ct-tab.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.ct-graph-head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.ct-graph-head b {
  font-size: 13px;
}
.ct-graph-head span {
  font-size: 11px;
  color: var(--muted);
}
.ct-graph-head-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ct-market-mode {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.ct-market-mode select {
  font: inherit;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
}
.ct-market-hint {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}
.ct-node-acts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.ct-node-en {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.ct-node-en input {
  margin: 0;
}
.ct-node-req {
  font-size: 10px;
  font-weight: 750;
  color: var(--up);
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--chip-bg);
}
.ct-node-doc {
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--up);
  cursor: pointer;
}
.ct-graph-node.is-off {
  opacity: 0.48;
  filter: grayscale(0.25);
}
.ct-graph-node.is-off .ct-graph-idx {
  background: #8aa;
}
.ct-block-guide {
  margin-top: 10px;
}
.ct-block-guide[hidden] {
  display: none !important;
}
.ct-guide-card {
  border: 1px solid var(--line);
  background: var(--panel-2, #f4f7f9);
  border-radius: 12px;
  padding: 10px 12px;
}
.ct-guide-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ct-guide-card-head b {
  font-size: 13px;
}
.ct-guide-dl {
  margin: 0;
  display: grid;
  gap: 8px;
}
.ct-guide-dl > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
}
.ct-guide-dl dt {
  margin: 0;
  font-weight: 750;
  color: var(--up);
}
.ct-guide-dl dd {
  margin: 0;
  color: var(--text);
}
.ct-guide-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
html[data-theme="dark"] .ct-market-mode select {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e8eef2;
}
html[data-theme="dark"] .ct-guide-card {
  background: var(--panel-2);
  border-color: var(--line);
}
html[data-theme="dark"] .ct-guide-dl dt {
  color: var(--muted);
}
html[data-theme="dark"] .ct-node-doc {
  color: #7fdec8;
  border-color: rgba(127, 222, 200, 0.28);
  background: rgba(127, 222, 200, 0.08);
}
@media (max-width: 720px) {
  .ct-graph-head {
    flex-direction: column;
  }
  .ct-guide-dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
.ct-graph-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ct-graph-node {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 10px 12px;
}
.ct-graph-node-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ct-graph-idx {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--chip-bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ct-graph-titles {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.ct-graph-titles b {
  font-size: 13px;
}
.ct-graph-titles span {
  font-size: 11px;
  color: var(--muted);
}
.ct-graph-moves {
  display: flex;
  gap: 4px;
}
.ct-graph-moves .btn {
  min-width: 28px;
  padding: 2px 6px;
}
.ct-graph-params {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.ct-graph-param {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.ct-graph-param input,
.ct-graph-branch select {
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  background: var(--panel, #fff);
}
.ct-graph-branch {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.ct-graph-edge {
  width: 2px;
  height: 14px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--chip-bg), var(--chip-bg));
  border-radius: 2px;
}
.ct-graph-err {
  margin-top: 8px;
  color: var(--down);
  font-size: 12px;
}
html[data-theme="dark"] .ct-tab {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
html[data-theme="dark"] .ct-tab.on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
html[data-theme="dark"] .ct-graph-node {
  border-color: var(--line);
  background: var(--panel);
}
html[data-theme="dark"] .ct-graph-param input,
html[data-theme="dark"] .ct-graph-branch select {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e8eef2;
}
/* 二期：横向规则画布 */


.ct-graph-canvas-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 16px;
  margin: 0 -4px;
}
.ct-graph-wires {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 0;
}
.ct-graph-pipeline.is-canvas {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 28px;
  min-width: max-content;
  padding: 4px 8px;
}
.ct-graph-pipeline.is-canvas .ct-graph-node {
  width: 220px;
  flex: 0 0 220px;
}
.ct-graph-pipeline.is-canvas .ct-graph-params {
  grid-template-columns: 1fr;
}
/* 规则触发时间线（持仓卡） */


.ct-rule-timeline {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
}
/* 训练卡：记流程规则步进条，外观对齐对冲滚动 lh-cycle-progress */

.ct-rule-timeline.ct-rule-timeline--stepper,
.lh-cycle-progress.ct-rule-timeline--stepper {
  margin: 8px 0 12px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  position: relative;
  z-index: 4;
}
html[data-theme="dark"] .ct-rule-timeline.ct-rule-timeline--stepper {
  border: none;
  background: transparent;
}
.ct-rule-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ct-rule-head b { font-size: 12px; color: var(--up); }
.ct-rule-head span { font-size: 11px; color: var(--muted); }
.ct-rule-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.ct-rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  font-size: 11px;
  color: var(--up);
}
.ct-rule-chip b { font-weight: 800; }
.ct-rule-list { display: grid; gap: 6px; }
.ct-rule-row {
  display: grid;
  grid-template-columns: 64px 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  font-size: 11px;
}
.ct-rule-row time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ct-rule-row b { color: var(--up); }
.ct-rule-row span { color: var(--ink); opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-rule-row.warn b { color: #d4535c; }
.ct-rule-empty { margin: 0; font-size: 11px; color: var(--muted); }
html[data-theme="dark"] .ct-rule-timeline {
  border-color: rgba(127, 222, 200, 0.22);
  background: rgba(127, 222, 200, 0.06);
}
html[data-theme="dark"] .ct-rule-head b,
html[data-theme="dark"] .ct-rule-chip,
html[data-theme="dark"] .ct-rule-row b { color: #7fdec8; }
/* 二期：自由画布拖拽 + 锚点 */


.ct-graph-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.ct-graph-canvas-wrap.is-freeboard {
  min-height: 300px;
  max-height: min(52vh, 420px);
  overflow: auto;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 1px 1px, var(--chip-bg) 1px, transparent 0) 0 0 / 18px 18px;
}
.ct-graph-pipeline.is-freeboard {
  position: relative;
  display: block;
  min-width: 100%;
  min-height: 280px;
}
.ct-graph-node.is-free {
  position: absolute;
  width: 220px;
  margin: 0;
  box-shadow: 0 8px 24px rgba(15, 40, 36, 0.08);
  user-select: none;
  touch-action: none;
}
.ct-graph-node.is-dragging {
  opacity: 0.92;
  z-index: 5;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.ct-graph-drag {
  cursor: grab;
}
.ct-graph-node.is-dragging .ct-graph-drag {
  cursor: grabbing;
}
.ct-port {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  z-index: 2;
}
.ct-port-in {
  left: -7px;
  top: 22px;
}
.ct-port-out {
  right: -7px;
  top: 22px;
  cursor: crosshair;
}
.custom-prod-row {
  display: grid;
  gap: 8px;
}
.custom-prod-versions {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--chip-bg);
}
.custom-prod-ver-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.custom-prod-ver-empty {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
html[data-theme="dark"] .ct-graph-canvas-wrap.is-freeboard {
  border-color: rgba(127, 222, 200, 0.28);
  background:
    radial-gradient(circle at 1px 1px, rgba(127, 222, 200, 0.16) 1px, transparent 0) 0 0 / 18px 18px;
}
html[data-theme="dark"] .ct-port {
  border-color: #12171e;
}
/* 熔断若/否则分叉 */


.ct-graph-node.has-fork {
  padding-bottom: 8px;
}
.ct-fork {
  position: relative;
  margin-top: 10px;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ct-port-fork-yes,
.ct-port-fork-no {
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
}
.ct-port-fork-yes {
  left: 25%;
  background: #d4535c;
  box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.35);
}
.ct-port-fork-no {
  left: 75%;
  background: var(--ink);
}
.ct-fork-arm {
  display: grid;
  gap: 2px;
  padding: 8px 8px;
  border-radius: 10px;
  font-size: 11px;
  text-align: center;
  border: 1px solid transparent;
}
.ct-fork-arm i {
  font-style: normal;
  opacity: 0.7;
  font-size: 10px;
}
.ct-fork-arm b {
  font-size: 12px;
  font-weight: 800;
}
.ct-fork-arm.is-yes {
  border-color: rgba(192, 57, 43, 0.28);
  background: rgba(192, 57, 43, 0.08);
  color: #d4535c;
}
.ct-fork-arm.is-no {
  border-color: var(--line);
  background: var(--chip-bg);
  color: var(--up);
}
/* 积木高亮 */


.ct-graph-node.is-hl {
  border-color: var(--line) !important;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08), 0 12px 28px rgba(0,0,0,0.08);
  z-index: 4;
}
.ct-graph-node.is-hl-pulse {
  animation: ct-hl-pulse 0.9s ease-out 2;
}
@keyframes ct-hl-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
button.ct-rule-chip,
button.ct-rule-row {
  font: inherit;
  text-align: left;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--chip-bg);
  color: inherit;
  width: 100%;
}
button.ct-rule-chip {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--up);
}
button.ct-rule-row {
  display: grid;
  grid-template-columns: 64px 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 4px 6px;
  border-radius: 8px;
  background: transparent;
}
button.ct-rule-chip.is-on,
button.ct-rule-row.is-on {
  border-color: var(--line);
  background: var(--chip-bg);
}
html[data-theme="dark"] .ct-fork-arm.is-yes {
  color: #f0a0a8;
  border-color: rgba(240, 160, 168, 0.35);
  background: rgba(192, 57, 43, 0.16);
}
html[data-theme="dark"] .ct-fork-arm.is-no {
  color: #7fdec8;
}
html[data-theme="dark"] .ct-graph-node.is-hl {
  box-shadow: 0 0 0 2px rgba(127, 222, 200, 0.35), 0 12px 28px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] button.ct-rule-chip {
  color: #7fdec8;
  background: rgba(127, 222, 200, 0.1);
}
/* 自定义规则状态条 */


.ct-rule-status {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
}
.ct-rule-status-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.ct-rule-status-main b { font-weight: 800; color: var(--up); }
.ct-rule-status-main span { color: var(--muted); font-size: 11px; }
.ct-rule-cool {
  height: 4px;
  border-radius: 999px;
  background: var(--chip-bg);
  overflow: hidden;
}
.ct-rule-cool i {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: inherit;
}
.ct-rule-status.tone-warn {
  border-color: rgba(200, 140, 40, 0.35);
  background: rgba(200, 140, 40, 0.1);
}
.ct-rule-status.tone-warn .ct-rule-status-main b { color: #b07a10; }
.ct-rule-status.tone-danger {
  border-color: rgba(192, 57, 43, 0.35);
  background: rgba(192, 57, 43, 0.1);
}
.ct-rule-status.tone-danger .ct-rule-status-main b { color: #d4535c; }
.ct-rule-status.tone-cool .ct-rule-status-main b { color: #1a7a9b; }
.ct-rule-status.tone-cool .ct-rule-cool i { background: #1a7a9b; }
.ct-live-gate {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.ct-live-gate input { margin-top: 2px; }
html[data-theme="dark"] .ct-rule-status {
  border-color: rgba(127, 222, 200, 0.22);
  background: rgba(127, 222, 200, 0.06);
}
html[data-theme="dark"] .ct-rule-status-main b { color: #7fdec8; }
/* 操作记忆向导 + 画布删断线 */


.ct-mem-banner {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--up);
}
.ct-mem-banner.is-muted { color: var(--muted); }
.ct-node-act-row { display: flex; gap: 4px; }
.ct-node-del {
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(192, 57, 43, 0.35);
  background: rgba(192, 57, 43, 0.08);
  color: #d4535c;
  cursor: pointer;
}
.ct-wire-hit { pointer-events: stroke; }
.ct-mem {
  display: grid;
  gap: 12px;
}
.ct-mem-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ct-mem-step {
  font: inherit;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--muted);
  cursor: pointer;
}
.ct-mem-step.on {
  background: var(--ink);
  color: #fff;
  border-color: transparent;
}
.ct-mem-step.done {
  color: var(--up);
  border-color: var(--line);
}
.ct-mem-panel {
  border: 1px solid var(--line);
  background: var(--chip-bg);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}
.ct-mem-panel > b { font-size: 14px; }
.ct-mem-panel > p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text); }
.ct-mem-panel > p.is-muted { color: var(--muted); }
.ct-mem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ct-mem-grid label,
.ct-mem-note {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.ct-mem-grid input,
.ct-mem-grid select,
.ct-mem-note input {
  font: inherit;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
}
.ct-mem-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
}
.ct-mem-summary {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.ct-mem-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
html[data-theme="dark"] .ct-mem-panel {
  background: rgba(127, 222, 200, 0.05);
  border-color: rgba(255,255,255,0.1);
}
html[data-theme="dark"] .ct-mem-grid input,
html[data-theme="dark"] .ct-mem-grid select,
html[data-theme="dark"] .ct-mem-note input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  color: #e8eef2;
}
@media (max-width: 720px) {
  .ct-mem-grid { grid-template-columns: 1fr; }
}
/* 规则总览（流程/导图风） */


.ct-tab.is-quiet {
  opacity: 0.72;
  font-weight: 650;
}
.ct-rules {
  display: grid;
  gap: 10px;
}
.ct-rules-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.ct-rules-head b { font-size: 14px; }
.ct-rules-head span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ct-rules-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 20px 16px;
  display: grid;
  gap: 10px;
  justify-items: start;
}
.ct-rules-empty p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ct-rules-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
.ct-rules-arrow {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  padding: 2px 0;
}
.ct-rule-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}
.ct-rule-card.is-hl {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}
.ct-rule-card.is-hl-pulse {
  animation: ct-hl-pulse 1.2s ease;
}
.ct-rule-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ct-rule-card-head b { font-size: 13px; }
.ct-rule-card-head span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ct-rule-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ct-rule-fields label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.ct-rule-fields label.span2 { grid-column: span 2; }
.ct-rule-fields input,
.ct-rule-fields select {
  font: inherit;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
}
.ct-rule-more {
  font-size: 11px;
  color: var(--muted);
}
.ct-rule-more summary {
  cursor: pointer;
  color: var(--up);
  font-weight: 650;
}
.ct-rule-more p { margin: 6px 0 0; line-height: 1.45; }
.ct-rules-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
html[data-theme="dark"] .ct-rule-card {
  background: var(--panel);
  border-color: var(--line);
}
html[data-theme="dark"] .ct-rule-fields input,
html[data-theme="dark"] .ct-rule-fields select {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  color: #e8eef2;
}
@media (max-width: 720px) {
  .ct-rule-fields { grid-template-columns: 1fr; }
  .ct-rule-fields label.span2 { grid-column: auto; }
  .ct-rules-head { flex-direction: column; }
}

.custom-train-form.is-simple .custom-train-top.is-simple {
  grid-template-columns: 1fr;
  margin-bottom: 8px;
}
.custom-train-form.is-simple .custom-train-top.is-simple.ct-api-row3 {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel, #fff);
  box-shadow: 0 1px 0 var(--line);
}
.ct-api-row3 > .pro-field {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.ct-api-row3 .pro-field > input:not(.pro-toggle),
.ct-api-row3 .pro-field > select {
  width: 100%;
  box-sizing: border-box;
  background: var(--panel, #fff);
}
html[data-theme="dark"] .custom-train-form.is-simple .custom-train-top.is-simple.ct-api-row3 {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
}
.ct-acc-n-stepper {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: stretch;
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.ct-acc-n-stepper input {
  width: 100%;
  min-width: 0;
  height: 34px;
  margin: 0;
  padding: 0 4px;
  border: 0 !important;
  border-left: 1px solid var(--line) !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.ct-acc-n-stepper input::-webkit-outer-spin-button,
.ct-acc-n-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.ct-acc-n-btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--panel-2, #f4f7f9);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ct-acc-n-btn:hover:not(:disabled) {
  background: var(--chip-bg);
}
.ct-acc-n-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
html[data-theme="dark"] .ct-acc-n-stepper {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .ct-acc-n-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}
.ct-live-switch-field {
  display: grid;
  gap: 0;
  width: 100%;
  align-content: center;
}
.ct-live-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  min-height: 34px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 10px;
  background: var(--chip-bg);
}
.ct-live-seg-btn {
  border: 0;
  margin: 0;
  padding: 7px 6px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.ct-live-seg-btn.on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(21, 32, 43, 0.1);
}
.ct-live-seg-btn[data-ct-live="1"].on,
.ct-live-seg-btn[data-ct-gate-live="1"].on {
  color: var(--down, #d4535c);
}
html[data-theme="dark"] .ct-live-seg {
  background: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .ct-live-seg-btn.on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .ct-live-seg-btn[data-ct-live="1"].on,
html[data-theme="dark"] .ct-live-seg-btn[data-ct-gate-live="1"].on {
  color: #e8909c;
}
/* 旧 checkbox 开关样式保留兼容，训练窗已改分段 */

.ct-live-switch {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
}
.ct-live-switch .pro-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  min-width: 44px;
  min-height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, #8c8c8c 26%, #fff);
  box-shadow: none;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ct-live-switch .pro-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(21, 32, 43, 0.18);
  transition: transform 0.15s ease;
}
.ct-live-switch .pro-toggle:checked {
  background: var(--up);
}
.ct-live-switch .pro-toggle:checked::after {
  transform: translateX(18px);
}
.ct-live-switch em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.ct-live-switch .pro-toggle:checked + em {
  color: var(--teal);
}
html[data-theme="dark"] .ct-live-switch .pro-toggle {
  background: #3a3f46;
}
html[data-theme="dark"] .ct-live-switch .pro-toggle:checked {
  background: var(--up);
}
html[data-theme="dark"] .ct-live-switch .pro-toggle::after {
  background: #fff;
}
@media (max-width: 560px) {
  .custom-train-form.is-simple .custom-train-top.is-simple.ct-api-row3 {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}
.ct-rules-head.is-simple {
  align-items: center;
}
.ct-rules-head.is-simple b { font-size: 14px; }
.ct-rule-card.is-compact { padding: 8px 10px; gap: 6px; }
.ct-rule-card.is-compact .ct-rule-card-head b { font-size: 13px; }
.ct-rules-flow.is-simple .ct-rules-arrow { padding: 0; font-size: 12px; opacity: 0.55; }
.ct-live-gate.is-compact { margin: 6px 0 8px; font-size: 12px; }
.ct-api-simple { display: grid; gap: 8px; }
.custom-train-foot { gap: 8px; }
/* 自定义产品账户卡：与普通持仓卡同色，勿另套青绿描边 */


.holding.is-custom-product {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.holding.is-custom-product .holding-main {
  border: 1px solid var(--card-line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.holding.is-custom-product .ct-train-badge,
.ct-train-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  margin-right: 6px;
}
/* 工具风分段页签：对齐 .params-tabs */


.ct-tabs.ct-tabs-tool {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 3px;
  border-radius: 12px;
  background: #f4f7f9;
  border: 0;
  margin: 0 0 12px;
}
.ct-tabs.ct-tabs-tool .ct-tab {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 8px;
  box-shadow: none;
}
.ct-tabs.ct-tabs-tool .ct-tab.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.ct-env-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2, #f4f7f9);
}
.ct-env-bar-lab {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.ct-tabs-rules-only .ct-tab {
  cursor: default;
}
.custom-train-form.is-workflow-only .ct-tabs-rules-only {
  margin-bottom: 8px;
}
#custom-train-publish[hidden] {
  display: none !important;
}
.ct-api-add-unified {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: var(--panel-2, #f4f7f9);
}
.ct-api-add-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
}
.ct-api-add-open {
  width: 100%;
}
.ct-api-add-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: var(--panel-2, #f4f7f9);
}
.ct-api-add-fields[hidden] {
  display: none !important;
}
@media (max-width: 520px) {
  .ct-api-add-fields {
    grid-template-columns: 1fr;
  }
}
.ct-api-eq {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
/* 记流程 · 训练账户卡 */


.ct-mem-ops { display: grid; gap: 10px; }
.ct-mem-ops-lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.ct-train-card { cursor: default; }
.ct-train-exposure {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.ct-train-exposure > div {
  background: var(--chip-bg);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 2px;
}
.ct-train-exposure span { font-size: 11px; color: var(--muted); }
.ct-train-exposure b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ct-train-acts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ct-train-acts .btn { width: 100%; justify-content: center; }
.ct-train-op-form {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
}
.ct-op-form-inner { display: grid; gap: 8px; }
.ct-op-form-acts { display: flex; justify-content: flex-end; gap: 8px; }
.ct-mem-check {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ct-mem-check span {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--line);
}
.ct-mem-check span.on {
  color: var(--teal);
  background: var(--chip-bg);
  border-color: var(--line);
}
.ct-mem-ops-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 11px;
  max-height: 120px;
  overflow: auto;
}
.ct-mem-ops-log li {
  display: flex;
  gap: 6px;
  align-items: baseline;
  color: var(--ink);
}
.ct-mem-ops-log li span { color: var(--muted); margin-left: auto; }
.ct-mem-ops-log li.muted { color: var(--muted); }
.ct-mem-ops-log em.ct-mem-atom {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--line, #ccc) 80%, transparent);
  padding: 0 5px;
  border-radius: 3px;
  flex: 0 0 auto;
}
/* 思维导图 */


.ct-mindmap .ct-mm-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.ct-mindmap .ct-mm-head b { font-size: 14px; }
.ct-mindmap .ct-mm-head span { font-size: 11px; color: var(--muted); }
.ct-rules.ct-mindmap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  /* 分辨率自适应：字号 / 工作栏宽随视口缩放 */
  --ct-mm-fs: clamp(11px, 0.55vw + 9px, 14px);
  --ct-mm-fs-sm: clamp(10px, 0.45vw + 8px, 12.5px);
  --ct-mm-fs-xs: clamp(9px, 0.35vw + 7.5px, 11px);
  --ct-mm-fs-title: clamp(11px, 0.5vw + 9px, 13.5px);
  --ct-mm-dock-w: clamp(196px, 16.5vw, 280px);
  --ct-mm-chip-h: clamp(28px, 2.2vh + 18px, 36px);
  --ct-mm-node-min-w: clamp(76px, 6.5vw, 108px);
  --ct-mm-node-max-w: clamp(112px, 9.5vw, 148px);
  --ct-mm-node-pad-y: clamp(6px, 0.55vh + 4px, 10px);
  --ct-mm-node-pad-x: clamp(8px, 0.55vw + 5px, 12px);
  container-type: size;
  container-name: ct-mm;
}
/* 大屏桌面：略放大导图 UI，避免 27"+ 上字过小 */

@media (min-width: 1440px) {
  .ct-rules.ct-mindmap,
  .custom-train-panel {
    --ct-mm-fs: clamp(12.5px, 0.5vw + 9px, 15.5px);
    --ct-mm-fs-sm: clamp(11px, 0.4vw + 8px, 13.5px);
    --ct-mm-fs-xs: clamp(10px, 0.3vw + 8px, 12px);
    --ct-mm-dock-w: clamp(230px, 15vw, 300px);
  }
}
/* 小笔记本：收紧工作栏，留给画布 */

@media (max-width: 1100px) and (min-width: 721px) {
  .ct-rules.ct-mindmap,
  .custom-train-panel {
    --ct-mm-dock-w: clamp(180px, 22vw, 220px);
    --ct-mm-fs: clamp(10.5px, 0.7vw + 7px, 13px);
    --ct-mm-fs-sm: clamp(9.5px, 0.55vw + 7px, 11.5px);
  }
}
.ct-mm-board {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2, #f4f7f9);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  --mm-scale: 1;
  --mm-fit: 1;
  /* 微斜抬升：画布模块略明显，工作栏芯片更淡 */
  --ct-mm-elev: 1px 2px 4px rgba(15, 23, 32, 0.14), 2px 5px 12px rgba(15, 23, 32, 0.08);
  --ct-mm-elev-atom: 1px 2px 3px rgba(15, 23, 32, 0.11), 1px 3px 8px rgba(15, 23, 32, 0.06);
  --ct-mm-elev-chip: 1px 1px 0 rgba(15, 23, 32, 0.04), 1px 2px 5px rgba(15, 23, 32, 0.07);
}
html[data-theme="dark"] .ct-mm-board {
  --ct-mm-elev: 1px 2px 6px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(255, 255, 255, 0.05);
  --ct-mm-elev-atom: 1px 2px 5px rgba(0, 0, 0, 0.36);
  --ct-mm-elev-chip: 0 1px 3px rgba(0, 0, 0, 0.28);
}
.ct-mm-board.is-panning {
  cursor: grabbing;
}
.ct-mm-fs {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 8;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.72;
}
.ct-mm-board-tr {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ct-mm-board-tr .ct-mm-fs {
  position: static;
  top: auto;
  right: auto;
}
.ct-mm-mark {
  font-variant-numeric: tabular-nums;
  font-size: var(--ct-mm-fs-sm, 12px);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--muted);
  max-width: 7.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.ct-mm-mark.is-up { color: var(--up, #16a34a); }
.ct-mm-mark.is-down { color: var(--down, #dc2626); }
.ct-mm-fs svg {
  width: 18px;
  height: 18px;
  display: block;
}
.ct-mm-fs:hover {
  background: transparent;
  opacity: 1;
}
.ct-mm-board.is-board-fs {
  position: fixed;
  inset: 0;
  z-index: 12080;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border-radius: 0;
  border: 0;
  flex: none;
}
html.ct-mm-board-fs-lock,
html.ct-mm-board-fs-lock body {
  overflow: hidden;
}
.ct-mm-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
  /* 无限画布：节点/线可超出舞台盒，靠平移缩放查看 */
  overflow: visible;
}
.ct-mm-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.ct-mm-wire {
  stroke: rgba(21, 32, 43, 0.16);
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}
.ct-mm-wire.is-main {
  /* 白天：钢灰主链，与墨色模块同族；青绿只留给选中态 */
  stroke: rgba(21, 32, 43, 0.38);
  stroke-width: 0.82;
  vector-effect: non-scaling-stroke;
}
/* 主链分色（与角标 1–6 对齐）：交叉时按色认线 */

.ct-mm-wire.is-main.is-lane-1 { stroke: #334155; }
.ct-mm-wire.is-main.is-lane-2 { stroke: #475569; }
.ct-mm-wire.is-main.is-lane-3 { stroke: #b45309; }
.ct-mm-wire.is-main.is-lane-4 { stroke: #9f1239; }
.ct-mm-wire.is-main.is-lane-5 { stroke: #5b21b6; }
.ct-mm-wire.is-main.is-lane-6 { stroke: #1d4ed8; }
.ct-mm-wire-arrow.is-main.is-lane-1 { fill: #334155; }
.ct-mm-wire-arrow.is-main.is-lane-2 { fill: #475569; }
.ct-mm-wire-arrow.is-main.is-lane-3 { fill: #b45309; }
.ct-mm-wire-arrow.is-main.is-lane-4 { fill: #9f1239; }
.ct-mm-wire-arrow.is-main.is-lane-5 { fill: #5b21b6; }
.ct-mm-wire-arrow.is-main.is-lane-6 { fill: #1d4ed8; }
.ct-mm-edge-hub.is-lane-1 .ct-mm-pri-badge { background: #334155; color: #fff; }
.ct-mm-edge-hub.is-lane-2 .ct-mm-pri-badge { background: #475569; color: #fff; }
.ct-mm-edge-hub.is-lane-3 .ct-mm-pri-badge { background: #b45309; color: #fff; }
.ct-mm-edge-hub.is-lane-4 .ct-mm-pri-badge { background: #9f1239; color: #fff; }
.ct-mm-edge-hub.is-lane-5 .ct-mm-pri-badge { background: #5b21b6; color: #fff; }
.ct-mm-edge-hub.is-lane-6 .ct-mm-pri-badge { background: #1d4ed8; color: #fff; }
/* 悬停模块/🔗：高亮本线，压暗其它 */

.ct-mm-board.is-wire-focus .ct-mm-wire.is-main:not(.is-wire-hot),
.ct-mm-board.is-wire-focus .ct-mm-wire.is-expand:not(.is-wire-hot) {
  opacity: 0.14;
}
.ct-mm-board.is-wire-focus .ct-mm-wire-arrow:not(.is-wire-hot) {
  opacity: 0.14;
}
.ct-mm-board.is-wire-focus .ct-mm-edge-hub:not(.is-wire-hot) {
  opacity: 0.32;
}
.ct-mm-board.is-wire-focus .ct-mm-wire.is-wire-hot {
  opacity: 1;
  stroke-width: 1.35;
}
.ct-mm-board.is-wire-focus .ct-mm-wire-arrow.is-wire-hot {
  opacity: 1;
}
.ct-mm-board.is-wire-focus .ct-mm-edge-hub.is-wire-hot {
  opacity: 1;
  z-index: 6;
}
.ct-mm-wire.is-expand {
  /* 展开原子连线：虚线、钢灰系（勿跟原子绿框同色） */
  stroke: rgba(21, 32, 43, 0.42);
  stroke-width: 0.92;
  stroke-dasharray: 1.6 1.1;
  vector-effect: non-scaling-stroke;
}
.ct-mm-wire-arrow.is-main {
  /* 实心三角：勿半透明，否则线穿尖端会透出像空心 */
  fill: #15202b;
  stroke: none;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.ct-mm-wire.on {
  stroke: var(--teal);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}
.ct-mm-wire.on + .ct-mm-wire-arrow,
.ct-mm-wire.on ~ .ct-mm-wire-arrow[data-eid] {
  fill: var(--teal);
}
.ct-mm-board-acts {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 72px;
  max-width: calc(100% - 16px);
  pointer-events: auto;
}
.ct-mm-board-acts > .ct-mm-act {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.ct-mm-board-acts > .ct-mm-act.main {
  background: var(--teal, #1a9b7a);
  color: #fff;
  box-shadow: none;
  font-weight: 700;
}
.ct-mm-act {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.ct-mm-act.soft {
  background: var(--panel);
  color: var(--ink);
}
.ct-mm-act.main {
  background: var(--ink, #15202b);
  color: #fff;
  border-color: transparent;
}
.ct-mem-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ct-rules-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}
.ct-api-simple .custom-train-api-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 10px 12px;
}
.ct-api-simple .custom-train-api-card b {
  color: var(--ink);
  font-size: 12px;
}
.ct-api-bound {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.ct-api-bound.muted { opacity: 0.85; }
.pos-learn-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.pos-learn-q {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pos-learn-q svg {
  width: 16px;
  height: 16px;
  display: block;
}
.pos-learn-q:hover,
.pos-learn-q[aria-expanded="true"] {
  color: var(--teal, var(--up));
}
.pos-learn-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(280px, 72vw);
  pointer-events: auto;
}
.pos-learn-pop[hidden] { display: none !important; }
.pos-learn-pop-card {
  position: relative;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel, #fff);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}
.pos-learn-pop-arrow {
  position: absolute;
  left: 10px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: var(--panel, #fff);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.pos-learn-pop-txt {
  margin: 0;
  color: var(--ink);
}
html[data-theme="dark"] .pos-learn-pop-card {
  background: #15202b;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .pos-learn-pop-arrow {
  background: #15202b;
  border-color: rgba(255, 255, 255, 0.12);
}
.pos-learn-banner {
  display: none !important;
}
.ct-mem-guide-card {
  padding: 12px;
  margin: 0;
}
.ct-mem-guide-steps {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}
/* 记流程引导卡内动作：右下角紧凑按钮，无分割线 */

.ct-mem-card-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.ct-mem-act {
  appearance: none;
  margin: 0;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.ct-mem-act.soft {
  background: transparent;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--line, #c5d0d8) 90%, transparent);
}
.ct-mem-act.soft:hover {
  background: var(--chip-bg);
  border-color: var(--line);
  color: var(--teal, var(--up));
}
.ct-mem-act.main {
  background: var(--chip-bg);
  color: var(--teal, var(--up));
  border-color: var(--line);
}
.ct-mem-act.main:hover:not(:disabled) {
  background: var(--chip-bg);
  border-color: var(--line);
}
.ct-mem-act:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
html[data-theme="dark"] .ct-mem-act.soft {
  border-color: rgba(255, 255, 255, 0.14);
  color: #d7e2ea;
}
html[data-theme="dark"] .ct-mem-act.soft:hover {
  background: rgba(127, 222, 200, 0.08);
  border-color: rgba(127, 222, 200, 0.32);
  color: #9fe8d6;
}
html[data-theme="dark"] .ct-mem-act.main {
  background: rgba(127, 222, 200, 0.12);
  color: #9fe8d6;
  border-color: rgba(127, 222, 200, 0.28);
}
html[data-theme="dark"] .ct-mem-act.main:hover:not(:disabled) {
  background: rgba(127, 222, 200, 0.2);
  border-color: rgba(127, 222, 200, 0.42);
}
.ct-mem-foot-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
}
html[data-theme="dark"] .pos-learn-banner {
  display: none !important;
}
.ct-mm-dock {
  /* 与「记流程 / 看规则 / 填密钥」分段轨道同色（.ct-tabs.ct-tabs-tool） */
  --ct-mm-dock-bg: #f4f7f9;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--ct-mm-dock-w, min(248px, 82vw));
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: 0 14px 14px 0;
  border: 1px solid var(--line);
  border-left: 0;
  background: var(--ct-mm-dock-bg);
  box-shadow: 8px 0 28px rgba(15, 23, 32, 0.12);
  overflow: hidden;
  transition: width 0.18s ease;
  font-size: var(--ct-mm-fs-sm, 11px);
}
.ct-mm-dock.is-collapsed {
  top: 8px;
  left: 8px;
  bottom: auto;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}
.ct-mm-dock.is-collapsed .ct-mm-dock-head {
  justify-content: center;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  background: transparent;
  pointer-events: auto;
}
.ct-mm-dock.is-collapsed .ct-mm-menu {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 1;
}
.ct-mm-dock.is-collapsed .ct-mm-menu:hover,
.ct-mm-dock.is-collapsed .ct-mm-menu:active,
.ct-mm-dock.is-collapsed .ct-mm-menu:focus,
.ct-mm-dock.is-collapsed .ct-mm-menu:focus-visible {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}
.ct-mm-dock[hidden] { display: none !important; }
.ct-mm-dock-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--ct-mm-dock-bg);
}
.ct-mm-dock-title {
  font-size: var(--ct-mm-fs-title, 12px);
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}
.ct-mm-dock-sym-slot {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  min-width: 0;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}
.ct-mm-dock.is-collapsed .ct-mm-dock-sym-slot,
.ct-mm-dock.is-collapsed .ct-mm-dock-sym-slot .custom-train-head-sym,
.custom-train-head-sym.is-dock-collapsed {
  display: none !important;
}
.ct-mm-dock-title + .ct-mm-dock-sym-slot .custom-train-head-sym.is-on-dock-head,
.custom-train-head-sym.is-on-dock-head {
  margin-left: 0;
  width: auto;
  max-width: none;
}
.custom-train-head-sym.is-on-dock-head .custom-train-sym-hit,
.custom-train-panel.is-page .ct-mm-dock-sym-slot .custom-train-head-sym .custom-train-sym-hit {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  max-width: none;
  height: 28px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  padding: 0 8px;
  border-radius: 8px;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.custom-train-head-sym.is-on-dock-head .pro-ops-symbol-base {
  flex: 0 0 auto;
  line-height: 1;
  white-space: nowrap;
}
.custom-train-head-sym.is-on-dock-head .pro-ops-sym-kind,
.custom-train-head-sym.is-on-page-head .pro-ops-sym-kind {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 16px;
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 0 4px;
}
.custom-train-head-sym.is-on-dock-head .pro-ops-chev {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
  transform: none;
}
.custom-train-head-sym.is-on-dock-head select {
  height: 24px;
  width: 100%;
  max-width: 124px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.02em;
  padding: 0 14px 0 6px;
  border-radius: 7px;
}
.ct-mm-dock.is-collapsed .ct-mm-dock-title {
  display: none;
}
.ct-mm-menu {
  position: static;
  flex: 0 0 auto;
  top: auto;
  left: auto;
  z-index: 1;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.85;
}
.ct-mm-menu svg { width: 18px; height: 18px; display: block; }
.ct-mm-menu:hover,
.ct-mm-menu:active,
.ct-mm-menu:focus,
.ct-mm-menu:focus-visible {
  opacity: 1;
  background: transparent;
  box-shadow: none;
  outline: none;
}
.ct-mm-dock-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--ct-mm-dock-bg);
  scrollbar-width: none; /* Firefox：隐藏条，仍可滚 */
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.ct-mm-dock-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.ct-mm-dock.is-collapsed .ct-mm-dock-scroll {
  display: none;
}
.ct-mm-dock-modes,
.ct-mm-dock-body[data-dock="tree"] {
  display: none !important;
}
.ct-mm-mode {
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}
.ct-mm-mode.on {
  background: var(--ct-mm-dock-bg);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 32, 0.12);
}
.ct-mm-dock-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ct-mm-sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 2px 8px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.ct-mm-sec:last-child,
.ct-mm-sec-foot {
  border-bottom: 0;
}
.ct-mm-sec-foot {
  padding: 6px 2px 2px;
  gap: 6px;
}
.ct-mm-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 22px;
}
.ct-mm-sec-toggle {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.ct-mm-sec-chev {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent var(--muted);
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}
.ct-mm-sec:not(.is-folded) .ct-mm-sec-chev {
  transform: rotate(90deg);
}
.ct-mm-sec.is-folded .ct-mm-sec-body {
  display: none;
}
.ct-mm-sec-title {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ct-mm-help-dialog-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
  white-space: pre-wrap;
}
.ct-mm-dock .ct-mm-dock-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.ct-mm-dock .ct-mm-q {
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.75;
  flex: 0 0 auto;
  cursor: help;
}
.ct-mm-dock .ct-mm-q:hover,
.ct-mm-dock .ct-mm-q.on {
  opacity: 1;
}
.ct-mm-dock-h {
  margin-top: 4px;
  font-size: var(--ct-mm-fs-xs, 11px);
  font-weight: 700;
  color: var(--muted);
}
.ct-mm-chip-grid,
.ct-mm-palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ct-mm-chip-grid-3 {
  grid-template-columns: 1fr;
}
.ct-mm-pal-item {
  font: inherit;
  font-size: var(--ct-mm-fs-sm, 11px);
  font-weight: 650;
  min-height: var(--ct-mm-chip-h, 32px);
  padding: clamp(5px, 0.5vh + 3px, 8px) clamp(6px, 0.5vw + 4px, 10px);
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel, #fff);
  color: var(--ink);
  cursor: grab;
  text-align: center;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--ct-mm-elev-chip);
}
.ct-mm-pal-item:hover {
  border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
  box-shadow: 1px 2px 6px rgba(15, 23, 32, 0.1);
}
.ct-mm-pal-item:active { cursor: grabbing; }
.ct-mm-pal-item.on,
.ct-mm-fam.on,
.ct-mm-tpl.on {
  /* 白天选中：深底白字（勿用 var(--ink)，夜间 ink 是浅色会整块发白） */
  background: #15202b;
  color: #ffffff;
  border-color: transparent;
  cursor: pointer;
  box-shadow: 1px 2px 5px rgba(15, 23, 32, 0.18);
}
html[data-theme="dark"] .ct-mm-dock .ct-mm-pal-item.on,
html[data-theme="dark"] .ct-mm-board .ct-mm-pal-item.on,
html[data-theme="dark"] .ct-mm-dock .ct-mm-fam.on,
html[data-theme="dark"] .ct-mm-board .ct-mm-fam.on,
html[data-theme="dark"] .ct-mm-dock .ct-mm-tpl.on,
html[data-theme="dark"] .ct-mm-board .ct-mm-tpl.on {
  /* 夜间选中：柔和抬升，勿白底黑字 */
  background: rgba(255, 255, 255, 0.14) !important;
  color: #f4f7fb !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), var(--ct-mm-elev-chip);
}
.ct-mm-tpl,
.ct-mm-fam {
  cursor: pointer;
}
.ct-mm-status {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px dashed var(--line);
  background: transparent;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ct-mm-dock-tip {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: var(--muted);
}
.ct-mm-gate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}
.ct-mm-gate-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ct-mm-gate-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.ct-mm-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  cursor: pointer;
  margin: 0;
}
.ct-mm-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.ct-mm-switch-track {
  position: relative;
  display: block;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, #8c8c8c 26%, #fff);
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.ct-mm-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 32, 0.25);
  transition: transform 0.16s ease;
}
.ct-mm-switch input:checked + .ct-mm-switch-track {
  background: var(--ink);
  border-color: transparent;
}
.ct-mm-switch input:checked + .ct-mm-switch-track .ct-mm-switch-thumb {
  transform: translateX(14px);
}
.ct-mm-switch input:focus-visible + .ct-mm-switch-track {
  outline: 2px solid rgba(0, 0, 0, 0.28);
  outline-offset: 2px;
}
html[data-theme="dark"] .ct-mm-switch input:focus-visible + .ct-mm-switch-track {
  outline-color: rgba(255, 255, 255, 0.35);
}
.ct-mm-gate-legend {
  display: none;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 2px;
}
.ct-mm-gate-sec.is-on .ct-mm-gate-legend {
  display: flex;
}
.ct-mm-gate-env-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.ct-mm-gate-env-wrap .ct-live-seg {
  width: 100%;
}
.ct-mm-gate-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}
.ct-mm-gate-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.ct-mm-gate-dot.is-on::before { background: var(--ct-mm-gate-on); }
.ct-mm-gate-dot.is-wait::before { background: #c4a035; }
.ct-mm-gate-dot.is-off::before { background: #8a8a8a; }
/* 允许态：外扩描边（box-shadow 外圈）+ 轻投影，不占模块内边框 */

.ct-mm-gate-mode .ct-mm-node.is-gate-on:not(.is-atom-child),
.ct-mm-gate-mode .ct-mm-tree-item.is-gate-on {
  border-width: 1px;
  border-style: solid;
  border-color: rgba(21, 32, 43, 0.12);
  box-shadow: 0 0 0 3px var(--ct-mm-gate-on), var(--ct-mm-elev);
  background: #3d4a5c;
  color: #ffffff;
}
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-on {
  /* 原子：贴边虚线绿框（白天略粗于配方实环观感） */
  background: #5f6467;
  color: #ffffff;
  border-width: 3px;
  border-style: dashed;
  border-color: var(--ct-mm-gate-on);
  box-shadow: var(--ct-mm-elev-atom);
  outline: none;
  opacity: 1;
}
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-wait {
  background: #5f6467;
  color: #ffffff;
  border-width: 3px;
  border-style: dashed;
  border-color: #c4a035;
  box-shadow: var(--ct-mm-elev-atom);
  outline: none;
  opacity: 1;
}
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-on .ct-mm-node-t,
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-wait .ct-mm-node-t {
  color: #ffffff;
}
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-on .ct-mm-node-sub,
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-wait .ct-mm-node-sub {
  color: rgba(255, 255, 255, 0.9);
}
.ct-mm-gate-mode .ct-mm-node.is-gate-wait:not(.is-atom-child),
.ct-mm-gate-mode .ct-mm-tree-item.is-gate-wait {
  border-width: 1px;
  border-style: solid;
  border-color: rgba(21, 32, 43, 0.12);
  box-shadow: 0 0 0 3px #c4a035, var(--ct-mm-elev);
  background: #3d4a5c;
  color: #ffffff;
}
.ct-mm-gate-mode .ct-mm-node.is-gate-off:not(.is-atom-child),
.ct-mm-gate-mode .ct-mm-tree-item.is-gate-off {
  opacity: 0.5;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(21, 32, 43, 0.12);
  box-shadow: 0 0 0 2.5px #8a8a8a, var(--ct-mm-elev);
  background: #3d4a5c;
}
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-off {
  opacity: 0.5;
  border-width: 3px;
  border-style: dashed;
  border-color: #8a8a8a;
  box-shadow: var(--ct-mm-elev-atom);
  outline: none;
  background: #5f6467;
  color: #ffffff;
}
/* 折叠展开钮：允许态下也不许变绿 */

.ct-mm-gate-mode .ct-mm-node .ct-mm-node-exp,
.ct-mm-gate-mode .ct-mm-node.is-gate-on .ct-mm-node-exp,
.ct-mm-gate-mode .ct-mm-node.is-gate-wait .ct-mm-node-exp,
.ct-mm-gate-mode .ct-mm-node.is-gate-off .ct-mm-node-exp {
  background: #556275 !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #ffffff !important;
}
.ct-mm-gate-mode .ct-mm-node .ct-mm-node-exp:hover,
.ct-mm-gate-mode .ct-mm-node .ct-mm-node-exp:focus-visible {
  background: #6a788a !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #ffffff !important;
}
/* 允许态：连线 / 箭头 一律不跟绿黄灰，保持分色车道原色 */

.ct-mm-gate-mode .ct-mm-wire.is-gate-on,
.ct-mm-gate-mode .ct-mm-wire.is-main.is-gate-on,
.ct-mm-gate-mode .ct-mm-wire.is-expand.is-gate-on,
.ct-mm-gate-mode .ct-mm-wire.is-gate-wait,
.ct-mm-gate-mode .ct-mm-wire.is-main.is-gate-wait,
.ct-mm-gate-mode .ct-mm-wire.is-expand.is-gate-wait,
.ct-mm-gate-mode .ct-mm-wire.is-gate-off,
.ct-mm-gate-mode .ct-mm-wire.is-main.is-gate-off,
.ct-mm-gate-mode .ct-mm-wire.is-expand.is-gate-off {
  opacity: 1;
}
.ct-mm-gate-mode .ct-mm-wire-arrow.is-gate-on,
.ct-mm-gate-mode .ct-mm-wire-arrow.is-main.is-gate-on,
.ct-mm-gate-mode .ct-mm-wire-arrow.is-gate-wait,
.ct-mm-gate-mode .ct-mm-wire-arrow.is-main.is-gate-wait,
.ct-mm-gate-mode .ct-mm-wire-arrow.is-gate-off,
.ct-mm-gate-mode .ct-mm-wire-arrow.is-main.is-gate-off {
  opacity: 1;
  stroke: none;
}
/* 允许态：🔗 一律无绿/黄/灰外框（白天夜间一致） */

.ct-mm-gate-mode .ct-mm-edge-hub.is-gate-on:not(.is-expand-hub),
.ct-mm-gate-mode .ct-mm-edge-hub.is-gate-wait:not(.is-expand-hub),
.ct-mm-gate-mode .ct-mm-edge-hub.is-gate-off:not(.is-expand-hub) {
  box-shadow: 0 0 0 1px var(--line);
}
.ct-mm-gate-mode .ct-mm-edge-hub.is-gate-off:not(.is-expand-hub) {
  opacity: 0.5;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-edge-hub.is-gate-on:not(.is-expand-hub),
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-edge-hub.is-gate-wait:not(.is-expand-hub),
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-edge-hub.is-gate-off:not(.is-expand-hub) {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-edge-hub.is-gate-off:not(.is-expand-hub) {
  opacity: 0.5;
}
.ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub,
.ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub.is-gate-on,
.ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub.is-gate-wait,
.ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub.is-gate-off {
  /* 展开边 🔗：可见圆钮，但不带绿/黄/灰描边 */
  box-shadow: 0 0 0 1px var(--line);
  opacity: 0.92;
  background: var(--panel);
  color: var(--ink);
}
.ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub:hover {
  opacity: 1;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub.is-gate-on,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub.is-gate-wait,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-edge-hub.is-expand-hub.is-gate-off {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
  background: #3a4554;
  color: #e6edf4;
  opacity: 0.92;
}
html[data-theme="dark"] .ct-mm-switch input:not(:checked) + .ct-mm-switch-track {
  background: #3a3f46;
  border-color: transparent;
}
html[data-theme="dark"] .ct-mm-switch-thumb {
  background: #fff;
}
.ct-mm-edge-hub {
  position: absolute;
  z-index: 3;
  /* 已在 .ct-mm-stage 的 scale 内，跟节点同缩；勿再乘 1/--mm-scale */
  transform: translate(-50%, -50%);
  transform-origin: center center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ct-mm-edge-hub.is-expand-hub {
  width: 18px;
  height: 18px;
  opacity: 0.92;
  z-index: 2;
  /* 与主链 🔗 同族圆钮，仅更小、无角标；勿做成「透明幽灵」 */
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
}
.ct-mm-edge-hub.is-expand-hub:hover {
  opacity: 1;
  z-index: 4;
}
.ct-mm-edge-hub svg { width: 12px; height: 12px; display: block; }
.ct-mm-edge-hub.is-expand-hub svg { width: 10px; height: 10px; }
.ct-mm-node {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: var(--ct-mm-node-min-w, 88px);
  max-width: var(--ct-mm-node-max-w, 130px);
  padding: var(--ct-mm-node-pad-y, 8px) var(--ct-mm-node-pad-x, 10px);
  border-radius: 12px;
  border: 1px solid rgba(21, 32, 43, 0.1);
  /* 白天：配方模块略提亮（勿纯黑，否则允许态绿框不显） */
  background: #3d4a5c;
  color: #ffffff;
  box-shadow: var(--ct-mm-elev);
  cursor: grab;
  text-align: center;
  font: inherit;
  display: grid;
  gap: 2px;
  z-index: 2;
  user-select: none;
  touch-action: none;
}
.ct-mm-node.is-link,
.ct-mm-node.is-sel {
  /* 选中/连线态 = 允许态 is-gate-on：同色同粗（2px var(--ct-mm-gate-on)），用边框不用 outline */
  outline: none;
  box-shadow: var(--ct-mm-elev);
  border-width: 2px;
  border-style: solid;
  border-color: var(--ct-mm-gate-on);
}
html[data-theme="dark"] .ct-mm-node.is-link,
html[data-theme="dark"] .ct-mm-node.is-sel {
  outline: none;
  box-shadow: var(--ct-mm-elev);
  border-width: 2px;
  border-style: solid;
  border-color: var(--ct-mm-gate-on);
}
/* 允许态开着时选中仍保持同一绿框（盖过 gate-off 灰框） *//* 允许态开着时选中仍用外扩绿环（勿改回内边框） */


.ct-mm-gate-mode .ct-mm-node.is-link,
.ct-mm-gate-mode .ct-mm-node.is-sel {
  outline: none;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(21, 32, 43, 0.12);
  box-shadow: 0 0 0 3px var(--ct-mm-gate-on), var(--ct-mm-elev);
  opacity: 1;
}
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-link,
.ct-mm-gate-mode .ct-mm-node.is-atom-child.is-sel {
  border-width: 3px;
  border-style: dashed;
  border-color: var(--ct-mm-gate-on);
  box-shadow: var(--ct-mm-elev-atom);
  outline: none;
}
.ct-mm-node.is-ai-diff {
  outline: 2px solid rgba(37, 99, 235, 0.75);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22), var(--ct-mm-elev);
  animation: ct-ai-diff-pulse 1.2s ease-in-out 2;
  z-index: 4;
}
@keyframes ct-ai-diff-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), var(--ct-mm-elev);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.32), var(--ct-mm-elev);
  }
}
.ct-mm-node.is-off { opacity: 0.55; }
/* 子原子：白天底板 = 品种下拉展开面同色（比配方 #3d4a5c 浅）；浅虚线（绿框留给允许态） */

.ct-mm-node.is-atom-child {
  border-style: dashed;
  border-width: 1px;
  border-color: rgba(21, 32, 43, 0.22);
  background: #5f6467;
  color: #ffffff;
  box-shadow: var(--ct-mm-elev-atom);
  max-width: 110px;
  min-width: 76px;
  padding: 6px 8px;
  opacity: 1;
}
.ct-mm-node.is-expanded {
  box-shadow: 0 0 0 1px color-mix(in srgb, #1a2330 28%, transparent), var(--ct-mm-elev);
}
.ct-mm-node-exp {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  /* 白天：跟提亮后的配方底板同族，勿再纯黑融进卡片 */
  background: #556275;
  color: #ffffff;
  font-size: 11px;
  line-height: 20px;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 1px 2px rgba(15, 23, 32, 0.12);
}
.ct-mm-node.is-atom-child .ct-mm-node-exp {
  border-color: rgba(255, 255, 255, 0.32);
  background: #5a6778;
  color: #ffffff;
}
.ct-mm-node-exp:hover {
  /* 悬停：中性提亮，勿用允许态绿（避免关允许态也「发绿」误会） */
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: #6a788a;
}
.ct-mm-node-exp:focus,
.ct-mm-node-exp:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: #6a788a;
}
.ct-mm-expand-hint {
  margin: 10px 0 6px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.ct-mm-expand-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.ct-mm-node-t { font-size: var(--ct-mm-fs, 12px); font-weight: 700; }
.ct-mm-node-sub {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: var(--ct-mm-fs-xs, 10px);
  color: rgba(232, 238, 244, 0.62);
  cursor: pointer;
  text-decoration: underline dotted;
}
/* 白天：配方主模块墨底 → 标题/副标用白字（勿灰字看不清） */

.ct-mm-node:not(.is-atom-child) {
  color: #ffffff;
}
.ct-mm-node:not(.is-atom-child) .ct-mm-node-t {
  color: #ffffff;
}
.ct-mm-node:not(.is-atom-child) .ct-mm-node-sub {
  color: rgba(255, 255, 255, 0.92);
}
.ct-mm-node.is-atom-child .ct-mm-node-sub {
  color: rgba(232, 238, 244, 0.72);
}
.ct-mm-link-hint {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 6;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(21, 32, 43, 0.82);
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100% - 72px);
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 719px) {
  .ct-mm-link-hint {
    top: 8px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    letter-spacing: 0.01em;
    max-width: calc(100% - 88px);
  }
}
.ct-mm-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  width: min(320px, calc(100% - 24px));
}
.ct-mm-pop[hidden] { display: none !important; }
.ct-mm-ctx {
  position: absolute;
  z-index: 40;
  min-width: 112px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel, #fff);
  box-shadow: 0 8px 24px rgba(15, 23, 32, 0.18);
  display: grid;
  gap: 2px;
}
.ct-mm-ctx[hidden] { display: none !important; }
.ct-mm-ctx-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.ct-mm-ctx-item:hover {
  background: var(--chip-bg);
}
.ct-mm-ctx-item.is-danger {
  color: var(--down, #dc2626);
}
.ct-mm-ctx-item.is-danger:hover {
  background: color-mix(in srgb, var(--down, #dc2626) 12%, transparent);
}
.ct-mm-pop.is-prompt {
  inset: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: auto;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 32, 0.45);
  pointer-events: auto;
}
.ct-mm-pop.is-prompt[hidden] {
  display: none !important;
}
.ct-mm-pop.is-prompt .ct-mm-pop-card {
  width: min(320px, 100%);
  margin: 0;
  pointer-events: auto;
}
.ct-mm-pop-card {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(15, 23, 32, 0.18);
  padding: clamp(8px, 0.8vh + 4px, 12px) clamp(10px, 0.8vw + 4px, 14px);
  display: grid;
  gap: 8px;
  font-size: var(--ct-mm-fs-sm, 12px);
}
.ct-mm-pop-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ct-mm-pop-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ct-mm-pop-title b {
  font-size: 14px;
  font-weight: 800;
}
.ct-mm-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.ct-mm-help-bubble {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 12;
  width: min(260px, 72vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(15, 23, 32, 0.18);
  display: grid;
  gap: 8px;
}
.ct-mm-help-bubble[hidden] {
  display: none !important;
}
.ct-mm-help-bubble::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -6px;
  width: 10px;
  height: 10px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.ct-mm-help-bubble p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
}
.ct-mm-q.on {
  color: var(--teal, var(--up));
  border-color: var(--line);
}
html[data-theme="dark"] .ct-mm-help-bubble {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.ct-mm-edge-band {
  display: grid;
  gap: 8px;
  padding: 10px 10px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, var(--ink) 4%);
}
.ct-mm-edge-one {
  margin: 0;
  align-items: center;
}
.ct-mm-edge-lab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 650;
}
.ct-mm-edge-lab .ui-help-wrap {
  flex: 0 0 auto;
}
.ct-mm-edge-lab .ct-mm-q {
  width: 14px;
  height: 14px;
  padding: 0;
  opacity: 0.75;
}
.ct-mm-edge-lab .ct-mm-q:hover,
.ct-mm-edge-lab .ct-mm-q.on {
  opacity: 1;
}
.ct-mm-edge-signed-input {
  width: 7.5rem;
  max-width: 42%;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ct-mm-edge-signed-input.is-invalid {
  border-color: #c45c4a !important;
  box-shadow: 0 0 0 2px rgba(196, 92, 74, 0.22);
}
.ct-mm-pop input.is-invalid,
.ct-mm-pop textarea.is-invalid {
  border-color: #c45c4a !important;
  box-shadow: 0 0 0 2px rgba(196, 92, 74, 0.22);
}
.ct-mm-pop-row .ct-mm-switch {
  margin-left: auto;
}
html[data-theme="dark"] .ct-mm-edge-band {
  background: color-mix(in srgb, var(--panel) 92%, #fff 4%);
}
.ct-mm-pop-body {
  display: grid;
  gap: 8px;
  max-height: 46vh;
  overflow: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
}
.ct-mm-pop-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none; /* Chrome / Safari */
}
.ct-mm-pop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.ct-mm-pop-body [hidden] {
  display: none !important;
}
.ct-mm-seg {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  flex: 0 0 auto;
  max-width: 100%;
}
.ct-mm-seg-btn {
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.2;
}
.ct-mm-seg-btn + .ct-mm-seg-btn {
  border-left: 1px solid var(--line);
}
.ct-mm-seg-btn.on {
  background: color-mix(in srgb, var(--ink) 12%, var(--panel));
  color: var(--ink);
}
html[data-theme="dark"] .ct-mm-seg-btn.on {
  background: rgba(255, 255, 255, 0.12);
  color: #f2f6fa;
}
.ct-mm-tp-style {
  align-items: center;
}
.ct-mm-pop-row[data-tp-dp-row] {
  flex-wrap: wrap;
  gap: 6px 8px;
}
.ct-mm-pop-row[data-tp-dp-row] .btn {
  flex: 0 0 auto;
  max-width: none;
}
.ct-mm-tp-dp-warn {
  color: #b45309;
}
html[data-theme="dark"] .ct-mm-tp-dp-warn {
  color: #fbbf24;
}
.ct-mm-pop-body label[hidden],
.ct-mm-pop-body div[hidden],
.ct-mm-pop-body p[hidden] {
  display: none !important;
}
.ct-mm-pop-row input,
.ct-mm-pop-row select,
.ct-mm-pop-row textarea {
  font: inherit;
  min-width: 0;
  flex: 1;
  max-width: 160px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2, #f4f7f9);
  color: inherit;
}
.ct-mm-pop-row input.is-locked {
  opacity: 0.88;
  cursor: default;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-2, #f4f7f9) 72%, var(--line) 28%);
  border-style: dashed;
  pointer-events: none;
}
.ct-mm-pop-hint {
  margin: -4px 0 10px;
  padding: 0 2px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
/* 导图帮助公式区：仅 .is-help-open 时显示，勿用 display:!important 覆盖 [hidden] */

.ui-help-tip.ct-mm-help-tip,
.ui-help-tip.ct-mm-help-tip[hidden],
body > .ui-help-tip.ct-mm-help-tip[hidden],
body > .ui-help-tip.ui-help-tip-portal.ct-mm-help-tip[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.ui-help-tip.ct-mm-help-tip.is-help-open:not([hidden]),
body > .ui-help-tip.ui-help-tip-portal.ct-mm-help-tip.is-help-open:not([hidden]) {
  white-space: normal;
  max-width: min(360px, 82vw) !important;
  line-height: 1.45;
  text-align: left;
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  gap: 8px;
  box-sizing: border-box;
}
.ui-help-tip.ct-mm-help-tip .ct-mm-help-body {
  white-space: pre-line;
  color: inherit;
}
.ui-help-tip.ct-mm-help-tip .ct-mm-help-live {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--line, #2a3540) 80%, transparent);
  color: color-mix(in srgb, var(--muted, #9aa7b5) 70%, #fff);
  font-size: 12px;
  line-height: 1.45;
}
.ui-help-tip.ct-mm-help-tip .ct-mm-help-live[hidden] {
  display: none !important;
}
.ui-help-tip.ct-mm-help-tip .ct-mm-help-formula {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: #121820;
}
.ui-help-tip.ct-mm-help-tip .ct-mm-help-formula-t {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e8eef2;
}
.ui-help-tip.ct-mm-help-tip .ct-mm-help-formula-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
  opacity: 0.95;
}
/* 白天：气泡本身仍是深底；公式区勿用浅底+浅字（会糊成一片） */

html[data-theme="light"] .ui-help-tip.ct-mm-help-tip .ct-mm-help-formula {
  background: #121820;
  border-color: rgba(255, 255, 255, 0.16);
}
html[data-theme="light"] .ui-help-tip.ct-mm-help-tip .ct-mm-help-formula-t {
  color: color-mix(in srgb, #5ee0c0 70%, #fff);
}
html[data-theme="light"] .ui-help-tip.ct-mm-help-tip .ct-mm-help-formula-code {
  color: #e7f2ef;
  opacity: 1;
}
.ct-mm-pop-col { flex-direction: column; align-items: stretch; }
.ct-mm-pop-col textarea { max-width: none; width: 100%; resize: vertical; }
.ct-mm-pop-card footer,
.ct-mm-pop-foot {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}
.ct-mm-pop-foot .btn {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}
.ct-mm-note {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--panel-2, #f4f7f9) 88%, transparent);
  display: grid;
  gap: 4px;
}
.ct-mm-note b {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.ct-mm-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
}
html[data-theme="dark"] .ct-mm-note {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.ct-mm-exec-suggest {
  margin: 0 0 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent, #2a7a9b) 45%, var(--line));
  background: color-mix(in srgb, var(--accent, #2a7a9b) 8%, var(--panel-2, #f4f7f9));
  display: grid;
  gap: 8px;
}
.ct-mm-exec-suggest[hidden] {
  display: none !important;
}
.ct-mm-exec-suggest p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 550;
}
.ct-mm-exec-suggest-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.ct-mm-exec-suggest-acts .btn.sm {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
}
html[data-theme="dark"] .ct-mm-exec-suggest {
  background: rgba(80, 160, 200, 0.08);
  border-color: rgba(120, 180, 210, 0.35);
}
.ct-mm-q {
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  color: var(--muted);
  vertical-align: middle;
  opacity: 0.75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.ct-mm-q:hover,
.ct-mm-q.on {
  opacity: 1;
}
.ct-mm-pri-help {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.ct-mm-tree-view {
  position: absolute;
  inset: 12px;
  overflow: auto;
  padding: 8px;
  outline: none;
}
.ct-mm-tree-ul { list-style: none; margin: 0; padding: 0; }
.ct-mm-tree-li {
  margin: 2px 0;
  padding-left: calc(var(--d, 0) * 16px);
  position: relative;
}
.ct-mm-tree-li::before {
  content: "";
  position: absolute;
  left: calc(var(--d, 0) * 16px - 10px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  opacity: 0.55;
}
.ct-mm-tree-li[style*="--d:0"]::before { display: none; }
.ct-mm-tree-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.ct-mm-tree-fold,
.ct-mm-tree-fold-sp {
  width: 22px;
  flex: 0 0 22px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}
.ct-mm-tree-fold-sp { visibility: hidden; }
.ct-mm-tree-pri,
.ct-mm-tree-when {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 0;
  padding: 0 5px;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  line-height: 1;
}
.ct-mm-tree-when { background: #3d6b8a; }
.ct-mm-push {
  display: grid;
  gap: 6px;
  margin: 0;
}
.ct-mm-push-sel {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
.ct-mm-tpl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
}
.ct-mm-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 28px 24px;
  pointer-events: auto;
}
.ct-mm-empty-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, var(--line));
  background: #15202b;
  color: #ffffff;
  box-shadow: 1px 2px 6px rgba(15, 23, 32, 0.14);
}
.ct-mm-empty-btn:hover {
  border-color: color-mix(in srgb, var(--ink) 36%, var(--line));
  filter: brightness(1.06);
}
.ct-mm-empty-btn-ico {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.ct-mm-empty-btn-ico svg {
  width: 14px;
  height: 14px;
  display: block;
}
html[data-theme="dark"] .ct-mm-empty-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f4f7fb;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), var(--ct-mm-elev-chip, 0 1px 3px rgba(0, 0, 0, 0.28));
}
html[data-theme="dark"] .ct-mm-empty-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.36);
  filter: none;
}
.ct-mm-empty b { font-size: 14px; }
.ct-mm-empty p { margin: 0; font-size: 12px; color: var(--muted); max-width: 28em; line-height: 1.5; }
.ct-mm-pri-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
/* 夜间：数字徽章用雾灰，避免纯白刺眼 */

html[data-theme="dark"] .ct-mm-pri-badge,
html[data-theme="dark"] .ct-mm-board .ct-mm-pri-badge,
html[data-theme="dark"] .ct-mm-edge-hub .ct-mm-pri-badge {
  background: #c5ced8 !important;
  color: #1a2330 !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22);
}
html[data-theme="dark"] .ct-mm-edge-hub:not(.is-expand-hub) {
  background: #3a4554;
  color: #e6edf4;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .ct-mm-edge-hub.is-expand-hub {
  background: #3a4554;
  color: #e6edf4;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  opacity: 0.92;
}
.ct-mm-when-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #3d6b8a;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.ct-mm-edge-hub { position: absolute; }
.ct-mm-tree-item {
  display: grid;
  gap: 2px;
  text-align: left;
  min-width: 140px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  color: inherit;
}
.ct-mm-tree-item-h {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ct-mm-tree-item-h b {
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-mm-tree-item-sub {
  display: block;
  margin-top: 2px;
  padding: 6px 8px;
  min-height: 28px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 82%, #3d6b8a 18%);
  border: 1px dashed color-mix(in srgb, var(--line) 70%, #3d6b8a 30%);
  text-align: left;
  cursor: pointer;
  line-height: 1.35;
  box-sizing: border-box;
}
.ct-mm-tree-item-sub:hover {
  background: color-mix(in srgb, var(--panel) 70%, #3d6b8a 30%);
  border-color: color-mix(in srgb, var(--line) 40%, #3d6b8a 60%);
}
.ct-mm-tree-item.is-draggable {
  cursor: grab;
  touch-action: none;
}
.ct-mm-tree-item.is-draggable:active,
.ct-mm-tree-item.is-dragging {
  cursor: grabbing;
}
.ct-mm-tree-item.is-dragging {
  opacity: 0.55;
  pointer-events: none;
}
.ct-mm-tree-li.is-drop-before > .ct-mm-tree-row {
  box-shadow: inset 0 2px 0 var(--ink);
}
.ct-mm-tree-li.is-drop-after > .ct-mm-tree-row {
  box-shadow: inset 0 -2px 0 var(--ink);
}
.ct-mm-tree-item b { font-size: 12px; }
.ct-mm-tree-item span { font-size: 10px; color: var(--muted); }
.ct-mm-tree-item.on {
  outline: 2px solid rgba(0,0,0,0.2);
}
.ct-mm-tree-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-mm-editor {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 44px;
  z-index: 5;
  margin: 0;
  max-height: min(46%, 280px);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 32, 0.12);
}
.ct-mm-editor[hidden] {
  display: none !important;
}
.ct-mm-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ct-mm-related {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}
.ct-mm-rel {
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--teal);
  cursor: pointer;
}
html[data-theme="dark"] .ct-tabs.ct-tabs-tool {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
}
html[data-theme="dark"] .ct-tabs.ct-tabs-tool .ct-tab.on {
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] .ct-api-add-fields {
  background: var(--panel-2);
  border-color: var(--line);
}
html[data-theme="dark"] .ct-mm-board {
  background: var(--panel-2);
  border-color: var(--line);
  /* 与工作栏卡片底同令牌，供画布原子节点复用 */
  --ct-mm-dock-bg: color-mix(in srgb, var(--panel) 94%, #ffffff 6%);
}
/* 夜间：工作栏 = 「记流程/看规则/填密钥」未选中轨道色（.ct-tabs.ct-tabs-tool） */

html[data-theme="dark"] .ct-mm-dock {
  --ct-mm-dock-bg: color-mix(in srgb, var(--panel) 94%, #ffffff 6%);
  background: var(--ct-mm-dock-bg);
  border-color: var(--line);
  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .ct-mm-dock-head,
html[data-theme="dark"] .ct-mm-dock-scroll {
  background: var(--ct-mm-dock-bg);
}
html[data-theme="dark"] .ct-mm-dock-modes {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .ct-mm-mode.on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
html[data-theme="dark"] .ct-mm-pal-item:not(.on) {
  background: color-mix(in srgb, var(--panel) 88%, #ffffff 12%);
  border-color: rgba(255, 255, 255, 0.1);
  /* 配方/原子芯片字样再白一点，提高对比 */
  color: #f4f7fb;
  box-shadow: var(--ct-mm-elev-chip);
}
html[data-theme="dark"] .ct-mm-fam:not(.on),
html[data-theme="dark"] .ct-mm-tpl:not(.on) {
  color: #f4f7fb;
}
html[data-theme="dark"] .ct-mm-act.main {
  background: var(--solid-bg, #e8edf2);
  color: var(--solid-fg, #15202b);
}
html[data-theme="dark"] .ct-mm-editor {
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .holding.is-custom-product {
  border: 0;
  background: transparent;
  box-shadow: none;
}
html[data-theme="dark"] .holding.is-custom-product .holding-main,
html[data-theme="dark"] .app .bias-card.is-pulse-layout .bias-watch-shell.holding-main {
  border: 1px solid var(--card-line);
  background: var(--panel);
  box-shadow: none;
}
html[data-theme="dark"] .ct-tab.on {
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] .ct-mm-wire {
  stroke: rgba(255, 255, 255, 0.28);
}
html[data-theme="dark"] .ct-mm-wire.on {
  stroke: #ffffff;
  stroke-width: 1.15;
}
html[data-theme="dark"] .ct-mm-wire.on + .ct-mm-wire-arrow,
html[data-theme="dark"] .ct-mm-wire.on ~ .ct-mm-wire-arrow[data-eid] {
  fill: #ffffff;
}
html[data-theme="dark"] .ct-mm-wire.is-main {
  /* 夜间：主链纯白系，与选中工作栏一体 */
  stroke: rgba(255, 255, 255, 0.88);
}
html[data-theme="dark"] .ct-mm-wire.is-main.is-lane-1 { stroke: #cbd5e1; }
html[data-theme="dark"] .ct-mm-wire.is-main.is-lane-2 { stroke: #2dd4bf; }
html[data-theme="dark"] .ct-mm-wire.is-main.is-lane-3 { stroke: #fbbf24; }
html[data-theme="dark"] .ct-mm-wire.is-main.is-lane-4 { stroke: #fb7185; }
html[data-theme="dark"] .ct-mm-wire.is-main.is-lane-5 { stroke: #c4b5fd; }
html[data-theme="dark"] .ct-mm-wire.is-main.is-lane-6 { stroke: #93c5fd; }
html[data-theme="dark"] .ct-mm-wire-arrow.is-main.is-lane-1 { fill: #cbd5e1; }
html[data-theme="dark"] .ct-mm-wire-arrow.is-main.is-lane-2 { fill: #2dd4bf; }
html[data-theme="dark"] .ct-mm-wire-arrow.is-main.is-lane-3 { fill: #fbbf24; }
html[data-theme="dark"] .ct-mm-wire-arrow.is-main.is-lane-4 { fill: #fb7185; }
html[data-theme="dark"] .ct-mm-wire-arrow.is-main.is-lane-5 { fill: #c4b5fd; }
html[data-theme="dark"] .ct-mm-wire-arrow.is-main.is-lane-6 { fill: #93c5fd; }
html[data-theme="dark"] .ct-mm-edge-hub.is-lane-1 .ct-mm-pri-badge { background: #64748b; color: #fff; }
html[data-theme="dark"] .ct-mm-edge-hub.is-lane-2 .ct-mm-pri-badge { background: #64748b; color: #fff; }
html[data-theme="dark"] .ct-mm-edge-hub.is-lane-3 .ct-mm-pri-badge { background: #d97706; color: #111; }
html[data-theme="dark"] .ct-mm-edge-hub.is-lane-4 .ct-mm-pri-badge { background: #e11d48; color: #fff; }
html[data-theme="dark"] .ct-mm-edge-hub.is-lane-5 .ct-mm-pri-badge { background: #7c3aed; color: #fff; }
html[data-theme="dark"] .ct-mm-edge-hub.is-lane-6 .ct-mm-pri-badge { background: #2563eb; color: #fff; }
html[data-theme="dark"] .ct-mm-wire.is-expand {
  /* 夜间展开线：浅白虚线，明显但不跟绿框抢色 */
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.05;
}
html[data-theme="dark"] .ct-mm-wire-arrow.is-main {
  fill: #ffffff;
  stroke: none;
}
/* 夜间 + 允许态：连线/箭头不跟绿黄灰（保持分色）；仅模块线框变色 */

html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-main.is-gate-on,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-expand.is-gate-on,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-gate-on,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-main.is-gate-wait,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-expand.is-gate-wait,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-gate-wait,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-main.is-gate-off,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-expand.is-gate-off,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire.is-gate-off {
  opacity: 1;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire-arrow.is-main.is-gate-on,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire-arrow.is-gate-on,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire-arrow.is-main.is-gate-wait,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire-arrow.is-gate-wait,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire-arrow.is-main.is-gate-off,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-wire-arrow.is-gate-off {
  opacity: 1;
  stroke: none;
}
/* 夜间配方模块底板 = 工作栏底板同色（--ct-mm-dock-bg），勿再混白提亮 */

html[data-theme="dark"] .ct-mm-node:not(.is-atom-child) {
  background: var(--ct-mm-dock-bg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%));
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--ct-mm-elev);
}
html[data-theme="dark"] .ct-mm-node:not(.is-atom-child) .ct-mm-node-t {
  color: #ffffff;
}
html[data-theme="dark"] .ct-mm-node:not(.is-atom-child) .ct-mm-node-sub {
  color: rgba(255, 255, 255, 0.82);
}
html[data-theme="dark"] .ct-mm-node:not(.is-atom-child) .ct-mm-node-exp {
  background: var(--ct-mm-dock-bg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%));
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}
html[data-theme="dark"] .ct-mm-node-exp:hover {
  background: color-mix(in srgb, #0e141b 75%, #ffffff 25%);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}
/* 夜间原子：偏黑板 + 浅白虚线（勿常驻绿虚线；绿留给选中/允许态） */

html[data-theme="dark"] .ct-mm-node.is-atom-child {
  border-style: dashed;
  border-width: 1px;
  border-color: rgba(255, 255, 255, 0.2);
  background: color-mix(in srgb, #0e141b 96%, #ffffff 4%);
  color: #ffffff;
  box-shadow: var(--ct-mm-elev-atom);
  opacity: 1;
}
html[data-theme="dark"] .ct-mm-node.is-atom-child .ct-mm-node-t {
  color: #ffffff;
}
html[data-theme="dark"] .ct-mm-node.is-atom-child .ct-mm-node-sub {
  color: rgba(255, 255, 255, 0.78);
}
html[data-theme="dark"] .ct-mm-node.is-atom-child .ct-mm-node-exp {
  background: color-mix(in srgb, #0e141b 92%, #ffffff 8%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}
html[data-theme="dark"] .ct-mm-node.is-expanded:not(.is-atom-child) {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), var(--ct-mm-elev);
}
/* 夜间主链 🔗 圆底 = 展开原子边 🔗 同色（仅改色，不改尺寸） */

html[data-theme="dark"] .ct-mm-board .ct-mm-edge-hub:not(.is-expand-hub) {
  background: #3a4554;
  color: #e6edf4;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
html[data-theme="dark"] .ct-mm-pri-badge,
html[data-theme="dark"] .ct-mm-board .ct-mm-pri-badge,
html[data-theme="dark"] .ct-mm-edge-hub .ct-mm-pri-badge {
  background: #ffffff !important;
  color: #15202b !important;
  box-shadow: none;
}
/* 夜间选中：绿线框；配方底板仍=工作栏 */

html[data-theme="dark"] .ct-mm-node.is-link:not(.is-atom-child),
html[data-theme="dark"] .ct-mm-node.is-sel:not(.is-atom-child) {
  outline: none;
  box-shadow: var(--ct-mm-elev);
  border-width: 2px;
  border-style: solid;
  border-color: var(--ct-mm-gate-on);
  background: var(--ct-mm-dock-bg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%));
  color: #ffffff;
}
html[data-theme="dark"] .ct-mm-node.is-atom-child.is-link,
html[data-theme="dark"] .ct-mm-node.is-atom-child.is-sel {
  outline: none;
  box-shadow: var(--ct-mm-elev-atom);
  border-width: 2px;
  border-style: solid;
  border-color: var(--ct-mm-gate-on);
  background: color-mix(in srgb, #0e141b 96%, #ffffff 4%);
  color: #ffffff;
}
/* 夜间允许态：外扩描边，配方底板仍=工作栏 */

html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-gate-on:not(.is-atom-child) {
  background: var(--ct-mm-dock-bg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%));
  border-width: 1px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px var(--ct-mm-gate-on), var(--ct-mm-elev);
  color: #ffffff;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-gate-wait:not(.is-atom-child) {
  background: var(--ct-mm-dock-bg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%));
  border-width: 1px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px #c4a035, var(--ct-mm-elev);
  color: #ffffff;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-on {
  background: color-mix(in srgb, #0e141b 96%, #ffffff 4%);
  color: #ffffff;
  border-width: 3px;
  border-style: dashed;
  border-color: var(--ct-mm-gate-on);
  box-shadow: var(--ct-mm-elev-atom);
  outline: none;
  opacity: 1;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-atom-child.is-gate-wait {
  background: color-mix(in srgb, #0e141b 96%, #ffffff 4%);
  color: #ffffff;
  border-width: 3px;
  border-style: dashed;
  border-color: #c4a035;
  box-shadow: var(--ct-mm-elev-atom);
  outline: none;
  opacity: 1;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-link,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-sel {
  border-width: 1px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px var(--ct-mm-gate-on), var(--ct-mm-elev);
  outline: none;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-atom-child.is-link,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-atom-child.is-sel {
  border-width: 3px;
  border-style: dashed;
  border-color: var(--ct-mm-gate-on);
  box-shadow: var(--ct-mm-elev-atom);
  outline: none;
}
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node .ct-mm-node-exp,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-gate-on .ct-mm-node-exp,
html[data-theme="dark"] .ct-mm-gate-mode .ct-mm-node.is-gate-wait .ct-mm-node-exp {
  background: var(--ct-mm-dock-bg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%)) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}
/* —— i18n layout lock (P1) —— */


.btn .btn-label {
  max-width: 7.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}
.pos-resume-btn,
.pos-flat-btn,
.pos-open-btn {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.holding-pnl-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 勿给 .lh-stepper-step 加 overflow:hidden——标签绝对定位在圆点下方，会被裁掉 */

.lh-step {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lh-stepper-lab {
  max-width: 4.8em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag#pill {
  max-width: 6.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* —— i18n layout lock (P2) —— */


.params-tab {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.params-emerg-row > span:first-child b,
.params-emerg-row > span:first-child small {
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.params-actions .params-save,
.params-actions .confirm-btn {
  /* 参数底栏通栏均分；勿再限 max-width，否则两侧留白过大 */
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.help-step b,
.help-step p,
.help-link span,
.help-link small {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 只裁切按钮内文案；勿限 #btn-apply-all 本身（会破坏通栏主按钮） */

.pro-ops-primary .btn-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* —— OKX 页签作卡片头（研判内嵌 + 全屏放大）——
 * 结构：tabs / toolbar 固定在卡片顶；.okx-data-body-scroll 内滚图表。
 * 不再靠 sticky 钉顶（会像被裁开的另一条）。 */


.radar-okx-host,
.fee-tip-modal.radar-sheet .radar-okx-host,
.okx-data-sheet .radar-okx-host,
.okx-data-body .radar-okx-host {
  overflow: hidden !important;
}

.radar-okx-host .okx-data-inline,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-inline,
.okx-data-sheet .radar-okx-host .okx-data-inline,
.okx-data-body .okx-data-inline,
.radar-body.radar-factors-tab-active .radar-okx-host .okx-data-inline.is-factors-tab,
.okx-data-inline.is-factors-tab {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.radar-okx-host .okx-data-body-scroll,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-body-scroll,
.okx-data-sheet .radar-okx-host .okx-data-body-scroll,
.okx-data-body .okx-data-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 154, 171, 0.55) transparent;
}
.radar-okx-host .okx-data-body-scroll::-webkit-scrollbar,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-body-scroll::-webkit-scrollbar,
.okx-data-sheet .radar-okx-host .okx-data-body-scroll::-webkit-scrollbar {
  width: 6px;
  height: 0;
}
.radar-okx-host .okx-data-body-scroll::-webkit-scrollbar-thumb,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-body-scroll::-webkit-scrollbar-thumb,
.okx-data-sheet .radar-okx-host .okx-data-body-scroll::-webkit-scrollbar-thumb {
  background: rgba(139, 154, 171, 0.45);
  border-radius: 999px;
}

.radar-okx-host .okx-data-inline.is-fill-layout > .okx-data-body-scroll,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-inline.is-fill-layout > .okx-data-body-scroll,
.okx-data-sheet .radar-okx-host .okx-data-inline.is-fill-layout > .okx-data-body-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.radar-okx-host .okx-data-inline.is-scroll-layout > .okx-data-body-scroll,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-inline.is-scroll-layout > .okx-data-body-scroll,
.okx-data-sheet .radar-okx-host .okx-data-inline.is-scroll-layout > .okx-data-body-scroll {
  overflow-x: hidden;
  overflow-y: auto;
}

.okx-data-inline > .okx-data-tabs,
.radar-okx-host .okx-data-tabs,
.okx-data-sheet .radar-okx-host .okx-data-tabs,
.okx-data-inline > .okx-data-toolbar,
.radar-okx-host .okx-data-toolbar,
.okx-data-sheet .radar-okx-host .okx-data-toolbar {
  position: relative !important;
  top: auto !important;
  z-index: 2 !important;
  flex-shrink: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
}
.okx-data-inline > .okx-data-tabs,
.radar-okx-host .okx-data-tabs,
.okx-data-sheet .radar-okx-host .okx-data-tabs {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  align-self: stretch !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  pointer-events: auto;
}
/* 研判页固定暗色：桌面保留圆角卡；手机全屏见下方 @media 去卡片 */


.fee-tip-modal.radar-sheet .radar-okx-host {
  --okx-card-bg: #000000;
  background: var(--okx-card-bg) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: none !important;
  border-radius: 14px;
}
.fee-tip-modal.radar-sheet .okx-data-inline > .okx-data-tabs,
.fee-tip-modal.radar-sheet .okx-data-inline > .okx-data-toolbar,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-tabs,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-toolbar,
.fee-tip-modal.radar-sheet .okx-data-tabs,
.fee-tip-modal.radar-sheet .okx-data-toolbar,
html[data-theme="dark"] .fee-tip-modal.radar-sheet .okx-data-inline > .okx-data-tabs,
html[data-theme="dark"] .fee-tip-modal.radar-sheet .okx-data-inline > .okx-data-toolbar,
html[data-theme="dark"] .fee-tip-modal.radar-sheet .radar-okx-host .okx-data-tabs,
html[data-theme="dark"] .fee-tip-modal.radar-sheet .radar-okx-host .okx-data-toolbar,
html[data-theme="dark"] .fee-tip-modal.radar-sheet .okx-data-tabs,
html[data-theme="dark"] .fee-tip-modal.radar-sheet .okx-data-toolbar,
html:not([data-theme="dark"]) .fee-tip-modal.radar-sheet .okx-data-tabs,
html:not([data-theme="dark"]) .fee-tip-modal.radar-sheet .okx-data-toolbar,
html:not([data-theme="dark"]) .fee-tip-modal.radar-sheet .radar-okx-host .okx-data-tabs,
html:not([data-theme="dark"]) .fee-tip-modal.radar-sheet .radar-okx-host .okx-data-toolbar {
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
}
.fee-tip-modal.radar-sheet .okx-data-tabs,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-tabs {
  padding: 10px 12px 4px !important;
}
.fee-tip-modal.radar-sheet .okx-data-toolbar,
.fee-tip-modal.radar-sheet .radar-okx-host .okx-data-toolbar {
  padding: 2px 12px 4px !important;
}
/* OKX 全屏 sheet：桌面保留圆角；手机去卡片贴边 */

.okx-data-sheet .radar-okx-host {
  --okx-card-bg: #000000;
  background: var(--okx-card-bg) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: none !important;
  border-radius: 14px;
}
.okx-data-sheet .okx-data-inline > .okx-data-tabs,
.okx-data-sheet .okx-data-inline > .okx-data-toolbar,
.okx-data-sheet .radar-okx-host .okx-data-tabs,
.okx-data-sheet .radar-okx-host .okx-data-toolbar,
html[data-theme="dark"] .okx-data-sheet .okx-data-tabs,
html[data-theme="dark"] .okx-data-sheet .okx-data-toolbar,
html:not([data-theme="dark"]) .okx-data-sheet .okx-data-tabs,
html:not([data-theme="dark"]) .okx-data-sheet .okx-data-toolbar {
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
}
.okx-data-sheet .okx-data-tabs,
.okx-data-sheet .radar-okx-host .okx-data-tabs {
  padding: 10px 12px 4px !important;
}
.okx-data-sheet .okx-data-toolbar,
.okx-data-sheet .radar-okx-host .okx-data-toolbar {
  padding: 2px 12px 4px !important;
}
/* 手机 / 窄屏 / 全屏：研判与 OKX 页签单行横滑 + 可点；图表区无圆角卡贴边 */


@media (max-width: 720px) {
  /* .fee-sheet 默认 touch-action:none 会吃掉滑动与部分点击，研判必须放开 */
  .fee-tip-modal.radar-sheet .fee-sheet.radar-card,
  .fee-tip-modal.radar-sheet .radar-card.radar-pro,
  .okx-data-sheet .okx-data-card {
    touch-action: manipulation !important;
    pointer-events: auto !important;
  }
  /* 工具条统计一排完整显示，不挡右侧放大镜 */
  .okx-data-toolbar,
  .radar-okx-host .okx-data-toolbar,
  .okx-data-sheet .okx-data-toolbar {
    gap: 6px !important;
  }
  .okx-data-stat,
  .okx-data-sheet .okx-data-stat,
  .fee-tip-modal.radar-sheet .okx-data-stat {
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
  /* 手机全屏：去掉内层圆角卡片与外边距，图表区铺满 */
  .fee-tip-modal.radar-sheet .radar-body,
  .fee-tip-modal.radar-sheet.is-page .radar-body {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }
  .fee-tip-modal.radar-sheet .radar-body > .radar-verdict,
  .fee-tip-modal.radar-sheet .radar-body > .radar-verdict-diff,
  .fee-tip-modal.radar-sheet .radar-body > .radar-kpi-strip,
  .fee-tip-modal.radar-sheet .radar-body > .radar-flow-link-strip {
    margin-left: 12px !important;
    margin-right: 12px !important;
  }
  .fee-tip-modal.radar-sheet .radar-okx-host,
  .fee-tip-modal.radar-sheet.is-page .radar-okx-host,
  .okx-data-sheet .radar-okx-host,
  .okx-data-sheet .okx-data-body .radar-okx-host {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: none !important;
    background: #000000 !important;
  }
  .okx-data-sheet {
    padding: 0 !important;
    background: #000000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .okx-data-sheet .okx-data-card {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000000 !important;
  }
  .okx-data-sheet .okx-data-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .fee-tip-modal.radar-sheet .radar-body,
  .fee-tip-modal.radar-sheet .radar-okx-host,
  .fee-tip-modal.radar-sheet .okx-data-inline,
  .fee-tip-modal.radar-sheet .okx-data-body-scroll,
  .okx-data-sheet .okx-data-body,
  .okx-data-sheet .radar-okx-host,
  .okx-data-sheet .okx-data-inline,
  .okx-data-sheet .okx-data-body-scroll {
    min-width: 0 !important;
    max-width: 100% !important;
    pointer-events: auto !important;
    touch-action: pan-y !important;
  }
  .fee-tip-modal.radar-sheet .okx-data-inline > .okx-data-tabs,
  .fee-tip-modal.radar-sheet .radar-okx-host .okx-data-tabs,
  .fee-tip-modal.radar-sheet .okx-data-tabs,
  .okx-data-sheet .okx-data-inline > .okx-data-tabs,
  .okx-data-sheet .radar-okx-host .okx-data-tabs,
  .okx-data-sheet .okx-data-tabs,
  .radar-okx-host .okx-data-tabs,
  .okx-data-inline > .okx-data-tabs {
    align-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    touch-action: pan-x !important;
    pointer-events: auto !important;
    z-index: 6 !important;
    position: relative !important;
  }
  .fee-tip-modal.radar-sheet .okx-data-tabs::-webkit-scrollbar,
  .okx-data-sheet .okx-data-tabs::-webkit-scrollbar,
  .radar-okx-host .okx-data-tabs::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
  }
  .fee-tip-modal.radar-sheet .okx-data-tab,
  .okx-data-sheet .okx-data-tab,
  .radar-okx-host .okx-data-tab {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}
/* 工具端 · 交易账户凭证卡
   电脑：交易所同构（中心大 + 两侧雾化 + 无限循环）
   手机：堆积探探翻页 / 上滑展开 / 点选平坦 */



#accounts.plat-cred-rail {
  padding: 2px 0 10px;
  overflow: visible;
}
.acc-panel .acc-list.plat-cred-rail {
  padding-left: 8px;
  padding-right: 8px;
}
.acc-panel-trade:has(#accounts.plat-cred-rail) {
  overflow: visible;
}
#accounts .plat-cred-stage {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  padding: 10px 0 18px;
}
/* 手机展开必须可见，否则 rotateY 近端会被裁掉 */

#accounts .plat-cred-stage.is-mobile.is-spread {
  overflow: visible !important;
}
/* JS 挂 .plat-cred-spread-open：纵向可溢出阴影；横向仍裁切，防止左缘冲出白底 */

html.plat-cred-spread-open,
html.plat-cred-spread-open body,
.app.plat-cred-spread-open,
.acc-panel.plat-cred-spread-open,
.acc-panel-trade.plat-cred-spread-open,
.acc-panel-trade.plat-cred-spread-open,
#accounts.plat-cred-spread-open {
  overflow-x: hidden !important;
  overflow-y: visible !important;
}
.app.plat-cred-spread-open {
  overflow-x: hidden !important;
}
#accounts .plat-cred-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  will-change: transform;
}
#accounts .plat-cred-slide {
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
}
#accounts .plat-cred-slide.is-clone {
  pointer-events: none;
}
#accounts .plat-cred-card {
  --plat-accent: #14c8be;
  position: relative;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 12px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: none;
  overflow: hidden;
  transition: opacity 0.18s ease, filter 0.18s ease, transform 0.28s cubic-bezier(.22,.8,.3,1);
}
@media (max-width: 760px) {
  #accounts .plat-cred-card {
    box-shadow: none;
  }
}
#accounts .plat-cred-card::before {
  display: none;
}
#accounts .plat-cred-card.tone-okx { --plat-accent: #111111; }
#accounts .plat-cred-card.tone-binance { --plat-accent: #f0b90b; }
#accounts .plat-cred-card.tone-gate { --plat-accent: #17e6a1; }
#accounts .plat-cred-card.tone-weex { --plat-accent: #d8ae15; }
#accounts .plat-cred-card.tone-sina_free,
#accounts .plat-cred-card.tone-akshare,
#accounts .plat-cred-card.tone-free { --plat-accent: #14c8be; }
#accounts .plat-cred-card.tone-tushare { --plat-accent: #3b82f6; }
#accounts .plat-cred-card.tone-broker_md { --plat-accent: #8b5cf6; }
#accounts .plat-cred-card.tone-shfe { --plat-accent: #c45c26; }
#accounts .plat-cred-card.tone-dce { --plat-accent: #2563eb; }
#accounts .plat-cred-card.tone-czce { --plat-accent: #dc2626; }
#accounts .plat-cred-card.tone-cffex { --plat-accent: #1d4ed8; }
#accounts .plat-cred-card.tone-ine { --plat-accent: #0d9488; }
#accounts .plat-cred-card.tone-gfex { --plat-accent: #059669; }
#accounts .plat-cred-card.is-off {
  opacity: 0.58;
}
#accounts .plat-cred-card.is-locked {
  filter: saturate(0.75);
}
#accounts .plat-cred-card.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #0b1220 6%, transparent);
  pointer-events: none;
  border-radius: inherit;
}
#accounts .plat-cred-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}
#accounts .plat-cred-head--dual {
  gap: 4px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#accounts .plat-cred-head--dual:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--teal, #0d9488) 55%, transparent);
  outline-offset: 2px;
}
#accounts .plat-cred-head-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
#accounts .plat-cred-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
#accounts .plat-cred-fold-btn {
  border: 0;
  background: transparent;
  color: var(--muted, var(--ink));
  width: 40px;
  height: 40px;
  padding: 7px;
  margin: -4px 0;
  display: inline-grid;
  place-items: center;
  pointer-events: none;
  flex-shrink: 0;
  box-sizing: border-box;
}
#accounts .plat-cred-fold-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  transition: transform 0.22s ease;
}
#accounts .plat-cred-fold-btn.is-collapsed svg {
  transform: rotate(-90deg);
}
#accounts .plat-cred-fold-btn:hover,
#accounts .plat-cred-fold-btn:focus-visible {
  color: var(--teal, #0d9488);
  outline: none;
}
#accounts .plat-cred-menu-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted, var(--ink));
  width: 44px;
  height: 44px;
  padding: 8px;
  margin: -6px -4px -6px 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
}
#accounts .plat-cred-menu-btn svg {
  width: 26px;
  height: 26px;
  display: block;
  stroke-width: 2.15;
}
#accounts .plat-cred-menu-btn:hover,
#accounts .plat-cred-menu-btn:focus-visible,
#accounts .plat-cred-menu-btn:active {
  color: var(--teal, #0d9488);
  background: transparent;
  outline: none;
  box-shadow: none;
}
/* 账户卡汉堡菜单 · 电脑下拉 / 手机底抽屉 */

.acc-card-menu-modal {
  z-index: 12080;
}
.acc-card-menu-modal .acc-card-menu-sheet {
  width: min(320px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: var(--panel, #fff);
  box-shadow: 0 16px 40px color-mix(in srgb, #0b1220 18%, transparent);
}
/* 电脑：居中弹窗（与金库/更多一致） */

.acc-card-menu-modal.is-desk-center {
  display: grid !important;
  place-items: center !important;
  padding: 16px !important;
}
.acc-card-menu-modal.is-desk-center .acc-card-menu-sheet {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: min(320px, calc(100vw - 32px));
  margin: 0;
  max-height: min(78vh, calc(100vh - 32px));
  overflow: auto;
}
.acc-card-menu-modal.is-desk-center .acc-card-menu-grab {
  display: none;
}
.acc-card-menu-modal.is-desk-center .acc-card-menu-head {
  display: flex;
  margin-bottom: 10px;
}
.acc-card-menu-modal.is-desk-center .acc-card-menu-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc-card-menu-modal.is-desk-center .acc-card-menu-act {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, #fff);
}

.fee-tip-modal.acc-more-sheet-modal {
  z-index: 12130;
}
.fee-tip-modal.acc-more-sheet-modal.is-desk-center {
  display: grid !important;
  place-items: center !important;
  padding: 16px !important;
}
.fee-tip-modal.acc-more-sheet-modal.is-desk-center .acc-more-dialog.fee-sheet {
  width: min(460px, calc(100vw - 28px));
  max-height: min(86vh, 720px);
  padding: 14px 16px 18px;
  overflow: auto;
  border-radius: 16px;
}
.acc-more-sheet-modal .acc-more-sheet-head {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}
.acc-more-sheet-modal .acc-more-sheet-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.acc-more-sheet-modal .acc-more-sheet-mount .acc-more-card {
  padding: 0;
}
.fee-tip-modal.acc-more-sheet-modal.is-mobile-drawer {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: stretch !important;
  padding: 0 !important;
}
.fee-tip-modal.acc-more-sheet-modal.is-mobile-drawer .acc-more-dialog.fee-sheet {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  /* 仅顶边线框，勿四边描边（fee-sheet 默认 0 0 0 1px 环） */
  border: 0 !important;
  border-top: 1px solid rgba(21, 32, 43, 0.12) !important;
  box-shadow: 0 -12px 40px rgba(12, 20, 28, 0.22) !important;
  padding: 6px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: min(82vh, calc(100vh - 40px));
  overflow: auto;
  background: #f4f6f8 !important;
  animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.fee-tip-modal.acc-more-sheet-modal.is-mobile-drawer .acc-card-menu-grab {
  display: block;
}
html[data-theme="dark"] .fee-tip-modal.acc-more-sheet-modal.is-mobile-drawer .acc-more-dialog.fee-sheet,
html[data-theme="dark"] .fee-tip-modal.acc-more-sheet-modal.on .acc-more-dialog.fee-sheet {
  background: var(--sheet, #121212) !important;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  outline: none !important;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45) !important;
}

/* 电脑：贴按钮下方的轻量下拉（遗留类名，勿再用于账户菜单） */

.acc-card-menu-modal.is-desk-pop {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: block;
  padding: 0;
  place-items: unset;
}
.acc-card-menu-modal.is-desk-pop .acc-card-menu-sheet {
  position: fixed;
  width: min(248px, calc(100vw - 24px));
  margin: 0;
  max-height: min(70vh, calc(100vh - 24px));
  overflow: auto;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ink, #111) 10%, transparent),
    0 12px 28px color-mix(in srgb, #0b1220 16%, transparent);
}
.acc-card-menu-modal.is-desk-pop .acc-card-menu-close,
.acc-card-menu-modal.is-desk-pop .acc-card-menu-grab {
  display: none;
}
/* 电脑下拉不显示账户名标题（卡片上已有） */

.acc-card-menu-modal.is-desk-pop .acc-card-menu-head {
  display: none;
}
.acc-card-menu-modal.is-desk-pop .acc-card-menu-sheet {
  background: #fff;
  padding: 10px;
  border: 1px solid var(--line);
}
.acc-card-menu-modal.is-desk-pop .acc-card-menu-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc-card-menu-modal.is-desk-pop .acc-card-menu-row.acc-card-menu-enable,
.acc-card-menu-modal.is-desk-pop .acc-card-menu-act {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
html[data-theme="dark"] .acc-card-menu-modal.is-desk-pop .acc-card-menu-sheet {
  background: var(--sheet);
  border: 1px solid var(--card-line);
}
html[data-theme="dark"] .acc-card-menu-modal.is-desk-pop .acc-card-menu-row.acc-card-menu-enable,
html[data-theme="dark"] .acc-card-menu-modal.is-desk-pop .acc-card-menu-act {
  background: var(--sheet-2);
  border-color: var(--card-line);
}
.acc-card-menu-grab {
  display: none;
  width: 36px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: rgba(21, 32, 43, 0.18);
  flex-shrink: 0;
}
html[data-theme="dark"] .acc-card-menu-grab {
  background: rgba(255, 255, 255, 0.22);
}
/* 手机：底部抽屉（对齐账号设置：灰底 + 顶杠 + 白列表） */

.fee-tip-modal.acc-card-menu-modal.is-mobile-drawer {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: stretch !important;
  place-items: unset !important;
  padding: 0 !important;
  box-sizing: border-box;
}
.fee-tip-modal.acc-card-menu-modal.is-mobile-drawer .acc-card-menu-sheet.fee-sheet {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(21, 32, 43, 0.12) !important;
  background: #f4f6f8 !important;
  box-shadow: 0 -12px 40px rgba(12, 20, 28, 0.22) !important;
  padding: 6px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  max-height: min(78vh, calc(100vh - 48px));
  overflow: auto;
  align-self: flex-end;
  touch-action: auto;
  animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.acc-card-menu-modal.is-mobile-drawer .acc-card-menu-grab {
  display: block;
}
.acc-card-menu-modal.is-mobile-drawer .acc-card-menu-close {
  display: none !important;
}
.acc-card-menu-modal.is-mobile-drawer .acc-card-menu-head {
  display: none;
}
.acc-card-menu-modal.is-mobile-drawer .acc-card-menu-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.acc-card-menu-modal.is-mobile-drawer .acc-card-menu-row.acc-card-menu-enable,
.acc-card-menu-modal.is-mobile-drawer .acc-card-menu-act {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, #fff);
  padding: 14px 12px;
  text-align: center;
}
html[data-theme="dark"] .acc-card-menu-modal.is-mobile-drawer .acc-card-menu-sheet.fee-sheet,
html[data-theme="dark"] .fee-tip-modal.acc-card-menu-modal.on .acc-card-menu-sheet.fee-sheet {
  background: var(--sheet, #121212) !important;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  outline: none !important;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .acc-card-menu-modal.is-mobile-drawer .acc-card-menu-body {
  background: transparent;
  border: 0;
}
@media (max-width: 899px) {
  .fee-tip-modal.acc-card-menu-modal.on {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: stretch !important;
    place-items: unset !important;
    padding: 0 !important;
  }
  .fee-tip-modal.acc-card-menu-modal.on .acc-card-menu-sheet.fee-sheet {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(21, 32, 43, 0.12) !important;
    background: #f4f6f8 !important;
    box-shadow: 0 -12px 40px rgba(12, 20, 28, 0.22) !important;
    padding: 6px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    align-self: flex-end;
    touch-action: auto;
    animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  html[data-theme="dark"] .fee-tip-modal.acc-card-menu-modal.on .acc-card-menu-sheet.fee-sheet {
    background: var(--sheet, #121212) !important;
    border-top-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45) !important;
  }
  .acc-card-menu-modal.on .acc-card-menu-grab {
    display: block;
  }
  .acc-card-menu-modal.on .acc-card-menu-head {
    display: none;
  }
  .acc-card-menu-modal.on .acc-card-menu-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
  .acc-card-menu-modal.on .acc-card-menu-row.acc-card-menu-enable,
  .acc-card-menu-modal.on .acc-card-menu-act {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel, #fff);
    padding: 14px 12px;
    text-align: center;
  }
}
@keyframes accCardMenuDrawerIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.acc-card-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.acc-card-menu-title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  color: var(--ink, #15202b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-card-menu-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted, #8899aa);
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 8px;
}
.acc-card-menu-close:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--line, #e2e8f0) 80%, transparent);
}
.acc-card-menu-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc-card-menu-body--outlined {
  background: transparent;
  border: 0;
}
.acc-card-menu-row.acc-card-menu-enable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--chip-bg, #f4f7f9) 92%, #fff);
  cursor: pointer;
}
.acc-card-menu-lab {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #15202b);
}
.acc-card-menu-act {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel, #fff);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: none;
}
.acc-card-menu-act:hover:not(:disabled) {
  background: var(--chip-bg);
  border-color: color-mix(in srgb, var(--ink) 12%, var(--line));
}
.acc-card-menu-act:active:not(:disabled) {
  background: var(--chip-hover, var(--chip-bg));
}
.acc-card-menu-act:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.acc-card-menu-act--danger {
  color: var(--down, #d4535c) !important;
  font-weight: 800;
  border-color: color-mix(in srgb, var(--down, #d4535c) 32%, var(--line)) !important;
  background: var(--panel, #fff);
}
.acc-card-menu-modal.is-mobile-drawer .acc-card-menu-act--danger,
.acc-card-menu-modal.on .acc-card-menu-act--danger {
  color: var(--down, #d4535c) !important;
}
.acc-card-menu-act--detail {
  margin-top: 0;
  color: var(--ink);
  font-weight: 750;
}
/* 仓位窗 · 委托槽筛选（对齐账户菜单：居中 / 底抽屉 + 分组列表） */

.pos-ord-slot-filter-modal {
  /* 高于仓位浮窗叠层 FLOAT_STACK_CEIL(78) 与全屏币种页 */
  z-index: 32900;
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  pointer-events: auto;
}
.pos-ord-slot-filter-modal .pos-ord-slot-sheet.fee-sheet {
  width: min(280px, calc(100vw - 32px));
  min-height: 0;
  height: auto;
  max-height: min(70vh, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  background: var(--panel, #fff);
}
.pos-ord-slot-filter-modal.is-desk-center {
  display: grid !important;
  place-items: center !important;
  padding: 16px !important;
}
.pos-ord-slot-filter-modal.is-desk-center .pos-ord-slot-sheet {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0;
  max-height: min(78vh, calc(100vh - 32px));
  overflow: auto;
}
.pos-ord-slot-filter-modal.is-desk-center .acc-card-menu-grab {
  display: none;
}
.pos-ord-slot-filter-modal.is-mobile-drawer {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: stretch !important;
  place-items: unset !important;
  padding: 0 !important;
  z-index: var(--z-drawer-mobile, 12080) !important;
}
.pos-ord-slot-filter-modal.is-mobile-drawer .pos-ord-slot-sheet {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  align-self: flex-end !important;
  border-radius: 18px 18px 0 0 !important;
  border-bottom: 0;
  background: var(--panel, #fff) !important;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  max-height: min(72dvh, calc(100dvh - 48px));
  overflow: hidden;
  animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pos-ord-slot-filter-modal.is-mobile-drawer .pos-ord-slot-list {
  padding-bottom: 8px;
}
.pos-ord-slot-filter-modal.is-mobile-drawer .acc-card-menu-grab {
  display: block;
}
.pos-ord-slot-filter-modal .acc-card-menu-grab {
  margin-top: 8px;
}
.pos-ord-slot-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.pos-ord-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 11px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.pos-ord-slot-row:hover {
  background: color-mix(in srgb, var(--chip-bg, #f4f7f9) 45%, transparent);
}
.pos-ord-slot-row.is-on {
  background: transparent;
}
.pos-ord-slot-row-lab {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}
.pos-ord-slot-row-mark {
  flex: 0 0 auto;
  min-width: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink, #15202b);
  opacity: 0.88;
}
html[data-theme="dark"] .pos-ord-slot-filter-modal .pos-ord-slot-sheet {
  background: var(--panel, #1a222c);
  border-color: var(--card-line, rgba(255, 255, 255, 0.1));
}
html[data-theme="dark"] .pos-ord-slot-filter-modal.is-mobile-drawer .pos-ord-slot-sheet {
  background: var(--sheet, #121820) !important;
}
html[data-theme="dark"] .pos-ord-slot-row.is-on {
  background: transparent;
}
html[data-theme="dark"] .pos-ord-slot-row:hover {
  background: color-mix(in srgb, var(--chip-bg, #1c2430) 55%, transparent);
}
html[data-theme="dark"] .acc-card-menu-modal .acc-card-menu-sheet {
  background: var(--panel, #1a222c);
}
html[data-theme="dark"] .acc-card-menu-row.acc-card-menu-enable,
html[data-theme="dark"] .acc-card-menu-act {
  background: color-mix(in srgb, var(--panel, #151a21) 88%, #000);
}
/* 新手教学：电脑居中 / 手机底抽屉（不进帮助中心） */

.teach-sheet {
  z-index: 12090;
}
.teach-sheet .teach-sheet-card {
  width: min(420px, calc(100vw - 32px));
  padding: 8px 16px 16px;
  border-radius: 18px;
  background: var(--panel, #fff);
  overflow: auto;
  overflow-x: hidden;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(86vh, calc(100vh - 32px));
  flex: none !important;
  box-sizing: border-box;
}
.teach-sheet-body {
  min-width: 0;
  overflow-x: hidden;
}
.fee-tip-modal.teach-sheet.is-desk-pop {
  display: grid;
  place-items: center;
  padding: 16px;
}
.fee-tip-modal.teach-sheet.is-mobile-drawer {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  place-items: unset !important;
  padding: 0 !important;
}
.fee-tip-modal.teach-sheet.is-mobile-drawer .teach-sheet-card.fee-sheet {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  align-self: flex-end !important;
  margin: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  padding: 6px max(18px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px))
    max(18px, env(safe-area-inset-left, 0px)) !important;
  max-height: min(78vh, calc(100vh - 80px));
  animation: accCardMenuDrawerIn 0.22s ease-out;
  box-sizing: border-box !important;
  overflow-x: hidden;
}
.teach-sheet.is-mobile-drawer .teach-sheet-x {
  display: none !important;
}
@media (max-width: 899px) {
  .fee-tip-modal.teach-sheet.on {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    place-items: unset !important;
    padding: 0 !important;
  }
  .fee-tip-modal.teach-sheet.on {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .fee-tip-modal.teach-sheet.on .teach-sheet-card.fee-sheet {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    align-self: flex-end !important;
    margin: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    padding: 6px max(18px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px))
      max(18px, env(safe-area-inset-left, 0px)) !important;
    max-height: min(78vh, calc(100vh - 80px));
    animation: accCardMenuDrawerIn 0.22s ease-out;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }
  .teach-sheet.on .teach-sheet-x {
    display: none !important;
  }
}
.teach-sheet-grab {
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  margin: 8px auto 2px;
  background: color-mix(in srgb, var(--ink, #111) 18%, transparent);
}
.teach-sheet.is-mobile-drawer .teach-sheet-grab {
  display: block;
}
@media (max-width: 899px) {
  .teach-sheet.on .teach-sheet-grab {
    display: block;
  }
}
.teach-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0 4px;
}
.teach-sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink, #111);
}
.teach-sheet-x {
  appearance: none;
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}
.teach-pane[hidden] { display: none !important; }
.teach-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 8px -4px 12px;
  padding: 0 4px 6px;
}
.teach-rail[hidden],
.teach-hero-card[hidden] { display: none !important; }
.teach-rail-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
  position: relative;
  min-height: 168px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  overflow: hidden;
  background: #0b0b0b;
  color: #fff;
  cursor: pointer;
  text-align: left;
  padding: 0;
  box-sizing: border-box;
}
.teach-rail-cover {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
}
.teach-rail-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 168px;
  background: #000;
}
.teach-rail-play {
  position: absolute;
  left: 14px;
  bottom: 36px;
  font-size: 14px;
}
.teach-rail-name {
  position: absolute;
  left: 36px;
  right: 12px;
  bottom: 12px;
  font-size: 16px;
  font-weight: 800;
}
.teach-rail-card > .teach-hero-mins {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
}
.teach-player {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(6, 10, 16, 0.72);
  display: none;
}
.teach-player.on { display: block; }
.teach-player.is-page {
  background: #000;
}
.teach-player-inner {
  width: min(860px, 86vw);
  height: min(72vh, 520px);
  margin: 10vh auto 0;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.teach-player.is-page .teach-player-inner {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
}
.teach-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px 6px 4px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
}
.teach-player-bar .teach-player-back.ui-page-back {
  color: #fff;
  margin-left: 0;
}
.teach-player-bar .teach-player-back.ui-page-back:active {
  background: rgba(255, 255, 255, 0.12);
}
.teach-player-fs {
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
}
.teach-player video {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: #000;
}
.teach-player.is-pending .teach-player-fs,
.teach-player.is-pending video { display: none !important; }
.teach-player-spin {
  flex: 1;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.teach-player-spin[hidden] { display: none !important; }
.teach-player-spin .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.teach-player-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: #fff;
  border-radius: 50%;
  animation: teachSpin 0.75s linear infinite;
}
@keyframes teachSpin {
  to { transform: rotate(360deg); }
}
.admin-tut-modal .admin-tut-sheet {
  width: min(420px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 16px;
  background: var(--panel, #fff);
}
.admin-tut-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.admin-tut-x {
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
}
.admin-tut-form { display: grid; gap: 10px; }
.admin-tut-lab {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.admin-tut-hint,
.admin-tut-cur {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.admin-tut-preview img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
}
.admin-tut-acts {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.teach-hero-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 220px;
  margin: 10px 0 8px;
  padding: 12px 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: #000;
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
.teach-hero-mins {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-end;
  font-size: 12px;
  font-weight: 700;
  color: #d6ff2a;
}
.teach-hero-art {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0 6px;
  min-height: 136px;
}
.teach-hero-art svg.teach-hero-mark,
.teach-hero-mark {
  width: min(340px, 100%);
  height: auto;
  display: block;
}
/* 教学默认封面：居中白 M 笔画，沿路径贪吃蛇爬完（canvas，非圆环 LOGO 贴图） */

.teach-cover-brand {
  position: relative;
  width: 100%;
  height: 136px;
  display: grid;
  place-items: center;
}
.teach-cover-snake {
  width: 112px;
  height: 112px;
  display: block;
}
.teach-rail-ph .teach-cover-brand {
  width: 100%;
  height: 168px;
}
.teach-rail-ph .teach-cover-snake {
  width: 96px;
  height: 96px;
}
.teach-hero-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.teach-hero-play {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
}
.teach-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 4px 4px 8px;
}
.teach-foot-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.teach-foot-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
}
.teach-foot-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--chip-bg, #f3f5f7) 92%, #fff);
  color: var(--ink);
}
.teach-foot-btn em {
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}
.teach-pane[data-teach-pane="novice"] {
  padding: 0 0 10px;
}
.teach-novice-path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.teach-novice-step {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 12px;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 10%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--chip-bg, #f3f5f7) 88%, #fff);
  color: var(--ink, #111);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  font: inherit;
}
button.teach-novice-step {
  appearance: none;
}
.teach-novice-step.is-disabled {
  cursor: default;
  opacity: 0.62;
  border-style: dashed;
}
.teach-novice-path li.is-soon .teach-novice-n {
  background: color-mix(in srgb, var(--muted, #94a3b8) 35%, #fff);
  color: var(--muted, #64748b);
}
button.teach-novice-step:not(.is-disabled):active {
  transform: scale(0.99);
}
.teach-novice-n {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--ink, #12171e);
  color: #fff;
}
.teach-novice-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.teach-novice-copy b {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}
.teach-novice-copy span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted, #5a6570);
}
.teach-novice-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 18px;
  min-width: 0;
}
.teach-novice-actions .btn {
  width: 100%;
  justify-content: center;
}
.teach-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--teal, #0d9488);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 0 4px;
  cursor: pointer;
}
.teach-sub-title {
  margin: 4px 0 2px;
  font-size: 18px;
  font-weight: 800;
}
.teach-sub-mins {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.teach-steps {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 12px;
}
.teach-steps li {
  display: grid;
  gap: 2px;
}
.teach-steps b { font-size: 14px; }
.teach-steps span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.teach-go {
  display: block;
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--ink, #111);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.teach-docs {
  display: grid;
  gap: 10px;
  padding: 6px 0 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
/* 规则说明：电脑居中弹窗 / 手机底部抽屉；须高于教学中心（手机 teach 可达 32000） */
#rules-sheet.rules-sheet,
#rules-sheet.fee-tip-modal.on {
  z-index: 32150 !important;
}

/* 持仓卡「更多」按钮红点 */
.holding-info .hold-more-btn {
  position: relative;
}
.hold-more-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f43f5e;
  border: 0;
  pointer-events: none;
}
.holding-info .hold-more-btn.warn,
.holding-info .hold-more-btn.warn:hover,
.holding-info .hold-more-btn.warn:focus-visible {
  color: var(--ink);
}

/* 持仓卡「更多」：电脑居中弹层 / 手机底抽屉 · OKX 宫格 */
#hold-more-sheet.hold-more-sheet,
#hold-more-sheet.fee-tip-modal.on {
  z-index: 32160 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
#hold-more-sheet.fee-tip-modal.on.is-desk-pop {
  display: grid !important;
}
/* 上层仓位/参数等打开时：… 层不接收点击，避免关上层时点穿 */
#hold-more-sheet.is-stacked {
  pointer-events: none;
}
/*
 * 「…」打开时整条链路抬升（否则子层仍是 60/100/12080/31000，会沉到 … 或仓位下面）
 * L0 …=32160  L1 宫格目标=33000  L2 仓位内页=33150  L3 确认=33250  L4 气泡=33350
 */
body.hold-more-open {
  --z-drawer-mobile: 33000;
  --z-modal-above-drawer: 33150;
  --z-tip-fixed: 33350;
}
body.hold-more-open #pos-sheet,
body.hold-more-open #pos-sheet.on,
body.hold-more-open #ai-sheet,
body.hold-more-open #ai-sheet.on,
body.hold-more-open #app-params-settings,
body.hold-more-open #app-params-settings.params-sheet,
body.hold-more-open #rules-sheet,
body.hold-more-open #rules-sheet.on,
body.hold-more-open #teach-player,
body.hold-more-open #teach-player.on,
body.hold-more-open #fleet-sheet,
body.hold-more-open #fleet-sheet.on,
body.hold-more-open #fleet-float {
  z-index: 33000 !important;
}
body.hold-more-open #lever-pop,
body.hold-more-open #lever-pop:not([hidden]),
body.hold-more-open #hold-detail-sheet,
body.hold-more-open #hold-detail-sheet.on,
body.hold-more-open #app-cycle-bills,
body.hold-more-open #app-cycle-bills.fee-tip,
body.hold-more-open #app-pnl-hub,
body.hold-more-open #app-pnl-hub.on,
body.hold-more-open #hold-fee-sheet,
body.hold-more-open #hold-fee-sheet.on,
body.hold-more-open #hold-fee-cmp-sheet,
body.hold-more-open #hold-fee-cmp-sheet.on,
body.hold-more-open #hold-color-sheet,
body.hold-more-open #hold-color-sheet.on,
body.hold-more-open #hold-fr-sheet,
body.hold-more-open #hold-fr-sheet.on,
body.hold-more-open #hold-fr-hist-sheet,
body.hold-more-open #hold-fr-hist-sheet.on,
body.hold-more-open #app-mgn-tip,
body.hold-more-open #teach-sheet,
body.hold-more-open #teach-sheet.on {
  z-index: 33150 !important;
}
body.hold-more-open #hold-fee-cmp-sheet,
body.hold-more-open #hold-fee-cmp-sheet.on {
  z-index: 33200 !important;
}
body.hold-more-open .fee-tip-modal.on:not(#hold-more-sheet):not(#hold-detail-sheet):not(#rules-sheet):not(#app-params-settings),
body.hold-more-open .fee-tip.on.confirm-modal,
body.hold-more-open .fee-tip-modal.confirm-modal,
body.hold-more-open .fee-tip-modal.confirm-modal.on {
  z-index: 33250 !important;
}
body.hold-more-open #hold-fr-pick,
body.hold-more-open #hold-fr-pick.on,
body.hold-more-open #hold-fr-pick.hold-fr-drop-mask,
body.hold-more-open .hold-fr-drop-mask,
body.hold-more-open #hold-fr-filter,
body.hold-more-open #hold-fr-filter.on {
  z-index: 33320 !important;
}
body.hold-more-open > .ui-help-tip,
body.hold-more-open .ui-help-tip.ui-help-tip-portal,
body.hold-more-open > .fold-tip.fold-tip-portal,
body.hold-more-open .fold-tip.fold-tip-portal,
body.hold-more-open .pos-heal-pop,
body.hold-more-open .pos-heal-pop-portal,
body.hold-more-open .run-stats-pop-portal {
  z-index: 33350 !important;
}
.hold-more-sheet .hold-more-card {
  width: min(420px, calc(100vw - 32px));
  padding: 10px 16px 18px;
  border-radius: 18px;
  background: var(--sheet, var(--panel, #fff));
  overflow: auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(86vh, calc(100vh - 32px));
  flex: none !important;
  box-sizing: border-box;
}
.hold-more-grab {
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  margin: 6px auto 2px;
  background: color-mix(in srgb, var(--ink, #111) 18%, transparent);
  flex-shrink: 0;
}
.fee-tip-modal.hold-more-sheet.is-desk-pop {
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.fee-tip-modal.hold-more-sheet.is-mobile-drawer {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  place-items: unset !important;
  padding: 0 !important;
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.fee-tip-modal.hold-more-sheet.is-mobile-drawer .hold-more-card.fee-sheet {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(78vh, calc(100vh - 80px)) !important;
  margin: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  padding: 6px 14px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: flex-end;
  animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  /* 手机贴底：仅顶线（压过 04-shell .fee-sheet 四边 border） */
  border: 0 !important;
  border-top: 1px solid var(--card-line, var(--line)) !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.hold-more-sheet.is-mobile-drawer .hold-more-grab {
  display: block;
}
.hold-more-head {
  display: flex;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  padding: 4px 0 12px;
  flex-shrink: 0;
}
.hold-more-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  background: var(--panel-2, #f5f5f5);
  border-radius: 10px;
  padding: 2px;
}
.hold-more-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--ink, #111) 62%, transparent);
  flex: 1;
  min-width: 0;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hold-more-tab.on {
  background: var(--sheet, var(--panel, #fff));
  color: var(--ink, #111);
  box-shadow: 0 1px 4px color-mix(in srgb, #0b1220 10%, transparent);
}
.hold-more-pane {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.hold-more-pane[hidden] {
  display: none !important;
}
.hold-more-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
  padding: 4px 0 2px;
}
.hold-more-train-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink, #111) 68%, transparent);
  background: color-mix(in srgb, #3b82f6 10%, transparent);
}
.hold-more-cell {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  cursor: pointer;
  color: var(--ink, #111);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  border-radius: 12px;
  position: relative;
}
.hold-more-cell.has-alert .hold-more-ico::after,
.hold-more-tab.has-alert::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f43f5e;
  border: 1.5px solid var(--panel, #fff);
  pointer-events: none;
}
.hold-more-tab.has-alert {
  position: relative;
}
.hold-more-tab.has-alert::after {
  top: 6px;
  right: 10px;
  border-color: transparent;
}
.hold-more-cell-tag {
  position: absolute;
  top: -4px;
  right: -6px;
  z-index: 1;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
}
.hold-more-cell:active {
  background: color-mix(in srgb, var(--ink, #111) 6%, transparent);
}
.hold-more-ico {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2, #f5f5f5);
  color: var(--ink, #111);
  border: 0;
  box-shadow: none;
}
.hold-more-ico .hold-tool-svg,
.hold-more-ico svg {
  width: 22px;
  height: 22px;
  display: block;
}
.hold-more-ico .pos-bill-clock-disk {
  fill: var(--panel-2, #f5f5f5);
}
html[data-theme="dark"] .hold-more-ico .pos-bill-clock-disk {
  fill: var(--sheet-2, #1c1c1c);
}
.hold-more-ico-ai .ai-ico-lab {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: inherit;
}
.hold-more-cell em {
  font-style: normal;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hold-more-teach-host {
  min-height: 120px;
}
.hold-more-teach-loading {
  padding: 28px 12px;
  text-align: center;
  font-size: 13px;
  color: color-mix(in srgb, var(--ink, #111) 55%, transparent);
}
/* 嵌入原教学中心：视频轨 + 底部双入口 */
.hold-more-teach-rail.teach-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 4px 0 8px;
  padding: 0 0 4px;
}
.hold-more-teach-rail .teach-rail-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
}
.hold-more-teach-hero.teach-hero-card {
  margin: 4px 0 8px;
  min-height: 200px;
}
.hold-more-teach-foot.teach-foot {
  margin-top: 4px;
}
.hold-more-teach-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-style: normal;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
}
.hold-more-teach-rail .teach-rail-card.is-match {
  outline: 1px solid rgba(37, 99, 235, 0.55);
}
html[data-theme="dark"] .hold-more-sheet.is-desk-pop .hold-more-card,
html[data-theme="dark"] .hold-more-sheet:not(.is-mobile-drawer) .hold-more-card {
  background: var(--sheet, #121212);
  box-shadow: var(--sheet-shadow);
}
html[data-theme="dark"] .hold-more-sheet.is-mobile-drawer .hold-more-card {
  background: var(--sheet, #121212);
  box-shadow: none !important;
}
html[data-theme="dark"] .hold-more-tabs {
  background: var(--panel-2, #121212);
}
html[data-theme="dark"] .hold-more-tab.on {
  background: var(--sheet-2, #1c1c1c);
  color: var(--ink, #fff);
  box-shadow: none;
}
html[data-theme="dark"] .hold-more-tab,
html[data-theme="dark"] .hold-more-cell {
  color: var(--ink, #e8edf2);
}
html[data-theme="dark"] .hold-more-ico {
  background: var(--sheet-2, #1c1c1c);
  color: var(--ink, #f2f5f8);
  border: 0;
  box-shadow: none;
}
.hold-more-sheet .teach-foot-ico {
  background: var(--panel-2, #f5f5f5);
  color: var(--ink);
  border: 0;
  box-shadow: none;
}
html[data-theme="dark"] .hold-more-sheet .teach-foot-ico {
  background: var(--sheet-2, #1c1c1c);
  color: var(--ink);
  border: 0;
  box-shadow: none;
}
html[data-ud-palette="classic"][data-ud-invert="0"] {
  --up: #0f7a6a;
  --up-solid: #0a5c50;
  --down: #c0392b;
  --down-solid: #a83228;
  --ct-mm-gate-on: #0f7a6a;
}
html[data-theme="dark"][data-ud-palette="classic"][data-ud-invert="0"] {
  --up: #2bbb8a;
  --up-solid: #1e9a72;
  --down: #e5546d;
  --down-solid: #cc4458;
  --ct-mm-gate-on: #2bbb8a;
}
html[data-ud-palette="okx"][data-ud-invert="0"],
html[data-ud-palette="modern"][data-ud-invert="0"] {
  --up: #00c076;
  --up-solid: #00a86a;
  --down: #f6465d;
  --down-solid: #e03e54;
  --ct-mm-gate-on: #00c076;
}
html[data-theme="dark"][data-ud-palette="okx"][data-ud-invert="0"],
html[data-theme="dark"][data-ud-palette="modern"][data-ud-invert="0"] {
  --up: #00c076;
  --up-solid: #00a86a;
  --down: #f6465d;
  --down-solid: #e03e54;
  --ct-mm-gate-on: #00c076;
}
html[data-ud-palette="classic"][data-ud-invert="1"] {
  --up: #c0392b;
  --up-solid: #a83228;
  --down: #0f7a6a;
  --down-solid: #0a5c50;
  --ct-mm-gate-on: #c0392b;
}
html[data-theme="dark"][data-ud-palette="classic"][data-ud-invert="1"] {
  --up: #e5546d;
  --up-solid: #cc4458;
  --down: #2bbb8a;
  --down-solid: #1e9a72;
  --ct-mm-gate-on: #e5546d;
}
html[data-ud-palette="okx"][data-ud-invert="1"],
html[data-ud-palette="modern"][data-ud-invert="1"] {
  --up: #f6465d;
  --up-solid: #e03e54;
  --down: #00c076;
  --down-solid: #00a86a;
  --ct-mm-gate-on: #f6465d;
}
html[data-theme="dark"][data-ud-palette="okx"][data-ud-invert="1"],
html[data-theme="dark"][data-ud-palette="modern"][data-ud-invert="1"] {
  --up: #f6465d;
  --up-solid: #e03e54;
  --down: #00c076;
  --down-solid: #00a86a;
  --ct-mm-gate-on: #f6465d;
}
.hold-tool-layer.fee-tip-modal.on.is-desk-pop {
  display: grid !important;
  place-items: center;
  padding: 16px;
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hold-tool-layer.fee-tip-modal.on.is-mobile-drawer {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 !important;
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.fee-tip-modal.hold-tool-layer:not(.is-mobile-drawer) .hold-tool-layer-card.fee-sheet {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: min(440px, calc(100vw - 32px)) !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  max-height: min(88vh, calc(100vh - 32px)) !important;
  padding: 10px 18px 18px !important;
  overflow: hidden;
  touch-action: pan-y;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--sheet, var(--panel, #fff));
}
.hold-tool-layer.is-mobile-drawer .hold-tool-layer-card.fee-sheet {
  width: 100% !important;
  max-width: none !important;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  border-radius: 18px 18px 0 0 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.hold-tool-layer.is-mobile-drawer .hold-tool-layer-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  border-radius: 18px 18px 0 0 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  padding: 6px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: min(86vh, calc(100dvh - env(safe-area-inset-bottom, 0px)));
  align-self: flex-end;
  animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hold-tool-layer.is-mobile-drawer .hold-more-grab { display: block; }
.hold-tool-layer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  flex-shrink: 0;
}
.hold-tool-layer-head h3 {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 750;
}
.hold-tool-layer-back {
  appearance: none;
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.hold-tool-layer-gap { width: 40px; }
.hold-color-sheet .hold-tool-layer-back,
.hold-color-sheet .hold-tool-layer-gap,
.hold-fr-sheet .hold-tool-layer-back,
.hold-fr-sheet .hold-tool-layer-gap,
.hold-fr-hist-sheet .hold-tool-layer-back,
.hold-fr-hist-sheet .hold-tool-layer-gap {
  display: none !important;
}
.hold-color-sheet .hold-tool-layer-head h3,
.hold-fr-sheet .hold-tool-layer-head h3,
.hold-fr-hist-sheet .hold-tool-layer-head h3 {
  flex: 1;
  text-align: center;
}
.hold-tool-layer-body {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.hold-fee-exch.hold-fee-tabs {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  overflow-x: auto;
  padding: 0 2px 0;
  margin: 0 0 14px;
  border-bottom: 0;
  scrollbar-width: none;
}
.hold-fee-exch.hold-fee-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.hold-fee-tabs button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted, #737373);
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
}
.hold-fee-tabs button.on {
  color: var(--ink, #111);
}
.hold-fee-tabs button.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink, #111);
}
.hold-fee-sheet.is-desk-pop .hold-tool-layer-head,
.hold-fee-sheet.is-desk-pop .hold-more-grab,
.hold-fee-cmp-sheet.is-desk-pop .hold-tool-layer-head,
.hold-fee-cmp-sheet.is-desk-pop .hold-more-grab {
  display: none !important;
}
.hold-fee-sheet .hold-tool-layer-body,
.hold-tool-layer-body {
  scrollbar-width: none;
}
.hold-fee-sheet .hold-tool-layer-body::-webkit-scrollbar,
.hold-tool-layer-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
@media (max-width: 899px) {
  /* 持仓教学中心子抽屉：贴底、无底圆角（颜色/费率/手续费等） */
  .hold-tool-layer.fee-tip-modal.is-mobile-drawer:not(.is-desk-pop) {
    align-items: flex-end !important;
    justify-content: stretch !important;
    padding: 0 !important;
  }
  .hold-tool-layer.is-mobile-drawer:not(.is-desk-pop) .hold-tool-layer-card.fee-sheet {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    align-self: flex-end !important;
    box-shadow: 0 -12px 40px rgba(12, 20, 28, 0.22);
  }
  #hold-fee-sheet.hold-tool-layer.is-mobile-drawer {
    align-items: stretch !important;
    padding: 0 !important;
    background: var(--bg, #f5f5f5);
  }
  #hold-fee-sheet.is-mobile-drawer .hold-tool-layer-card.fee-sheet {
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: none !important;
    overflow: hidden;
  }
  #hold-fee-sheet.is-mobile-drawer .hold-more-grab {
    display: none !important;
  }
  #hold-fee-sheet.is-mobile-drawer .hold-tool-layer-head {
    display: flex !important;
    flex-shrink: 0;
    align-items: center;
    min-height: 48px;
    padding: 8px 0 6px;
    overflow: visible;
  }
  #hold-fee-sheet.is-mobile-drawer .hold-tool-layer-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  #hold-fee-sheet.is-mobile-drawer .hold-fee-exch.hold-fee-tabs {
    margin-top: 4px;
    padding-top: 8px;
  }
}
.hold-fee-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.hold-fee-hero h4 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hold-fee-cmp-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}
.hold-fee-card {
  border-radius: 14px;
  background: var(--panel-2, #f6f7f8);
  padding: 4px 16px;
  margin-bottom: 12px;
}
.hold-fee-asset + .hold-fee-asset {
  border-top: 1px solid var(--card-line, rgba(0,0,0,.08));
}
.hold-fee-asset { padding: 14px 0; }
.hold-fee-asset-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  margin-bottom: 10px;
}
.hold-fee-q {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  background: transparent;
  color: inherit;
  font-size: 10px;
  line-height: 1;
  padding: 0;
}
.hold-fee-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hold-fee-pair small {
  display: block;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  margin-bottom: 4px;
}
.hold-fee-pair b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hold-fee-sheet.is-desk-pop .hold-tool-layer-card.fee-sheet,
.hold-fee-cmp-sheet.is-desk-pop .hold-tool-layer-card.fee-sheet {
  padding-top: 16px !important;
}
@media (max-width: 899px) {
  #hold-fee-cmp-sheet.hold-tool-layer.is-mobile-drawer {
    align-items: flex-end !important;
    padding: 0 !important;
    background: rgba(6, 10, 16, 0.58);
  }
  #hold-fee-cmp-sheet.is-mobile-drawer .hold-tool-layer-card.fee-sheet {
    height: auto !important;
    min-height: 0 !important;
    max-height: min(86vh, calc(100vh - 48px)) !important;
    border-radius: 18px 18px 0 0 !important;
    width: 100% !important;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #hold-fee-cmp-sheet.is-mobile-drawer .hold-more-grab {
    display: block !important;
  }
  #hold-fee-cmp-sheet.is-mobile-drawer .hold-tool-layer-head {
    display: none !important;
  }
}
.hold-fee-note {
  margin: 10px 0 8px;
  font-size: 11px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 48%, transparent);
}
.hold-fee-off {
  display: inline-block;
  font-size: 13px;
  font-weight: 650;
  color: #c47a22;
  text-decoration: none;
}
.hold-fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.hold-fee-table th,
.hold-fee-table td {
  text-align: left;
  padding: 10px 6px;
  border-bottom: 1px solid var(--card-line, rgba(0,0,0,.08));
}
.hold-fee-table tr.is-cur td { font-weight: 750; }
.hold-fee-cmp-cap {
  margin: 0 0 8px;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}
.hold-color-sec { margin-bottom: 16px; }
.hold-color-sec h4 {
  margin: 4px 0 10px;
  padding: 0 2px;
  font-size: 13px;
  font-weight: 650;
  color: color-mix(in srgb, var(--ink) 58%, transparent);
}
.hold-color-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--card-line, rgba(0,0,0,.1));
  background: var(--sheet, #fff);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.hold-color-card.on {
  border-color: var(--ink, #111);
  box-shadow: inset 0 0 0 1px var(--ink, #111);
}
.hold-color-card-t { font-size: 16px; font-weight: 750; }
.hold-color-mini { width: 92px; height: 40px; flex-shrink: 0; }
.hold-color-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--card-line, rgba(0,0,0,.1));
  background: var(--sheet, #fff);
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
}
.hold-color-row.on {
  border-color: var(--ink, #111);
  box-shadow: inset 0 0 0 1px var(--ink, #111);
}
.hold-color-arrows {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 0;
}
.hold-color-arrows svg {
  width: 15px;
  height: 17px;
  display: block;
  fill: currentColor;
}
.hold-color-arrows .is-up { color: var(--up, #0f7a6a); }
.hold-color-arrows .is-dn { color: var(--down, #c0392b); }
.hold-color-arrows.is-swap .is-up { color: var(--down, #c0392b); }
.hold-color-arrows.is-swap .is-dn { color: var(--up, #0f7a6a); }
html[data-theme="dark"] .hold-tool-layer-card,
html[data-theme="dark"] .hold-color-card,
html[data-theme="dark"] .hold-color-row {
  background: var(--sheet, #121212);
}
html[data-theme="dark"] .hold-fee-card {
  background: var(--sheet-2, #1c1c1c);
}
html[data-theme="dark"] .hold-fee-tabs button.on {
  color: var(--ink, #f2f5f8);
}
html[data-theme="dark"] .hold-fee-tabs button.on::after {
  background: var(--ink, #f2f5f8);
}
html[data-theme="dark"] .hold-color-card.on,
html[data-theme="dark"] .hold-color-row.on {
  border-color: #f2f5f8;
  box-shadow: inset 0 0 0 1px #f2f5f8;
}
.hold-fr-ov { padding: 4px 2px 8px; }
.hold-fr-ov .hold-fr-bar { margin-bottom: 14px; }
.hold-fr-kicker {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
}
.hold-fr-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
  margin-bottom: 14px;
}
.hold-fr-kpis small {
  display: block;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink) 52%, transparent);
  margin-bottom: 6px;
}
.hold-fr-kpis b { font-size: 18px; font-weight: 800; }
.hold-fr-kpis b.is-up { color: var(--up); }
.hold-fr-kpis b.is-dn { color: var(--down); }
.hold-fr-band {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 12px 0;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}
.hold-fr-intro {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  padding: 10px 0;
  cursor: pointer;
}
.hold-fr-intro i {
  font-style: normal;
  transform: rotate(180deg);
  display: inline-block;
  opacity: 0.55;
}
.hold-fr-intro.is-open i { transform: none; }
.hold-fr-intro-body {
  font-size: 13px;
  line-height: 1.65;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  padding-bottom: 16px;
}
.hold-fr-cta {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 28px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 800;
  background: #111;
  color: #fff;
  cursor: pointer;
}
html[data-theme="dark"] .hold-fr-cta {
  background: #fff;
  color: #111;
}
.hold-fr-cta.is-inline { width: auto; min-width: 120px; }
.hold-fr-hist-sheet .hold-tool-layer-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-bottom: 0;
}
.hold-fr-hist {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.hold-fr-hist-pin {
  flex-shrink: 0;
  background: var(--sheet, var(--panel, #fff));
  z-index: 2;
}
.hold-fr-hist-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.hold-fr-hist-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.hold-fr-hist[data-hold-fr-view="cmp"] [data-hold-fr-pick="venue"],
.hold-fr-hist[data-hold-fr-view="cmp"] [data-hold-fr-pane="rate"],
.hold-fr-hist[data-hold-fr-view="rate"] [data-hold-fr-pane="cmp"] {
  display: none !important;
}
.hold-fr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--panel-2, #f3f4f6);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 8px;
}
.hold-fr-tabs button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  cursor: pointer;
}
.hold-fr-tabs button.on {
  background: var(--sheet, #fff);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.hold-fr-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.hold-fr-bar > button:not(.hold-fr-filter) {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hold-fr-filter {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.hold-fr-chart-box {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 12px;
  background: transparent;
  padding: 6px 12px 8px 4px;
}
.hold-fr-chart-box .hold-fr-range {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 12px;
  margin: 0;
  gap: 16px;
  pointer-events: auto;
}
.hold-fr-range { display: flex; gap: 16px; }
.hold-fr-range button {
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.hold-fr-range button.on { color: var(--ink); }
.hold-fr-chart {
  position: relative;
  height: 248px;
  min-height: 248px;
  touch-action: none;
  user-select: none;
}
.hold-fr-svg { display: block; overflow: visible; }
.hold-fr-axis { stroke: color-mix(in srgb, var(--ink) 22%, transparent);stroke-width: 1; }
.hold-fr-tick { stroke: color-mix(in srgb, var(--ink) 22%, transparent);stroke-width: 1; }
.hold-fr-zero { stroke: color-mix(in srgb, var(--ink) 18%, transparent);stroke-width: 1; }
.hold-fr-lab { fill: #8b95a5; font-size: 11px; }
.hold-fr-line { fill: none; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.hold-fr-line.is-up { stroke: #2ecf9a; }
.hold-fr-line.is-dn { stroke: #d4535c; }
.hold-fr-cross-v,
.hold-fr-cross-h {
  stroke: color-mix(in srgb, var(--ink) 40%, transparent);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  display: none;
}
.hold-fr-cross-v.is-on,
.hold-fr-cross-h.is-on { display: block; }
.hold-fr-tip {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  background: #151a21;
  color: #e8eef4;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}
.hold-fr-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  margin: 8px 0 12px;
}
.hold-fr-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.hold-fr-meta span { color: color-mix(in srgb, var(--ink) 52%, transparent); }
.hold-fr-meta b { float: none; font-weight: 750; }
.hold-fr-list { list-style: none; margin: 0; padding: 0; }
.hold-fr-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--card-line, rgba(0,0,0,.08));
  font-size: 13px;
}
.hold-fr-list .is-head {
  border-top: 0;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  font-size: 12px;
}
.hold-fr-empty {
  padding: 28px 8px;
  text-align: center;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
}
.hold-fr-pick-body { display: flex; min-height: 240px; }
.hold-fr-pick-list { list-style: none; margin: 0; padding: 0; width: 100%; }
.hold-fr-pick-list button,
.hold-fr-pick-coins button,
.hold-fr-pick-side button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 8px;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hold-fr-pick-list button .hold-fr-pick-mark {
  margin-left: auto;
  flex-shrink: 0;
  width: 1.2em;
  text-align: right;
  font-weight: 700;
  color: var(--ink);
}
.hold-fr-pick-row .hold-fr-exico,
.hold-fr-pick-row .hold-fr-cico,
.hold-fr-bar .hold-fr-exico,
.hold-fr-bar .hold-fr-cico,
.hold-fr-bar .hold-fr-cico-wrap,
.hold-fr-pick-row .hold-fr-cico-wrap {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.hold-fr-cico-wrap {
  display: inline-grid;
  place-items: center;
  background: var(--panel-2, #eee);
  overflow: hidden;
}
.hold-fr-cico-wrap::before {
  content: attr(data-letter);
  font-size: 10px;
  font-weight: 800;
  grid-area: 1 / 1;
}
.hold-fr-cico-wrap img {
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
}
.hold-fr-cico-ph {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  background: var(--panel-2, #eee);
}
.hold-fr-drop-mask {
  position: fixed;
  inset: 0;
  z-index: 33320;
  background: transparent;
  pointer-events: auto;
}
body.hold-more-open .hold-fr-drop-mask,
body.hold-more-open #hold-fr-pick.hold-fr-drop-mask {
  z-index: 33320 !important;
  display: block !important;
  pointer-events: auto;
}
.hold-fr-drop-card {
  position: absolute;
  z-index: 2;
  background: var(--sheet, #fff);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 24, 32, 0.2);
  padding: 6px;
  max-height: min(70vh, 420px);
  overflow: auto;
  min-width: 180px;
}
.hold-fr-drop-card.is-coin {
  display: flex;
  min-width: 300px;
  padding: 0;
  overflow: hidden;
  max-height: min(70vh, 460px);
}
.hold-fr-drop-card.is-coin .hold-fr-pick-side {
  padding: 8px 0;
}
.hold-fr-drop-card.is-coin .hold-fr-pick-coins {
  overflow: auto;
  padding: 6px;
}
html[data-theme="dark"] .hold-fr-drop-card {
  background: var(--sheet, #1c1c1c);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.hold-fr-filter.is-desk-pop {
  display: grid !important;
  place-items: center;
  padding: 16px;
  background: rgba(6, 10, 16, 0.45);
}
.hold-fr-filter.is-desk-pop .hold-tool-layer-card.fee-sheet,
.hold-fr-filter.is-desk-pop .hold-tool-layer-card {
  width: min(420px, calc(100vw - 32px)) !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 8px 18px 16px !important;
  border-radius: 18px !important;
  align-self: center;
  animation: none;
  overflow: hidden;
}
.hold-fr-filter.is-desk-pop .hold-more-grab {
  display: none !important;
}
.hold-fr-filter.is-mobile-drawer .hold-more-grab {
  display: block;
}
.hold-fr-filter.is-mobile-drawer .hold-tool-layer-card {
  padding: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
}
.hold-fr-dates {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 8px;
}
.hold-fr-date-pill {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 1px solid var(--card-line, rgba(0,0,0,.12));
  background: var(--panel-2, #f5f5f5);
  color: var(--ink);
  border-radius: 8px;
  min-height: 42px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}
.hold-fr-date-pill.on {
  border-color: var(--ink, #111);
  background: var(--sheet, #fff);
}
.hold-fr-date-dash {
  color: color-mix(in srgb, var(--ink) 45%, transparent);
  flex-shrink: 0;
}
.hold-fr-wheels {
  position: relative;
  display: flex;
  height: 220px;
  margin: 4px 0 12px;
  overflow: hidden;
}
.hold-fr-wheel-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 40px;
  margin-top: -20px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  pointer-events: none;
  z-index: 0;
}
.hold-fr-wheel-col {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hold-fr-wheel-col::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.hold-fr-wheel-pad { display: block; height: 90px; }
.hold-fr-wheel-item {
  display: block;
  width: 100%;
  height: 40px;
  line-height: 40px;
  text-align: center;
  appearance: none;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 38%, transparent);
  font-size: 16px;
  scroll-snap-align: center;
  cursor: pointer;
}
.hold-fr-wheel-item.on {
  color: var(--ink);
  font-weight: 750;
}
.hold-fr-filter-act {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
}
.hold-fr-filter-act [data-fr-reset] {
  border: 0;
  flex: 1;
  background: var(--panel-2, #eee);
  border-radius: 24px;
  padding: 12px 22px;
  font-weight: 750;
  cursor: pointer;
  color: var(--ink);
}
.hold-fr-filter-ok {
  flex: 1.15;
  border: 0;
  border-radius: 24px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 800;
  background: #111;
  color: #fff;
  cursor: pointer;
}
html[data-theme="dark"] .hold-fr-filter-ok {
  background: #fff;
  color: #111;
}
html[data-theme="dark"] .hold-fr-date-pill {
  background: #1a1a1a;
  border-color: #333;
}
html[data-theme="dark"] .hold-fr-date-pill.on {
  border-color: #eee;
  background: #111;
}
html[data-theme="dark"] .hold-fr-wheel-band {
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .hold-fr-filter-act [data-fr-reset] {
  background: #2a2a2a;
  color: #eee;
}
.hold-fr-pick-list button.on,
.hold-fr-pick-coins button.on,
.hold-fr-pick-side button.on { font-weight: 800; }
.hold-fr-pick-side {
  width: 108px;
  flex-shrink: 0;
  border-right: 1px solid var(--card-line);
}
.hold-fr-pick-coins { flex: 1; }
html[data-theme="dark"] .hold-fr-tabs { background: #1c1c1c; }
html[data-theme="dark"] .hold-fr-tabs button.on { background: #2a2a2a; }
@media (max-width: 899px) {
  html[data-theme="dark"] .fee-tip-modal.hold-more-sheet.is-mobile-drawer .hold-more-card,
  html[data-theme="dark"] .fee-tip-modal.hold-more-sheet.is-mobile-drawer .hold-more-card.fee-sheet {
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }
  html[data-theme="dark"] .hold-more-grab {
    background: rgba(255, 255, 255, 0.28);
  }
}
.rules-sheet .rules-sheet-card {
  width: min(440px, calc(100vw - 32px));
  padding: 10px 18px 18px;
  border-radius: 18px;
  background: var(--panel, #fff);
  overflow: auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(86vh, calc(100vh - 32px));
  flex: none !important;
  box-sizing: border-box;
}
.rules-sheet-grab {
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  margin: 6px auto 2px;
  background: color-mix(in srgb, var(--ink, #111) 18%, transparent);
  flex-shrink: 0;
}
.fee-tip-modal.rules-sheet.is-desk-pop {
  display: grid;
  place-items: center;
  padding: 16px;
}
.fee-tip-modal.rules-sheet.is-mobile-drawer {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  place-items: unset !important;
  padding: 0 !important;
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.fee-tip-modal.rules-sheet.is-mobile-drawer .rules-sheet-card.fee-sheet {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(78vh, calc(100vh - 80px)) !important;
  margin: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: flex-end;
  animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -12px 40px rgba(12, 20, 28, 0.22);
}
.rules-sheet.is-mobile-drawer .rules-sheet-grab {
  display: block;
}
.rules-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0 10px;
  flex-shrink: 0;
}
.rules-sheet-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink, #111);
}
.rules-sheet-back,
.rules-sheet-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink, #111);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.rules-sheet.is-desk-pop .rules-sheet-back {
  visibility: hidden;
  pointer-events: none;
}
/* 手机抽屉：无 ×、无返回箭头；点遮罩关闭 */
.rules-sheet.is-mobile-drawer .rules-sheet-x,
.rules-sheet.is-mobile-drawer .rules-sheet-back {
  display: none !important;
}
.rules-sheet.is-mobile-drawer .rules-sheet-title {
  text-align: left;
  padding-left: 2px;
}
.rules-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.rules-usage-lead {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--muted, #4d4d4d);
}
.rules-usage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rules-usage-list li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px 12px;
  align-items: start;
  margin: 0;
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  background: var(--panel-2, #f5f5f5);
  border: 1px solid color-mix(in srgb, var(--ink, #111) 8%, transparent);
}
.rules-usage-list b {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink, #111);
  line-height: 1.45;
  padding-top: 1px;
}
.rules-usage-list span {
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.55;
  color: var(--muted, #4d4d4d);
}
html[data-theme="dark"] .rules-usage-lead {
  color: #9aa3ad;
}
html[data-theme="dark"] .rules-usage-list li {
  background: #121212;
  border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .rules-usage-list b {
  color: #f2f5f8;
}
html[data-theme="dark"] .rules-usage-list span {
  color: #b8c0c8;
}
html[data-theme="dark"] .rules-sheet .rules-sheet-card {
  background: #000 !important;
}
@media (max-width: 899px) {
  html[data-theme="dark"] .fee-tip-modal.rules-sheet.is-mobile-drawer .rules-sheet-card {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.55) !important;
  }
  html[data-theme="dark"] .rules-sheet-grab {
    background: rgba(255, 255, 255, 0.28);
  }
}
html[data-theme="dark"] .rules-sheet-title,
html[data-theme="dark"] .rules-sheet-back,
html[data-theme="dark"] .rules-sheet-x {
  color: #f2f5f8;
}
html[data-theme="dark"] .rules-sheet .teach-docs {
  color: #e8edf2;
}
html[data-theme="dark"] .teach-sheet .teach-sheet-card {
  background: var(--panel, #1a222c);
}
html[data-theme="dark"] .teach-sheet-title {
  color: #f2f5f8;
}
html[data-theme="dark"] .teach-foot-ico {
  background: color-mix(in srgb, var(--panel, #151a21) 88%, #000);
}
#accounts .plat-cred-badge {
  display: inline-flex;
  align-items: center;
  max-width: 72%;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fff;
  background: color-mix(in srgb, var(--plat-accent) 88%, #000);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#accounts .plat-cred-card.tone-binance .plat-cred-badge,
#accounts .plat-cred-card.tone-okx .plat-cred-badge {
  color: #fff;
}
#accounts .plat-cred-card.tone-binance .plat-cred-badge {
  color: #1a1200;
}
#accounts .plat-cred-body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 1;
}
#accounts .plat-cred-name {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#accounts .plat-cred-mask {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#accounts .plat-cred-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted, #6b7a8d);
}
#accounts .plat-cred-fail {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--down, #f05a72);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#accounts .plat-cred-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 2px;
  position: relative;
  z-index: 1;
}
#accounts .plat-cred-more {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  background: color-mix(in srgb, var(--panel, #fff) 96%, transparent);
  border-radius: 12px;
  box-shadow: 0 10px 28px color-mix(in srgb, #0b1220 14%, transparent);
}
html[data-theme="dark"] #accounts .plat-cred-card {
  background: var(--panel-2) !important;
  border: 1px solid var(--line);
  box-shadow: none;
}
html[data-theme="dark"] #accounts .plat-cred-name {
  color: var(--text, #e8eef6);
}
html[data-theme="dark"] #accounts .plat-cred-more {
  background: color-mix(in srgb, var(--panel, #1a222c) 96%, #0b0e11);
}
@media (min-width: 761px) {
  #accounts .plat-cred-stage:not(.is-mobile) .plat-cred-card {
    min-height: 196px;
    padding: 18px 20px 16px;
  }
  #accounts .plat-cred-stage:not(.is-mobile) .plat-cred-name {
    font-size: 20px;
  }
  #accounts .plat-cred-stage:not(.is-mobile) .plat-cred-slide:not(.is-center) {
    cursor: pointer;
  }
  /* 仅布局完成后雾化侧卡；中间卡强制清晰，避免无 is-center 时三张全糊 */
  #accounts .plat-cred-stage.is-laid:not(.is-mobile) .plat-cred-slide:not(.is-center) .plat-cred-card {
    transform: scale(0.84);
    filter: blur(2px);
    opacity: 0.5;
    transition: none;
  }
  #accounts .plat-cred-stage.is-laid:not(.is-mobile) .plat-cred-slide.is-center .plat-cred-card {
    transition: none;
  }
  #accounts .plat-cred-stage:not(.is-mobile) .plat-cred-slide.is-center .plat-cred-card {
    transform: none;
    filter: none;
    opacity: 1;
  }
  #accounts .plat-cred-stage.is-laid:not(.is-mobile) .plat-cred-slide:not(.is-center) button,
  #accounts .plat-cred-stage.is-laid:not(.is-mobile) .plat-cred-slide:not(.is-center) input,
  #accounts .plat-cred-stage.is-laid:not(.is-mobile) .plat-cred-slide:not(.is-center) label {
    pointer-events: none;
  }
}
@media (max-width: 760px) {
  #accounts.plat-cred-rail {
    padding-bottom: 8px;
  }
  #accounts .plat-cred-stage.is-mobile {
    position: relative;
    min-height: 220px;
    /* 左右 padding 堆积/展开必须一致，否则钉点相对屏幕会漂移 */
    padding: 8px 4px 36px;
    overflow: visible;
    touch-action: none;
    perspective: none;
  }
  #accounts .plat-cred-stage.is-mobile.is-pile {
    perspective: 900px;
    perspective-origin: 50% 50%;
  }
  #accounts .plat-cred-stack {
    position: relative;
    width: 100%;
    min-height: 188px;
    transform-style: flat;
  }
  #accounts .plat-cred-stage.is-mobile.is-spread .plat-cred-stack {
    transform-style: preserve-3d;
    overflow: visible !important;
  }
  #accounts .plat-cred-stage.is-mobile .plat-cred-slide {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    transform-origin: 50% 50%;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    backface-visibility: hidden;
  }
  #accounts .plat-cred-stage.is-mobile.is-pile .plat-cred-stack {
    height: auto;
    min-height: 188px;
  }
  #accounts .plat-cred-stage.is-mobile.is-pile .plat-cred-slide {
    transform-origin: 100% 50%;
    height: 100%;
    top: 0;
    bottom: 0;
  }
  #accounts .plat-cred-stage.is-mobile.is-pile .plat-cred-card {
    min-height: 0 !important;
    overflow: hidden;
    border-radius: 14px;
    box-sizing: border-box;
  }
  #accounts .plat-cred-stage.is-mobile.is-pile .plat-cred-slide.is-front .plat-cred-card {
    height: auto;
    max-height: min(78dvh, calc(100dvh - 200px));
  }
  #accounts .plat-cred-stage.is-mobile.is-pile .plat-cred-slide:not(.is-front) .plat-cred-card {
    height: 100%;
  }
  #accounts .plat-cred-stage.is-mobile.is-pile .plat-cred-card.is-iface-dist .plat-cred-body--dual {
    flex: 0 0 auto;
  }
  /* 仅露右缘的层：去掉重阴影，只留细右边线，避免歪/糊 */
  #accounts .plat-cred-stage.is-mobile.is-pile .plat-cred-slide:not(.is-front) .plat-cred-card {
    box-shadow: none !important;
    border: 1px solid color-mix(in srgb, var(--line, #c9d2de) 80%, transparent);
    background: var(--panel, #fff);
  }
  #accounts .plat-cred-stage.is-mobile.is-pile .plat-cred-slide.is-front .plat-cred-card {
    /* 外层账户壳已有白底：前卡阴影压轻，避免双层抬高 */
    box-shadow:
      0 2px 8px color-mix(in srgb, #0b1220 5%, transparent);
  }
  /* 展开：左右 padding 与堆积相同，钉点屏幕坐标不变；透视在 stage */
  #accounts .plat-cred-stage.is-mobile.is-spread {
    min-height: 0;
    padding: 12px 4px 28px;
    overflow: visible !important;
    perspective: 1800px;
    perspective-origin: 0% 50%;
  }
  #accounts .plat-cred-stage.is-mobile.is-spread .plat-cred-stack {
    min-height: 220px;
    height: 220px;
    display: block;
    transform-style: preserve-3d;
    overflow: visible !important;
  }
  #accounts .plat-cred-stage.is-mobile.is-spread .plat-cred-slide {
    position: absolute !important;
    right: auto !important;
    top: 16px !important;
    height: 188px !important;
    transform-origin: 0% 50% !important;
    overflow: visible !important;
    backface-visibility: visible;
    will-change: transform;
  }
  #accounts .plat-cred-stage.is-mobile.is-spread .plat-cred-card {
    height: 100%;
    min-height: 0 !important;
    overflow: hidden;
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow:
      2px 3px 10px color-mix(in srgb, #0b1220 6%, transparent);
  }
  /* 堆积右侧厚度可点；勿 overflow:hidden，否则最右一层（第6张）会被裁掉 */
  #accounts .plat-cred-stage.is-mobile.is-pile {
    cursor: grab;
    overflow: visible;
  }
  #accounts .plat-cred-stage.is-mobile.is-pile:active {
    cursor: grabbing;
  }
  #accounts .plat-cred-stage.is-mobile .plat-cred-card {
    min-height: 168px;
    box-shadow:
      0 2px 8px color-mix(in srgb, #0b1220 5%, transparent);
  }
  #accounts .plat-cred-card.is-demo {
    opacity: 0.92;
    pointer-events: none;
  }
  #accounts .plat-cred-demo-tag {
    margin-left: auto;
    font-size: 11px;
    font-weight: 650;
    color: var(--muted, #8899aa);
  }
  #accounts .plat-cred-mode-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    display: flex;
    justify-content: center;
    gap: 16px;
    z-index: 40;
  }
  #accounts .plat-cred-mode-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--teal, var(--up));
    font-size: 13px;
    font-weight: 650;
    padding: 6px 10px;
    cursor: pointer;
  }
  #accounts .plat-cred-mode-btn[hidden] {
    display: none !important;
  }
  #accounts .plat-cred-stage.is-mobile.is-spread .plat-cred-stack,
  #accounts .plat-cred-stage.is-mobile.is-focus .plat-cred-stack {
    min-height: 210px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #accounts .plat-cred-track,
  #accounts .plat-cred-stage.is-mobile .plat-cred-slide,
  #accounts .plat-cred-card {
    transition: none !important;
  }
}
/* 工具端账户：双接口余额分布（博弈条 + 图例） */
#accounts .acc-iface-dist {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}
#accounts .acc-iface-dist-bar {
  --acc-iface-slant: 4px;
  --acc-iface-gap: 3px;
  display: flex;
  align-items: stretch;
  height: 10px;
  overflow: visible;
  gap: var(--acc-iface-gap);
  padding: 0;
  background: transparent;
}
#accounts .acc-iface-dist-seg {
  flex: 0 1 0;
  min-width: 0;
  display: block;
  height: 100%;
  transition: flex-grow 0.35s ease;
}
#accounts .acc-iface-dist-seg.is-visible {
  min-width: 5px;
}
#accounts .acc-iface-dist-seg.slant-solo {
  border-radius: 2px;
}
#accounts .acc-iface-dist-seg.slant-r {
  clip-path: polygon(
    0 0,
    calc(100% - var(--acc-iface-slant)) 0,
    100% 100%,
    0 100%
  );
  border-radius: 2px 0 0 2px;
}
#accounts .acc-iface-dist-seg.slant-l {
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--acc-iface-slant) 100%);
  border-radius: 0 2px 2px 0;
}
#accounts .acc-iface-dist-seg.slant-both {
  clip-path: polygon(
    0 0,
    calc(100% - var(--acc-iface-slant)) 0,
    100% 100%,
    var(--acc-iface-slant) 100%
  );
}
#accounts .acc-iface-dist-legends {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin: 0 -2px;
  padding: 0 2px 2px;
}
#accounts .acc-iface-dist-legends::-webkit-scrollbar {
  display: none;
}
#accounts .acc-iface-dist-legend {
  flex: 1 1 0;
  min-width: 108px;
  max-width: none;
  scroll-snap-align: start;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--line, #e8edf3) 38%, var(--panel, #fff));
}
#accounts .acc-iface-dist-legends:has(.acc-iface-dist-legend:nth-child(3)) .acc-iface-dist-legend {
  flex: 0 0 auto;
  width: max(42%, 118px);
}
html[data-theme="dark"] #accounts .acc-iface-dist-legend {
  background: color-mix(in srgb, var(--line, #2a3544) 55%, var(--panel-2, #1a222c));
}
#accounts .acc-iface-dist-legend-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-bottom: 4px;
}
#accounts .acc-iface-dist-swatch {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
#accounts .acc-iface-dist-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #6b7a8d);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#accounts .acc-iface-dist-amt {
  display: block;
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.2;
}
#accounts .acc-iface-dist-amt small {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #6b7a8d);
}
html[data-theme="dark"] #accounts .acc-iface-dist-amt {
  color: var(--text, #e8eef6);
}
#accounts .plat-cred-card.is-iface-dist {
  min-height: 0;
}
#accounts .plat-cred-body--dual {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#accounts .acc-iface-dist-wrap {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
#accounts .plat-cred-card.is-iface-dist .acc-iface-dist {
  flex: 0 0 auto;
}
/* 折叠：保留色条 + 余额，仅收起各接口图例（acc.iface_fold = 接口明细） */
#accounts .plat-cred-card.is-iface-collapsed .acc-iface-dist-collapsible {
  display: none;
}
#accounts .acc-spot-bal {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  padding-top: 4px;
}
#accounts .acc-spot-bal-hd {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
  color: var(--ink);
}
html[data-theme="dark"] #accounts .acc-spot-bal-hd {
  color: var(--text, #e8eef6);
}
#accounts .acc-spot-bal-scroll {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(42dvh, 280px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
#accounts .acc-spot-bal-scroll::-webkit-scrollbar {
  display: none;
}
#accounts .acc-spot-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  min-height: 48px;
}
#accounts .acc-spot-ico-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
  line-height: 0;
}
/* 品牌币：满圆 PNG 须 contain，勿 cover 裁切内部图形 */
#accounts img.acc-spot-ico--coin {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  object-position: center;
  background: transparent !important;
  border-radius: 50%;
  box-sizing: border-box;
  -webkit-user-drag: none;
}
#accounts img.acc-spot-ico:not(.acc-spot-ico--coin) {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 50%;
  box-sizing: border-box;
  object-fit: cover;
  flex-shrink: 0;
  background: #e6e8eb;
}
html[data-theme="dark"] #accounts img.acc-spot-ico:not(.acc-spot-ico--coin) {
  background: #3a424c;
}
#accounts .acc-spot-ico.is-letter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
#accounts .acc-spot-ico.is-letter.mkt-ico-ph {
  background: color-mix(in srgb, var(--muted, #6b7a8d) 72%, #3b4a5c);
  color: #fff;
}
#accounts .acc-spot-row--usdt .acc-spot-ico.is-letter {
  background: #26a17b;
  font-size: 16px;
  color: #fff;
}
/* 手机：余额列表图标略缩小（须写在 40px 基础规则之后，否则会被覆盖） */
@media (max-width: 899px) {
  #accounts .acc-spot-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 9px 0;
    min-height: 44px;
  }
  #accounts .acc-spot-ico-wrap {
    width: 32px;
    height: 32px;
  }
  #accounts img.acc-spot-ico--coin,
  #accounts img.acc-spot-ico:not(.acc-spot-ico--coin) {
    width: 32px;
    height: 32px;
  }
  #accounts .acc-spot-ico.is-letter {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  #accounts .acc-spot-row--usdt .acc-spot-ico.is-letter {
    font-size: 14px;
  }
  html:has(#tab-accounts.on) #accounts .plat-cred-badge.is-acct-name {
    font-size: 15px;
    font-weight: 750;
    line-height: 1.25;
    color: var(--ink);
  }
  html[data-theme="dark"]:has(#tab-accounts.on) #accounts .plat-cred-badge.is-acct-name {
    color: var(--text, #e8eef6);
  }
  html:has(#tab-accounts.on) #accounts .plat-cred-name {
    font-size: 15px;
    font-weight: 750;
  }
}
#accounts .acc-spot-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#accounts .acc-spot-meta b {
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.2;
}
#accounts .acc-spot-meta em {
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  color: var(--muted, #6b7a8d);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-theme="dark"] #accounts .acc-spot-meta b {
  color: var(--text, #e8eef6);
}
#accounts .acc-spot-amt {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.25;
}
#accounts .acc-spot-amt small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #6b7a8d);
}
html[data-theme="dark"] #accounts .acc-spot-amt {
  color: var(--text, #e8eef6);
}
/* 双接口卡：仅限制列表最大高度，卡片随内容增高（不钉死 72dvh） */
html:has(#tab-accounts.on) #accounts .plat-cred-slide.is-center .plat-cred-card.is-iface-dist {
  max-height: min(78dvh, calc(100dvh - 200px));
}

#accounts .plat-cred-body .acc-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #6b7a8d);
  gap: 6px;
}
#accounts .plat-cred-badge.is-dual {
  background: #111;
  color: #fff;
}
#accounts .plat-cred-badge.is-acct-name {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 52px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.25;
}
html[data-theme="dark"] #accounts .plat-cred-badge.is-acct-name {
  color: var(--text, #e8eef6);
}
@media (min-width: 761px) {
  #accounts .plat-cred-stage:not(.is-mobile) .plat-cred-badge.is-acct-name {
    font-size: 20px;
  }
}
#accounts .plat-cred-card.tone-mixed { --plat-accent: #6366f1; }
#accounts .plat-cred-card.tone-ctp,
#accounts .plat-cred-card.tone-simnow_ctp { --plat-accent: #c45c26; }
/* treasury panel shares more shell *//* —— 工具端 · 交易账户凭证轨 END —— *//* —— 工具端市场板（对照 BBX CEX / 交易所 / 板块） —— */





.mkt-panel.on {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.mkt-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  max-width: 560px;
  width: 100%;
  padding: 4px 0 0;
  box-sizing: border-box;
  overflow: hidden;
}
/*
 * 市场页滚动：.main 默认只有 padding≈4px；若 #tab-market 再 absolute，
 * 含块塌成 4px → 面板高度 0 → 整页空白。必须让 .main 参与 flex 撑满。
 */

body.mkt-tab-on {
  overflow: hidden;
}
body.mkt-tab-on .hero {
  display: none !important;
}
body.mkt-tab-on .app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding-top: 10px;
  padding-bottom: calc(var(--dock-h, 68px) + var(--safe-b) + 8px);
  box-sizing: border-box;
}
body.mkt-tab-on .app > .main {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 保持 relative 供内部层叠；不再用 absolute 填 .main */
}
body.mkt-tab-on #tab-market.panel.on {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
}
/* 钉住：搜索 + CEX/交易所/板块 */

.mkt-pin {
  flex: 0 0 auto;
  position: relative;
  z-index: 6;
  background: var(--bg);
  padding-bottom: 2px;
}
.mkt-pin-top {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
/* 手机：搜索在上、页签在下 */

.mkt-pin-top .mkt-head {
  order: -1;
}
.mkt-page.is-search-hidden .mkt-head {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-6px);
}
.mkt-head {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.22s ease, margin 0.22s ease;
  max-height: 56px;
}
.mkt-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  --mkt-search-bg: var(--panel-2);
  background: var(--mkt-search-bg);
  border: 1px solid var(--line);
  color: var(--muted);
}
html[data-theme="light"] .mkt-search-wrap {
  --mkt-search-bg: #fff;
  background: var(--mkt-search-bg);
}
.mkt-search {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text, inherit);
  font-size: 14px;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.mkt-search::-webkit-search-decoration,
.mkt-search::-webkit-search-cancel-button,
.mkt-search::-webkit-search-results-button {
  -webkit-appearance: none;
  appearance: none;
}
html[data-theme="dark"] .app input.mkt-search,
html[data-theme="dark"] .app .mkt-search-wrap .mkt-search,
html[data-theme="light"] .app input.mkt-search {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--ink) !important;
}
.mkt-status {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
/* 工具端市场页不向用户展示内部同步/额度类状态文案 */
body.mkt-tab-on .mkt-status {
  display: none !important;
}
.mkt-tabs {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin: 10px 4px 0;
  /* 无通栏分割线，仅选中项 ::after 下划线 */
  border-bottom: 0;
}
.mkt-tabs button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  position: relative;
}
.mkt-tabs button.on {
  color: var(--ink);
}
.mkt-tabs button.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
}
.mkt-chips,
.mkt-flow-toolbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 6px;
  scrollbar-width: none;
  flex-shrink: 0;
  background: var(--bg);
}
.mkt-chips {
  align-items: center;
  gap: 0;
  overflow: hidden;
}
.mkt-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  scrollbar-width: none;
}
.mkt-chips-scroll::-webkit-scrollbar,
.mkt-chips::-webkit-scrollbar { display: none; }
.mkt-chip-pin {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  padding: 0;
  background: transparent;
}
.mkt-chip-tool,
.mkt-chip-tool.is-icon {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #111111;
  height: 32px;
  min-width: 32px;
  width: auto;
  margin: 0;
  padding: 0 4px;
  gap: 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mkt-chip-tool.is-icon {
  width: 32px;
  padding: 0;
}
.mkt-chip-tool:not(.is-icon) {
  font-size: 12px;
  font-weight: 650;
}
.mkt-venue-now {
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  max-width: 8.5em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-chip-caret {
  width: 12px;
  height: 12px;
  display: block;
  flex: 0 0 auto;
}
.mkt-chip-burger {
  width: 21px;
  height: 21px;
  display: block;
  flex: 0 0 auto;
}
html:not([data-theme="dark"]) .mkt-chip-tool,
html:not([data-theme="dark"]) .mkt-chip-tool.is-icon {
  background: transparent;
  color: #111111;
  box-shadow: none;
}
html[data-theme="dark"] .mkt-chip-tool,
html[data-theme="dark"] .mkt-chip-tool.is-icon {
  background: transparent;
  color: #f2f2f2;
  box-shadow: none;
}
.mkt-pick-layer {
  position: fixed;
  inset: 0;
  z-index: 1300 !important;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
}
.mkt-pick-layer[hidden] { display: none !important; }
.mkt-pick-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.mkt-pick-sheet {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  background: var(--panel, #fff);
  color: var(--ink, #111);
  border-radius: 16px 16px 0 0;
  /* 暗色下与页面同黑时靠顶边线框与列表分开 */
  border: 1px solid var(--line, color-mix(in srgb, var(--ink, #111) 16%, transparent));
  border-bottom: 0;
  padding: 6px 16px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
}
html[data-theme="dark"] .mkt-pick-sheet {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.45);
}
.mkt-pick-grab {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink, #111) 18%, transparent);
  margin: 6px auto 8px;
}
.mkt-pick-head {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted, #666);
  padding: 4px 4px 8px;
}
.mkt-pick-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 16px;
  font-weight: 650;
  padding: 14px 4px;
  cursor: pointer;
}
.mkt-pick-item.on { font-weight: 800; }
.mkt-pick-item.is-off { opacity: 0.4; cursor: default; }
.mkt-pick-kind {
  display: flex;
  gap: 8px;
  padding: 2px 4px 6px;
}
.mkt-pick-kind button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 650;
  background: transparent;
  color: var(--muted, #666);
  cursor: pointer;
}
html:not([data-theme="dark"]) .mkt-pick-kind button.on {
  background: #f5f5f5;
  color: #000;
  font-weight: 750;
}
html[data-theme="dark"] .mkt-pick-kind button.on {
  background: #1c1c1c;
  color: #fff;
  font-weight: 750;
}
.mkt-pick-venue {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.mkt-pick-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  flex: 0 0 auto;
}
.mkt-pick-logo.is-fallback {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--ink, #111) 8%, transparent);
  font-size: 14px;
  font-weight: 750;
}
.mkt-pick-venue b {
  font-size: 20px;
  font-weight: 750;
  line-height: 1.1;
}
@media (min-width: 900px) {
  .mkt-pick-sheet.is-venues { width: 360px; }
}
.mkt-pick-mark {
  width: 1.2em;
  text-align: right;
  color: var(--ink, #111);
}
@media (min-width: 900px) {
  .mkt-pick-layer {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .mkt-pick-sheet {
    width: 320px;
    max-width: 100%;
    border-radius: 16px;
    border-bottom: 1px solid var(--line, color-mix(in srgb, var(--ink, #111) 16%, transparent));
    padding: 8px 12px 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  }
  .mkt-pick-grab {
    display: none;
  }
}
.mkt-chip {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
/* OKX 式：未选中纯文字；选中浅灰胶囊 + 近黑字（非黑底白字） */

html:not([data-theme="dark"]) .mkt-chip {
  background: transparent;
  color: #666666;
  box-shadow: none;
}
html:not([data-theme="dark"]) .mkt-chip.on {
  background: #f5f5f5;
  color: #000000;
  font-weight: 750;
}
/* 夜间 OKX：选中炭灰抬升底 + 白字 */

html[data-theme="dark"] .mkt-chip {
  background: transparent;
  color: #8c8c8c;
}
html[data-theme="dark"] .mkt-chip.on {
  color: #ffffff;
  background: #1c1c1c;
  font-weight: 750;
}
.mkt-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 0 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mkt-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.mkt-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.mkt-cols[hidden] {
  display: none !important;
}
.mkt-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr;
  gap: 8px;
  position: relative;
  z-index: 4;
  margin: 0 2px 4px;
  padding: 4px 10px;
  min-height: 0;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  /* 与 .mkt-chip.on 同色浅灰抬升，无描边线框 */
  background: #f5f5f5;
  border-radius: 8px;
  border: 0;
  box-shadow: none;
  overflow: visible;
  flex-shrink: 0;
}
html[data-theme="dark"] .mkt-cols {
  background: #1c1c1c;
  color: #8c8c8c;
  border: 0;
  box-shadow: none;
}
html:not([data-theme="dark"]) .mkt-cols {
  background: #f5f5f5;
  color: #666666;
  border: 0;
}
.mkt-cols.is-exch {
  grid-template-columns: minmax(0, 1.22fr) minmax(76px, 0.92fr) minmax(64px, 0.82fr) minmax(64px, 0.82fr);
  padding-left: 8px;
}
@media (max-width: 899px) {
  /* CEX 手机榜：Price 列表头+数值左对齐，靠近市值列 */
  .mkt-cols.is-cex,
  .mkt-list.is-cex > .mkt-row {
    grid-template-columns: minmax(0, 0.82fr) minmax(76px, 0.56fr) 76px;
    gap: 4px;
    padding-left: 6px;
    padding-right: 8px;
  }
  .mkt-cols.is-cex > :nth-child(2),
  .mkt-list.is-cex > .mkt-row > .mkt-px {
    text-align: left;
    justify-self: start;
  }
  .mkt-cols.is-cex > :nth-child(3),
  .mkt-list.is-cex > .mkt-row > .mkt-pill {
    text-align: right;
    justify-self: end;
  }
  /* 价/涨跌表头即 .mkt-th-sort 本体，不是子元素 */
  .mkt-cols.is-cex > .mkt-th-sort:nth-child(2) {
    justify-content: flex-start;
    text-align: left;
    justify-self: start;
    width: 100%;
  }
  .mkt-cols.is-cex > .mkt-th-sort:nth-child(3) {
    justify-content: flex-end;
    text-align: right;
    justify-self: end;
    width: 100%;
  }
  .mkt-list.is-cex .mkt-ident {
    min-width: 0;
  }
  .mkt-cols.is-exch,
  .mkt-row-exch {
    /* 名称收窄；Fees / Spot vol 靠左；Spot net 与 CEX 24H% 色块同宽 76px */
    grid-template-columns: minmax(0, 0.68fr) minmax(66px, 72px) minmax(56px, 0.48fr) minmax(76px, 80px);
    gap: 3px;
    padding-left: 6px;
    padding-right: 8px;
  }
  .mkt-cols.is-exch {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.02em;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .mkt-cols.is-exch > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .mkt-ex-fee-col,
  .mkt-row-exch > .mkt-vol.mkt-ex-fee-cell {
    text-align: left;
    justify-self: start;
    align-self: center;
    font-size: 9px;
    min-width: 0;
    overflow: hidden;
  }
  .mkt-cols.is-exch .mkt-ex-th-vol,
  .mkt-row-exch > .mkt-vol.mkt-ex-vol-cell {
    text-align: left;
    justify-self: start;
    min-width: 0;
    padding-right: 0;
  }
  .mkt-cols.is-exch .mkt-ex-th-net {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: right;
    justify-self: stretch;
    min-width: 0;
    overflow: visible;
    padding-right: 0;
  }
  .mkt-row-exch .mkt-ex-fee {
    font-size: 11px;
    line-height: 1.28;
    gap: 2px;
  }
  .mkt-row-exch .mkt-ico {
    width: 28px;
    height: 28px;
  }
  .mkt-row-exch .mkt-ident {
    gap: 6px;
  }
  .mkt-row-exch .mkt-names b {
    font-size: 14px;
  }
  .mkt-row-exch .mkt-vol:not(.mkt-ex-net-cell) {
    font-size: 11px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mkt-row-exch > .mkt-vol.mkt-ex-net-cell {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
    width: 100%;
    padding: 0;
    overflow: visible;
  }
  /* 与 CEX 榜 .mkt-pill（24H 涨跌色块）同尺寸；勿超出栅格列以免被裁切 */
  .mkt-row-exch .mkt-ex-net-cell > .mkt-pill {
    flex: 0 1 76px;
    width: 100%;
    max-width: 76px;
    min-width: 0 !important;
    min-height: 0;
    height: auto;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
  }
  html[data-theme="light"] .mkt-row-exch .mkt-ex-mob-only .mkt-pill.is-up {
    background: var(--up-solid, var(--up));
    color: #fff;
  }
  html[data-theme="light"] .mkt-row-exch .mkt-ex-mob-only .mkt-pill.is-down {
    background: var(--down-solid, var(--down));
    color: #fff;
  }
  html[data-theme="light"] .mkt-row-exch .mkt-ex-mob-only .mkt-pill.is-flat {
    background: color-mix(in srgb, var(--muted) 28%, var(--line, #e8e8e8));
    color: color-mix(in srgb, var(--muted) 88%, #666);
  }
  html[data-theme="dark"] .mkt-row-exch .mkt-ex-mob-only .mkt-pill {
    background: transparent !important;
    text-align: center;
  }
  html[data-theme="dark"] .mkt-row-exch .mkt-ex-net-cell > .mkt-pill.is-flat {
    background: transparent !important;
    color: var(--muted);
  }
  html[data-theme="dark"] .mkt-row-exch .mkt-ex-mob-only .mkt-pill.is-up {
    color: var(--up, #16a34a);
  }
  html[data-theme="dark"] .mkt-row-exch .mkt-ex-mob-only .mkt-pill.is-down {
    color: var(--down, #dc2626);
  }
  html[data-theme="dark"] .mkt-row-exch .mkt-ex-mob-only .mkt-pill.is-flat {
    color: var(--muted);
  }
}
.mkt-ex-desk-only {
  display: none !important;
}
.mkt-cex-desk-only {
  display: none !important;
}
.mkt-cex-mob-only {
  display: block;
}
.mkt-ex-fee {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mkt-ex-fee em {
  font-style: normal;
  font-weight: inherit;
  color: inherit;
  white-space: nowrap;
}
.mkt-ex-funding.is-up {
  color: var(--up, #16a34a);
}
.mkt-ex-funding.is-down {
  color: var(--down, #dc2626);
}
.mkt-ex-funding.is-flat {
  color: var(--muted);
}
.mkt-ex-fee-cell {
  text-align: right;
  color: var(--muted);
}
.mkt-cols.is-sector {
  grid-template-columns: 72px 1.2fr 0.8fr 0.8fr;
  padding-left: 8px;
}
.mkt-cols > :last-child { text-align: right; }
/* 桌面：价/量列右对齐；手机在 @media (max-width:899px) 单独排版，避免盖掉左对齐 */
@media (min-width: 900px) {
  .mkt-cols.is-cex > :nth-child(n+2) {
    text-align: right;
  }
  .mkt-cols.is-exch span:nth-child(n+3),
  .mkt-cols.is-sector span:nth-child(n+3),
  .mkt-row-exch > .mkt-vol,
  .mkt-row-sector > .mkt-vol {
    text-align: right;
    justify-self: stretch;
    width: 100%;
  }
}
.mkt-list {
  display: flex;
  flex-direction: column;
}
.mkt-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 6px 8px;
  border-bottom: 0;
}
.mkt-row[data-mkt-open] { cursor: pointer; }
.mkt-row-exch {
  grid-template-columns: minmax(0, 1.22fr) minmax(76px, 0.92fr) minmax(64px, 0.82fr) minmax(64px, 0.82fr);
}
.mkt-ex-fee-col {
  text-align: right;
}
.mkt-row-sector {
  grid-template-columns: minmax(0, 1.35fr) 0.78fr 0.72fr;
}
.mkt-sector-ident {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.mkt-sector-name {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-star {
  appearance: none;
  border: 0;
  background: none;
  color: #8b95a5;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.mkt-star .mkt-star-ico { width: 16px; height: 16px; display: block; }
.mkt-star.on { color: #f5c518; }
.mkt-ident {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.mkt-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center;
  background: transparent;
  flex-shrink: 0;
}
/* 满圆品牌 PNG 在透明画布上：cover 会放大裁切，内部白标易被切没 */
.mkt-ico.is-brand-round {
  object-fit: contain;
  background: transparent !important;
}
/* 远程非满圆图（少数）仍用 cover + 灰底 */
.mkt-ico.is-remote-coin {
  object-fit: cover;
  background: #e6e8eb;
}
html[data-theme="dark"] .mkt-ico.is-remote-coin {
  background: #3a424c;
}
.mkt-ico-ph {
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--teal);
  background: #e6e8eb;
}
html[data-theme="dark"] .mkt-ico-ph {
  background: #3a424c;
}
.mkt-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mkt-names b {
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mkt-names em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mkt-px {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 750;
  text-align: right;
  justify-self: end;
}
.mkt-vol {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  justify-self: end;
}
.mkt-pill {
  justify-self: end;
  min-width: 76px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: #fff;
}
/* 最新价：字色跟令牌；24H 涨跌：实心色卡白字（对照 BBX） */

.mkt-px.is-up { color: var(--up); }
.mkt-px.is-down { color: var(--down); }
.mkt-px.is-flat { color: var(--muted); }
.mkt-pill.is-up {
  background: var(--up-solid, var(--up));
  color: #fff;
}
.mkt-pill.is-down {
  background: var(--down-solid, var(--down));
  color: #fff;
}
.mkt-pill.is-flat {
  background: color-mix(in srgb, var(--muted) 45%, #6b7280);
  color: #fff;
}
/* 浅色：无数据也用灰底色块，与涨跌块同宽同高（桌面） */
html[data-theme="light"] .mkt-row-exch .mkt-pill.is-flat {
  background: color-mix(in srgb, var(--muted) 28%, var(--line, #e8e8e8));
  color: color-mix(in srgb, var(--muted) 88%, #666);
}
/* 暗色：无数据仅 muted 字，不铺灰 pill（桌面净额列；手机见上方 mob 规则） */
html[data-theme="dark"] .mkt-row-exch .mkt-pill.is-flat {
  background: transparent !important;
  color: var(--muted);
  font-weight: inherit;
}
@media (min-width: 900px) {
  /* 交易所榜净额：桌面统一色块尺寸 */
  .mkt-row-exch .mkt-vol:has(> .mkt-pill) {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
  }
  .mkt-row-exch .mkt-vol > .mkt-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 96px;
    min-width: 96px;
    min-height: 28px;
    padding: 4px 6px;
    line-height: 1.15;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  html[data-theme="dark"] .mkt-row-exch .mkt-ex-desk-only .mkt-pill.is-flat {
    background: transparent !important;
    color: var(--muted);
    font-weight: inherit;
  }
}
/* 表头：最新价 / 24H 排序箭头 */

.mkt-th-sort {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: 100%;
  text-align: right;
  color: inherit;
}
@media (max-width: 899px) {
  .mkt-cols.is-cex > .mkt-th-sort:nth-child(2) {
    justify-content: flex-start;
    text-align: left;
    justify-self: start;
  }
  .mkt-cols.is-cex > .mkt-th-sort:nth-child(3) {
    justify-content: flex-end;
    justify-self: end;
  }
}
.mkt-th-lab {
  appearance: none;
  border: 0;
  background: none;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
}
.mkt-cols > :first-child {
  text-align: left;
  justify-self: start;
}
.mkt-th-sort.is-on .mkt-th-lab {
  color: var(--text, inherit);
}
.mkt-carets {
  cursor: pointer;
}
.mkt-th-mcap {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 5;
}
.mkt-th-mcap-btn {
  appearance: none;
  border: 0;
  background: none;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mkt-funnel {
  opacity: 0.75;
  flex-shrink: 0;
}
.mkt-th-mcap.is-open .mkt-funnel {
  color: var(--ink);
  opacity: 1;
}
.mkt-limit-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 88px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--panel, #161b22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}
.mkt-limit-menu[hidden] { display: none !important; }
.mkt-limit-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text, inherit);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.mkt-limit-item.on {
  background: var(--chip-bg);
  color: #dffaf3;
}
html:not([data-theme="dark"]) .mkt-limit-menu {
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 32, 43, 0.12);
}
html:not([data-theme="dark"]) .mkt-limit-item.on {
  background: #111;
  color: #fff;
}
.mkt-carets {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 0;
  flex-shrink: 0;
}
.mkt-caret {
  display: block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  opacity: 1;
  color: #8b949e; /* 未选中：灰 */
}
.mkt-caret.is-up {
  border-bottom: 4px solid currentColor;
}
.mkt-caret.is-dn {
  border-top: 4px solid currentColor;
}
.mkt-caret.on {
  color: #ffffff;
}
html:not([data-theme="dark"]) .mkt-caret {
  color: #9aa3ad;
}
html:not([data-theme="dark"]) .mkt-caret.on {
  color: #000000;
}
.mkt-rank {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.mkt-sector-icos {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
  /* 叠放后视觉宽度 ≈ 22 + (n-1)*15 */
  min-width: 22px;
}
.mkt-sector-icos .mkt-ico,
.mkt-sector-icos img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--panel, #fff);
  margin: 0 0 0 -7px;
  background: transparent;
  object-fit: cover;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
}
.mkt-sector-icos .mkt-ico:first-child,
.mkt-sector-icos img:first-child {
  margin-left: 0;
  z-index: 1;
}
.mkt-sector-icos .mkt-ico:nth-child(2),
.mkt-sector-icos img:nth-child(2) {
  z-index: 2;
}
.mkt-sector-icos .mkt-ico:nth-child(3),
.mkt-sector-icos img:nth-child(3) {
  z-index: 3;
}
html[data-theme="dark"] .mkt-sector-icos .mkt-ico,
html[data-theme="dark"] .mkt-sector-icos img {
  border-color: #0b0e11;
}
html:not([data-theme="dark"]) .mkt-sector-icos .mkt-ico,
html:not([data-theme="dark"]) .mkt-sector-icos img {
  border-color: #fff;
  box-shadow: 0 0 0 0.5px color-mix(in srgb, var(--line) 45%, transparent);
}
.mkt-sector-venue-bar {
  padding: 6px 12px 8px;
  border-bottom: 0;
}
.mkt-sector-venue-pick {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--chip-bg, rgba(127, 127, 127, 0.08));
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.mkt-sector-venue-pick svg {
  opacity: 0.55;
}

/* 板块 Tab 列表：跟工具皮肤（var），仅布局/密度；全屏详情 sheet 仍见 06-market-sector-sheet 固定暗色 */
.mkt-sector-row-sub {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.mkt-row-sector .mkt-sector-mcap {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}
.mkt-sector-ico-ph {
  width: 22px;
  height: 22px;
  font-size: 10px;
  border: 1.5px solid var(--panel, #fff);
  box-sizing: border-box;
}
html[data-theme="dark"] .mkt-sector-ico-ph {
  border-color: #0b0e11;
}
html:not([data-theme="dark"]) .mkt-sector-ico-ph {
  border-color: #fff;
}
.mkt-sector-icos .mkt-sector-ico-ph {
  margin-left: -7px;
}
.mkt-sector-icos .mkt-sector-ico-ph:first-child,
.mkt-sector-icos .mkt-sector-ico-img:first-child {
  margin-left: 0;
}
.mkt-empty, .mkt-note {
  margin: 12px 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
/* 关注空态：居中插画 + 文案；未登录多登录按钮 */

.mkt-watch-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: min(52vh, 420px);
  padding: 32px 20px 48px;
  text-align: center;
  box-sizing: border-box;
}
.mkt-watch-illust {
  color: var(--teal, var(--up, #178f7a));
  line-height: 0;
}
.mkt-watch-illust svg { display: block; }
.mkt-watch-card {
  fill: color-mix(in srgb, var(--ink, #111) 8%, transparent);
}
.mkt-watch-card-top {
  fill: var(--teal, var(--up, #178f7a));
}
.mkt-watch-line {
  fill: color-mix(in srgb, var(--teal, var(--up, #178f7a)) 55%, transparent);
}
.mkt-watch-glass {
  fill: var(--teal, var(--up, #178f7a));
}
.mkt-watch-glass-hole {
  fill: var(--bg, #fff);
}
.mkt-watch-glass-stem {
  stroke: var(--teal, var(--up, #178f7a));
  stroke-width: 8;
}
html[data-theme="dark"] .mkt-watch-illust {
  color: var(--muted);
}
html[data-theme="dark"] .mkt-watch-card {
  fill: color-mix(in srgb, #fff 8%, transparent);
}
html[data-theme="dark"] .mkt-watch-card-top,
html[data-theme="dark"] .mkt-watch-glass {
  fill: var(--muted);
}
html[data-theme="dark"] .mkt-watch-line {
  fill: color-mix(in srgb, var(--muted) 55%, transparent);
}
html[data-theme="dark"] .mkt-watch-glass-stem {
  stroke: var(--muted);
}
html[data-theme="dark"] .mkt-watch-glass-hole {
  fill: var(--bg, #000);
}
html[data-theme="dark"] .mkt-watch-title {
  color: var(--muted);
}
.mkt-watch-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}
.mkt-watch-login {
  min-width: 168px;
  margin-top: 4px;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 750;
}
.mkt-flow {
  position: relative;
  min-height: 420px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 40%, transparent);
}
html[data-theme="dark"] .mkt-flow {
  background: #0e141b;
}
.mkt-flow-canvas {
  display: block;
  width: 100%;
  height: 400px;
}
.mkt-flow-cap { display: none !important; }
.mkt-list[hidden],
.mkt-flow[hidden],
.mkt-chips[hidden],
.mkt-flow-toolbar[hidden],
.mkt-side[hidden],
.mkt-table-pane[hidden] {
  display: none !important;
}
.mkt-split {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1;
}
.mkt-table-pane {
  min-width: 0;
}
.mkt-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mkt-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px 8px;
}
.mkt-side-head strong {
  font-size: 13px;
  font-weight: 750;
  color: var(--text, inherit);
}
.mkt-side-head .mkt-flow-toolbar {
  padding: 0;
  overflow: visible;
}
.dock button[data-tab="market"] svg {
  display: block;
}

@media (min-width: 900px) {
  body.mkt-tab-on .app {
    padding: 16px 28px 24px;
  }
  .mkt-panel.on {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 48px);
  }
  .mkt-page {
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 0;
    flex: 1 1 auto;
  }
  body.mkt-tab-on .app {
    max-width: none;
  }
  .mkt-head {
    max-width: none;
  }
  /* 电脑端：去掉灰底板感；页签 + 右侧小搜索同一行；不要通栏分割线（仅选中下划线） */
  body.mkt-tab-on .mkt-pin {
    background: transparent;
    padding-bottom: 0;
  }
  body.mkt-tab-on .mkt-pin-top {
    position: relative;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  body.mkt-tab-on .mkt-pin-top .mkt-head {
    order: 0;
    flex: 0 0 auto;
    width: min(260px, 28vw);
    max-width: 280px;
    max-height: none;
    margin: 0;
    padding-bottom: 8px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    overflow: visible;
  }
  body.mkt-tab-on .mkt-page.is-search-hidden .mkt-head {
    max-height: none;
    opacity: 1;
    margin: 0;
    padding: 0 0 8px;
    overflow: visible;
    pointer-events: auto;
    transform: none;
  }
  body.mkt-tab-on .mkt-tabs {
    flex: 1 1 auto;
    margin: 0;
    border-bottom: 0;
    min-width: 0;
  }
  body.mkt-tab-on .mkt-tabs button.on::after {
    bottom: 0;
  }
  body.mkt-tab-on .mkt-search-wrap {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--panel, #fff);
  }
  html[data-theme="light"] body.mkt-tab-on .mkt-search-wrap {
    background: #fff;
    border-color: color-mix(in srgb, var(--line) 80%, transparent);
  }
  html[data-theme="dark"] body.mkt-tab-on .mkt-search-wrap {
    background: var(--panel-2);
  }
  body.mkt-tab-on .mkt-search {
    font-size: 13px;
  }
  body.mkt-tab-on .mkt-status {
    display: none;
  }
  body.mkt-tab-on .mkt-chips {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    padding-top: 10px;
  }
  .mkt-chips {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .mkt-chip-pin {
    background: transparent;
  }
  .mkt-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: stretch;
    min-height: 0;
    flex: 1;
  }
  .mkt-page.has-flow .mkt-split {
    grid-template-columns: 1fr;
    flex: 1;
    min-height: 0;
  }
  .mkt-page.has-flow .mkt-side {
    flex: 1 1 auto;
    min-height: calc(100vh - 240px);
  }
  .mkt-page.has-flow .mkt-flow-canvas {
    min-height: calc(100vh - 280px);
    height: calc(100vh - 280px);
  }
  .mkt-page.is-sector .mkt-split {
    grid-template-columns: 1fr;
  }
  .mkt-table-pane {
    overflow: visible;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  html[data-theme="dark"] .mkt-table-pane {
    background: transparent;
    box-shadow: none;
  }
  /* 电脑端：钉顶到表头，仅列表区在 .mkt-scroll 内滚动 */
  body.mkt-tab-on .mkt-page {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  body.mkt-tab-on .mkt-pin {
    flex: 0 0 auto;
  }
  body.mkt-tab-on .mkt-scroll {
    flex: 1 1 0;
    min-height: 0;
    background: transparent;
  }
  body.mkt-tab-on .mkt-split {
    min-height: 0;
  }
  .mkt-cols.is-cex.is-metric-volume,
  .mkt-row-desk.is-metric-volume,
  .mkt-cols.is-cex.is-metric-inflow,
  .mkt-row-desk.is-metric-inflow {
    grid-template-columns: minmax(148px, 1.6fr) 0.9fr 1fr;
  }
  /* 换手率：名称 + 最新价 + 24H成交额 + 市值 + 换手率（5 列） */
  .mkt-cols.is-cex.is-metric-turn,
  .mkt-row-desk.is-metric-turn {
    grid-template-columns: minmax(148px, 1.45fr) minmax(96px, 0.58fr) 0.85fr 0.95fr 0.88fr;
  }
  /* 量比：名称 + 最新价 + 24H成交额 + 量比（4 列） */
  .mkt-cols.is-cex.is-metric-vr,
  .mkt-row-desk.is-metric-vr {
    grid-template-columns: minmax(148px, 1.45fr) minmax(96px, 0.58fr) 0.9fr 0.92fr;
  }
  .mkt-cols.is-cex.is-market-spot:not(.is-metric-turn):not(.is-metric-vr),
  .mkt-row-desk.is-market-spot:not(.is-metric-turn):not(.is-metric-vr) {
    grid-template-columns: minmax(120px, 1.15fr) minmax(96px, 0.58fr) 0.66fr 0.76fr 0.76fr 0.86fr 0.8fr;
  }
  .is-market-spot .mkt-perp-only {
    display: none !important;
  }
  .mkt-cols.is-cex,
  .mkt-row-desk {
    grid-template-columns: minmax(120px, 1.15fr) minmax(96px, 0.58fr) 0.66fr 0.76fr 0.76fr 0.86fr 0.7fr 0.74fr 0.8fr;
    padding-left: 10px;
    padding-right: 12px;
  }
  .mkt-cols.is-cex {
    margin-left: 0;
    margin-right: 0;
  }
  .mkt-cols.is-cex > :nth-child(n+2),
  .mkt-row-desk > :nth-child(n+2) {
    text-align: right;
  }
  /* 电脑端：最新价数值靠左；表头再单独左移与数值对齐 */
  .mkt-row-desk > .mkt-px {
    text-align: left;
    justify-self: start;
  }
  .mkt-cols.is-cex > .mkt-th-sort:nth-child(2) {
    justify-content: flex-start;
    text-align: left;
    justify-self: start;
    margin-left: -18px;
    width: calc(100% + 18px);
    max-width: none;
  }
  .mkt-cols.is-exch,
  .mkt-row-exch {
    grid-template-columns: 32px minmax(120px, 1.1fr) repeat(5, minmax(58px, 0.82fr));
    padding-left: 10px;
    padding-right: 12px;
  }
  .mkt-row-exch > .mkt-ex-rank-cell {
    justify-self: center;
    align-self: center;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
  }
  .mkt-row-exch > .mkt-ex-ident-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: visible;
  }
  .mkt-row-exch > .mkt-ex-ident-cell .acc-exch-mode-ico-wrap {
    flex-shrink: 0;
  }
  .mkt-row-exch > .mkt-ex-ident-cell .mkt-names {
    min-width: 0;
    flex: 1;
  }
  .mkt-ex-desk-only {
    display: block !important;
  }
  .mkt-ex-mob-only {
    display: none !important;
  }
  .mkt-cex-desk-only {
    display: block !important;
  }
  .mkt-cex-mob-only {
    display: none !important;
  }
  .mkt-cols.is-exch > :nth-child(n+3),
  .mkt-row-exch > :nth-child(n+3) {
    text-align: right;
  }
  .mkt-cols.is-cex .mkt-th-mcap,
  .mkt-cols.is-sector .mkt-th-sector-mcap,
  .mkt-cols.is-sector .mkt-th-mcap {
    justify-content: flex-end;
    justify-self: stretch;
    width: 100%;
    text-align: right;
  }
  .mkt-cols.is-cex .mkt-limit-menu,
  .mkt-cols.is-sector .mkt-limit-menu {
    left: auto;
    right: 0;
  }
  .mkt-side {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px 12px;
    background: var(--panel);
    min-height: 0;
  }
  html[data-theme="dark"] .mkt-side .mkt-flow,
  .mkt-side .mkt-flow {
    flex: 1;
    min-height: 0;
    height: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }
  .mkt-flow-canvas {
    height: 100%;
    min-height: 460px;
  }
  .mkt-list.is-sector {
    display: flex;
    flex-direction: column;
  }
  .mkt-list.is-sector .mkt-row-sector {
    border-right: none;
  }
  .mkt-note {
    margin-top: 8px;
  }
}

/* 产品创建页：手机端表单紧凑（不依赖 :has，最后加载保证覆盖） */
@media (max-width: 899px) {
  body.strategy-tab-on #pro-ops-box.pro-ops-shell .sleeve-account,
  body.strategy-tab-on #pro-ops-box.pro-ops-shell .binding-grid .pro-field select,
  body.strategy-tab-on #pro-ops-box.pro-ops-shell .binding-grid .pro-field input[type="text"],
  body.strategy-tab-on #pro-ops-box.pro-ops-shell .sleeve-invest,
  body.strategy-tab-on #pro-ops-box.pro-ops-shell .pro-ops-input-wrap .sleeve-base-notional,
  body.strategy-tab-on #pro-ops-box.pro-ops-shell .pro-ops-input-wrap,
  body.strategy-tab-on #pro-ops-box.pro-ops-shell .pro-ops-manual-fields .sleeve-lev {
    min-height: 38px;
  }
  body.strategy-tab-on #pro-ops-box .pro-ops-mode-btn {
    min-height: 34px;
  }
}

/* 持仓/产品「…」底抽屉：仅顶线（压过 04-shell html[data-theme=dark] .fee-sheet 四边 border） */
html[data-theme="dark"] #hold-more-sheet.fee-tip-modal.hold-more-sheet.is-mobile-drawer:not(.is-desk-pop) > .fee-sheet.hold-more-card,
html[data-theme="dark"] #pro-ops-more-sheet.fee-tip-modal.hold-more-sheet.is-mobile-drawer:not(.is-desk-pop) > .fee-sheet.hold-more-card,
html[data-theme="dark"] .fee-tip-modal.hold-more-sheet.is-mobile-drawer:not(.is-desk-pop) > .fee-sheet.hold-more-card,
html:not([data-theme="dark"]) #hold-more-sheet.fee-tip-modal.hold-more-sheet.is-mobile-drawer:not(.is-desk-pop) > .fee-sheet.hold-more-card,
html:not([data-theme="dark"]) #pro-ops-more-sheet.fee-tip-modal.hold-more-sheet.is-mobile-drawer:not(.is-desk-pop) > .fee-sheet.hold-more-card,
html:not([data-theme="dark"]) .fee-tip-modal.hold-more-sheet.is-mobile-drawer:not(.is-desk-pop) > .fee-sheet.hold-more-card {
  border-width: 0 !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-top-width: 1px !important;
  border-top-color: var(--card-line, rgba(255, 255, 255, 0.14)) !important;
  border-left-width: 0 !important;
  border-right-width: 0 !important;
  border-bottom-width: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}
