/* —— P0 登录 / 我的 / 管理后台 —— *//* 电脑：工具内弹窗；手机（.auth-mobile-page）：独立灰底页 */



.auth-layer {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px 10px;
  background: transparent;
  box-sizing: border-box;
}
.auth-layer.is-open,
.auth-layer:not([hidden]) {
  display: flex;
}
.auth-layer[hidden] {
  display: none !important;
}
.auth-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(19, 33, 46, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
  cursor: default;
  pointer-events: auto;
}
body.auth-gate-open .shell {
  /* 未登录只看登录页：工具壳完全藏起，避免先闪工具再退回 */
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
  filter: none !important;
}
body.auth-boot-pending .shell {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.auth-sheet {
  position: relative;
  z-index: 2;
  width: min(400px, 100%);
  max-width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 18px 48px rgba(19, 33, 46, 0.22);
  padding: 22px 16px 24px;
  pointer-events: auto;
  box-sizing: border-box;
}
.auth-head {
  position: relative;
  margin-bottom: 18px;
  padding-top: 2px;
}
.auth-close {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 3;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 4px 6px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.auth-close:hover,
.auth-close:focus-visible {
  background: transparent !important;
  color: var(--ink);
  outline: none;
}
.auth-close:active {
  background: transparent !important;
  opacity: 0.75;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 4px 36px 0;
}
.auth-logo-mark {
  line-height: 0;
  margin-bottom: 8px;
  color: var(--teal);
}
.auth-logo-mark .logo-mc {
  width: 96px;
  height: 96px;
  display: block;
  color: inherit;
  object-fit: contain;
}
.auth-brand-name {
  font-family: Figtree, "Noto Sans SC", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.2;
}
.auth-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}
.auth-a11y {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.auth-head .fee-x:not(.auth-close) {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  flex-shrink: 0;
}
.auth-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.auth-form .pro-field { margin-bottom: 12px; }
/* 登录框内提示：纯字样，不要背景条 */

.auth-form .toast,
.auth-form #auth-msg,
.auth-form #auth-force-msg,
#auth-msg.toast,
#auth-force-msg.toast {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  min-height: 0;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.auth-form .toast:empty,
#auth-msg.toast:empty,
#auth-force-msg.toast:empty {
  margin: 0;
  min-height: 0;
}
.auth-form .toast.err,
#auth-msg.toast.err,
#auth-force-msg.toast.err {
  color: var(--down) !important;
}
.auth-form .toast.ok,
#auth-msg.toast.ok,
#auth-force-msg.toast.ok {
  color: var(--up) !important;
}
/* 白卡片上略灰输入底，贴近持仓区层次 */

.auth-sheet .pro-field-inp {
  background: var(--panel-2) !important;
  background-color: var(--panel-2) !important;
  border-color: var(--line) !important;
}
.auth-submit {
  width: 100%;
  margin-top: 8px;
  background: var(--teal) !important;
  color: #fff !important;
  pointer-events: auto;
}
.auth-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
body.auth-gate-open {
  overflow: hidden;
}
/* 手机全页登录：灰底 + 白卡片（非弹窗） */

body.auth-mobile-page {
  background: var(--bg);
}
body.auth-mobile-page.auth-gate-open .shell {
  filter: none;
  opacity: 0;
  transform: none;
}
body.auth-mobile-page .auth-layer {
  padding: 18px 10px calc(18px + var(--safe-b, 0px));
  align-items: flex-start;
  justify-content: center;
  background: var(--bg);
}
body.auth-mobile-page .auth-backdrop {
  display: block;
  background: var(--bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.auth-mobile-page .auth-sheet {
  width: 100%;
  max-width: min(460px, 100%);
  min-height: 0;
  margin-top: 28px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 10px 28px rgba(21, 32, 43, 0.08);
  padding: 22px 16px 24px;
}

@media (min-width: 900px) {
  .auth-layer {
    padding: 24px 20px;
  }
  .auth-sheet {
    width: min(420px, 100%);
    padding: 26px 22px 28px;
  }
}
/* 「我的」· APP 账号页 */


.me-page {
  padding: 0;
  max-width: none;
}
.acc-login-block {
  margin: 0;
}
.me-hero-compact {
  padding: 0;
}
.me-hero-compact .me-title {
  font-size: 22px;
}
.me-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 14px;
}
.me-hero-actions .me-cta-inline,
.me-hero-actions .me-gear {
  margin-top: 0;
}
@media (hover: hover) and (pointer: fine) {
  .me-hero-actions .me-gear:hover {
    transform: scale(1.16);
    color: var(--ink, #e8eef4);
    background: transparent;
  }
}
.me-hero-actions .me-gear:active {
  color: var(--ink, #e8eef4);
  background: transparent;
  opacity: 1;
  transform: scale(1.24);
  transition-duration: 0.08s;
}
/* 电脑账户卡：设置左侧三图标 — 与 .me-gear 同尺寸同色 */

.me-acc-tools {
  display: none;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.me-acc-tools .hero-acc-tool {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  transition: color 0.12s ease, transform 0.1s ease, opacity 0.12s ease;
}
.me-acc-tools .hero-acc-tool svg {
  width: 24px;
  height: 24px;
}
.me-acc-tools .hero-acc-tool[data-acc-tool="cs"] svg,
#hero-acc-cs svg {
  transform: scaleX(1.16);
}
@media (min-width: 900px) {
  .me-acc-tools .hero-acc-tool svg {
    width: 26px;
    height: 26px;
  }
}
.me-acc-tools .hero-acc-tool:hover {
  color: var(--teal);
  background: transparent;
}
.me-acc-tools .hero-acc-tool:active {
  transform: scale(0.96);
  opacity: 0.75;
  background: transparent;
  color: var(--ink);
}
html[data-theme="dark"] .me-acc-tools .hero-acc-tool {
  color: #e6ebf0 !important;
}
html[data-theme="dark"] .me-acc-tools .hero-acc-tool:hover {
  color: #fff !important;
  background: transparent !important;
}
html[data-theme="dark"] .me-acc-tools .hero-acc-tool:active {
  color: #e6ebf0 !important;
  opacity: 0.75;
}
.me-acc-tools .me-desk-search {
  display: none;
  flex: 0 0 auto;
  width: min(260px, 28vw);
  min-width: 180px;
  max-width: 280px;
  align-items: center;
}
.me-acc-tools .me-desk-search .hero-hold-search-wrap {
  height: 36px;
  min-height: 36px;
  border-radius: 10px;
}
@media (min-width: 900px) {
  .me-acc-tools {
    display: inline-flex;
    flex-wrap: nowrap;
  }
  /* 电脑账户页顶栏三图标已迁到卡片，避免重复 */
  html:has(#tab-accounts.on) .hero-acc-tools {
    display: none !important;
  }
  .me-acc-tools.is-searching .me-desk-search {
    display: flex;
    animation: hero-inline-search-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .me-acc-tools.is-searching [data-acc-tool="search"] {
    display: none;
  }
}
.acc-panel-head .me-hero-actions .me-cta-inline,
.acc-panel-head .me-hero-actions .me-gear {
  margin-top: 0;
}
.me-user .me-hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 0;
  align-self: center;
}
.me-user .me-gear {
  margin-top: 0;
}
.me-sheet-row[hidden] {
  display: none !important;
}
.me-cta-inline {
  margin-top: 14px;
  min-width: 80px;
  height: 36px;
  padding: 0 16px;
  flex-shrink: 0;
}
/* 未登录：登录按钮占据用户名位，右侧仅保留设置 */

.me-cta-title {
  margin-top: 0;
  min-width: 88px;
  height: 36px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 750;
  flex-shrink: 0;
}
.me-guest .me-hero-actions {
  margin-top: 0;
  align-self: flex-end;
  padding-bottom: 0;
}
.me-guest .me-gear {
  margin-top: 0;
}
.acc-empty--guest {
  padding-top: 14px;
  padding-bottom: 16px;
}
.acc-empty--guest p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.me-gear svg {
  width: 24px;
  height: 24px;
  display: block;
}
.admin-me-gears {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.me-gear {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-top: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.12s ease, transform 0.1s ease, opacity 0.12s ease;
}
/* display:grid 会盖住 UA 的 [hidden]，分享邀请等须强制隐藏 */
.me-gear[hidden] {
  display: none !important;
}
.ch-inv-filters { display: flex; gap: 8px; margin: 8px 0; }
.ch-inv-filters button {
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}
.ch-inv-filters button.on { background: #121417; color: #fff; border-color: #121417; }
.ch-inv-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.invite-share-layer {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
body.invite-share-open .dock {
  visibility: hidden !important;
  pointer-events: none !important;
}
.invite-share-layer[hidden] { display: none !important; }
.invite-share-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.invite-share-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  color: #f4f6f8;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(100deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 42%, rgba(255, 255, 255, 0.05) 78%),
    radial-gradient(70% 80% at 92% 18%, rgba(210, 214, 220, 0.28), transparent 52%),
    #090a0c;
}
.invite-share-body {
  flex: 1; min-height: 0; overflow: auto; padding: 0 18px 12px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.invite-share-body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.invite-share-top {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px 4px;
}
.invite-share-top-tools { display: flex; align-items: center; gap: 8px; }
.invite-share-x {
  width: 36px; height: 36px; margin-left: -8px; border: 0; background: transparent; color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.invite-share-vip {
  height: 26px; padding: 0 8px 0 6px; border-radius: 999px;
  background: rgba(16, 18, 22, 0.55); border: 0;
  color: #fff; font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.invite-share-scan {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(16, 18, 22, 0.55); border: 0;
  color: #fff; display: grid; place-items: center; cursor: pointer;
}
.invite-share-earn {
  display: inline-flex; margin: 14px 0 0; padding: 6px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.45); color: #d7dde3; font-size: 12px;
}
.invite-share-earn[hidden] { display: none !important; }
.invite-share-earn b { color: #c8f542; font-weight: 700; margin: 0 4px; }
#invite-share-title {
  margin: 16px 0 0; font-size: 34px; line-height: 1.18; font-weight: 760; letter-spacing: -0.4px;
}
.invite-share-clock { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; }
.invite-share-clock[hidden] { display: none !important; }
.invite-flip { display: flex; align-items: center; gap: 6px; }
.invite-flip-card {
  position: relative; width: 42px; height: 34px; perspective: 220px;
  font-variant-numeric: tabular-nums;
}
.invite-flip-top, .invite-flip-bot, .invite-flip-leaf {
  position: absolute; left: 0; right: 0; height: 17px; overflow: hidden;
  background: #121212; color: #fff;
}
.invite-flip-top, .invite-flip-leaf-top { top: 0; border-radius: 7px 7px 0 0; }
.invite-flip-bot, .invite-flip-leaf-bot { bottom: 0; border-radius: 0 0 7px 7px; }
.invite-flip-top span, .invite-flip-bot span, .invite-flip-leaf span {
  display: block; height: 34px; line-height: 34px; text-align: center;
  font-size: 16px; font-weight: 700;
}
.invite-flip-bot span, .invite-flip-leaf-bot span { margin-top: -17px; }
.invite-flip-leaf { visibility: hidden; backface-visibility: hidden; }
.invite-flip-leaf-top { transform-origin: center bottom; z-index: 3; }
.invite-flip-leaf-bot { transform-origin: center top; z-index: 2; transform: rotateX(90deg); }
.invite-flip-leaf-top.is-fold { visibility: visible; animation: invite-fold-down 0.42s ease-in forwards; }
.invite-flip-leaf-bot.is-fold { visibility: visible; animation: invite-fold-up 0.42s ease-in 0.12s forwards; }
.invite-flip-card::after {
  content: ""; position: absolute; left: 1px; right: 1px; top: 50%; z-index: 6;
  height: 1px; margin-top: -0.5px; background: rgba(0, 0, 0, 0.72); pointer-events: none;
}
@keyframes invite-fold-down {
  0% { transform: rotateX(0deg); }
  100% { transform: rotateX(-90deg); }
}
@keyframes invite-fold-up {
  0% { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}
.invite-share-clock em { color: #9aa3ad; font-size: 12px; font-style: normal; }
.invite-share-kicker { margin: 18px 0 0; color: #c8f542; font-size: 14px; font-weight: 700; }
.invite-share-amount { margin: 0; font-size: 84px; line-height: 0.9; font-weight: 760; color: #c8f542; letter-spacing: -2px; }
.invite-share-unit { margin: 0 0 8px; font-size: 28px; line-height: 1; font-weight: 760; color: #c8f542; }
.invite-share-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: #e4e8ec; font-size: 14px; }
.invite-share-line svg { flex: none; }
.invite-share-rules-btn {
  margin: 12px 0 0; padding: 0; border: 0; background: transparent;
  color: #d5dbe1; text-decoration: underline; cursor: pointer; font-size: 14px;
}
.invite-share-rules { margin: 8px 0 0; color: #9aa3ad; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.invite-share-rules[hidden] { display: none !important; }
.invite-share-sheet.is-rules > :not(#invite-rules) { display: none !important; }
.invite-share-sheet.is-rules {
  background: #000;
}
.invite-share-sheet.is-history > :not(#invite-history) { display: none !important; }
.invite-share-sheet.is-history { background: #000; }
.invite-history {
  display: none; flex-direction: column; min-height: 0; width: 100%; height: 100%;
  background: #000; color: #fff;
}
.invite-share-sheet.is-history .invite-history:not([hidden]) { display: flex; flex: 1 1 auto; }
.invite-history[hidden] { display: none !important; }
.invite-history-scroll {
  flex: 1; min-height: 0; overflow: auto; padding: 4px 16px calc(28px + env(safe-area-inset-bottom)); scrollbar-width: none;
}
.invite-history-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.invite-hist-earn { margin: 8px 4px 0; font-size: 15px; font-weight: 550; }
.invite-hist-sum { margin: 6px 4px 0; font-size: 36px; line-height: 1.05; font-weight: 760; letter-spacing: -0.6px; }
.invite-hist-more { margin: 8px 4px 0; color: #8e969e; font-size: 14px; }
.invite-hist-h {
  margin: 22px 4px 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 16px; font-weight: 700;
}
.invite-hist-sub { margin: 4px 4px 14px; color: #8e969e; font-size: 13px; }
.invite-hist-note { margin: -8px 4px 12px; color: #6e767e; font-size: 12px; }
.invite-hist-empty { margin: 28px 4px; color: #8e969e; font-size: 14px; text-align: center; }
.invite-hist-card {
  width: 100%; display: grid; grid-template-columns: 1fr; gap: 0; align-items: start;
  text-align: left; color: inherit; background: #161616; border: 0; border-radius: 16px;
  padding: 14px; margin: 0 0 12px; cursor: pointer;
}
.invite-hist-ava { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; }
.invite-hist-ava img { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 50%; }
.invite-hist-ava.lg { width: 72px; height: 72px; margin: 8px auto 10px; }
.invite-hist-ava.lg img { width: 72px; height: 72px; }
.invite-hist-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 16px; font-weight: 750; }
.invite-hist-name i { color: #8d949c; font-style: normal; font-weight: 400; font-size: 18px; }
.invite-hist-kv { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; }
.invite-hist-kv em { color: #8e969e; font-style: normal; }
.invite-hist-kv b { font-weight: 650; }
.invite-hist-who { margin: 4px 0 16px; text-align: center; font-size: 18px; font-weight: 750; }
.invite-hist-banner {
  position: relative; background: #161616; border-radius: 16px; padding: 28px 16px 18px; text-align: center;
}
.invite-hist-banner .invite-hist-pill { position: absolute; left: 12px; top: 12px; }
.invite-hist-banner p { margin: 8px 0 6px; font-size: 15px; }
.invite-hist-banner strong { display: block; font-size: 28px; font-weight: 760; letter-spacing: -0.4px; }
.invite-hist-banner small { display: block; margin-top: 8px; color: #8e969e; font-size: 13px; }
.invite-hist-pill {
  display: inline-flex; align-items: center; gap: 4px; background: #2c2c2c; color: #d0d4d8;
  border-radius: 8px; font-size: 12px; line-height: 1; padding: 5px 8px; font-weight: 550;
}
.invite-hist-sec { display: flex; align-items: center; gap: 8px; margin: 22px 4px 8px; font-size: 15px; }
.invite-hist-taskline { margin: 0 4px 12px; font-size: 16px; font-weight: 700; line-height: 1.45; }
.invite-hist-steps {
  display: flex; flex-direction: column; gap: 16px; background: #161616; border-radius: 16px; padding: 16px 14px;
}
.invite-hist-step { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; position: relative; }
.invite-hist-step i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid #6a7078; color: #cfd4da; font-size: 12px; font-style: normal; font-weight: 650;
  background: #161616; position: relative; z-index: 1;
}
.invite-hist-step.is-done i { border-color: #8b929a; }
.invite-hist-step:not(:last-child)::after {
  content: ""; position: absolute; left: 10px; top: 22px; bottom: -16px; width: 1px; background: #3a3f45;
}
.invite-hist-step b { display: block; font-size: 15px; font-weight: 650; }
.invite-hist-step small { display: block; margin-top: 4px; color: #8e969e; font-size: 12px; }
.invite-hist-meta { margin: 18px 4px 0; }
.invite-hist-meta span { display: block; color: #8e969e; font-size: 13px; }
.invite-hist-meta b { display: block; margin-top: 4px; font-size: 16px; font-weight: 750; }
.invite-rules {
  display: none; flex-direction: column; min-height: 0; width: 100%; height: 100%;
  background: #000; color: #fff;
}
.invite-share-sheet.is-rules .invite-rules:not([hidden]) {
  display: flex; flex: 1 1 auto;
}
.invite-rules[hidden] { display: none !important; }
.invite-rules-top { flex: none; padding: calc(8px + env(safe-area-inset-top)) 12px 0; }
.invite-rules-tabs { display: flex; gap: 22px; padding: 2px 18px 0; }
.invite-rules-tabs button {
  flex: none; border: 0; background: transparent; color: #8e969e; font-size: 16px; font-weight: 650;
  padding: 8px 0 10px; cursor: pointer; position: relative; white-space: nowrap;
}
.invite-rules-tabs button.on { color: #fff; }
.invite-rules-tabs button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #fff;
}
.invite-rules-scroll {
  flex: 1; min-height: 0; overflow: auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); scrollbar-width: none;
}
.invite-rules-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.invite-rules-h { margin: 6px 0 14px; font-size: 22px; line-height: 1.25; font-weight: 760; }
.invite-rules-card {
  background: #121212; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 18px;
}
.invite-rules-step { display: flex; gap: 12px; align-items: flex-start; }
.invite-rules-step svg { flex: none; margin-top: 1px; color: #e8edf2; }
.invite-rules-step b { display: block; font-size: 16px; font-weight: 700; }
.invite-rules-step span { display: block; margin-top: 4px; color: #9aa3ad; font-size: 13px; line-height: 1.45; }
.invite-rules-guide {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 18px 0 4px; color: #fff; font-size: 16px;
}
.invite-rules-guide svg { flex: none; color: #c5ced6; }
.invite-rules-reward { margin: 26px 0 12px; font-size: 22px; font-weight: 760; }
.invite-rules-p { margin: 0 0 14px; color: #d7dde4; font-size: 14px; line-height: 1.65; }
.invite-rules-faq { border-bottom: 1px solid #2a2e33; }
.invite-rules-faq > button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0; border: 0; background: transparent; color: #fff;
  font-size: 15px; line-height: 1.4; text-align: left; cursor: pointer;
}
.invite-rules-faq > button svg { flex: none; color: #c5ced6; transition: transform .15s ease; }
.invite-rules-faq.open > button svg { transform: rotate(180deg); }
.invite-rules-faq p { display: none; margin: 0 0 14px; color: #9aa3ad; font-size: 14px; line-height: 1.6; }
.invite-rules-faq.open p { display: block; }
.invite-rules-terms {
  display: block; margin: 28px auto 8px; padding: 0; border: 0; background: transparent;
  color: #d5dbe2; text-decoration: underline; font-size: 14px; cursor: pointer;
}
.invite-rules-terms-body { margin: 8px 0 0; color: #d7dde4; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.ch-rules-edit { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.ch-rules-edit textarea.pro-field-inp { min-height: 44px; resize: vertical; }
.ch-rules-step, .ch-rules-faq {
  display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.ch-rules-step-top, .ch-rules-faq-top { display: flex; gap: 6px; align-items: center; }
.ch-rules-step-top select { width: 88px; flex: none; }
.ch-rules-step-top button, .ch-rules-faq-top button { flex: none; }
.invite-share-friend-lab { margin: 36px 0 10px; color: #c5ced6; font-size: 15px; }
.invite-share-friend {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 14px 16px 16px; border-radius: 16px; background: #121212; border: 1px solid rgba(255, 255, 255, 0.08);
}
.invite-share-friend b { display: block; font-size: 16px; font-weight: 700; }
.invite-share-friend div span { display: block; margin-top: 6px; color: #9aa3ad; font-size: 13px; line-height: 1.45; }
.invite-share-badge {
  width: 64px; height: 64px; flex: none; position: relative;
}
.invite-share-badge i {
  position: absolute; right: 0; bottom: 0; z-index: 0; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: #111;
  display: grid; place-items: center;
}
.invite-share-badge b {
  position: absolute; left: 6px; top: 4px; z-index: 1; width: 34px; height: 34px; margin: 0;
  border-radius: 50%; color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid; place-items: center; font-size: 16px;
}
.invite-share-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; font-size: 13px; }
.invite-share-list p { margin: 0; color: #9aa3ad; }
.invite-share-toast {
  margin: 0 16px 8px; padding: 8px 10px; border-radius: 8px;
  background: #1a222c; color: #e8eef4; font-size: 13px;
}
.invite-share-toast[hidden] { display: none !important; }
.invite-share-dock {
  display: flex; justify-content: space-around; gap: 8px;
  padding: 8px 8px calc(16px + env(safe-area-inset-bottom));
  background: transparent;
}
.invite-send-drawer {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.invite-send-drawer[hidden] { display: none !important; }
.invite-send-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, 0.45); cursor: pointer; }
.invite-send-card {
  position: relative; padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0; background: #000;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}
.invite-send-grab {
  display: block; width: 36px; height: 4px; margin: 2px auto 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}
.invite-send-card h3 { margin: 4px 0 14px; font-size: 22px; font-weight: 760; letter-spacing: -0.3px; }
.invite-send-card h3[hidden], .invite-send-row[hidden], .invite-send-wechat[hidden] { display: none !important; }
.invite-send-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 12px 14px; border-radius: 12px; background: #121212;
}
.invite-send-row span { flex: none; color: #c5ced6; font-size: 15px; }
.invite-send-row b {
  flex: 1; min-width: 0; font-size: 15px; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.invite-send-row button {
  flex: none; width: 32px; height: 32px; border: 0; background: transparent; color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.invite-send-black {
  margin: 0 0 16px; padding: 14px 14px 12px; border-radius: 12px; background: #121212;
}
.invite-send-note { margin: 0 0 12px; font-size: 16px; line-height: 1.55; font-weight: 650; }
.invite-send-url { margin: 0; color: #d7dde3; font-size: 15px; line-height: 1.45; word-break: break-all; }
.invite-send-wechat > button {
  width: 100%; height: 48px; border: 0; border-radius: 999px;
  background: #121212; color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.invite-share-dock button {
  border: 0; background: transparent; color: #f4f6f8;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; cursor: pointer; min-width: 64px;
}
.invite-share-dock i {
  width: 52px; height: 52px; border-radius: 50%;
  background: #121212; border: 1px solid rgba(255, 255, 255, 0.08); color: #fff;
  display: grid; place-items: center;
}
@media (min-width: 900px) {
  .invite-share-layer { align-items: center; }
  .invite-share-sheet {
    width: min(420px, calc(100% - 48px));
    height: auto;
    max-height: min(720px, calc(100% - 48px));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    overflow: hidden;
  }
  .invite-share-sheet.is-rules,
  .invite-share-sheet.is-history {
    height: min(720px, calc(100% - 48px));
  }
}
.me-gear:hover { background: transparent; color: var(--teal); }
.me-gear:active { transform: scale(0.96); opacity: 0.75; background: transparent; }
.me-guest,
.me-user {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.me-guest[hidden],
.me-user[hidden] {
  display: none !important;
}
.me-hero {
  padding: 8px 4px 4px;
}
.me-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.me-hero-ident {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
/* 未登录：不展示每人相同的固定头像（仅登录态 #me-user 显示） */

.me-guest .me-avatar {
  display: none !important;
}
.me-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: transparent;
  /* 轻环：大红头像在浅底上不「糊」进白卡 */
  box-shadow: 0 0 0 1px rgba(15, 30, 40, 0.06);
}
@media (max-width: 720px) {
  .me-avatar,
  .acc-panel-head .me-avatar {
    width: 32px;
    height: 32px;
  }
  .me-hero-ident,
  .acc-panel-head .me-hero-ident {
    gap: 8px;
  }
  .me-asset-ico-wrap,
  .me-asset-ico,
  .acc-panel-head .me-asset-ico-wrap,
  .acc-panel-head .me-asset-ico {
    width: 28px;
    height: 28px;
  }
  .me-asset {
    gap: 8px;
    padding: 12px 10px;
  }
}
.me-hero-text {
  flex: 1;
  min-width: 0;
}
.me-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.me-title {
  margin: 0;
  font-family: Figtree, "Noto Sans SC", sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
  word-break: break-all;
}
.me-desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.me-cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}
.me-cta:hover { background: #0c6a5c; }
.me-cta:active { transform: scale(0.98); }

.me-assets {
  display: flex;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid rgba(21, 32, 43, 0.06);
  border-radius: 12px;
  overflow: hidden;
}
.me-asset {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.me-asset:active { background: var(--chip-bg); }
.me-asset-ico-wrap {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  box-shadow: none;
  background: transparent;
  color: var(--ink);
}
.me-asset-ico {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.me-asset-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.me-asset-split {
  display: none;
}
.me-asset-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.me-asset-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
  min-width: 0;
}
.me-asset-val {
  font-family: Figtree, "Noto Sans SC", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.me-asset-val.up { color: var(--up); }
.me-asset-val.down { color: var(--down); }
.me-asset-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1;
  flex-shrink: 0;
}

.me-menu {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid rgba(21, 32, 43, 0.06);
  border-radius: 12px;
  overflow: hidden;
}
.me-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 15px 14px;
  border: 0;
  border-bottom: 1px solid rgba(21, 32, 43, 0.06);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
}
.me-menu-item:last-child { border-bottom: 0; }
.me-menu-item:active { background: var(--chip-bg); }
.me-menu-item > span {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.me-menu-danger > span { color: #b42318; }
.me-chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid #b0bec5;
  border-top: 2px solid #b0bec5;
  transform: rotate(45deg);
  flex-shrink: 0;
  opacity: 0.85;
}

.me-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 28000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 14px calc(16px + var(--safe-b, 0px));
}
.me-sheet-layer.is-open,
.me-sheet-layer:not([hidden]) {
  display: flex;
}
.me-sheet-layer[hidden] {
  display: none !important;
}
.me-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  cursor: pointer;
}
#me-asset-layer .me-sheet-backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.me-sheet {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  background-color: var(--panel);
  background-image: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: me-sheet-in 0.22s ease-out;
}
/* 账号设置：电脑端外层卡片包住菜单+取消；手机端见下方抽屉 */

.me-settings-sheet {
  width: min(340px, calc(100vw - 40px));
  padding: 12px;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(15, 24, 32, 0.06);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 24, 32, 0.22), 0 0 0 1px rgba(15, 24, 32, 0.06);
}
.me-settings-sheet .me-sheet-list {
  margin: 0;
}
.me-sheet-cancel-desk {
  display: none;
}
@media (min-width: 720px) {
  .me-settings-sheet {
    background: #f4f6f8;
    gap: 10px;
    padding: 12px;
  }
  .me-settings-sheet .me-sheet-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 1px solid rgba(21, 32, 43, 0.08);
    border-radius: 14px;
    overflow: hidden;
  }
  .me-settings-sheet .me-skin-block {
    border-bottom: 0;
    gap: 0;
  }
  .me-settings-sheet .me-sheet-row,
  .me-settings-sheet .me-skin-block .me-sheet-row,
  .me-settings-sheet .me-sheet-row:last-child {
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .me-sheet-cancel-desk {
    display: block;
  }
  .me-settings-sheet .me-sheet-cancel-desk,
  .me-region-sheet .me-sheet-cancel-desk {
    width: 100%;
  }
  .me-settings-sheet .me-sheet-cancel-desk {
    border: 0;
    background: transparent;
    border-radius: 0;
    color: var(--muted);
  }
}
.me-sheet-handle {
  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"] .me-sheet-handle {
  background: rgba(255, 255, 255, 0.22);
}
@keyframes me-drawer-up {
  from {
    opacity: 0.85;
    transform: translateY(108%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* 手机端：账号设置 / 市场设置 → 底部抽屉 */

@media (max-width: 719px) {
  #me-settings-layer,
  #admin-settings-layer,
  #admin-prod-ops-layer,
  #me-region-layer,
  #admin-region-layer {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }
  #me-settings-layer .me-settings-sheet,
  #admin-settings-layer .me-settings-sheet,
  #admin-prod-ops-layer .me-settings-sheet,
  #me-region-layer .me-region-sheet,
  #admin-region-layer .me-region-sheet {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 6px 12px calc(14px + var(--safe-b, 0px));
    gap: 0;
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(21, 32, 43, 0.08);
    border-bottom: 0;
    background: #f4f6f8;
    box-shadow: 0 -12px 40px rgba(12, 20, 28, 0.22);
    animation: me-drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  #me-settings-layer .me-sheet-cancel-desk,
  #admin-settings-layer .me-sheet-cancel-desk,
  #admin-prod-ops-layer .me-sheet-cancel-desk,
  #me-region-layer .me-sheet-cancel-desk,
  #admin-region-layer .me-sheet-cancel-desk {
    display: none !important;
  }
  #me-settings-layer .me-sheet-handle,
  #admin-settings-layer .me-sheet-handle,
  #admin-prod-ops-layer .me-sheet-handle,
  #me-region-layer .me-sheet-handle,
  #admin-region-layer .me-sheet-handle {
    display: block;
  }
  #me-settings-layer .me-sheet-list,
  #admin-settings-layer .me-sheet-list,
  #admin-prod-ops-layer .me-sheet-list {
    border-radius: 14px;
    background: #fff;
  }
  #me-settings-layer .me-sheet-row,
  #admin-settings-layer .me-sheet-row,
  #admin-prod-ops-layer .me-sheet-row,
  #me-settings-layer .me-skin-block,
  #admin-settings-layer .me-skin-block {
    border-bottom: 0;
  }
  #me-region-layer .me-region-sheet,
  #admin-region-layer .me-region-sheet {
    --me-region-fade: #f4f6f8;
  }
  html[data-theme="dark"] #me-settings-layer .me-settings-sheet,
  html[data-theme="dark"] #admin-settings-layer .me-settings-sheet,
  html[data-theme="dark"] #admin-prod-ops-layer .me-settings-sheet,
  html[data-theme="dark"] #me-region-layer .me-region-sheet,
  html[data-theme="dark"] #admin-region-layer .me-region-sheet {
    background: #000000 !important;
    border-color: var(--card-line) !important;
    box-shadow: none !important;
    --me-region-fade: #000000 !important;
  }
  html[data-theme="dark"] #me-settings-layer .me-sheet-list,
  html[data-theme="dark"] #admin-settings-layer .me-sheet-list,
  html[data-theme="dark"] #admin-prod-ops-layer .me-sheet-list {
    background: var(--sheet-2);
    border-color: var(--card-line);
  }
  html[data-theme="dark"] #me-region-layer .me-region-sheet,
  html[data-theme="dark"] #admin-region-layer .me-region-sheet {
    --me-region-fade: #000000;
  }
}
/* 手机端：总余额合计 / 总盈利日账 → 底栏抽屉；无 X，点遮罩关闭。电脑仍居中 */

@media (max-width: 719px) {
  #me-asset-layer {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }
  #me-asset-layer .me-asset-sheet,
  #me-asset-layer .me-pnl-sheet {
    --me-asset-drawer-h: min(82dvh, 640px);
    width: 100%;
    max-width: none;
    height: var(--me-asset-drawer-h);
    min-height: var(--me-asset-drawer-h);
    max-height: var(--me-asset-drawer-h);
    margin: 0;
    padding: 6px 16px calc(16px + var(--safe-b, 0px));
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(21, 32, 43, 0.08);
    border-bottom: 0;
    box-shadow: 0 -12px 40px rgba(12, 20, 28, 0.22);
    animation: none;
    overflow: hidden;
  }
  #me-asset-layer .me-sheet-handle {
    display: block;
  }
  #me-asset-layer .me-sheet-x {
    display: none !important;
  }
  #me-asset-layer .me-sheet-head {
    padding-right: 2px;
    flex-shrink: 0;
  }
  #me-asset-layer .me-asset-list {
    flex: 0 1 auto;
    max-height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  #me-asset-layer .me-pnl-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  html[data-theme="dark"] #me-asset-layer .me-asset-sheet,
  html[data-theme="dark"] #me-asset-layer .me-pnl-sheet {
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.5) !important;
  }
}
@keyframes me-sheet-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.me-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}
.me-sheet-head-text {
  min-width: 0;
}
.me-sheet-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.me-sheet-account {
  display: block;
  font-family: Figtree, "Noto Sans SC", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
  word-break: break-all;
}
.me-asset-sheet .me-bal-total-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  max-width: min(220px, 70vw);
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1;
  word-break: normal;
  white-space: nowrap;
}
html[data-theme="dark"] .me-asset-sheet .me-bal-total-chip {
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  -webkit-text-fill-color: var(--solid-fg) !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
.me-sheet-x {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7a8a94;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
}
.me-sheet-x:hover { color: var(--ink); }
.me-sheet-x:active {
  background: transparent;
  color: var(--ink);
  opacity: 0.7;
}
.me-sheet-list {
  display: flex;
  flex-direction: column;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.me-sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid rgba(21, 32, 43, 0.06);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
}
.me-sheet-row:last-child { border-bottom: 0; }
.me-sheet-row:active { background: var(--chip-bg); }
.me-sheet-ico {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink);
  background: none;
  border-radius: 0;
}
.me-sheet-ico svg {
  display: block;
}
.me-sheet-row-danger .me-sheet-ico {
  color: #b42318;
  background: none;
}
.me-sheet-row-main {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.me-sheet-row-danger .me-sheet-row-main {
  color: #b42318;
}
.me-sheet-row .me-chev {
  opacity: 0.55;
}
#me-lang-toggle .me-chev,
#me-skin-toggle .me-chev,
#admin-lang-toggle .me-chev,
#admin-skin-toggle .me-chev {
  display: none !important;
}
/* 工具端账号设置：与后台一致，不显示行尾箭头 */
#me-settings-layer .me-sheet-list .me-chev {
  display: none !important;
}
.me-asset-sheet .me-sheet-row {
  cursor: default;
}
.me-asset-row {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.me-asset-row .me-sheet-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.me-asset-row .me-sheet-row-main small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.me-asset-amt {
  text-align: right;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
}
.me-asset-amt-lab {
  display: inline;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 6px;
  vertical-align: baseline;
}
.me-asset-amt small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}
.me-asset-amt.up { color: var(--up); }
.me-asset-amt.down { color: var(--down); }

.me-asset-acct {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid rgba(21, 32, 43, 0.06);
}
.me-asset-acct:last-child { border-bottom: 0; }
.me-asset-acct-head {
  background: transparent;
  width: 100%;
  border: 0;
  margin: 0;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: default;
  box-sizing: border-box;
  position: relative;
}
button.me-asset-acct-head {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button.me-asset-acct-head:hover {
  background: var(--chip-bg);
}
.me-asset-acct.is-open > .me-asset-acct-head,
html[data-theme="dark"] .me-asset-acct.is-open > .me-asset-acct-head {
  background: transparent;
}
html[data-theme="dark"] .me-asset-acct:not(.is-open) > .me-asset-acct-head {
  background: transparent;
}
.me-asset-acct.is-collapsible:not(.is-open) .me-asset-ifaces {
  display: none;
}
.me-asset-chev {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-left: 4px;
  border-right: 2px solid rgba(122, 136, 148, 0.75);
  border-bottom: 2px solid rgba(122, 136, 148, 0.75);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  align-self: center;
}
.me-asset-acct.is-open > .me-asset-acct-head .me-asset-chev {
  transform: rotate(45deg);
  margin-top: -2px;
}
.me-asset-acct.is-collapsible > .me-asset-acct-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.me-asset-acct.is-err .me-asset-acct-head .me-asset-amt,
.me-asset-iface.is-err .me-asset-amt {
  color: #b42318;
}
.me-asset-ifaces {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 6px 10px;
  margin: 0 0 4px;
  border-left: 2px solid var(--line);
  margin-left: 12px;
}
.me-asset-iface {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 14px;
}
.me-asset-iface .me-iface-main {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.me-iface-title {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.me-asset-iface .me-iface-name {
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-iface-slot {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.me-iface-metrics {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 14px;
  flex-shrink: 0;
}
.me-iface-metrics .me-asset-amt {
  min-width: 4.8em;
}
/* 分腿行按卡片内宽排成三列，数字不再冲出右沿 */
#me-asset-layer .me-asset-list,
#me-asset-layer .me-asset-acct,
#me-asset-layer .me-asset-ifaces,
#me-asset-layer .me-asset-row {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
#me-asset-layer .me-asset-ifaces {
  margin-left: 8px;
  padding-left: 8px;
}
#me-asset-layer .me-asset-iface.me-asset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: start;
  column-gap: 16px;
  width: 100%;
  padding: 8px 12px;
}
#me-asset-layer .me-asset-iface .me-iface-metrics {
  display: contents;
}
#me-asset-layer .me-iface-metrics .me-asset-amt {
  min-width: 0;
}
.me-iface-pnl.up { color: var(--up); }
.me-iface-pnl.down { color: #b42318; }
.me-asset-acct.is-collapsible:not(.is-open) .me-asset-ifaces[hidden],
.me-asset-acct.is-collapsible:not(.is-open) .me-asset-ifaces {
  display: none !important;
}
.me-asset-acct.is-open > .me-asset-ifaces[hidden] {
  display: flex !important;
}
.me-exch-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  border: 0;
  color: inherit;
  flex-shrink: 0;
}
.me-exch-tag.tone-okx,
.me-exch-tag.tone-binance {
  background: transparent !important;
  color: inherit;
}
.me-exch-tag-ico {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  background: transparent;
  color: inherit;
}
.me-exch-tag-fallback {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: transparent;
}
.me-exch-tag-lab {
  display: none;
  line-height: 1;
  max-width: 4.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-theme="dark"] .me-asset-acct {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .me-asset-ifaces {
  border-left-color: rgba(255, 255, 255, 0.16);
}
html[data-theme="dark"] .me-exch-tag.tone-okx,
html[data-theme="dark"] .me-exch-tag.tone-binance {
  background: transparent !important;
  color: inherit;
}
.me-asset-more {
  justify-content: center;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}
.me-asset-loading {
  padding: 16px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.me-asset-loading.err { color: #b42318; }
.me-pnl-sheet {
  width: min(400px, 100%);
  max-height: min(88vh, 640px);
}
.me-pnl-head-text {
  flex: 1;
  min-width: 0;
}
.me-pnl-head-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}
.me-pnl-total-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  max-width: min(148px, 42vw);
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.me-pnl-total-chip.up { color: var(--up); }
.me-pnl-total-chip.down { color: var(--down); }
.me-pnl-head-row .me-sheet-account {
  display: none;
}
.me-pnl-account-select {
  flex: 0 1 auto;
  max-width: 46%;
  min-width: 96px;
  height: 30px;
  font-size: 12px;
}
.me-pnl-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  /* 可滚动，不显示滚动条（避免挡住右侧金额） */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.me-pnl-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.me-pnl-pane[hidden] {
  display: none !important;
}
.me-pnl-day-list {
  display: flex;
  flex-direction: column;
}
.me-pnl-day-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 12px;
  margin: 0;
  border: 0;
  border-bottom: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
}
.me-pnl-day-card:active {
  background: var(--chip-bg);
}
.me-pnl-day-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.me-pnl-day-net {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.me-pnl-day-net.up { color: var(--up); }
.me-pnl-day-net.down { color: var(--down); }
.me-pnl-book-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.me-pnl-back {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}
.me-pnl-cal {
  margin-top: 0;
}
.me-sheet-cancel {
  width: 100%;
  height: 46px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef2f5;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease, transform 0.1s ease, border-color 0.12s ease;
}
.me-sheet-cancel:active {
  background: #e3e9ee;
  transform: scale(0.99);
}
@media (min-width: 720px) {
  .me-sheet-layer {
    align-items: center;
    padding: 24px;
  }
  /* 总余额卡要放下「余额 + 总盈亏」两列 */
  #me-asset-layer .me-asset-sheet {
    width: min(560px, calc(100vw - 48px));
  }
  @keyframes me-sheet-in {
    from {
      opacity: 0;
      transform: translateY(8px) scale(0.97);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}
/* [hidden] 会被 .shell{display:flex} / .admin-auth-layer{display:flex} 盖掉，必须用 !important */


.page-admin .admin-login[hidden],
.page-admin .admin-auth-layer[hidden],
.page-admin #admin-app[hidden] {
  display: none !important;
}
/* 登录闸打开：禁止背后滚动 */

body.page-admin.admin-auth-gate-open,
body.page-admin:has(.admin-auth-layer:not([hidden])) {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  overscroll-behavior: none;
}
/* 管理后台登录闸：与工具端 auth-layer 同构 */

.admin-auth-layer,
.page-admin .admin-login.admin-auth-layer {
  position: fixed;
  inset: 0;
  z-index: 30000;
  box-sizing: border-box;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  min-height: 0;
  background: transparent;
  overflow: visible;
  grid-template-columns: none;
}
.admin-auth-layer.is-open,
.admin-auth-layer:not([hidden]) {
  display: flex;
}
.admin-auth-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(19, 33, 46, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
  cursor: default;
  pointer-events: auto;
}
body.admin-auth-gate-open #admin-app.shell {
  filter: blur(10px);
  transform: translateZ(0);
  opacity: 1;
  pointer-events: none;
  user-select: none;
}
.admin-auth-sheet {
  position: relative;
  z-index: 2;
  width: min(400px, 100%);
  max-height: calc(100dvh - 28px);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  padding: 22px 18px 20px;
  background: var(--panel, #fff);
  border: 1px solid var(--line, rgba(19, 33, 46, 0.08));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 18px 48px rgba(19, 33, 46, 0.22);
  pointer-events: auto;
}
.admin-auth-head {
  margin-bottom: 16px;
}
.admin-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.admin-auth-logo {
  line-height: 0;
  margin-bottom: 2px;
  color: var(--teal, var(--up));
}
.admin-auth-logo .logo-mc {
  display: block;
  width: 72px;
  height: 42px;
  color: inherit;
}
.admin-auth-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, #6b7c88);
}
.admin-auth-brand h1,
#admin-auth-title {
  margin: 0;
  font-family: Figtree, "Noto Sans SC", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink, #15202b);
  line-height: 1.2;
}
.admin-auth-sub {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #6b7c88);
  letter-spacing: 0.02em;
}
.admin-auth-form {
  margin: 0;
}
.admin-auth-form[hidden] {
  display: none !important;
}
/* 兼容旧选择器：登录卡样式收束到闸内 sheet */

.admin-login-card {
  position: relative;
  z-index: 1;
  width: auto;
  max-height: none;
  box-sizing: border-box;
  border-radius: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.admin-login-card-head {
  margin-bottom: clamp(12px, 1.8vh, 18px);
}
.admin-login-card-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.admin-login-card-logo {
  line-height: 0;
  color: var(--up);
}
.admin-login-card-logo .logo-mc {
  display: block;
  width: 64px;
  height: 37px;
}
.admin-login-card-head h1 {
  margin: 0;
  font-family: Figtree, "Noto Sans SC", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink, #15202b);
  line-height: 1.2;
}
.admin-login-card-brand h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3a4a58;
}
.admin-login-card-sub {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #667788);
  line-height: 1.45;
}

.admin-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.admin-login-field span {
  font-size: 12px;
  font-weight: 600;
  color: #667788;
  letter-spacing: 0.04em;
}
.admin-login-field input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 10px;
  background: rgba(248, 250, 251, 0.82);
  box-shadow: inset 0 0 0 1px rgba(19, 33, 46, 0.1);
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: #15202b;
  outline: none;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.admin-login-field input:focus {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1.5px var(--up), 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.admin-login-toast {
  min-height: 0;
  margin: 0 0 8px;
  font-size: 13px;
  /* 白卡片上纯字提示，勿吃全局夜间 toast 深底（否则空消息是黑条） */
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.admin-login-toast:empty {
  display: none;
  margin: 0;
}
.admin-login-toast:not(:empty) {
  min-height: 18px;
  margin: 0 0 8px;
}
.admin-login-btn {
  width: 100%;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  transition: background 0.15s ease, transform 0.1s ease;
}
.admin-login-btn:hover { background: #0c6a5c; }
.admin-login-btn:active { transform: translateY(1px); }
.admin-login-btn:disabled { opacity: 0.65; cursor: wait; }

.admin-login-mfa-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #7a8a98;
  text-align: center;
}
.admin-mfa-shield {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background-color: var(--up);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l8 3v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5l8-3z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l8 3v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5l8-3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.admin-mfa-progress {
  margin: 0 0 14px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #8a9aa8;
}
.admin-mfa-card .admin-login-card-head {
  text-align: center;
  margin-bottom: 16px;
}
.admin-mfa-card .admin-login-card-head h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111827;
}
.admin-mfa-card .admin-login-card-sub {
  margin: 6px auto 0;
  max-width: 22em;
  font-size: 13px;
  font-weight: 450;
  color: #6b7280;
  line-height: 1.45;
}
.admin-mfa-account {
  margin: 0 0 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.admin-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.admin-otp-single-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
  min-width: 0;
}
.admin-otp-single-lab {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.02em;
}
.admin-otp-single {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  padding: 14px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-align: center;
  color: #111827;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.admin-otp-single::placeholder {
  letter-spacing: 0.42em;
  color: #d1d5db;
}
.admin-otp-single:focus {
  background: #fff;
  border-color: var(--up);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
/* 扫码区不嵌套 panel-2：弹窗主面作底板，仅二维码留小白底 */


.admin-totp-setup-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 4px 0 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.admin-totp-qr-wrap {
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eef1f4;
}
.admin-totp-qr {
  display: block;
  width: 132px;
  height: 132px;
  border-radius: 2px;
  background: #fff;
}
.admin-totp-account-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}
.admin-totp-manual {
  width: 100%;
  margin-top: 2px;
  min-width: 0;
}
.admin-totp-manual > summary {
  cursor: pointer;
  list-style: none;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--up);
  user-select: none;
  padding: 4px 0;
}
.admin-totp-manual > summary::-webkit-details-marker { display: none; }
.admin-totp-secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 6px 6px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
}
.admin-totp-secret {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.05em;
  word-break: break-all;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #374151;
  line-height: 1.4;
}
.admin-totp-copy {
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
}
.admin-totp-copy:hover {
  background: #0c6a5c;
  text-decoration: none;
}
.admin-totp-copy:active {
  transform: translateY(1px);
}
.admin-mfa-setup {
  width: min(380px, 100%);
  max-width: 100%;
  /* 右上角帮助气泡需溢出卡片可见 */
  overflow: visible;
}
.admin-mfa-help {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
}
.admin-mfa-help .ui-help-tip {
  left: auto;
  right: 0;
  transform: none;
  top: calc(100% + 8px);
  width: min(268px, calc(100vw - 48px));
  --arrow-x: calc(100% - 14px);
}
.admin-mfa-help .help-ico-btn {
  color: var(--muted);
}
.admin-mfa-help .help-ico-btn:hover,
.admin-mfa-help .help-ico-btn.on,
.admin-mfa-help .help-ico-btn:focus-visible {
  color: var(--up);
}
/* 旧分格 OTP / 步骤条已废弃，保留无害兜底避免残留 */


.admin-mfa-steps,
.admin-mfa-guide,
.admin-mfa-tip,
.admin-otp-row,
.admin-otp-hidden,
.admin-mfa-icon { display: none !important; }

button.admin-login-back {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.admin-login-back {
  display: block;
  margin-top: clamp(12px, 2vh, 20px);
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #8896a4;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}
.admin-login-back:hover { color: var(--up); }
.admin-panel { padding: 12px 4px 88px; }
.admin-panel-head h1 { margin: 0 0 4px; font-size: 22px; }
.ch-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ch-page-head h1 { margin: 0; }
.ch-page-head .btn { flex: none; }
.admin-panel-head p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
/* 管理后台「我的」：与工具端账户页同一套 app / acc-panel 布局 */

.page-admin .app-admin {
  position: relative;
  width: 100%;
  max-width: min(460px, 100%);
  min-width: 0;
  min-height: 100vh;
  overflow-x: clip;
  padding: 18px 10px calc(var(--dock-h) + var(--dock-gap) + var(--safe-b));
  isolation: isolate;
  container-type: inline-size;
  container-name: fund-app;
  transition: background-color .36s ease;
}
.page-admin .app-admin > .main {
  margin-top: 18px;
  padding-bottom: 4px;
}
/* 仅在激活时 flex；勿无 .on 写 display，否则盖过 .panel{display:none} 导致「我的」叠在其它页 */

.page-admin #admin-tab-me.admin-panel.on {
  padding: 0 0 88px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.page-admin #admin-me-page.me-page {
  padding: 0;
  max-width: none;
  margin: 0 0 12px;
}
/* 管理端「我的」账户区：与工具端 #me-page 同构 — 外框透明，头区独立大卡，凭证列表另起一块 */
.page-admin #admin-me-page.acc-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.page-admin #admin-me-page .acc-panel-head {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.page-admin #admin-plat-trade.acc-panel-trade {
  border-top: 0;
  padding: 0;
  background: transparent;
  margin-top: 10px;
}
html[data-theme="dark"] .page-admin #admin-me-page.acc-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}
html[data-theme="dark"] .page-admin #admin-me-page .acc-panel-head {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
/* 管理员「我的」顶部：与工具端 hero 同构，铺在页面底上，不进卡片 */

.page-admin .admin-me-hero {
  padding: 4px 4px 16px;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.page-admin .admin-me-hero .admin-earn-block {
  margin-top: 6px;
}
.page-admin .admin-rebate-meta {
  margin: 10px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
/* 与工具端 .tag 同尺：12px / 5×9 */

.page-admin .admin-rebate-meta .tag {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  line-height: 1.2;
  min-height: 0;
}
.page-admin .admin-rebate-sync-btn {
  cursor: pointer;
  border: none;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
}
.page-admin .admin-rebate-sync-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.page-admin .admin-me-cta {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}
.page-admin .admin-me-cta .btn {
  min-height: 48px;
  font-weight: 800;
}
/* 与账号 ID 条同一底色：暗色跟 --panel-2，浅色跟账户条的混色 */

.page-admin .admin-btn-sec {
  background: color-mix(in srgb, var(--bg) 70%, var(--panel));
  background-color: color-mix(in srgb, var(--bg) 70%, var(--panel));
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.page-admin .admin-btn-sec:hover {
  background: color-mix(in srgb, var(--bg) 58%, var(--panel));
  background-color: color-mix(in srgb, var(--bg) 58%, var(--panel));
}
html[data-theme="dark"] .page-admin .admin-btn-sec {
  background: var(--panel-2);
  background-color: var(--panel-2);
}
html[data-theme="dark"] .page-admin .admin-btn-sec:hover {
  background: var(--sheet-2);
  background-color: var(--sheet-2);
}
.page-admin #admin-btn-broker .btn-label {
  max-width: none;
}
.page-admin .admin-sheet-body {
  padding: 4px 4px 8px;
}
.page-admin .admin-sheet-lead {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 600;
}
.page-admin .admin-sheet-list {
  margin: 0 0 14px;
  padding: 0 0 0 1.15em;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.page-admin .admin-sheet-list li {
  margin: 0 0 6px;
}
.page-admin .admin-sheet-soon {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}
.page-admin .admin-broker-form .pro-field {
  margin-bottom: 0;
}
.page-admin .admin-broker-sheet .me-sheet-account,
.page-admin .admin-ops-sheet .me-sheet-account {
  font-size: 16px;
  letter-spacing: -0.02em;
}
.page-admin .admin-ops-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.page-admin .admin-ops-title-row .me-sheet-account {
  min-width: 0;
}
.page-admin .admin-ai-config-title-row {
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}
.page-admin .admin-sectors-reload-head {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--teal, #0d9488);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.page-admin .admin-sectors-reload-head:active {
  opacity: 0.72;
}
.page-admin .admin-ops-help {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  z-index: 4;
}
.page-admin .admin-ops-help .help-ico-q {
  width: 22px;
  height: 22px;
  color: var(--muted);
}
.page-admin .admin-ops-help .help-ico-q svg {
  width: 16px;
  height: 16px;
}
.page-admin .admin-ops-help .ui-help-q.on,
.page-admin .admin-ops-help .ui-help-q:hover,
.page-admin .admin-ops-help .ui-help-q:focus-visible {
  color: var(--teal, var(--up));
}
.page-admin .admin-ops-help .ui-help-tip {
  top: calc(100% + 8px);
  bottom: auto;
  left: auto;
  right: 0;
  transform: none;
  width: min(300px, calc(100vw - 48px));
  max-width: min(300px, calc(100vw - 48px));
  z-index: 90;
  text-align: left;
  font-weight: 500;
  line-height: 1.45;
}
.page-admin .admin-ops-help .ui-help-tip::before {
  top: -6px;
  bottom: auto;
  left: auto;
  right: 10px;
  margin-left: 0;
  transform: none;
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent #000 transparent;
}
.page-admin .admin-fee-help-tip {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  letter-spacing: 0.01em;
}
.page-admin .admin-fee-help-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  opacity: 0.92;
}
.page-admin .admin-fee-help-list > span {
  display: block;
  padding-left: 0.85em;
  text-indent: -0.85em;
  line-height: 1.45;
}
.page-admin .admin-fee-help-list > span::before {
  content: "· ";
  font-weight: 700;
}
.page-admin .admin-ops-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 2px 0;
  min-width: 0;
}
.page-admin .me-sheet.admin-ops-sheet {
  width: min(420px, 100%);
  gap: 12px;
  padding: 14px 14px 12px;
}
.page-admin .admin-fee-sheet .admin-fee-readonly {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2, var(--chip-bg));
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.page-admin .admin-fee-sheet .admin-fee-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.page-admin .admin-fee-sheet .admin-fee-row b {
  color: var(--ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  word-break: break-all;
}
.page-admin .admin-fee-sheet a.admin-fee-okx-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin: 0;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
}
.page-admin .admin-fee-sheet .admin-fee-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2, var(--chip-bg));
  border: 1px solid var(--line);
  cursor: pointer;
}
.page-admin .admin-fee-sheet .admin-fee-track-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.page-admin .admin-fee-sheet .admin-fee-track-row b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.page-admin .admin-fee-sheet .admin-fee-track-row small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}
.page-admin .admin-fee-sheet .me-sheet-cancel {
  margin-top: 0;
}
/* 从交易所配置里再打开经纪商时，须压过同为 28000 的 #admin-exch-edit-layer */

#admin-broker-layer {
  z-index: 28100;
}
#admin-broker-layer .me-sheet.admin-broker-sheet {
  max-height: calc(100dvh - 32px - env(safe-area-inset-bottom, 0px));
  overflow: visible;
}
.page-admin .admin-broker-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 0;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
}
.page-admin .admin-broker-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}
.page-admin .admin-broker-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-admin .admin-broker-group {
  margin: 0;
  padding: 12px 12px 12px;
  border-radius: 12px;
  background: var(--panel-2, rgba(15, 22, 30, 0.35));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.page-admin .admin-broker-group-lab {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}
.page-admin .admin-broker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}
.page-admin .admin-broker-sheet .pro-field-lab {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.page-admin .admin-broker-sheet .pro-field {
  gap: 5px;
  align-content: start;
  align-self: start;
}
.page-admin .admin-broker-sheet .pro-field-inp,
.page-admin .admin-broker-sheet select.pro-field-inp {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line) !important;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--panel) !important;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: none !important;
  outline: none !important;
  transition: border-color 0.15s ease;
}
.page-admin .admin-broker-sheet .pro-field-inp:focus,
.page-admin .admin-broker-sheet .pro-field-inp:focus-visible,
.page-admin .admin-broker-sheet select.pro-field-inp:focus,
.page-admin .admin-broker-sheet select.pro-field-inp:focus-visible {
  border-color: var(--teal) !important;
  box-shadow: none !important;
  outline: none !important;
}
.page-admin .admin-broker-sheet .pro-field:focus-within {
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
}
.page-admin .admin-broker-sheet .pro-field-inp::placeholder {
  color: var(--muted) !important;
  opacity: 0.48;
  font-weight: 500;
  -webkit-text-fill-color: var(--muted);
}
.page-admin .admin-broker-sheet .pro-field-inp::-webkit-input-placeholder {
  color: var(--muted) !important;
  opacity: 0.48;
  font-weight: 500;
  -webkit-text-fill-color: var(--muted);
}
.page-admin .admin-broker-sheet .pro-field-inp::-moz-placeholder {
  color: var(--muted);
  opacity: 0.48;
  font-weight: 500;
}
.page-admin .admin-broker-sheet select.pro-field-inp {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.page-admin .admin-broker-field-wide {
  grid-column: 1 / -1;
}
.page-admin .admin-broker-form .admin-sheet-soon {
  margin: 0;
  flex-shrink: 0;
}
.page-admin .admin-broker-form #admin-broker-msg.toast {
  margin: 0;
  min-height: 0;
}
.page-admin .admin-broker-form #admin-broker-msg.toast:empty {
  display: none;
}
.page-admin .admin-broker-actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
  margin-top: 2px;
  flex-shrink: 0;
  align-items: stretch;
}
.page-admin .admin-broker-actions .auth-submit,
.page-admin .admin-broker-actions .btn {
  width: auto;
  min-height: 44px;
  margin: 0;
  font-weight: 800;
}
.page-admin .admin-broker-actions .me-sheet-cancel {
  width: auto;
  margin: 0;
  min-height: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  /* 与手续费弹层「取消」同款：实心底 + 线框，无内描边/外光 */
  border: 1px solid var(--line);
  background: #eef2f5;
  color: var(--ink);
  box-shadow: none;
  outline: none;
}
html[data-theme="dark"] .page-admin .admin-broker-actions .me-sheet-cancel {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
@media (min-width: 720px) {
  .page-admin .me-sheet.admin-ops-sheet {
    width: min(480px, calc(100vw - 48px));
  }
  #admin-broker-layer .me-sheet.admin-broker-sheet {
    width: min(520px, calc(100vw - 48px));
    max-height: min(88dvh, 640px);
    gap: 12px;
    padding: 14px 16px 12px;
  }
  .page-admin .admin-broker-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
  }
  .page-admin .admin-broker-fields .admin-broker-field-wide {
    grid-column: 1 / -1;
  }
  .page-admin .admin-broker-form .admin-sheet-soon {
    padding: 8px 10px;
    margin: 0;
  }
  .page-admin .admin-broker-actions .auth-submit,
  .page-admin .admin-broker-actions .btn,
  .page-admin .admin-broker-actions .me-sheet-cancel {
    min-height: 42px;
  }
}
/* ===== 接口设置（AI 配置）· 卡片化专业样式 ===== */


#admin-ai-config-layer .me-sheet.admin-ai-config-sheet,
#admin-ai-config-edit-layer .me-sheet.admin-ai-config-edit-sheet,
#admin-quote-edit-layer .me-sheet.admin-ai-config-edit-sheet {
  max-height: min(88dvh, 720px);
  /* 不裁切：表头 ? 气泡需下探到列表区，滚动由 body/list 内部承担 */
  overflow: visible;
}
/* 表头抬升到内容之上，? 气泡不被列表/卡片盖住 */

#admin-ai-config-layer .me-sheet.admin-ai-config-sheet > .me-sheet-head,
#admin-ai-config-edit-layer .me-sheet.admin-ai-config-edit-sheet > .me-sheet-head,
#admin-quote-edit-layer .me-sheet.admin-ai-config-edit-sheet > .me-sheet-head {
  position: relative;
  z-index: 30;
}
#admin-ai-config-layer .me-sheet.admin-ai-config-sheet > .me-sheet-head .me-sheet-head-text {
  flex: 1 1 auto;
  width: 100%;
}
.page-admin .admin-ai-config-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 0;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
}
.page-admin .admin-ai-config-body[hidden] {
  display: none !important;
}
.page-admin .admin-ai-config-summary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 4px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.page-admin .admin-ai-config-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  padding: 1px;
}
.page-admin .admin-ai-config-actions {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}
.page-admin .admin-ai-config-actions[hidden] {
  display: none !important;
}
.page-admin .admin-ai-config-actions .btn {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
}
@media (max-width: 719px) {
  #admin-ai-config-layer .admin-ai-config-cancel-desk {
    display: none !important;
  }
}
html[data-theme="dark"] .page-admin #admin-quote-edit-save {
  background: #fff !important;
  background-color: #fff !important;
  color: #121212 !important;
  -webkit-text-fill-color: #121212 !important;
  border: 0 !important;
  box-shadow: none !important;
}
/* 加载中 */


.page-admin .admin-ai-config-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 44px 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.page-admin .admin-ai-config-spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  animation: adminAiConfigSpin 0.7s linear infinite;
}
@keyframes adminAiConfigSpin { to { transform: rotate(360deg); } }
/* 空状态 */


.page-admin .admin-ai-config-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 44px 16px;
  text-align: center;
  color: var(--muted);
}
.page-admin .admin-ai-config-empty-ico {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--panel-2, var(--chip-bg));
  border: 1px solid var(--line);
  margin-bottom: 6px;
}
.page-admin .admin-ai-config-empty-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.page-admin .admin-ai-config-empty-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  max-width: 240px;
  line-height: 1.55;
}
/* 接口卡片 */


.page-admin .admin-ai-config-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--panel-2, var(--chip-bg));
  border: 1px solid var(--line);
  transition: opacity 0.15s ease;
}
.page-admin .admin-ai-config-item.is-off {
  opacity: 0.68;
}
.page-admin .admin-ai-config-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.page-admin .admin-ai-config-provider {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}
.page-admin .admin-ai-config-provider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pc, var(--teal));
}
.page-admin .admin-ai-config-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}
.page-admin .admin-ai-config-state {
  font-size: 11.5px;
  font-weight: 700;
}
.page-admin .admin-ai-config-state.on { color: var(--teal); }
.page-admin .admin-ai-config-state.off { color: var(--muted); }

.page-admin .admin-ai-config-item-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
  word-break: break-all;
}
.page-admin .admin-ai-config-default {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--teal);
  background: var(--chip-bg);
  padding: 1px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}
html[data-theme="dark"] .page-admin .admin-ai-config-default {
  background: var(--chip-bg);
}

.page-admin .admin-ai-config-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: var(--muted);
}
.page-admin .admin-ai-config-item-model {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.page-admin .admin-ai-config-item-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-admin .admin-ai-config-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}
.page-admin .admin-ai-config-item-created {
  font-size: 11px;
  color: var(--muted);
}
.page-admin .admin-ai-config-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.page-admin .admin-ai-config-item-actions button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.page-admin .admin-ai-config-item-actions button:hover {
  background: var(--chip-bg);
}
html[data-theme="dark"] .page-admin .admin-ai-config-item-actions button {
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  -webkit-text-fill-color: var(--solid-fg) !important;
  border: 0 !important;
  box-shadow: none !important;
}
.page-admin .admin-ai-config-item-actions .admin-ai-config-delete,
.page-admin .admin-ai-config-item-actions .admin-quote-delete {
  color: #d4535c;
  border-color: rgba(192, 57, 43, 0.28);
}
html[data-theme="dark"] .page-admin .admin-ai-config-item-actions .admin-ai-config-delete,
html[data-theme="dark"] .page-admin .admin-ai-config-item-actions .admin-quote-delete {
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  color: #f05a72 !important;
  -webkit-text-fill-color: #f05a72 !important;
  border: 0 !important;
  box-shadow: none !important;
}
.page-admin .admin-ai-config-item-actions .admin-ai-config-delete.is-confirm,
.page-admin .admin-ai-config-item-actions .admin-quote-delete.is-confirm {
  background: #d4535c;
  border-color: #d4535c;
  color: #fff;
}
html[data-theme="dark"] .page-admin .admin-ai-config-item-actions .admin-ai-config-delete.is-confirm,
html[data-theme="dark"] .page-admin .admin-ai-config-item-actions .admin-quote-delete.is-confirm {
  background: #f05a72 !important;
  background-color: #f05a72 !important;
  border-color: #f05a72 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
/* 编辑/添加接口表单 */


.page-admin .admin-sectors-json {
  width: 100%;
  max-width: 100%;
  min-height: 140px;
  max-height: 220px;
  resize: vertical;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2, #f6f7f9);
  color: var(--ink);
}
.page-admin .admin-sectors-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  padding: 4px 2px 8px;
  box-sizing: border-box;
}
.page-admin .admin-sectors-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: var(--panel, #fff);
}
.page-admin .admin-sectors-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.page-admin .admin-sectors-card-label-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.page-admin .admin-sectors-card-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
.page-admin .admin-sectors-source-help {
  position: relative;
  flex-shrink: 0;
  margin: 0;
}
.page-admin .admin-sectors-source-help .help-ico-q {
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.page-admin .admin-sectors-source-help .help-ico-q svg {
  width: 15px;
  height: 15px;
}
.page-admin .admin-sectors-source-help .ui-help-q.on {
  color: var(--teal, #0d9488);
}
.page-admin .admin-sectors-guide-tip {
  min-width: min(92vw, 300px);
  max-width: min(92vw, 340px);
  text-align: left;
}
.page-admin .admin-sectors-guide-tip .admin-sectors-guide-body {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink);
}
.page-admin .admin-sectors-mode-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.page-admin .admin-sectors-mode-row .admin-sectors-mode {
  flex: 1 1 auto;
  min-width: 0;
}
.page-admin .admin-sectors-preview-btn {
  flex-shrink: 0;
  align-self: center;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}
.page-admin .admin-sectors-pill {
  font-size: 11px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal, #0d9488) 12%, transparent);
  color: var(--teal, #0d9488);
  white-space: nowrap;
}
.page-admin .admin-sectors-mode {
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2, #f6f7f9);
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}
.page-admin .admin-sectors-desc {
  display: none;
}
.page-admin .admin-sectors-guide {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px 10px;
  background: var(--panel, #fff);
  font-size: 12px;
  color: var(--ink);
}
.page-admin .admin-sectors-guide summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--muted);
  list-style: none;
}
.page-admin .admin-sectors-guide summary::-webkit-details-marker {
  display: none;
}
.page-admin .admin-sectors-guide-body {
  margin-top: 10px;
  line-height: 1.55;
  color: var(--muted);
}
.page-admin .admin-sectors-guide-body ol {
  margin: 0;
  padding-left: 18px;
}
.page-admin .admin-sectors-guide-body li + li {
  margin-top: 6px;
}
.page-admin .admin-sectors-guide-body strong {
  color: var(--ink);
  font-weight: 650;
}
.page-admin .admin-sectors-advanced-tip {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.page-admin .admin-sectors-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.page-admin .admin-sectors-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel, #fff);
}
.page-admin .admin-sectors-metric-k {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.page-admin .admin-sectors-metric strong {
  font-size: 20px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.page-admin .admin-sectors-advanced {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 8px 12px 10px;
  background: color-mix(in srgb, var(--line) 35%, transparent);
}
.page-admin .admin-sectors-advanced summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  list-style: none;
  user-select: none;
}
.page-admin .admin-sectors-advanced summary::-webkit-details-marker {
  display: none;
}
.page-admin .admin-sectors-advanced[open] summary {
  margin-bottom: 8px;
  color: var(--ink);
}
.page-admin .admin-sectors-toast {
  margin: 0;
  font-size: 12px;
}
.page-admin .admin-sectors-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding-top: 2px;
}
.page-admin .admin-sectors-actions .btn-sm,
.page-admin .admin-sectors-actions .admin-sectors-draft-btn,
.page-admin .admin-sectors-actions .admin-sectors-save-btn {
  width: 100%;
  max-width: none;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 750;
  border-radius: 12px;
  box-sizing: border-box;
}
.page-admin .admin-sectors-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-admin .admin-sectors-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.page-admin .admin-sectors-block-head b {
  font-size: 13px;
  font-weight: 650;
}
.page-admin .admin-sectors-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, #fff);
}
.page-admin .admin-sectors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.page-admin .admin-sectors-table th,
.page-admin .admin-sectors-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}
.page-admin .admin-sectors-table th {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  background: color-mix(in srgb, var(--line) 40%, transparent);
}
.page-admin .admin-sectors-table tr:last-child td {
  border-bottom: 0;
}
.page-admin .admin-sectors-table input[type="text"],
.page-admin .admin-sectors-table select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2, #f6f7f9);
}
.page-admin .admin-sectors-sym-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 140px;
}
.page-admin .admin-sectors-sym-tag {
  font-size: 10px;
  font-weight: 650;
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--teal, #0d9488) 14%, transparent);
  color: var(--ink);
}
.page-admin .admin-sectors-coins-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.page-admin .admin-sectors-coins-auto {
  font-size: 12px;
}
.page-admin .admin-sectors-table tr.admin-sectors-row td.admin-sectors-cell-en {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  vertical-align: middle;
}
.page-admin .admin-sectors-cell-en::before {
  display: none;
}
.page-admin .admin-sectors-en-lab {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}
.page-admin .admin-sectors-member-select {
  appearance: none;
  -webkit-appearance: none;
}
@media (max-width: 719px) {
  .page-admin .admin-sectors-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .page-admin .admin-sectors-table {
    display: block;
    width: 100%;
  }
  .page-admin .admin-sectors-table thead {
    display: none;
  }
  .page-admin .admin-sectors-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .page-admin .admin-sectors-table tr.admin-sectors-row {
    display: block;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2px 14px 10px;
    background: var(--panel, #fff);
  }
  .page-admin .admin-sectors-table tr.admin-sectors-row td {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 0;
  }
  .page-admin .admin-sectors-table tr.admin-sectors-row td.admin-sectors-cell-del {
    border-bottom: 0;
    padding-top: 8px;
    margin-top: 0;
    border-top: 0;
  }
  .page-admin .admin-sectors-table td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 650;
    color: var(--muted);
  }
  .page-admin .admin-sectors-table tr.admin-sectors-row td.admin-sectors-cell-en {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 4px;
  }
  .page-admin .admin-sectors-table tr.admin-sectors-row td.admin-sectors-cell-en::before {
    display: none;
  }
  .page-admin .admin-sectors-en-lab {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 650;
    color: var(--ink);
  }
  .page-admin .admin-sectors-en-switch {
    flex: 0 0 auto;
    margin-left: auto;
  }
  .page-admin .admin-sectors-cell-del::before {
    display: none;
  }
  .page-admin .admin-sectors-del-btn,
  .page-admin .admin-sectors-pick-btn {
    width: 100%;
    min-height: 40px;
    font-size: 13px;
    font-weight: 650;
    border-radius: 10px;
  }
  .page-admin .admin-sectors-sym-tags {
    max-width: none;
    width: 100%;
  }
  .page-admin .admin-sectors-coins-inner {
    width: 100%;
    gap: 8px;
  }
  .page-admin .admin-sectors-table input[type="text"],
  .page-admin .admin-sectors-table .admin-sectors-member-select {
    min-height: 40px;
    font-size: 14px;
    padding: 8px 12px;
  }
  .page-admin .admin-sectors-block-head b {
    font-size: 14px;
  }
}
.page-admin .admin-sector-sym-sheet {
  max-width: 420px;
  margin: 0 auto;
  width: calc(100% - 24px);
  max-height: min(80dvh, 560px);
  display: flex;
  flex-direction: column;
}
.page-admin .admin-sector-sym-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 4px;
}
.page-admin .admin-sector-sym-q {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
}
.page-admin .admin-sector-sym-list {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: var(--panel, #fff);
}
.page-admin .admin-sector-sym-empty {
  margin: 0;
  padding: 16px 10px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.page-admin .admin-sector-sym-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
.page-admin .admin-sector-sym-row:hover {
  background: color-mix(in srgb, var(--line) 45%, transparent);
}
.page-admin .admin-sector-sym-row input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.page-admin .admin-sector-sym-av {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--line) 55%, transparent);
  display: grid;
  place-items: center;
}
.page-admin .admin-sector-sym-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-admin .admin-sector-sym-av-ph {
  font-size: 14px;
  font-weight: 750;
  color: var(--muted);
}
.page-admin .admin-sector-sym-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.page-admin .admin-sector-sym-name {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-admin .admin-sector-sym-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-admin .admin-sector-sym-foot {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}
.page-admin .admin-sector-sym-foot .btn {
  flex: 1 1 0;
}
.page-admin .admin-sectors-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 10px;
}
.page-admin #admin-sectors-pane.admin-ai-config-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.page-admin #admin-sectors-pane.admin-ai-config-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#admin-ai-config-layer .me-sheet.admin-ai-config-sheet {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#admin-ai-config-layer .me-sheet.admin-ai-config-sheet::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.page-admin #admin-ai-config-edit-layer .me-sheet.admin-ai-config-edit-sheet .acc-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
}
.page-admin .admin-ai-config-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  padding: 1px;
}
.page-admin .admin-ai-config-fields,
.page-admin .admin-ai-config-group {
  display: contents;
}
.page-admin .admin-ai-config-field-wide {
  grid-column: 1 / -1;
}
.page-admin .admin-ai-config-edit-sheet .acc-form-actions-two {
  flex-shrink: 0;
}
.page-admin .admin-fee-readonly {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--chip-bg);
  display: grid;
  gap: 8px;
}
.page-admin .admin-fee-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.page-admin .admin-fee-row b {
  color: var(--ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  word-break: break-all;
}
.page-admin a.admin-fee-okx-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin: 0 0 12px;
  min-height: 44px;
}
.page-admin .admin-fee-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--chip-bg);
  cursor: pointer;
}
.page-admin .admin-fee-track-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.page-admin .admin-fee-track-row b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.page-admin .admin-fee-track-row small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}
.page-admin .admin-broker-mask {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.page-admin .admin-broker-mask[hidden] {
  display: none !important;
}
.page-admin .acc-add-panel .admin-api-viz {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
}
.page-admin .acc-add-panel .admin-api-viz[hidden] {
  display: none !important;
}
.page-admin .admin-api-pill {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f0f4f7;
  color: #667788;
}
.page-admin .admin-api-pill.is-ok {
  background: var(--chip-bg);
  color: var(--up);
}
.page-admin .admin-api-pill.is-off {
  background: #f5f7f9;
  color: #8896a4;
}
.page-admin .acc-panel-trade-meta.is-ok {
  color: var(--teal);
}
.page-admin .acc-panel-trade-meta.is-warn {
  color: #8896a4;
}
.page-admin .admin-api-mask {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}
.page-admin .admin-api-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  min-height: auto;
}
.page-admin .admin-api-check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}
.admin-plat-hint {
  margin: 0;
  padding: 0 16px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
#admin-plat-trade .acc-list {
  padding: 0;
}
#admin-plat-trade.acc-trade-empty-open .acc-panel-trade-head,
#admin-plat-trade.acc-trade-empty-open .admin-plat-hint {
  display: none;
}
/* 备用 API「更多」：编辑 / 删除 左右铺满；无顶部分割线（对齐工具端） */

#admin-plat-trade .admin-plat-more-foot {
  grid-template-columns: 1fr 1fr;
  border-top: 0;
  padding-top: 4px;
}
#admin-plat-trade .admin-plat-more-foot .acc-act-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
#admin-plat-trade .admin-plat-hint.is-ok {
  color: var(--teal);
}
#admin-plat-trade .admin-plat-hint.is-err {
  color: var(--down);
}
@media (max-width: 420px) {
  #admin-plat-trade .admin-plat-more-foot {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-pwd-form {
  display: grid;
  gap: 12px;
  padding: 4px 16px 8px;
}
.admin-pwd-form .pro-field {
  margin: 0;
}
.admin-pwd-form .auth-submit {
  width: 100%;
  margin-top: 4px;
}
/* 经纪商配置：覆盖 admin-pwd-form，桌面两列 + 视口内收纳 */

.page-admin .admin-broker-form.admin-pwd-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 0;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
}
.page-admin .admin-broker-form.admin-pwd-form .auth-submit {
  width: auto;
  margin-top: 0;
}
@media (min-width: 900px) {
  .page-admin .app-admin {
    max-width: none;
    flex: 1;
    padding: 36px 40px 48px;
    background: rgba(255, 255, 255, 0.35);
  }
}
.admin-placeholder-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 12px;
}
/* —— 管理后台 · 产品目录（对照工具端 pro-ops 排版） —— */


.page-admin #admin-tab-products.admin-panel.on {
  padding: 0 0 96px;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.page-admin .admin-pro-ops-box {
  margin: 4px 0 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  transition: background-color .36s ease;
}
/* 压过 html[data-theme].app .pro-ops-box 的边框/阴影/面板底，只留产品底板平色 */

html[data-theme="dark"] .page-admin .app .pro-ops-box.admin-pro-ops-box.is-prod-plate,
html[data-theme="light"] .page-admin .app .pro-ops-box.admin-pro-ops-box.is-prod-plate,
.page-admin .app .pro-ops-box.admin-pro-ops-box.is-prod-plate,
.page-admin .admin-pro-ops-box.is-prod-plate {
  border: 0 !important;
  border-color: transparent !important;
  border-width: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: var(--admin-prod-plate, transparent) !important;
  background-image: none !important;
  background-color: var(--admin-prod-plate, transparent) !important;
}
.page-admin .admin-pro-ops-box.is-prod-plate > .admin-pro-ops-head-sec,
.page-admin .admin-pro-ops-box.is-prod-plate > .admin-pro-ops-pane,
.page-admin .admin-pro-ops-box.is-prod-plate > .admin-pro-ops-foot {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
/* 插画最上沿淡进底板，接缝不再是一条硬线；主体在更下面，不会被抹虚 */

.page-admin .admin-pro-ops-box.is-prod-plate > .admin-pro-ops-head-sec {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
}
.page-admin .admin-pro-ops-box.is-prod-plate > #admin-prod-pane-products {
  margin-top: -20px;
}
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-msg:empty {
  display: none;
  margin: 0;
}
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide.is-center .admin-prod-cover {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
}
/* 产品插画铺满内容宽，去掉左右内边距，避免「卡在盒子里」的矩形框 */

.page-admin .admin-pro-ops-box.is-prod-plate > .admin-pro-ops-pane#admin-prod-pane-products {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-seg,
html[data-theme="dark"] .page-admin .admin-pro-ops-box.is-prod-plate #admin-prod-subtabs.admin-prod-seg {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-stage {
  padding: 0 !important;
}
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide.is-center .admin-prod-card.custom-prod-card,
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide.is-center .admin-prod-card,
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide.is-center .admin-prod-cover {
  border: 0 !important;
  outline: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  overflow: hidden !important;
}
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide.is-center .admin-prod-chart,
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide.is-center .admin-prod-art-wrap,
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide.is-center .admin-prod-art-pic,
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide.is-center .admin-prod-art {
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}
.page-admin .admin-pro-ops-box.is-prod-plate .admin-prod-slide:not(.is-center) .admin-prod-card {
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  .page-admin .admin-pro-ops-box {
    transition: none;
  }
}
.page-admin .admin-pro-ops-box > .pro-ops-sec,
.page-admin .admin-pro-ops-box > .admin-pro-ops-head-sec,
.page-admin .admin-pro-ops-box > .admin-pro-ops-pane,
.page-admin .admin-pro-ops-box > .admin-pro-ops-foot {
  border-bottom: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
}
.page-admin .admin-pro-ops-box > * {
  min-width: 0;
  max-width: 100%;
}
.page-admin .admin-pro-ops-head-sec {
  padding-bottom: 14px;
}
.page-admin .admin-pro-ops-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.page-admin .admin-pro-ops-sub {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}
.page-admin .admin-prod-seg {
  margin-top: 12px;
  grid-template-columns: repeat(3, 1fr);
  background: var(--panel);
  box-shadow: none;
}
.page-admin .admin-prod-seg .pro-seg-btn {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
.page-admin .admin-prod-seg .pro-seg-btn.on {
  background: #15202b;
  color: #fff;
  box-shadow: 0 4px 10px rgba(21, 32, 43, 0.22);
}
html[data-theme="dark"] .page-admin #admin-prod-subtabs.admin-prod-seg {
  background: var(--panel) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .page-admin #admin-prod-subtabs .pro-seg-btn {
  background: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .page-admin #admin-prod-subtabs .pro-seg-btn.on {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}
.page-admin .admin-pro-ops-pane[hidden] {
  display: none !important;
}
.page-admin .admin-pro-ops-pane {
  padding-top: 12px;
}
.page-admin .admin-prod-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.page-admin .admin-prod-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--chip-bg, rgba(127, 140, 160, 0.12));
  color: var(--ink);
}
.page-admin .admin-prod-stat b {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.page-admin .admin-prod-stat em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.page-admin .admin-prod-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.page-admin .admin-prod-chip {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 6px 11px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.page-admin .admin-prod-chip.on {
  color: var(--ink);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.page-admin .admin-prod-list {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}
.page-admin .admin-prod-stage {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
  contain: inline-size;
  container-type: inline-size;
  padding: 18px 4px 32px;
  outline: none;
  touch-action: pan-y;
}
.page-admin .admin-prod-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  will-change: transform;
}
.page-admin .admin-prod-slide {
  flex: 0 0 auto;
  min-width: 0;
  width: min(680px, 68cqi);
  overflow: visible;
}
.page-admin .admin-prod-slide .admin-prod-card {
  position: relative;
  height: auto;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  transition: transform .34s ease, filter .34s ease, opacity .34s ease, box-shadow .34s ease;
}
.page-admin .admin-prod-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12% 8% 8%;
  height: auto;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.page-admin .admin-prod-name {
  position: relative;
  top: auto;
  left: auto;
  z-index: 4;
  transform: none;
  max-width: 92%;
  margin: 0;
  padding: 2px 8px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.page-admin .admin-prod-name:hover .admin-prod-banner-title {
  opacity: 0.78;
}
.page-admin .admin-prod-flow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.page-admin .admin-prod-tadpoles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  pointer-events: none;
}
.page-admin .admin-prod-slide:not(.is-center) .admin-prod-tadpoles {
  visibility: hidden;
}
.page-admin .admin-prod-leg {
  position: absolute;
  bottom: 13%;
  z-index: 2;
  width: 8.8cqi;
  min-width: 18px;
  max-width: 32px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: center bottom;
  transform: scale(calc(0.88 + var(--leg, 0.14) * 0.67));
  transition: transform .55s ease, opacity .4s ease, color .5s ease, filter .5s ease;
}
.page-admin .admin-prod-leg svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}
.page-admin .admin-prod-leg.is-long {
  left: 11%;
  color: var(--up, #1aa36a);
  --leg: var(--leg-long, 0.14);
}
.page-admin .admin-prod-leg.is-short {
  right: 11%;
  color: var(--down, #f05a72);
  --leg: var(--leg-short, 0.14);
}
.page-admin .admin-prod-leg.is-short svg {
  transform: scaleX(-1);
}
.page-admin .admin-prod-card.is-exch-flow .admin-prod-leg {
  display: none;
}
.page-admin .admin-prod-tadpoles,
.page-admin .admin-prod-leg,
.page-admin .admin-prod-flow {
  display: none !important;
}
.page-admin .admin-prod-exch-dock {
  --hex: 46px;
  --cols: 4;
  --gap: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  gap: var(--gap);
  width: calc(var(--cols) * var(--hex) + (var(--cols) - 1) * var(--gap));
  max-width: 92%;
  margin: 6px auto 0;
  z-index: 3;
  pointer-events: none;
}
.page-admin .admin-prod-exch-dock[data-n="0"] { display: none; }
.page-admin .admin-prod-exch-dock[data-n="1"] { --hex: 52px; --cols: 1; --gap: 0px; }
.page-admin .admin-prod-exch-dock[data-n="2"] { --hex: 48px; --cols: 2; }
.page-admin .admin-prod-exch-dock[data-n="3"] { --hex: 44px; --cols: 3; }
.page-admin .admin-prod-exch-dock[data-n="4"] { --hex: 44px; --cols: 2; }
.page-admin .admin-prod-exch-dock[data-n="5"],
.page-admin .admin-prod-exch-dock[data-n="6"] { --hex: 40px; --cols: 3; }
.page-admin .admin-prod-exch-dock[data-n="7"],
.page-admin .admin-prod-exch-dock[data-n="8"] { --hex: 36px; --cols: 4; }
.page-admin .admin-prod-exch-dock[data-n="9"] { --hex: 36px; --cols: 3; }
.page-admin .admin-prod-exch-dock[data-layout="many"] { --hex: 32px; --cols: 5; --gap: 6px; }
.page-admin .admin-prod-exch {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: var(--hex, 46px);
  height: calc(var(--hex, 46px) * 236 / 240);
  padding: 0;
  display: block;
  border: 0;
  background: transparent;
  pointer-events: none;
  overflow: visible;
}
.page-admin .admin-prod-exch .admin-exch-hex {
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
}
.page-admin .admin-prod-exch .admin-exch-hex::before {
  content: none;
  display: none;
}
.page-admin .admin-prod-exch.tone-binance,
.page-admin .admin-prod-exch.tone-okx,
.page-admin .admin-prod-exch.tone-bybit,
.page-admin .admin-prod-exch.tone-htx { --exch-accent: #000000; }
/* 黑底六边形铺在黑卡片上会消失。线框跟界面分割线同色，不要亮灰描边 */
.page-admin .admin-prod-exch.tone-binance .admin-exch-hex-shape,
.page-admin .admin-prod-exch.tone-okx .admin-exch-hex-shape,
.page-admin .admin-prod-exch.tone-bybit .admin-exch-hex-shape,
.page-admin .admin-prod-exch.tone-htx .admin-exch-hex-shape,
.page-admin .admin-prod-exch.is-nameplate .admin-exch-hex-shape {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 10;
  stroke-linejoin: round;
  paint-order: stroke fill;
  vector-effect: none;
  overflow: visible;
}
.page-admin .admin-prod-exch.tone-mixed { --exch-accent: #14c8be; }
.page-admin .admin-prod-exch.tone-paper { --exch-accent: #8fa3b8; }
.page-admin .admin-prod-exch.tone-gate { --exch-accent: #f8f8f8; }
.page-admin .admin-prod-exch.tone-weex { --exch-accent: #e0c020; }
.page-admin .admin-prod-exch.tone-bitget { --exch-accent: #08f0f8; }
.page-admin .admin-prod-exch.tone-coinex { --exch-accent: #00d4cd; }
.page-admin .admin-prod-exch.tone-coinbase { --exch-accent: #0050f8; }
.page-admin .admin-prod-exch.tone-kraken { --exch-accent: #7c3af2; }
.page-admin .admin-prod-exch.tone-kucoin { --exch-accent: #00b078; }
.page-admin .admin-prod-exch.tone-mexc { --exch-accent: #f4f4f4; }
.page-admin .admin-prod-exch.is-nameplate { --exch-accent: #111111; }
.page-admin .admin-prod-exch .admin-exch-logo-img {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 70% !important;
  height: 70% !important;
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%) !important;
  object-fit: contain;
  filter: none !important;
}
.page-admin .admin-prod-exch .admin-exch-logo-fallback,
.page-admin .admin-prod-exch .admin-exch-nameplate,
.page-admin .admin-prod-exch .admin-exch-nameplate[data-rows] {
  font-size: 8px !important;
  width: 62%;
  max-height: 58%;
}
.page-admin .admin-prod-card.is-off .admin-prod-exch,
.page-admin .admin-prod-card.is-rotor-off .admin-prod-exch {
  opacity: 0.45;
  filter: grayscale(0.4);
}
.page-admin .admin-prod-card.is-off .admin-prod-leg,
.page-admin .admin-prod-card.is-rotor-off .admin-prod-leg {
  color: #9aa3af;
  --leg: 0.08;
  opacity: 0.5;
  filter: grayscale(0.35);
}
.admin-prod-name-menu {
  position: fixed;
  z-index: 80;
  min-width: 156px;
  padding: 6px;
  border-radius: 14px;
  background: var(--panel, #fff);
  box-shadow: 0 10px 28px rgba(21, 33, 46, 0.16), 0 0 0 1px rgba(21, 33, 46, 0.06);
}
.admin-prod-name-menu[hidden] { display: none !important; }
.admin-prod-name-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink, #15202b);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.admin-prod-name-menu button:hover {
  background: color-mix(in srgb, var(--ink, #15202b) 6%, transparent);
}
.admin-prod-name-menu button.is-del { color: #f05a72; }
html[data-theme="dark"] .admin-prod-name-menu {
  background: #1c232c;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .admin-prod-name-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .page-admin .admin-prod-cover {
  background: transparent;
  box-shadow: none;
}
.page-admin .admin-prod-card.tone-0 { --pc: #14c8be; }
.page-admin .admin-prod-card.tone-1 { --pc: #f0a31a; }
.page-admin .admin-prod-card.tone-2 { --pc: #4d6bff; }
.page-admin .admin-prod-card.tone-3 { --pc: #ff5d7a; }
.page-admin .admin-prod-card.tone-4 { --pc: #7a5cff; }
.page-admin .admin-prod-card.tone-5 { --pc: #ff7a3c; }
.page-admin .admin-prod-card.tone-6 { --pc: #2dd4bf; }
.page-admin .admin-prod-card.tone-7 { --pc: #f472b6; }
.page-admin .admin-prod-card.tone-8 { --pc: #38bdf8; }
.page-admin .admin-prod-card.tone-9 { --pc: #a78bfa; }
.page-admin .admin-prod-card.tone-10 { --pc: #22c55e; }
.page-admin .admin-prod-card.tone-11 { --pc: #eab308; }
.page-admin .admin-prod-card.tone-12 { --pc: #ef4444; }
.page-admin .admin-prod-card.tone-13 { --pc: #84cc16; }
.page-admin .admin-prod-card.tone-14 { --pc: #14b8a6; }
.page-admin .admin-prod-card.tone-15 { --pc: #6366f1; }
.page-admin .admin-prod-card.tone-16 { --pc: #0ea5e9; }
.page-admin .admin-prod-card.tone-17 { --pc: #f43f5e; }
.page-admin .admin-prod-card.tone-18 { --pc: #8b5cf6; }
.page-admin .admin-prod-card.tone-19 { --pc: #10b981; }
.page-admin .admin-prod-chart {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}
.page-admin .admin-prod-chart img,
.page-admin .admin-prod-chart .admin-prod-art-wrap,
.page-admin .admin-prod-chart .admin-prod-art-pic,
.page-admin .admin-prod-chart .admin-prod-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.page-admin .admin-prod-chart .admin-prod-art-pic {
  position: absolute;
  inset: 0;
}
.page-admin .admin-prod-chart .admin-prod-art-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.page-admin .admin-prod-chart .admin-prod-art-wrap {
  overflow: hidden;
}
.page-admin .admin-prod-chart .admin-prod-art-wrap .admin-prod-art-svg,
.page-admin .admin-prod-chart .admin-prod-art-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.page-admin .admin-prod-slide.is-center .admin-prod-chart img,
.page-admin .admin-prod-slide.is-center .admin-prod-chart .admin-prod-art-wrap,
.page-admin .admin-prod-slide.is-center .admin-prod-chart .admin-prod-art {
  /* 轻微平移，禁止放大，避免石头/阴影又被裁出画布 */
  animation: admin-prod-drift 8s ease-in-out infinite;
  transform-origin: 72% 46%;
}
@keyframes admin-prod-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-1.2%, -0.8%, 0); }
}
.page-admin .admin-prod-chart .is-night { display: none; }
html[data-theme="dark"] .page-admin .admin-prod-chart .is-day { display: none; }
html[data-theme="dark"] .page-admin .admin-prod-chart .is-night { display: block; }
/* 新增产品弹层 */


.page-admin .admin-product-sheet .admin-product-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 8px;
}
.page-admin .admin-product-field-wide {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.page-admin .admin-product-field-wide select,
.page-admin .admin-product-field-wide input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.page-admin .admin-product-art-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
.page-admin .admin-product-sheet .admin-product-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.page-admin .admin-product-sheet .admin-product-actions .btn {
  flex: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 44px;
}
.page-admin .admin-prod-banner-copy {
  display: none;
}
.page-admin .admin-prod-banner-sub {
  display: none !important;
}
.page-admin .admin-prod-banner-sub::before,
.page-admin .admin-prod-power::after,
.page-admin .admin-prod-ico::after {
  content: "";
  position: absolute;
  left: 14%;
  top: 3px;
  width: 18%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
  filter: blur(1.4px);
  pointer-events: none;
}
html[data-theme="dark"] .page-admin .admin-prod-banner-sub::before,
html[data-theme="dark"] .page-admin .admin-prod-power::after,
html[data-theme="dark"] .page-admin .admin-prod-ico::after {
  background: rgba(255, 255, 255, 0.28);
}
html[data-theme="dark"] .page-admin .admin-prod-banner-sub {
  color: #e8eef4;
  background: linear-gradient(180deg, #323c4b 0%, #1b222c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 1px rgba(0, 0, 0, 0.2),
    0 8px 18px rgba(0, 0, 0, 0.32);
}
/* 状态条：昼夜同色。就绪绿条，默认下架灰条 */

.page-admin .admin-prod-banner-sub.is-ready,
html[data-theme="dark"] .page-admin .admin-prod-banner-sub.is-ready {
  color: #fff;
  min-width: 30cqi;
  justify-content: center;
  background: linear-gradient(180deg, #22c57a 0%, #0e9a58 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.16);
}
.page-admin .admin-prod-banner-sub.is-default-off,
html[data-theme="dark"] .page-admin .admin-prod-banner-sub.is-default-off {
  color: #f4f6f8;
  min-width: 30cqi;
  justify-content: center;
  background: linear-gradient(180deg, #9aa3af 0%, #6d7682 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.14);
}
.page-admin .admin-prod-banner-title {
  margin: 0;
  color: var(--ink);
  font-family: "Yuanti SC", "STYuanti-SC-Regular", "Hiragino Maru Gothic ProN", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 5.6cqi;
  font-weight: 720;
  letter-spacing: 0.04em;
  line-height: 1.16;
  background: none;
  -webkit-text-fill-color: var(--ink);
  -webkit-text-stroke: 0;
  filter: none;
  text-shadow: none;
  white-space: normal;
  text-align: center;
}
.page-admin .admin-prod-banner-title:has(br) {
  font-size: 5.6cqi;
  letter-spacing: 0.02em;
  line-height: 1.08;
}
html[data-theme="dark"] .page-admin .admin-prod-banner-title {
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: var(--ink);
  filter: none;
}
@media (min-width: 761px) {
  .page-admin .admin-prod-banner-title {
    font-size: 5.2cqi;
  }
  .page-admin .admin-prod-banner-title:has(br) {
    font-size: 4.4cqi;
  }
}
.page-admin .admin-prod-tools {
  display: none;
}
.page-admin .admin-prod-power,
.page-admin .admin-prod-ico {
  position: relative;
  overflow: hidden;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* 白天底板纯黑；夜间规则在下方覆盖 */
  background: #111111;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 1px 1px rgba(0, 0, 0, 0.28),
    0 6px 14px rgba(0, 0, 0, 0.32);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: #f2f6fa;
  -webkit-tap-highlight-color: transparent;
}
.page-admin .admin-prod-power svg,
.page-admin .admin-prod-ico svg {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-admin .admin-prod-power.is-on { color: #2a9d8a; }
.page-admin .admin-prod-power.is-off,
.page-admin .admin-prod-ico.is-del { color: #f05a72; }
.page-admin .admin-prod-ico { color: #f2f6fa; }
html[data-theme="dark"] .page-admin .admin-prod-power,
html[data-theme="dark"] .page-admin .admin-prod-ico {
  color: #f2f6fa;
  background: linear-gradient(180deg, #3a4554 0%, #242c38 58%, #171d26 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 1px rgba(0, 0, 0, 0.25),
    0 6px 14px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .page-admin .admin-prod-power.is-on { color: #2a9d8a; }
/* 与工具端「全部停止」图标同色 #f05a72，无霓虹光晕 */

html[data-theme="dark"] .page-admin .admin-prod-power.is-off,
html[data-theme="dark"] .page-admin .admin-prod-ico.is-del,
html[data-theme="dark"] .page-admin .admin-prod-ico.is-del svg {
  color: #f05a72 !important;
  stroke: #f05a72 !important;
  fill: none !important;
  filter: none !important;
  box-shadow: none;
}
html[data-theme="dark"] .page-admin .admin-prod-ico { color: #f2f6fa; }
html[data-theme="dark"] .page-admin .admin-prod-ico.is-del {
  /* 按钮本体阴影与编辑钮一致（父级已设），勿另加光晕 */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 1px rgba(0, 0, 0, 0.25),
    0 6px 14px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .page-admin .admin-prod-ico.is-del svg {
  stroke-width: 2.45;
}
.page-admin .admin-prod-power:hover,
.page-admin .admin-prod-ico:hover {
  transform: translateY(-1px);
}
.page-admin .admin-prod-power:active,
.page-admin .admin-prod-ico:active {
  transform: translateY(1px);
}
.page-admin #admin-prod-add.acc-add-row,
.page-admin #admin-symbol-add.acc-add-row,
.page-admin #admin-exchange-add.acc-add-row,
.page-admin #admin-user-add.acc-add-row {
  width: 100%;
  max-width: none;
  margin: 12px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
html[data-theme="dark"] .page-admin #admin-prod-add.acc-add-row,
html[data-theme="dark"] .page-admin #admin-symbol-add.acc-add-row,
html[data-theme="dark"] .page-admin #admin-exchange-add.acc-add-row,
html[data-theme="dark"] .page-admin #admin-user-add.acc-add-row {
  width: 100% !important;
  max-width: none !important;
  margin: 12px 0 0 !important;
  padding: 16px !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: var(--panel) !important;
}
/* 品种新增弹层 */


.page-admin .admin-symbol-sheet .admin-symbol-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 8px;
}
.page-admin .admin-symbol-field-wide {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.page-admin .admin-symbol-field-wide select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.page-admin .admin-symbol-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2, var(--chip-bg));
  font-size: 13px;
}
.page-admin .admin-symbol-preview-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.page-admin .admin-symbol-preview-row b {
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
.page-admin .admin-symbol-sheet .admin-symbol-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.page-admin .admin-symbol-sheet .admin-symbol-actions .btn {
  flex: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 44px;
}
@media (min-width: 761px) {
  .page-admin .admin-prod-slide {
    position: relative;
    z-index: 1;
  }
  .page-admin .admin-prod-slide.is-center {
    z-index: 3;
  }
  .page-admin .admin-prod-slide:not(.is-center) {
    cursor: pointer;
  }
  .page-admin .admin-prod-tools {
    gap: 14px;
  }
  .page-admin .admin-prod-power,
  .page-admin .admin-prod-ico {
    width: 50px;
    height: 50px;
  }
  .page-admin .admin-prod-power svg,
  .page-admin .admin-prod-ico svg {
    width: 25px;
    height: 25px;
  }
  .page-admin .admin-prod-ico.is-del svg {
    width: 29px;
    height: 29px;
  }
  .page-admin .admin-prod-slide.is-center .admin-prod-card {
    transform: scale(1.06);
    filter: none;
    opacity: 1;
  }
  .page-admin .admin-prod-slide:not(.is-center) .admin-prod-card {
    transform: scale(0.76);
    filter: blur(3.4px);
    opacity: 0.46;
  }
  .page-admin .admin-prod-slide:not(.is-center) .admin-prod-act,
  .page-admin .admin-prod-slide:not(.is-center) .admin-prod-listed,
  .page-admin .admin-prod-slide:not(.is-center) button,
  .page-admin .admin-prod-slide:not(.is-center) input,
  .page-admin .admin-prod-slide:not(.is-center) label {
    pointer-events: none;
  }
}
@media (max-width: 760px) {
  .page-admin .admin-prod-slide {
    width: 100cqi;
  }
  .page-admin .admin-prod-tools {
    gap: 6px;
  }
  .page-admin .admin-prod-power,
  .page-admin .admin-prod-ico {
    width: 36px;
    height: 36px;
  }
  .page-admin .admin-prod-power svg,
  .page-admin .admin-prod-ico svg {
    width: 18px;
    height: 18px;
  }
  .page-admin .admin-prod-ico.is-del svg {
    width: 21px;
    height: 21px;
  }
  .page-admin #admin-prod-add.acc-add-row,
  .page-admin #admin-symbol-add.acc-add-row,
  .page-admin #admin-exchange-add.acc-add-row,
  .page-admin #admin-user-add.acc-add-row {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-admin .admin-prod-track,
  .page-admin .admin-prod-slide .admin-prod-card {
    transition: none !important;
  }
  .page-admin .admin-prod-rotor-spin,
  .page-admin .admin-prod-gyro-chapter,
  .page-admin .admin-prod-tadpoles {
    animation: none !important;
  }
}
.page-admin .admin-prod-list .custom-prod-card,
.page-admin .admin-prod-card.custom-prod-card {
  border: 0;
  border-radius: 28px;
  background: var(--panel);
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(21, 33, 46, 0.03),
    0 10px 28px rgba(21, 33, 46, 0.055);
}
html[data-theme="dark"] .page-admin .admin-prod-list .custom-prod-card,
html[data-theme="dark"] .page-admin .admin-prod-card.custom-prod-card {
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
@media (max-width: 760px) {
  html:not([data-theme="dark"]) .page-admin .admin-prod-list .custom-prod-card,
  html:not([data-theme="dark"]) .page-admin .admin-prod-card.custom-prod-card {
    box-shadow:
      0 1px 2px rgba(21, 33, 46, 0.025),
      0 8px 26px rgba(21, 33, 46, 0.045),
      0 20px 48px rgba(21, 33, 46, 0.035);
  }
  html:not([data-theme="dark"]) .page-admin .admin-prod-slide.is-center .admin-prod-card.custom-prod-card {
    box-shadow:
      0 1px 2px rgba(21, 33, 46, 0.028),
      0 10px 30px rgba(21, 33, 46, 0.05),
      0 22px 52px rgba(21, 33, 46, 0.038);
  }
}
.page-admin .admin-prod-card.is-dirty {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.14);
}
.page-admin .admin-prod-card.is-off {
  opacity: 1;
}
.page-admin .admin-prod-card.is-paused .custom-prod-card-title {
  color: var(--muted);
}
.page-admin .admin-prod-card-id {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.page-admin .admin-prod-card-sub {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}
.page-admin .admin-prod-card-meta {
  margin-top: 10px;
}
.page-admin .admin-prod-acts {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 12px;
}
.page-admin .admin-prod-act {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 82%, #eef2f5);
  color: var(--ink);
  padding: 9px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(19, 33, 46, 0.04);
  -webkit-tap-highlight-color: transparent;
}
.page-admin .admin-prod-act:hover {
  border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
}
.page-admin .admin-prod-act.is-danger {
  color: #b42318;
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.22);
}
.page-admin .admin-prod-card-side {
  align-items: center;
  justify-content: center;
}
html[data-theme="dark"] .page-admin .admin-prod-act {
  background: color-mix(in srgb, var(--panel) 78%, #1c2630);
}
html[data-theme="dark"] .page-admin .admin-prod-act.is-danger {
  color: #ffb4ab;
  background: rgba(180, 35, 24, 0.22);
  border-color: rgba(255, 180, 171, 0.28);
}
.page-admin .admin-prod-listed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.page-admin .admin-prod-card-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--chip-bg, rgba(127, 140, 160, 0.08)) 70%, transparent);
}
.page-admin .admin-prod-card-body[hidden] {
  display: none !important;
}
.page-admin .admin-prod-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding-top: 12px;
}
.page-admin .admin-prod-field {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 0;
}
.page-admin .admin-prod-field-name {
  grid-column: 1 / -1;
}
.page-admin .admin-prod-field input,
.page-admin .admin-prod-field select {
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line);
  box-sizing: border-box;
}
.page-admin .admin-prod-field-hint {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}
.page-admin .admin-prod-card-foot {
  margin-top: 10px;
}
.page-admin .admin-prod-reset {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-admin .admin-pro-ops-foot {
  min-height: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.page-admin .admin-pro-ops-foot:not(:has(.admin-prod-bar:not([hidden]))) {
  display: none;
}
.page-admin .admin-prod-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.page-admin .admin-prod-bar[hidden] {
  display: none !important;
}
.page-admin .admin-prod-bar-lab {
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.page-admin .admin-prod-empty {
  margin: 8px 0;
  padding: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.page-admin .admin-prod-msg {
  margin: 0 0 8px;
}
.page-admin .admin-prod-pill.fam-roll,
.page-admin .admin-prod-pill.fam-fee_aware {
  color: var(--up);
  background: var(--chip-bg);
}
.page-admin .admin-prod-pill.fam-leg_harvest {
  color: #5b8def;
  background: rgba(91, 141, 239, 0.12);
}
.page-admin .admin-prod-pill.fam-mm_lite {
  color: #c9a227;
  background: rgba(201, 162, 39, 0.14);
}
.page-admin .admin-prod-pill.ok {
  color: var(--teal);
}
.page-admin .admin-prod-pill.warn {
  color: #c27a1a;
  background: rgba(194, 122, 26, 0.12);
}
html[data-theme="dark"] .page-admin .app-admin {
  background: transparent;
}

.admin-me-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; color: var(--ink); }
.admin-me-row b { font-size: 16px; }
.admin-me-row p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.admin-me-hint { margin: 0; font-size: 12px; color: var(--muted); }
.admin-evolve-embed { padding-bottom: 12px; }
@media (max-width: 800px) {
  .admin-auth-layer {
    padding: 12px 10px;
    align-items: center;
  }
  .admin-auth-sheet {
    width: min(400px, 100%);
    max-height: calc(100dvh - 20px);
    padding: 20px 16px 18px;
  }
  .admin-auth-logo .logo-mc {
    width: 64px;
    height: 37px;
  }
}

.admin-api-form h3.admin-api-title {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--ink);
}
.admin-api-mask {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.admin-api-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 13px;
}

.cycle-bills-head {
  position: relative;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  padding: 10px 44px 8px 8px;
  border-bottom: 0;
}
.cycle-bills-head h3 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
  z-index: 1;
}
.cycle-bills-head-sub {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
}
.cycle-bills-head .book-day-x {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 0;
  z-index: 1;
}

.cycle-bills-wrap {
  overflow-x: auto;
  margin: 4px 0 8px;
}
.cycle-bills-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.cycle-bills-table th,
.cycle-bills-table td {
  padding: 6px 5px;
  text-align: left;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  white-space: nowrap;
}
.cycle-bills-table th {
  color: var(--muted);
  font-weight: 500;
}
.cycle-bills-table tr.bill-st-pending td {
  opacity: 0.85;
  background: rgba(255, 193, 7, 0.06);
}
.cycle-bills-table tr.bill-st-partial td {
  background: rgba(33, 150, 243, 0.06);
}
.bill-st-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.06);
}
.cycle-bills-table .bill-id {
  color: var(--muted);
  font-size: 10px;
}
/* —— 皮肤设置（账号设置内） —— */


.me-skin-block {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(21, 32, 43, 0.06);
}
.me-skin-block:last-child { border-bottom: 0; }
.me-skin-block .me-sheet-row {
  border-bottom: 0;
}
.me-sheet-row-main .me-sheet-row-sub {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
#me-skin-toggle.is-expanded .me-chev {
  transform: rotate(90deg);
}
#me-lang-toggle.is-expanded .me-chev {
  transform: rotate(90deg);
}
#me-region-open .me-sheet-row-main {
  min-width: 0;
}
.me-region-sheet .me-sheet-account {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
/* 市场设置：干净选择菜单（独立色系，不跟全局 teal 描边） */

.me-region-sheet {
  overflow: hidden;
  width: min(280px, calc(100vw - 48px));
  padding: 10px 8px;
  gap: 0;
  border-radius: 18px;
  background: #f4f6f8;
  border: 1px solid rgba(15, 23, 32, 0.06);
  box-shadow:
    0 18px 48px rgba(12, 20, 28, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  --me-region-fade: #f4f6f8;
  --me-region-ink: #12181f;
  --me-region-muted: #8a94a0;
  --me-region-hl: rgba(18, 24, 31, 0.06);
  /* 白天：仅淡底条，不要上下线框 */
  --me-region-line: transparent;
}
html:not([data-theme="dark"]) #me-region-wheel .me-region-wheel-hl::before,
html:not([data-theme="dark"]) #me-region-wheel .me-region-wheel-hl::after,
html:not([data-theme="dark"]) #admin-region-wheel .me-region-wheel-hl::before,
html:not([data-theme="dark"]) #admin-region-wheel .me-region-wheel-hl::after {
  display: none !important;
}
html[data-theme="dark"] .me-region-sheet {
  background: #000000;
  border-color: var(--card-line);
  box-shadow: none;
  --me-region-fade: #000000;
  --me-region-ink: #ffffff;
  --me-region-muted: #6e6e6e;
  --me-region-hl: rgba(255, 255, 255, 0.06);
  --me-region-line: transparent;
}
/* 工具端：干净滚轮菜单 */

/* 工具端：干净滚轮菜单 */
#me-region-wheel,
#admin-region-wheel,
#admin-region-wheel {
  position: relative;
  height: 200px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 14px;
  background: transparent;
  touch-action: pan-y;
}
#me-region-wheel .me-region-wheel-scroller,
#admin-region-wheel .me-region-wheel-scroller,
#admin-region-wheel .me-region-wheel-scroller {
  height: 100%;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-snap-type: none;
  padding: 80px 0;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
  touch-action: pan-y;
}
#me-region-wheel .me-region-wheel-scroller::-webkit-scrollbar,
#admin-region-wheel .me-region-wheel-scroller::-webkit-scrollbar,
#admin-region-wheel .me-region-wheel-scroller::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#me-region-wheel .me-region-wheel-hl,
#admin-region-wheel .me-region-wheel-hl,
#admin-region-wheel .me-region-wheel-hl {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 40px;
  margin-top: -20px;
  border-radius: 10px;
  background: var(--me-region-hl);
  border: 0;
  box-shadow:
    inset 0 1px 0 transparent,
    0 0 0 0 transparent;
  pointer-events: none;
  z-index: 0;
  box-sizing: border-box;
}
#me-region-wheel .me-region-wheel-hl::before,
#admin-region-wheel .me-region-wheel-hl::before,
#me-region-wheel .me-region-wheel-hl::after,
#admin-region-wheel .me-region-wheel-hl::after,
#admin-region-wheel .me-region-wheel-hl::before,
#admin-region-wheel .me-region-wheel-hl::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1px;
  background: var(--me-region-line);
  opacity: 0.9;
}
#me-region-wheel .me-region-wheel-hl::before,
#admin-region-wheel .me-region-wheel-hl::before,
#admin-region-wheel .me-region-wheel-hl::before {
  top: 0;
}
#me-region-wheel .me-region-wheel-hl::after,
#admin-region-wheel .me-region-wheel-hl::after,
#admin-region-wheel .me-region-wheel-hl::after {
  bottom: 0;
}
/* 不用顶底渐变遮罩（夜间易出灰带轮廓）；靠 is-center 字重/透明度区分 */
#me-region-wheel .me-region-wheel-fade,
#admin-region-wheel .me-region-wheel-fade {
  display: none !important;
}
#me-region-wheel .me-region-opt,
#admin-region-wheel .me-region-opt,
#admin-region-wheel .me-region-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  background: transparent;
  color: var(--me-region-muted);
  font: inherit;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition: color 0.14s ease, opacity 0.14s ease, transform 0.14s ease;
  opacity: 0.38;
  transform: scale(0.96);
  -webkit-tap-highlight-color: transparent;
}
#me-region-wheel .me-region-opt.is-center,
#admin-region-wheel .me-region-opt.is-center {
  color: var(--me-region-ink);
  opacity: 1;
  transform: scale(1);
  border-color: transparent;
  background: transparent;
}
#me-region-wheel .me-region-opt-title,
#admin-region-wheel .me-region-opt-title,
#admin-region-wheel .me-region-opt-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
}
#me-region-wheel .me-region-opt.is-center .me-region-opt-title,
#admin-region-wheel .me-region-opt.is-center .me-region-opt-title,
#admin-region-wheel .me-region-opt.is-center .me-region-opt-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
#me-region-wheel .me-region-opt-hint,
#admin-region-wheel .me-region-opt-hint,
#admin-region-wheel .me-region-opt-hint {
  display: none;
}
html[data-theme="dark"] #me-region-wheel .me-region-wheel-hl,
html[data-theme="dark"] #admin-region-wheel .me-region-wheel-hl {
  /* 与白天一致：淡色选中条，不用上下白线（夜间会像渐变描边） */
  background: rgba(255, 255, 255, 0.06) !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: 0;
}
html[data-theme="dark"] #me-region-wheel .me-region-wheel-hl::before,
html[data-theme="dark"] #admin-region-wheel .me-region-wheel-hl::before,
html[data-theme="dark"] #me-region-wheel .me-region-wheel-hl::after,
html[data-theme="dark"] #admin-region-wheel .me-region-wheel-hl::after {
  display: none !important;
}
html[data-theme="dark"] #me-region-wheel .me-region-wheel-fade,
html[data-theme="dark"] #admin-region-wheel .me-region-wheel-fade {
  display: none !important;
}
html[data-theme="dark"] #me-region-wheel .me-region-opt,
html[data-theme="dark"] #admin-region-wheel .me-region-opt {
  border-color: transparent;
  background: transparent;
  opacity: 0.42;
}
html[data-theme="dark"] #me-region-wheel .me-region-opt.is-center,
html[data-theme="dark"] #admin-region-wheel .me-region-opt.is-center {
  opacity: 1;
}
/* 管理端等其它 wheel：保留卡片列表（除了 admin-region-wheel 使用滚轮样式） */

.me-region-wheel:not(#me-region-wheel):not(#admin-region-wheel) {
  max-height: min(52vh, 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 12px 16px;
  scroll-snap-type: y proximity;
  scrollbar-width: none;
}
.me-region-wheel:not(#me-region-wheel):not(#admin-region-wheel)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
/* 管理后台市场设置使用工具端滚轮样式 */

#admin-region-wheel {
  position: relative;
  height: 200px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 14px;
  background: transparent;
}
#admin-region-wheel .me-region-wheel-scroller {
  height: 100%;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-snap-type: none;
  padding: 80px 0;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
  touch-action: pan-y;
}
#admin-region-wheel .me-region-wheel-scroller::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#admin-region-wheel .me-region-wheel-hl {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 40px;
  margin-top: -20px;
  border-radius: 10px;
  background: var(--me-region-hl);
  border: 0;
  box-shadow:
    inset 0 1px 0 transparent,
    0 0 0 0 transparent;
  pointer-events: none;
  z-index: 0;
  box-sizing: border-box;
}
#admin-region-wheel .me-region-wheel-hl::before,
#admin-region-wheel .me-region-wheel-hl::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1px;
  background: var(--me-region-line);
  opacity: 0.9;
}
#admin-region-wheel .me-region-wheel-hl::before {
  top: 0;
}
#admin-region-wheel .me-region-wheel-hl::after {
  bottom: 0;
}
/* 顶底渐变遮罩已废弃：#me-region-wheel / #admin-region-wheel 统一 display:none */
#admin-region-wheel .me-region-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  background: transparent;
  color: var(--me-region-muted);
  font: inherit;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition: color 0.14s ease, opacity 0.14s ease;
  opacity: 0.72;
  -webkit-tap-highlight-color: transparent;
}
#admin-region-wheel .me-region-opt.is-on,
#admin-region-wheel .me-region-opt.is-center {
  color: var(--me-region-ink);
  opacity: 1;
  border-color: transparent;
  background: transparent;
}
#admin-region-wheel .me-region-opt-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
}
#admin-region-wheel .me-region-opt.is-center .me-region-opt-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
#admin-region-wheel .me-region-opt-hint {
  display: none;
}
html[data-theme="dark"] #admin-region-wheel .me-region-wheel-hl {
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
}
html[data-theme="dark"] #admin-region-wheel .me-region-opt,
html[data-theme="dark"] #admin-region-wheel .me-region-opt.is-on {
  border-color: transparent;
  background: transparent;
}
.me-region-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0 0 8px;
  border: 1px solid rgba(21, 32, 43, 0.08);
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: var(--chip-bg, var(--chip-bg));
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.me-region-opt:last-child {
  margin-bottom: 0;
}
.me-region-opt:active {
  transform: scale(0.99);
}
.me-region-opt.is-on {
  border-color: var(--line);
  background: var(--chip-bg);
}
.me-region-opt-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.me-region-opt-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}
.acc-venue-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
  background: var(--chip-bg, var(--chip-bg));
}
.acc-venue-hint.is-warn {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}
.acc-ctp-mount {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.acc-ctp-mount[hidden] {
  display: none !important;
}
.acc-ctp-mount .acc-field input {
  width: 100%;
}
.acc-venue-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--teal, var(--up));
  background: var(--chip-bg);
  vertical-align: middle;
}
html[data-theme="dark"] .me-region-opt {
  border-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .me-region-opt.is-on {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] #me-region-wheel .me-region-opt,
html[data-theme="dark"] #admin-region-wheel .me-region-opt,
html[data-theme="dark"] #me-region-wheel .me-region-opt.is-on,
html[data-theme="dark"] #admin-region-wheel .me-region-opt.is-on,
html[data-theme="dark"] #admin-region-wheel .me-region-opt,
html[data-theme="dark"] #admin-region-wheel .me-region-opt.is-on {
  border-color: transparent;
  background: transparent;
}
.me-skin-panel {
  padding: 0 12px 12px;
  background: transparent;
}
.me-skin-panel[hidden] {
  display: none !important;
}
.me-skin-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
/* 皮肤 自动/夜间/白天：圆角底槽 + 选中抬升块（语言段 .me-lang-seg 不加底槽） */
.me-skin-seg:not(.me-lang-seg) {
  gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(15, 24, 32, 0.06);
}
/* 语言：下滑菜单内横排并列 */

.me-lang-seg {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  grid-template-columns: none;
  gap: 8px;
  width: 100%;
}
.me-lang-seg .me-skin-opt {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 4.5rem;
  font-size: 12px;
  padding: 8px 4px;
}
.me-skin-opt {
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 9px 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.me-skin-opt:hover:not(.is-on) {
  background: rgba(17, 17, 17, 0.08);
  color: var(--ink);
}
.me-skin-opt.is-on {
  color: #111;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 24, 32, 0.14);
  font-weight: 700;
}
.me-skin-hint {
  margin: 8px 2px 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
/* —— 全局夜间皮肤（对照欧易电脑端：大面纯黑 + 分层面 #121212 / 抬升 #1c1c1c · 研判除外） —— */


html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --panel: #000000;
  --panel-2: #121212;
  --ink: #ffffff;
  --muted: #8c8c8c;
  --line: rgba(255, 255, 255, 0.08);
  --card-line: color-mix(in srgb, #fff 14%, transparent);
  --sheet: #121212;
  --sheet-2: #1c1c1c;
  --sheet-dim: rgba(0, 0, 0, 0.62);
  --sheet-shadow: 0 18px 48px rgba(0, 0, 0, 0.62);
  --teal: #e8e8e8;
  --teal-bg: #121212;
  --ct-mm-gate-on: #2f9e6b;
  --up: #2ecf9a;
  --up-solid: #22b884;
  --down: #f05a72;
  --down-solid: #db4d64;
  --warn: #c9a227;
  --shadow: none;
  --solid-bg: #1c1c1c;
  --solid-fg: #ffffff;
  --chip-bg: #121212;
  --chip-hover: #1c1c1c;
  --btn-main-fg: #ffffff;
  --danger-soft: rgba(229, 84, 109, 0.12);
  --danger-border: rgba(229, 84, 109, 0.32);
  --danger-text: #e8909c;
  --ok-soft: #121212;
  --ok-border: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .shell {
  background: var(--bg);
  color: var(--ink);
}
/* 关键：去掉桌面端半透明白底（否则叠在深色上发灰，很不专业） */

html[data-theme="dark"] .app {
  background: var(--bg) !important;
  color: var(--ink);
}
@media (min-width: 900px) {
  html[data-theme="dark"] .shell {
    background: var(--bg);
  }
  html[data-theme="dark"] .brand-rail {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--ink);
  }
  html[data-theme="dark"] .brand-rail .dock {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html[data-theme="dark"] .brand-rail .dock button,
  html[data-theme="dark"] .brand-rail .dock button:hover,
  html[data-theme="dark"] .brand-rail .dock button:focus,
  html[data-theme="dark"] .brand-rail .dock button:focus-visible,
  html[data-theme="dark"] .brand-rail .dock button svg {
    border: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #8e8e8e !important;
  }
  html[data-theme="dark"] .brand-rail .dock button.on,
  html[data-theme="dark"] .brand-rail .dock button.on svg,
  html[data-theme="dark"] .brand-rail .dock button.on .dock-trade-orb,
  html[data-theme="dark"] .brand-rail .dock button.on .dock-trade-orb svg {
    color: #ffffff !important;
    background: transparent !important;
  }
  html[data-theme="dark"] .brand-rail .dock button + button::before {
    background: linear-gradient(180deg, #000 0%, #000 40%, #6d7b86 48%, #000 100%);
  }
}
html[data-theme="dark"] .dock {
  background: #000000;
  border-top-color: var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .dock button {
  background: transparent !important;
  color: var(--muted);
}
html[data-theme="dark"] .dock button.on {
  background: transparent !important;
  color: #fff !important;
}
html[data-theme="dark"] .dock button.on svg {
  color: #fff !important;
  stroke: currentColor;
}
@media (max-width: 899px) {
  html[data-theme="dark"] .dock .dock-trade-orb svg,
  html[data-theme="dark"] .dock .dock-trade.on .dock-trade-orb svg {
    color: #111 !important;
    stroke: none;
  }
}
/* 主操作：灰白底；停止：灰白底 + 红框红字 */


html[data-theme="dark"] .btn.main,
html[data-theme="dark"] .app .btn.main {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  box-shadow: none;
}
/* 全部开始：未点时白底黑字 */

html[data-theme="dark"] .hero-cta .btn.main,
html[data-theme="dark"] .app .hero-cta .btn.main {
  background: #fff !important;
  color: #12171e !important;
}
html[data-theme="dark"] .lever-pop-card .btn.main,
html[data-theme="dark"] .app .lever-pop-card .btn.main {
  background: #fff !important;
  color: #12171e !important;
}
html[data-theme="dark"] .pro-ops-primary {
  background: var(--solid-bg) !important;
  color: var(--ink) !important;
  box-shadow: none;
}
html[data-theme="dark"] .btn.stop,
html[data-theme="dark"] .app .btn.stop {
  background: var(--solid-bg) !important;
  color: #f05a72 !important;
  box-shadow: inset 0 0 0 1.5px #f05a72;
}
html[data-theme="dark"] .btn.stop svg,
html[data-theme="dark"] .app .btn.stop svg {
  color: #f05a72 !important;
  stroke: #f05a72;
  fill: #f05a72;
}
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .btn.soft,
html[data-theme="dark"] .app .btn.ghost {
  background: var(--panel-2) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 0 0 1px var(--line);
}
html[data-theme="dark"] .btn.tiny {
  background: var(--panel-2);
  color: var(--muted);
}

html[data-theme="dark"] .tag {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
/* soft 与默认标签同款灰白，勿刷青绿 */

html[data-theme="dark"] .tag.soft {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  box-shadow: none;
}
html[data-theme="dark"] .tag.on {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
/* 持仓顶栏：未运行 / 全球 / 00:00 — 与数据页 .dh-card 同款线框，避免实心底糊进黑底 */

html:not([data-theme="dark"]) .hero .meta-row .tag,
html:not([data-theme="dark"]) .hero .meta-row .tag.soft,
html:not([data-theme="dark"]) .hero .meta-row .tag.on {
  background: var(--panel);
  color: #000000;
  border: 1px solid var(--card-line);
  box-shadow: none;
}
html[data-theme="dark"] .hero .meta-row .tag,
html[data-theme="dark"] .hero .meta-row .tag.soft,
html[data-theme="dark"] .hero .meta-row .tag.on {
  background: var(--panel);
  color: #ffffff;
  border: 1px solid var(--card-line);
  box-shadow: none;
}
html[data-theme="dark"] .hero .meta-row #uptime,
html[data-theme="dark"] .hero .meta-row #uptime-text {
  color: #ffffff;
}
/* 运行中：计时数字纯白 */

html[data-theme="dark"] #uptime.is-running {
  color: #fff !important;
}
/* 卡片层：统一抬升面，手机 App 感 */


html[data-theme="dark"] .app .pro-ops-box,
html[data-theme="dark"] .app .acc-panel,
html[data-theme="dark"] .app .help-box,
html[data-theme="dark"] .app .holding-main,
html[data-theme="dark"] .app .bias-watch-shell,
html[data-theme="dark"] .app .holding > .holding-detail-tail[open],
html[data-theme="dark"] .app .product,
html[data-theme="dark"] .app .insight,
html[data-theme="dark"] .app .orch-mode-card {
  background: var(--panel);
  border: 1px solid var(--card-line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .app .holding > .holding-detail-tail[open] {
  border-top: 0;
}
html[data-theme="dark"] #hold-detail-sheet.fee-tip-modal.on {
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme="dark"] #hold-detail-sheet .hold-detail-sheet-panel.fee-sheet {
  background: #000000 !important;
  background-image: none !important;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.55) !important;
}
html[data-theme="dark"] #hold-detail-sheet .hold-detail-grab {
  background: rgba(255, 255, 255, 0.28);
}
html[data-theme="dark"] #hold-detail-sheet .hold-detail-sheet-title {
  color: #e8eef4;
}
html[data-theme="dark"] .app .bias-card {
  background: var(--panel);
  border: 1px solid var(--card-line);
  color: var(--ink);
  box-shadow: none;
}
html[data-theme="dark"] .app .bias-card.is-pulse-layout {
  background: transparent;
  border: 0;
  box-shadow: none;
}
html[data-theme="dark"] .app .holding {
  background: transparent;
  border: 0;
  box-shadow: none;
}
html[data-theme="dark"] .app .holding > .holding-detail-tail:not([open]) > summary {
  background: var(--panel);
  border-color: var(--card-line);
}
html[data-theme="dark"] .app .acc-panel {
  border-radius: 16px !important;
  overflow: hidden !important;
}
html[data-theme="dark"] .app #me-page.acc-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  border-radius: 0 !important;
}
html[data-theme="dark"] .app #me-page .acc-panel-head {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
html[data-theme="dark"] .app .acc-add-panel {
  border-radius: 0 0 16px 16px !important;
}
html[data-theme="dark"] .app .pro-ops-sec,
html[data-theme="dark"] .app .help-sec,
html[data-theme="dark"] .app .acc-panel-trade,
html[data-theme="dark"] .app .acc-panel-yield,
html[data-theme="dark"] .app .sleeve-unit-card,
html[data-theme="dark"] .app .pro-row + .pro-row,
html[data-theme="dark"] .app .acc-item + .acc-item,
html[data-theme="dark"] .app .pro-ops-adv {
  border-color: var(--line);
}
html[data-theme="dark"] .page-admin .admin-pro-ops-box > .pro-ops-sec,
html[data-theme="dark"] .page-admin .admin-pro-ops-box > .admin-pro-ops-head-sec,
html[data-theme="dark"] .page-admin .admin-pro-ops-box > .admin-pro-ops-pane,
html[data-theme="dark"] .page-admin .admin-pro-ops-box > .admin-pro-ops-foot {
  border-bottom: 0 !important;
  border-top: 0 !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .app .acc-panel-head .me-assets,
html[data-theme="dark"] .app .help-link,
html[data-theme="dark"] .app .pro-seg,
html[data-theme="dark"] .app .mode-seg,
html[data-theme="dark"] .app .exec-seg-2,
html[data-theme="dark"] .app .pro-num {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"] .app .pro-seg-btn {
  background: transparent !important;
  color: var(--muted);
  border: 0;
}
html[data-theme="dark"] .app .pro-seg-btn.on {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
html[data-theme="dark"] .app .mode-seg .pro-seg-btn.on {
  background: #fff !important;
  color: #111 !important;
}
html[data-theme="dark"] .app .pro-field select,
html[data-theme="dark"] .app .binding-grid select,
html[data-theme="dark"] .app .sleeve-account,
html[data-theme="dark"] .app .sleeve-repair,
html[data-theme="dark"] .app .pro-dd-trigger,
html[data-theme="dark"] .app input,
html[data-theme="dark"] .app select,
html[data-theme="dark"] .app textarea {
  background: var(--panel-2) !important;
  background-color: var(--panel-2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
/* CTP 粘贴区：与连接方式模式钮同底；勿被全局 textarea panel-2 盖掉 */

html[data-theme="dark"] .app .acc-ctp-paste-box {
  background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
  background-color: color-mix(in srgb, var(--panel) 88%, transparent) !important;
  box-shadow: inset 0 0 0 1px var(--line) !important;
}
html[data-theme="dark"] .app .acc-ctp-paste-box:focus-within {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18) !important;
}
html[data-theme="dark"] .app .acc-ctp-paste-ta,
html[data-theme="dark"] .app textarea.acc-ctp-paste-ta {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .app .orch-mode-card.on {
  background: linear-gradient(135deg, var(--chip-bg), var(--panel));
  border-color: var(--ok-border);
}
html[data-theme="dark"] .app .pro-toggle,
html[data-theme="dark"] .fee-tip-modal .pro-toggle {
  background: #3a3f46 !important;
}
html[data-theme="dark"] .app .pro-toggle::after,
html[data-theme="dark"] .fee-tip-modal .pro-toggle::after {
  background: #fff !important;
}
html[data-theme="dark"] .app .pro-toggle:checked,
html[data-theme="dark"] .fee-tip-modal .pro-toggle:checked,
html[data-theme="dark"] .params-sec.is-locked .pro-toggle:disabled:checked {
  background: var(--up) !important;
}
html[data-theme="dark"] .params-sec.is-locked .pro-toggle:disabled:not(:checked) {
  background: #3a3f46 !important;
}
html[data-theme="dark"] .app .acc-slider {
  background: #3a3f46 !important;
}
html[data-theme="dark"] .app .acc-slider::before {
  background: #fff !important;
}
html[data-theme="dark"] .app .acc-switch input:checked + .acc-slider {
  background: var(--up) !important;
}
html[data-theme="dark"] .app .acc-add-row {
  /* 方案 A：静息态与主卡片同色，不做独立浅灰条 */
  background: var(--panel) !important;
  color: #e6ebf0 !important;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 0 16px 16px !important;
}
html[data-theme="dark"] .app .acc-panel:has(.acc-add-panel:not([hidden])) .acc-add-row {
  border-radius: 0 !important;
}
html[data-theme="dark"] .app .acc-add-row:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}
html[data-theme="dark"] .app .pro-ops-recover,
html[data-theme="dark"] .app .pro-ops-rows,
html[data-theme="dark"] .app .pro-row {
  background: transparent !important;
  color: var(--ink);
}
html[data-theme="dark"] .app .pro-ops-foot {
  background: var(--panel) !important;
  border-top-color: var(--line) !important;
  border-radius: 0 0 16px 16px !important;
}
html[data-theme="dark"] .page-admin .admin-pro-ops-foot,
html[data-theme="dark"] .app .page-admin .admin-pro-ops-foot {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
html[data-theme="dark"] .app .pro-row-text b {
  color: var(--ink);
}
html[data-theme="dark"] .app .pro-row-text small {
  color: var(--muted);
}
html[data-theme="dark"] .app .fold,
html[data-theme="dark"] .app .fold-body,
html[data-theme="dark"] .app .fold-ref,
html[data-theme="dark"] .app .run-bar,
html[data-theme="dark"] .app .sleeve-unit-card {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .app .earn.down,
html[data-theme="dark"] .down {
  color: var(--down);
}
html[data-theme="dark"] .app .earn.up,
html[data-theme="dark"] .up {
  color: var(--up);
}
html[data-theme="dark"] .app .hero h1,
html[data-theme="dark"] .app .kicker,
html[data-theme="dark"] .me-avatar {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .me-asset-ico-wrap {
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}
/* 设置 / 鉴权 / 合计 / 日账 sheet：夜间跟皮肤，清掉白底渐变 */


html[data-theme="dark"] .me-sheet,
html[data-theme="dark"] .me-asset-sheet,
html[data-theme="dark"] .me-pnl-sheet {
  background-color: var(--sheet) !important;
  background-image: none !important;
  border-color: var(--card-line) !important;
  box-shadow: var(--sheet-shadow) !important;
}
html[data-theme="dark"] .me-settings-sheet {
  background: var(--sheet) !important;
  border: 1px solid var(--card-line) !important;
  box-shadow: var(--sheet-shadow) !important;
}
html[data-theme="dark"] .me-settings-sheet .me-sheet-list {
  background: transparent !important;
  border: 0 !important;
}
html[data-theme="dark"] .me-settings-sheet .me-sheet-row,
html[data-theme="dark"] .me-settings-sheet .me-skin-block .me-sheet-row,
html[data-theme="dark"] .me-settings-sheet .me-sheet-cancel-desk {
  background: var(--sheet-2) !important;
  border-color: var(--card-line) !important;
  color: #fff !important;
}
html[data-theme="dark"] .me-settings-sheet .me-sheet-row-main {
  color: #fff;
}
html[data-theme="dark"] .me-settings-sheet .me-sheet-ico {
  color: #8c8c8c;
}
html[data-theme="dark"] .me-settings-sheet .me-sheet-row-danger .me-sheet-ico,
html[data-theme="dark"] .me-settings-sheet .me-sheet-row-danger .me-sheet-row-main {
  color: #f05a72;
}
html[data-theme="dark"] .me-settings-sheet .me-sheet-row:active {
  background: var(--chip-hover) !important;
}
html[data-theme="dark"] .me-sheet-list {
  background: var(--sheet-2) !important;
  border-color: var(--card-line) !important;
}
html[data-theme="dark"] .me-pnl-day-card {
  border-bottom: 0 !important;
}
html[data-theme="dark"] .me-pnl-day-date {
  color: var(--ink);
}
html[data-theme="dark"] .me-sheet-cancel {
  background: var(--panel-2);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .me-skin-seg:not(.me-lang-seg) {
  background: #262626;
  box-shadow: none;
}
html[data-theme="dark"] .me-skin-seg:not(.me-lang-seg) .me-skin-opt:hover:not(.is-on) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
html[data-theme="dark"] .me-skin-seg:not(.me-lang-seg) .me-skin-opt.is-on {
  background: #3a3a3a;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  font-weight: 700;
}
/* 语言切换：夜间仍透明底，仅 hover/选中轻反馈 */
html[data-theme="dark"] .me-lang-seg .me-skin-opt:hover:not(.is-on) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
html[data-theme="dark"] .me-lang-seg .me-skin-opt.is-on {
  background: #3a3a3a;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  font-weight: 700;
}
html[data-theme="dark"] .me-sheet-backdrop,
html[data-theme="dark"] .auth-backdrop {
  background: rgba(0, 0, 0, 0.62);
}
html[data-theme="dark"] .auth-layer {
  background: transparent;
}
html[data-theme="dark"] body.auth-mobile-page,
html[data-theme="dark"] body.auth-mobile-page .auth-layer,
html[data-theme="dark"] body.auth-mobile-page .auth-backdrop {
  background: var(--bg);
}
html[data-theme="dark"] body.auth-mobile-page.auth-gate-open .shell {
  opacity: 0;
  filter: none;
}
html[data-theme="dark"] body.auth-mobile-page .auth-sheet {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
/* 盈利明细 / 账户盈亏：账户下拉在 .app 外，需单独夜间样式 */

html[data-theme="dark"] .pnl-account-select,
html[data-theme="dark"] .me-pnl-account-select,
html[data-theme="dark"] .pnl-range-select {
  -webkit-appearance: none !important;
  appearance: none !important;
  color-scheme: light;
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  background-image: linear-gradient(var(--solid-bg), var(--solid-bg)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: center, right 8px center !important;
  background-size: 100% 100%, 12px 8px !important;
  padding-right: 26px !important;
  color: var(--solid-fg) !important;
  -webkit-text-fill-color: var(--solid-fg) !important;
  border: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .me-pnl-total-chip {
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .me-pnl-total-chip.up {
  color: var(--up) !important;
}
html[data-theme="dark"] .me-pnl-total-chip.down {
  color: var(--down) !important;
}
html[data-theme="dark"] .pnl-account-select option,
html[data-theme="dark"] .me-pnl-account-select option,
html[data-theme="dark"] .pnl-range-select option {
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] .auth-sheet {
  background: var(--sheet);
  border-color: var(--card-line);
  box-shadow: var(--sheet-shadow);
}
/* 登录层在 .app 外，吃不到 html[data-theme=dark] .app input；需单独对齐夜间输入 */

html[data-theme="dark"] .auth-sheet .pro-field-inp {
  background: var(--panel-2) !important;
  background-color: var(--panel-2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
  caret-color: var(--ink);
  -webkit-text-fill-color: var(--ink) !important;
}
html[data-theme="dark"] .auth-sheet .pro-field-inp::placeholder {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  opacity: 1;
}
html[data-theme="dark"] .auth-sheet .pro-field-inp:-webkit-autofill,
html[data-theme="dark"] .auth-sheet .pro-field-inp:-webkit-autofill:hover,
html[data-theme="dark"] .auth-sheet .pro-field-inp:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--panel-2) inset !important;
  transition: background-color 99999s ease-out;
}
/* 弹层（研判除外） */


/* 弹层（研判除外）：夜间居中/桌面卡保留四边；手机贴底抽屉见下条仅顶线 */
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet):not(.acc-pass-modal):not(.book-day-anchor-pop):not(.acc-more-sheet-modal):not(.acc-slot-manual-modal):not(.acc-card-menu-modal):not(.acc-qr-cam-modal):not(.is-mobile-drawer):not(.is-drawer) .fee-sheet,
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet):not(.is-mobile-drawer):not(.is-drawer) .confirm-sheet,
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet):not(.is-mobile-drawer):not(.is-drawer) .params-sheet-card,
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet):not(.is-mobile-drawer):not(.is-drawer) .flow-detail-card,
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet):not(.is-mobile-drawer):not(.is-drawer) .pnl-hub-card,
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet):not(.is-mobile-drawer):not(.is-drawer) .target-sheet {
  background: var(--sheet) !important;
  color: var(--ink);
  border: 1px solid var(--card-line) !important;
  box-shadow: var(--sheet-shadow) !important;
}
@media (max-width: 899px) {
  html[data-theme="dark"] .fee-tip-modal.is-mobile-drawer:not(.is-desk-pop):not(.radar-sheet) > .fee-sheet,
  html[data-theme="dark"] .fee-tip-modal.is-mobile-drawer:not(.is-desk-pop):not(.radar-sheet) .fee-sheet.hold-more-card,
  html[data-theme="dark"] .fee-tip-modal.is-drawer:not(.is-desk-pop):not(.radar-sheet) > .fee-sheet,
  html[data-theme="dark"] .fee-tip-modal.pro-ops-sheet.is-mobile-drawer:not(.is-desk-pop) > .fee-sheet,
  html[data-theme="dark"] .fee-tip-modal.hold-more-sheet.is-mobile-drawer:not(.is-desk-pop) > .fee-sheet,
  html[data-theme="dark"] .fee-tip-modal.acc-slot-manual-modal.is-mobile-drawer .acc-slot-manual-sheet.fee-sheet,
  html[data-theme="dark"] .fee-tip-modal.acc-more-sheet-modal.is-mobile-drawer > .fee-sheet,
  html[data-theme="dark"] .fee-tip-modal.acc-card-menu-modal.is-mobile-drawer > .fee-sheet {
    background: var(--sheet) !important;
    color: var(--ink);
    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 -18px 48px rgba(0, 0, 0, 0.55) !important;
  }
}
html[data-theme="dark"] .fee-tip-modal.target-sheet .fee-sheet.confirm-sheet,
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet).target-sheet .confirm-sheet {
  border-radius: 16px !important;
  overflow: hidden !important;
}
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet) .fee-head,
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet) .fee-foot {
  background: var(--sheet);
  border-color: var(--card-line);
  color: var(--ink);
}
/* 参数 / 今日目标：顶栏底栏透明，整卡一块黑底，不切三层 */

html[data-theme="dark"] .fee-tip-modal.params-sheet .params-sheet-card .fee-head,
html[data-theme="dark"] .fee-tip-modal.params-sheet .params-sheet-card .fee-body,
html[data-theme="dark"] .fee-tip-modal.params-sheet .params-sheet-card .fee-foot,
html[data-theme="dark"] .fee-tip-modal .params-sheet-card .fee-head,
html[data-theme="dark"] .fee-tip-modal .params-sheet-card .fee-body,
html[data-theme="dark"] .fee-tip-modal .params-sheet-card .fee-foot {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .fee-tip-modal.target-sheet .fee-sheet .fee-head,
html[data-theme="dark"] .fee-tip-modal.target-sheet .fee-sheet .fee-body,
html[data-theme="dark"] .fee-tip-modal.target-sheet .fee-sheet .fee-foot,
html[data-theme="dark"] .fee-tip-modal.target-sheet .fee-head,
html[data-theme="dark"] .fee-tip-modal.target-sheet .fee-foot,
html[data-theme="dark"] .fee-tip-modal.target-sheet .fee-body {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--ink);
}
/* 保证金说明：内层区块跟参数设置同款深色分层，勿留白底 */

html[data-theme="dark"] .mgn-sheet .mgn-sec {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"] .mgn-sheet .mgn-sec-h,
html[data-theme="dark"] .mgn-sheet .mgn-kv span,
html[data-theme="dark"] .mgn-sheet .mgn-foot-note {
  color: var(--muted) !important;
}
html[data-theme="dark"] .mgn-sheet .mgn-kv b:not(.mgn-risk-val),
html[data-theme="dark"] .mgn-sheet .mgn-list,
html[data-theme="dark"] .mgn-sheet .mgn-list strong {
  color: var(--ink) !important;
}
html[data-theme="dark"] .mgn-sheet .mgn-risk-val.is-safe {
  color: var(--up) !important;
}
html[data-theme="dark"] .mgn-sheet .mgn-risk-val.is-warn {
  color: var(--warn) !important;
}
html[data-theme="dark"] .mgn-sheet .mgn-risk-val.is-danger {
  color: var(--down) !important;
}
html[data-theme="dark"] .pos-mgn-rate-btn.is-safe,
html[data-theme="dark"] .pos-metrics > div > b.pos-liq-val.is-safe {
  color: var(--up);
}
html[data-theme="dark"] .pos-mgn-rate-btn.is-warn,
html[data-theme="dark"] .pos-metrics > div > b.pos-liq-val.is-warn {
  color: var(--warn);
}
html[data-theme="dark"] .pos-mgn-rate-btn.is-danger,
html[data-theme="dark"] .pos-metrics > div > b.pos-liq-val.is-danger {
  color: var(--down);
}
html[data-theme="dark"] .mgn-sheet .mgn-status.is-safe {
  color: var(--teal) !important;
  background: var(--chip-bg) !important;
}
html[data-theme="dark"] .mgn-sheet .mgn-status.is-warn {
  color: var(--warn) !important;
  background: rgba(201, 162, 39, 0.16) !important;
}
html[data-theme="dark"] .mgn-sheet .mgn-status.is-danger {
  color: var(--down) !important;
  background: var(--danger-soft) !important;
}
html[data-theme="dark"] .mgn-sheet .fee-head .fee-x {
  color: #fff !important;
  opacity: 0.92;
}
/* 文本类控件填 panel-2；切勿波及 range——否则滑杆整块变底板（仅夜间显现） */

html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet):not(.pwd-change-modal) input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="image"]),
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet) select:not(.pnl-account-select):not(.pnl-range-select):not(.me-pnl-account-select),
html[data-theme="dark"] .fee-tip-modal:not(.radar-sheet) textarea {
  background: var(--panel-2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
/* 仅双端价差的原生 range 透明（细轨画在 .gap-range-track::before）；勿波及 .target-range */

html[data-theme="dark"] .fee-tip-modal input[type="range"]:not(.target-range):not(.size-scale-range),
html[data-theme="dark"] .fee-tip-modal .gap-range-inp,
html[data-theme="dark"] .gap-range-inp {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: inherit !important;
  -webkit-appearance: none;
  appearance: none;
}
html[data-theme="dark"] .fee-tip-modal .gap-range-inp::-webkit-slider-runnable-track,
html[data-theme="dark"] .gap-range-inp::-webkit-slider-runnable-track {
  background: transparent !important;
}
html[data-theme="dark"] .fee-tip-modal .gap-range-inp::-moz-range-track,
html[data-theme="dark"] .gap-range-inp::-moz-range-track {
  background: transparent !important;
}
/* 双平正差 / 仓位规模：元素透明，细轨在 track 伪元素，避免再出整块底板 */

html[data-theme="dark"] .fee-tip-modal input.target-range,
html[data-theme="dark"] .fee-tip-modal input.size-scale-range,
html[data-theme="dark"] .fee-tip-modal .target-range,
html[data-theme="dark"] .target-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .fee-tip-modal .target-range::-webkit-slider-runnable-track,
html[data-theme="dark"] .target-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--teal) 0%,
    var(--teal) var(--range-fill, 0%),
    var(--chip-bg) var(--range-fill, 0%),
    var(--chip-bg) 100%
  ) !important;
}
html[data-theme="dark"] .fee-tip-modal .target-range::-moz-range-track,
html[data-theme="dark"] .target-range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--chip-bg) !important;
}
html[data-theme="dark"] .fee-tip-modal .target-range::-moz-range-progress,
html[data-theme="dark"] .target-range::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--teal) !important;
}
html[data-theme="dark"] .fee-tip-modal .target-range::-webkit-slider-thumb,
html[data-theme="dark"] .target-range::-webkit-slider-thumb {
  margin-top: -9px;
}
/* 白底滑点夜间保持白，不被全局色覆盖 */

html[data-theme="dark"] .gap-range-knob-lo,
html[data-theme="dark"] .gap-range-knob-hi,
html[data-theme="dark"] .size-slider-knob,
html[data-theme="dark"] .fee-tip-modal .target-range::-webkit-slider-thumb,
html[data-theme="dark"] .fee-tip-modal .target-range::-moz-range-thumb,
html[data-theme="dark"] .target-range::-webkit-slider-thumb,
html[data-theme="dark"] .target-range::-moz-range-thumb {
  background: #fff !important;
  background-color: #fff !important;
}
html[data-theme="dark"] .size-slider-wrap .target-range::-webkit-slider-thumb,
html[data-theme="dark"] .size-slider-wrap .target-range::-moz-range-thumb {
  background: transparent !important;
  background-color: transparent !important;
  opacity: 0.01;
}
/* 参数输入：外框跟皮肤，内层透明，避免白底+深色 input 割裂 */

html[data-theme="dark"] .params-field-ctrl,
html[data-theme="dark"] .params-sec.is-locked .params-field-ctrl,
html[data-theme="dark"] .fee-tip-modal .params-field-ctrl,
html[data-theme="dark"] .fee-tip-modal .pro-num {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .params-field-ctrl input,
html[data-theme="dark"] .fee-tip-modal .params-field-ctrl input,
html[data-theme="dark"] .fee-tip-modal .pro-num input,
html[data-theme="dark"] .params-emerg-row .pro-num input {
  background: transparent !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}
html[data-theme="dark"] .params-field-unit,
html[data-theme="dark"] .fee-tip-modal .pro-num em,
html[data-theme="dark"] .pro-num em {
  color: var(--muted) !important;
}
html[data-theme="dark"] .params-field-tip {
  background: #000 !important;
  color: #e8eef2 !important;
}
html[data-theme="dark"] .params-field-tip::after {
  background: #000 !important;
  border: 0 !important;
}
html[data-theme="dark"] .fee-tip-modal .fee-head .fee-x,
html[data-theme="dark"] .fee-tip-modal.params-sheet .fee-x {
  color: #fff !important;
  opacity: 0.92;
}
html[data-theme="dark"] .pos-float {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
html[data-theme="dark"] .pnl-tip {
  background: #000 !important;
  color: #f0f3f6;
}
html[data-theme="dark"] .pnl-tip::after {
  background: #000 !important;
  border: 0 !important;
}
html[data-theme="dark"] .pnl-tip.is-above::after {
  background: #000 !important;
}
html[data-theme="dark"] .pnl-anchor::before {
  border-color: var(--panel);
}
html[data-theme="dark"] .pnl-anchor.tone-up { color: var(--up); }
html[data-theme="dark"] .pnl-anchor.tone-down { color: var(--down); }
html[data-theme="dark"] .toast,
html[data-theme="dark"] .run-msg {
  background: var(--panel-2);
  color: var(--ink);
  border-color: var(--line);
}
/* 登录层提示例外：始终无底条 */

html[data-theme="dark"] .auth-form .toast,
html[data-theme="dark"] .auth-form #auth-msg,
html[data-theme="dark"] .auth-form #auth-force-msg,
html[data-theme="dark"] #auth-msg.toast,
html[data-theme="dark"] #auth-force-msg.toast,
html[data-theme="dark"] .admin-login-card .toast,
html[data-theme="dark"] .admin-login-toast,
html[data-theme="dark"] #admin-login-msg,
html[data-theme="dark"] #admin-totp-verify-msg,
html[data-theme="dark"] #admin-totp-setup-msg {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
html[data-theme="dark"] .admin-auth-backdrop {
  background: rgba(8, 12, 16, 0.55);
}
html[data-theme="dark"] .admin-auth-sheet {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .admin-login-field span,
html[data-theme="dark"] .admin-auth-kicker,
html[data-theme="dark"] .admin-auth-sub,
html[data-theme="dark"] .admin-login-mfa-note,
html[data-theme="dark"] .admin-mfa-progress,
html[data-theme="dark"] .admin-mfa-card .admin-login-card-sub,
html[data-theme="dark"] .admin-login-back {
  color: var(--muted);
}
html[data-theme="dark"] .admin-login-field input,
html[data-theme="dark"] .admin-otp-single {
  background: var(--panel-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
html[data-theme="dark"] .admin-otp-single:focus {
  background: var(--panel-2);
  border-color: #3dbaa0;
  box-shadow: 0 0 0 3px rgba(61, 186, 160, 0.18);
}
/* 两步验证扫码区：外层透明跟弹窗主面，二维码本身留白底便于扫描 */

html[data-theme="dark"] .admin-totp-setup-box {
  background: transparent;
  border: none;
}
html[data-theme="dark"] .admin-totp-qr-wrap {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .admin-totp-qr {
  background: #fff;
}
html[data-theme="dark"] .admin-totp-manual > summary {
  color: #3dbaa0;
}
html[data-theme="dark"] .admin-totp-secret-row {
  background: var(--panel);
  border-color: var(--line);
}
html[data-theme="dark"] .admin-totp-secret {
  color: var(--ink);
}
html[data-theme="dark"] .admin-mfa-card .admin-login-card-head h1,
html[data-theme="dark"] #admin-auth-title {
  color: var(--ink);
}
html[data-theme="dark"] .auth-form .toast.err,
html[data-theme="dark"] #auth-msg.toast.err,
html[data-theme="dark"] #auth-force-msg.toast.err {
  color: var(--down) !important;
}
html[data-theme="dark"] .auth-form .toast.ok,
html[data-theme="dark"] #auth-msg.toast.ok,
html[data-theme="dark"] #auth-force-msg.toast.ok {
  color: var(--up) !important;
}
/* 研判弹窗：沿用既有固定配色，不吃全局皮肤 *//* —— 夜间：账户折叠/展开、表单、更多面板（方案 A） —— *//* 页脚「添加账户」条 = 主面 --panel；展开表单内区 / 更多卡 = 嵌套 --panel-2 */




html[data-theme="dark"] .app .acc-add-row {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: #e6ebf0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .app .acc-add-panel,
html[data-theme="dark"] .app .acc-box,
html[data-theme="dark"] .app .acc-more-hint-muted,
html[data-theme="dark"] .app .bind {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--ink);
  box-shadow: none !important;
}
/* 更多外层 panel-2；双接口两行 panel（与账户卡片抬升面同色） */

html[data-theme="dark"] .app .acc-more-card {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--ink);
  box-shadow: none !important;
}
html[data-theme="dark"] .app .acc-more-meta {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--ink);
  box-shadow: none !important;
}
/* 新手引导：夜间跟工具欧易分层；白天仍白底 */

html[data-theme="dark"] .pro-ops-tour-backdrop {
  background: rgba(0, 0, 0, 0.62);
}
html[data-theme="dark"] .pro-ops-tour-sheet {
  background: var(--sheet) !important;
  color: var(--ink) !important;
  box-shadow: var(--sheet-shadow) !important;
}
html[data-theme="dark"] .pro-ops-tour-step,
html[data-theme="dark"] .pro-ops-tour-title {
  color: var(--ink) !important;
}
html[data-theme="dark"] .pro-ops-tour-body {
  color: var(--muted) !important;
}
html[data-theme="dark"] .pro-ops-tour-progress span {
  background: var(--panel-2) !important;
}
html[data-theme="dark"] .pro-ops-tour-progress span.on {
  background: var(--ink) !important;
}
html[data-theme="dark"] .pro-ops-tour-progress span.done {
  background: var(--chip-hover) !important;
}
html[data-theme="dark"] .pro-ops-tour-actions .btn.soft {
  background: var(--panel-2) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .pro-ops-tour-actions .btn.main {
  background: var(--solid-bg) !important;
  color: var(--ink) !important;
}
/* 策略/成员/协同/资金池：去掉独立底板，与外层面板齐平 */

html[data-theme="dark"] .app .fleet-group,
html[data-theme="dark"] .fleet-group,
html[data-theme="dark"] .app .fleet-panel,
html[data-theme="dark"] .fleet-panel,
html[data-theme="dark"] .fleet-cfg-target,
html[data-theme="dark"] .app .fpool-panel,
html[data-theme="dark"] .fpool-panel,
html[data-theme="dark"] #fund-pool-sec,
html[data-theme="dark"] .app .fleet-adv,
html[data-theme="dark"] .fleet-adv {
  background: transparent !important;
  box-shadow: none !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .app .acc-add-row {
  color: #e6ebf0 !important;
  border-top-color: var(--line) !important;
}
html[data-theme="dark"] .app .acc-add-row:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}
html[data-theme="dark"] .app .acc-add-row:active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
html[data-theme="dark"] .app .acc-field,
html[data-theme="dark"] .app .acc-more-lab,
html[data-theme="dark"] .app .acc-sec-hint,
html[data-theme="dark"] .app .acc-more-note,
html[data-theme="dark"] .app .acc-more-hint {
  color: var(--muted) !important;
}
html[data-theme="dark"] .app .acc-field input,
html[data-theme="dark"] .app .acc-field select,
html[data-theme="dark"] .app .acc-more-input,
html[data-theme="dark"] .app .acc-more-select,
html[data-theme="dark"] .app .bind input,
html[data-theme="dark"] .app .bind select {
  background: var(--panel) !important;
  background-color: var(--panel) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 0 0 1px var(--line) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .app .acc-act-btn {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .app .acc-act-btn:hover:not(:disabled) {
  background: var(--chip-hover) !important;
  color: var(--solid-fg) !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .app .acc-act-btn.acc-act-danger {
  background: #f05a72 !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .app .acc-act-btn.acc-act-danger:hover:not(:disabled) {
  background: #d4455e !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .app .acc-act-btn.acc-act-role {
  color: var(--teal) !important;
  background: var(--chip-bg) !important;
  border-color: var(--ok-border) !important;
}
html[data-theme="dark"] .app .acc-more-foot {
  border-top: 0 !important;
}
html[data-theme="dark"] .app .acc-more-val,
html[data-theme="dark"] .app .acc-link[aria-expanded="true"] {
  color: var(--ink) !important;
}
/* 检测 / 更多：夜间中灰，勿用过白 */

html[data-theme="dark"] .acc-link,
html[data-theme="dark"] .app .acc-link {
  color: #8b95a5 !important;
}
html[data-theme="dark"] .acc-link:hover,
html[data-theme="dark"] .app .acc-link:hover {
  color: #a8b2c0 !important;
}
html[data-theme="dark"] .acc-link[aria-expanded="true"],
html[data-theme="dark"] .app .acc-link[aria-expanded="true"] {
  color: #a8b2c0 !important;
}
html[data-theme="dark"] .app .fold summary,
html[data-theme="dark"] .app .fold-flow summary,
html[data-theme="dark"] .app .fold-detail summary {
  background: transparent !important;
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .app .fold-body,
html[data-theme="dark"] .app .fold-body-flow,
html[data-theme="dark"] .app .fold-sec,
html[data-theme="dark"] .app .mini-list,
html[data-theme="dark"] .app .flow-inline-bar,
html[data-theme="dark"] .app .holding-exposure,
html[data-theme="dark"] .app .ladder-board,
html[data-theme="dark"] .app .cycle-plan,
html[data-theme="dark"] .app .target-track,
html[data-theme="dark"] .app .day-track {
  background: transparent !important;
  color: var(--ink);
  border-color: var(--line) !important;
}
html[data-theme="dark"] .app .fold-ref,
html[data-theme="dark"] .app .fold-ref-item,
html[data-theme="dark"] .app .fold-row {
  background: transparent !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"] .app .btn.soft,
html[data-theme="dark"] .app .acc-menu-btn {
  background: var(--panel-2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .app .btn.soft:hover:not(:disabled),
html[data-theme="dark"] .app .acc-menu-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}
html[data-theme="dark"] .app .acc-menu-btn.danger {
  color: var(--down) !important;
  background: var(--danger-soft) !important;
}
/* —— 夜间：高亮钮跟欧易抬升面，不再用浅灰白底 —— */


html[data-theme="dark"] {
  --solid-bg: #1c1c1c;
  --solid-fg: #ffffff;
  --chip-bg: #121212;
  --chip-hover: #1c1c1c;
}
/* 墨底白字类：夜间改为浅底深字，保持高对比 */

html[data-theme="dark"] .btn.sleeve-rm,
html[data-theme="dark"] .app .btn.sleeve-rm,
html[data-theme="dark"] .pnl-range-btn.on,
html[data-theme="dark"] .mgn-sheet .mgn-ok,
html[data-theme="dark"] .target-sheet .confirm-btn-ok,
html[data-theme="dark"] .book-cal-cell.is-today .num,
html[data-theme="dark"] .book-cal-cell:not(.empty):not(.is-today):hover .num,
html[data-theme="dark"] .book-cal-cell.is-selected .num {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .btn.sleeve-rm:hover:not(:disabled),
html[data-theme="dark"] .app .btn.sleeve-rm:hover:not(:disabled) {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  opacity: 1;
}
html[data-theme="dark"] .btn.sleeve-rm:active:not(:disabled),
html[data-theme="dark"] .app .btn.sleeve-rm:active:not(:disabled) {
  background: var(--danger-soft) !important;
  color: var(--danger-text) !important;
}
html[data-theme="dark"] .pnl-range-btn.on:hover {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
}
/* 白底描边类：夜间深底 + 可读字色 */


html[data-theme="dark"] .flow-detail-btn,
html[data-theme="dark"] .tl-filter-btn,
html[data-theme="dark"] .tl-export-btn,
html[data-theme="dark"] .flow-detail-head-actions .flow-detail-export-btn,
html[data-theme="dark"] .flow-detail-head-actions .flow-filter-select,
html[data-theme="dark"] .ai-chips button,
html[data-theme="dark"] .target-edit-btn,
html[data-theme="dark"] .fleet-adv-act,
html[data-theme="dark"] .fleet-ev-filters .tl-filter-btn,
html[data-theme="dark"] .fleet-ev-filters .tl-export-btn,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-btn-cancel,
html[data-theme="dark"] .book-page .daybook-btn,
html[data-theme="dark"] .evo-icon-btn,
html[data-theme="dark"] .evo-act:not(.evo-act-primary),
html[data-theme="dark"] .evo-chip,
html[data-theme="dark"] .evo-label-btn,
html[data-theme="dark"] .evo-label-clear,
html[data-theme="dark"] .evo-seg-btn,
html[data-theme="dark"] .book-day-flow-btn,
html[data-theme="dark"] .fleet-chip,
html[data-theme="dark"] .pnl-range-btn,
html[data-theme="dark"] .member-pill.on,
html[data-theme="dark"] .params-tab.on {
  background: var(--chip-bg) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .tl-filter-btn,
html[data-theme="dark"] .fleet-ev-filters .tl-filter-btn,
html[data-theme="dark"] .pnl-range-btn {
  color: var(--muted) !important;
}
html[data-theme="dark"] .pos-resume-btn {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 6px 12px !important;
  min-height: 32px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}
html[data-theme="dark"] .pos-open-btn {
  background: var(--up) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: none !important;
  min-width: 4.75em !important;
  padding: 6px 12px !important;
  min-height: 32px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: center;
}
html[data-theme="dark"] .pos-flat-btn,
html[data-theme="dark"] .pos-side-flat-btn {
  background: #f05a72 !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: none !important;
  min-width: 4.75em !important;
  padding: 6px 12px !important;
  min-height: 32px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: center;
}
html[data-theme="dark"] .flow-detail-btn:hover,
html[data-theme="dark"] .tl-export-btn:hover,
html[data-theme="dark"] .flow-detail-head-actions .flow-detail-export-btn:hover,
html[data-theme="dark"] .fleet-adv-act:hover,
html[data-theme="dark"] .target-edit-btn:hover,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-btn-cancel:hover,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-btn-cancel:active {
  background: var(--chip-hover) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .pos-resume-btn:hover:not(:disabled) {
  background: var(--chip-hover) !important;
  color: var(--solid-fg) !important;
}
html[data-theme="dark"] .pos-open-btn:hover:not(:disabled) {
  background: var(--up-solid) !important;
  color: #fff !important;
}
html[data-theme="dark"] .pos-flat-btn:hover:not(:disabled),
html[data-theme="dark"] .pos-side-flat-btn:hover:not(:disabled) {
  background: #d4455e !important;
  color: #fff !important;
}
html[data-theme="dark"] .tl-filter-btn.on,
html[data-theme="dark"] .fleet-ev-filters .tl-filter-btn.on,
html[data-theme="dark"] .evo-label-btn.is-on.is-real {
  background: color-mix(in srgb, var(--up) 18%, #000) !important;
  border-color: color-mix(in srgb, var(--up) 45%, transparent) !important;
  color: var(--up) !important;
}
html[data-theme="dark"] .evo-label-btn.is-on.is-bad {
  background: var(--danger-soft) !important;
  border-color: var(--danger-border) !important;
  color: var(--danger-text) !important;
}
html[data-theme="dark"] .evo-label-btn.is-on.is-skip {
  background: var(--chip-bg) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .evo-seg-btn.on.ok {
  background: var(--chip-bg) !important;
  border-color: var(--ok-border) !important;
  color: var(--teal) !important;
}
html[data-theme="dark"] .evo-act-primary {
  background: var(--solid-bg) !important;
  border-color: var(--solid-bg) !important;
  color: #fff !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .evo-act-primary .evo-act-t b,
html[data-theme="dark"] .evo-act-primary .evo-act-ico {
  color: #fff !important;
}
html[data-theme="dark"] .evo-act-primary .evo-act-t small {
  color: rgba(255, 255, 255, 0.78) !important;
}
html[data-theme="dark"] .evo-chip.on {
  background: var(--chip-bg) !important;
  border-color: var(--ok-border) !important;
  color: var(--teal) !important;
}
html[data-theme="dark"] .evo-seg-btn.on.bad {
  background: var(--danger-soft) !important;
  color: var(--danger-text) !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .evo-seg-btn.on.mute {
  background: var(--chip-bg) !important;
  color: var(--muted) !important;
}
html[data-theme="dark"] .evo-progress,
html[data-theme="dark"] .evo-card,
html[data-theme="dark"] .evo-stat,
html[data-theme="dark"] .evo-help {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"] .evo-progress {
  background: var(--panel-2) !important;
}
html[data-theme="dark"] .evo-prog-ring::before {
  background: var(--panel) !important;
}
html[data-theme="dark"] .evo-card.is-focus {
  background: var(--chip-bg) !important;
  border-color: var(--ok-border) !important;
}
html[data-theme="dark"] .evo-card-feat,
html[data-theme="dark"] .evo-card-body header b,
html[data-theme="dark"] .evo-stat b,
html[data-theme="dark"] .evo-list-head h2,
html[data-theme="dark"] .evo-hero-text h1 {
  color: var(--ink) !important;
}
html[data-theme="dark"] .evo-card-tip,
html[data-theme="dark"] .evo-card-body time,
html[data-theme="dark"] .evo-stat span,
html[data-theme="dark"] .evo-kbd-hint,
html[data-theme="dark"] .evo-act-t small,
html[data-theme="dark"] .evo-noise-toggle {
  color: var(--muted) !important;
}
html[data-theme="dark"] .evo-card .tag,
html[data-theme="dark"] .evo-card .tag.soft {
  background: var(--chip-bg) !important;
  color: var(--muted) !important;
  box-shadow: inset 0 0 0 1px var(--line) !important;
}
html[data-theme="dark"] .evo-empty {
  color: var(--ink);
}
html[data-theme="dark"] .evo-empty p {
  color: var(--muted) !important;
}
html[data-theme="dark"] .tl-filter-btn:hover:not(.on),
html[data-theme="dark"] .fleet-ev-filters .tl-filter-btn:hover:not(.on) {
  background: var(--chip-hover) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .params-tab.on,
html[data-theme="dark"] .member-pill.on {
  background: var(--panel) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .flow-detail-head-actions .flow-filter-select,
html[data-theme="dark"] .flow-filter-select {
  background-color: var(--chip-bg) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238b98a8' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
html[data-theme="dark"] .flow-detail-head-actions .flow-filter-select:focus,
html[data-theme="dark"] .flow-detail-head-actions .flow-filter-select:focus-visible,
html[data-theme="dark"] .flow-detail-head-actions .flow-filter-select:active,
html[data-theme="dark"] .flow-filter-select:focus,
html[data-theme="dark"] .flow-filter-select:focus-visible,
html[data-theme="dark"] .flow-filter-select:active {
  outline: none !important;
  box-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  background-color: var(--chip-bg) !important;
}
html[data-theme="dark"] .btn.tiny:hover:not(:disabled),
html[data-theme="dark"] .btn.ghost:hover:not(:disabled) {
  background: var(--chip-hover) !important;
  color: var(--ink) !important;
}
/* 选中态实心钮须盖过上面的 chip 底色 */

html[data-theme="dark"] .pnl-range-btn.on {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  border-color: transparent !important;
}
/* —— 夜间补丁：弹层/账本/AI/成员/表格全覆盖 —— */


html[data-theme="dark"] {
  --solid-bg: #1c1c1c;
  --solid-fg: #ffffff;
  --chip-bg: #121212;
  --chip-hover: #1c1c1c;
}
/* 浮层外壳：仓位 / AI / 编队 */


html[data-theme="dark"] .pos-float,
html[data-theme="dark"] .ai-float {
  background: var(--panel) !important;
  color: var(--ink) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55) !important;
}
html[data-theme="dark"] .pos-float-head h3,
html[data-theme="dark"] .pos-float-tools .fee-x,
html[data-theme="dark"] .pos-empty,
html[data-theme="dark"] .pos-ord-title {
  color: var(--ink) !important;
}
html[data-theme="dark"] .pos-float-tools .fee-x {
  background: transparent !important;
  opacity: 0.85;
}
html[data-theme="dark"] .pos-float-tools .fee-x:hover {
  color: var(--teal) !important;
  opacity: 1;
}
html[data-theme="dark"] .pos-ord-act-cancel {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #e8eef2 !important;
}
html[data-theme="dark"] .pos-ord-act-amend {
  background: var(--solid-bg) !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="light"] .pos-ord-act-cancel {
  background: #fff !important;
  border-color: rgba(15, 24, 32, 0.14) !important;
  color: #12171e !important;
}
html[data-theme="light"] .pos-ord-act-amend {
  background: #12171e !important;
  color: #fff !important;
}
html[data-theme="dark"] .pos-ord-row {
  border-top-color: var(--line) !important;
}
html[data-theme="dark"] .pos-sym,
html[data-theme="dark"] .pos-grid > div b,
html[data-theme="dark"] .pos-ord-grid b,
html[data-theme="dark"] .pos-ord-title {
  color: var(--ink) !important;
}
/* 夜间：预估收益/开单手续费保留涨绿跌红，勿被上方 ink 盖掉 */

html[data-theme="dark"] .pos-ord-grid b.pos-ord-est.is-up,
html[data-theme="dark"] .amend-est-val.is-up {
  color: var(--up) !important;
}
html[data-theme="dark"] .pos-ord-grid b.pos-ord-est.is-down,
html[data-theme="dark"] .amend-est-val.is-down {
  color: var(--down) !important;
}
html[data-theme="dark"] .pos-ord-grid b.pos-ord-est.is-flat,
html[data-theme="dark"] .amend-est-val.is-flat,
html[data-theme="dark"] .amend-est-val.is-muted {
  color: var(--muted) !important;
}
html[data-theme="dark"] .amend-est-val.holding-mark.lean-long {
  color: var(--up) !important;
}
html[data-theme="dark"] .amend-est-val.holding-mark.lean-short {
  color: var(--down) !important;
}
html[data-theme="dark"] .amend-est-val.holding-mark.lean-flat {
  color: var(--ink) !important;
}
html[data-theme="dark"] .pos-grid > div span,
html[data-theme="dark"] .pos-ord-grid span,
html[data-theme="dark"] .pos-upl-label,
html[data-theme="dark"] .pos-ord-status,
html[data-theme="dark"] .pos-ord-type,
html[data-theme="dark"] .pos-meta-tag:not(.pos-slot-chip):not(.pos-slot-tag) {
  color: var(--muted) !important;
}
/* 仓位窗：委托/仓位切换 → 灰白选中块 */

html[data-theme="dark"] .pos-tabs {
  border-bottom-color: var(--line) !important;
  color: var(--muted);
}
html[data-theme="dark"] .pos-tabs-left {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 3px;
  gap: 0;
}
html[data-theme="dark"] .pos-tabs-left button {
  color: var(--muted) !important;
  background: transparent !important;
  border-radius: 8px;
  padding: 6px 12px !important;
  min-height: 32px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2;
}
html[data-theme="dark"] .pos-tabs-left button.on {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
}
html[data-theme="dark"] .pos-tabs-left button.on::after {
  display: none !important;
}
html[data-theme="dark"] .pos-tabs-left button.on b,
html[data-theme="dark"] .pos-tabs-left button b {
  color: inherit !important;
}
/* 仓位窗：桌面浮窗也跟手机抽屉同一套 CEX 下划线 + 操作轨（覆盖上方灰白胶囊） */
html[data-theme="dark"] #pos-sheet .pos-tabs {
  border-bottom: 0 !important;
}
html[data-theme="dark"] #pos-sheet .pos-tabs-left {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
html[data-theme="dark"] #pos-sheet .pos-tabs-left button:not(.pos-heal-bang):not(.pos-bill-btn):not(.pos-sheet-close) {
  background: transparent !important;
  color: var(--muted) !important;
  border-radius: 0 !important;
}
html[data-theme="dark"] #pos-sheet .pos-sheet-close {
  color: #e8edf2 !important;
  background: transparent !important;
}
html[data-theme="dark"] #pos-sheet .pos-tabs-left > #tab-ord.on,
html[data-theme="dark"] #pos-sheet .pos-tab-pos-wrap > #tab-pos.on {
  background: transparent !important;
  color: #fff !important;
}
html[data-theme="dark"] #pos-sheet .pos-tabs-left > #tab-ord.on::after,
html[data-theme="dark"] #pos-sheet .pos-tab-pos-wrap:has(#tab-pos.on)::after {
  display: block !important;
  background: #fff !important;
}
html[data-theme="dark"] #pos-sheet .pos-tab-pos-wrap > #tab-pos.on::after {
  display: none !important;
}
html[data-theme="dark"] #pos-sheet .pos-tabs-actions {
  background: var(--panel-2, #121212) !important;
}
html[data-theme="dark"] #pos-sheet .pos-resume-btn {
  background: transparent !important;
  color: var(--muted) !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] #pos-sheet .pos-resume-btn:hover:not(:disabled) {
  background: transparent !important;
  color: #fff !important;
}
html[data-theme="dark"] #pos-sheet .pos-flat-btn {
  background: #f05a72 !important;
  color: #fff !important;
}
html[data-theme="dark"] #pos-sheet .pos-open-btn {
  background: var(--up) !important;
  color: #fff !important;
}
html[data-theme="dark"] #pos-sheet .pos-heal-bang,
html[data-theme="dark"] #pos-sheet .pos-tabs-left .pos-heal-bang {
  color: #f05a72 !important;
  background: transparent !important;
}
html[data-theme="dark"] #pos-sheet .pos-heal-bang:hover,
html[data-theme="dark"] #pos-sheet .pos-heal-bang[aria-expanded="true"],
html[data-theme="dark"] #pos-sheet .pos-tabs-left .pos-heal-bang:hover,
html[data-theme="dark"] #pos-sheet .pos-tabs-left .pos-heal-bang[aria-expanded="true"] {
  color: #ff6b7a !important;
}
html[data-theme="dark"] #pos-sheet .pos-bill-btn {
  color: #e8edf2 !important;
  background: transparent !important;
}
html[data-theme="dark"] #pos-sheet .pos-bill-btn .pos-bill-clock-disk {
  fill: var(--panel, #121820);
}
@media (max-width: 899px) {
  html[data-theme="dark"] #pos-sheet.pos-float-layer.on {
    background: rgba(0, 0, 0, 0.55);
  }
  html[data-theme="dark"] #pos-sheet.on #pos-float {
    background: #000000 !important;
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.55) !important;
  }
  html[data-theme="dark"] #pos-sheet .pos-sheet-grab {
    background: rgba(255, 255, 255, 0.28);
  }
  html[data-theme="dark"] #pos-sheet .pos-bill-btn .pos-bill-clock-disk {
    fill: #000;
  }
}
/* AI：摘要 / 消息 / 底栏芯片 */


html[data-theme="dark"] .cs-fab {
  color: #c8d0d8;
  filter: none;
}
html[data-theme="dark"] .cs-fab:hover,
html[data-theme="dark"] .cs-fab:focus-visible,
html[data-theme="dark"].cs-sheet-open .cs-fab,
html[data-theme="dark"]:has(#cs-sheet.on:not([hidden])) .cs-fab {
  color: #e8edf2;
}
html[data-theme="dark"] #cs-sheet .cs-faq-list {
  border: 0;
}
html[data-theme="dark"] #cs-sheet .cs-faq-item {
  border: 0;
  color: inherit;
}
html[data-theme="dark"] #cs-sheet .cs-faq-item:hover,
html[data-theme="dark"] #cs-sheet .cs-faq-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}
html[data-theme="dark"] #cs-sheet .cs-faq-item.on,
html[data-theme="dark"] #cs-sheet .cs-faq-item:active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--ink) !important;
  border-radius: 10px;
  font-weight: 650;
}
html[data-theme="dark"] .ai-summary,
html[data-theme="dark"] .ai-msg.bot {
  background: var(--panel-2) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .ai-faq-q {
  background: var(--chip-bg) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .ai-faq-q:hover,
html[data-theme="dark"] .ai-faq-q:focus-visible {
  background: var(--chip-hover) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .ai-chat-dock {
  background: var(--panel) !important;
  border-top-color: var(--line) !important;
}
html[data-theme="dark"] .ai-mode-tab {
  background: var(--panel-2) !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .ai-mode-tab.on {
  background: var(--solid-bg) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .ai-chips button {
  background: var(--chip-bg) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .ai-chips button:hover {
  background: var(--chip-hover) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .ai-ask input {
  background: var(--panel-2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .ai-ask input::placeholder {
  color: var(--muted) !important;
}
html[data-theme="dark"] .ai-ask button {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
}
html[data-theme="dark"] .ai-refresh-ico {
  color: #e6ebf0 !important;
}
html[data-theme="dark"] .ai-refresh-ico:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
/* 参数设置 Tab + 底栏按钮 */


html[data-theme="dark"] .params-tabs,
html[data-theme="dark"] .fee-tip-modal .params-tabs {
  background: rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .params-tab {
  background: transparent !important;
  color: var(--muted) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .params-tab.on {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .confirm-btn-cancel,
html[data-theme="dark"] .fee-tip-modal .confirm-btn-cancel,
html[data-theme="dark"] .fee-tip-modal .params-sheet-card .params-actions .confirm-btn-cancel,
html[data-theme="dark"] .target-sheet .confirm-btn-cancel {
  background: var(--chip-bg) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .confirm-btn-cancel:hover,
html[data-theme="dark"] .confirm-btn-cancel:active {
  background: var(--chip-hover) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .confirm-btn-ok,
html[data-theme="dark"] .target-sheet .confirm-btn-ok,
html[data-theme="dark"] .fee-tip-modal .confirm-btn-ok,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-btn-ok {
  background: var(--solid-bg) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
/* 确认/平仓弹窗：顶底与正文同色；标题/步骤用 ink，备注用 panel-2（勿留白天深色字+白底条） */

html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-sheet,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-head,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-body,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-actions,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .fee-head,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .fee-foot {
  background: var(--panel) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-actions {
  border-top: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-actions .confirm-btn {
  width: 100% !important;
}
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-head h3,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-lead,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-step-t,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-steps li {
  color: var(--ink) !important;
}
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-msg,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-note,
html[data-theme="dark"] .fee-tip-modal.confirm-modal .flat-manual-hint {
  color: var(--muted) !important;
}
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-note {
  background: var(--panel-2) !important;
  border: 1px solid var(--line);
}
html[data-theme="light"] .fee-tip-modal.confirm-modal .confirm-step-n {
  background: #12171e !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="light"] .flat-mode-tab.on {
  background: #fff !important;
  color: #12171e !important;
  box-shadow: 0 1px 3px rgba(15, 24, 32, 0.1) !important;
  border: 1px solid rgba(15, 24, 32, 0.08) !important;
}
/* 开仓弹窗：选中态跟确认钮同色，勿被上方白底规则盖掉 */

html[data-theme="light"] .open-side-tabs .open-side-tab[data-open-side="long"].on {
  background: var(--up) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="light"] .open-side-tabs .open-side-tab[data-open-side="short"].on {
  background: var(--down) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="light"] .flat-manual-all {
  background: #12171e !important;
  border-color: transparent !important;
  color: #fff !important;
}
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-step-n {
  background: var(--solid-bg) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .fee-tip-modal.confirm-modal .fee-x {
  color: #fff !important;
  opacity: 0.92;
}
html[data-theme="dark"] .fee-tip-modal.confirm-modal .confirm-btn-danger {
  background: #d4535c !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .flat-mode-tabs {
  background: rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .flat-mode-tabs.open-side-tabs {
  background: transparent !important;
}
html[data-theme="dark"] .flat-mode-tab {
  color: var(--muted) !important;
}
html[data-theme="dark"] .flat-mode-tab.on:not(.open-side-tab) {
  background: #fff !important;
  color: #12171e !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .open-side-tabs .open-side-tab[data-open-side="long"].on {
  background: var(--up) !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .open-side-tabs .open-side-tab[data-open-side="short"].on {
  background: #d4535c !important;
  color: #fff !important;
  border-color: transparent !important;
}
/* 开仓确认：开多跟页签同绿，开空跟页签同红（勿被通用 confirm-btn-ok 灰底盖掉） */

html[data-theme="dark"] .confirm-flat-side #open-pos-yes.confirm-btn-ok:not(.confirm-btn-danger),
html[data-theme="light"] .confirm-flat-side #open-pos-yes.confirm-btn-ok:not(.confirm-btn-danger) {
  background: var(--up) !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .confirm-flat-side #open-pos-yes.confirm-btn-ok:not(.confirm-btn-danger):hover,
html[data-theme="light"] .confirm-flat-side #open-pos-yes.confirm-btn-ok:not(.confirm-btn-danger):hover {
  background: var(--up-solid) !important;
  color: #fff !important;
}
html[data-theme="dark"] .confirm-flat-side #open-pos-yes.confirm-btn-danger,
html[data-theme="light"] .confirm-flat-side #open-pos-yes.confirm-btn-danger {
  background: var(--down) !important;
  color: #fff !important;
}
html[data-theme="dark"] .confirm-flat-side #open-pos-yes.confirm-btn-danger:hover,
html[data-theme="light"] .confirm-flat-side #open-pos-yes.confirm-btn-danger:hover {
  background: var(--down-solid) !important;
  color: #fff !important;
}
/* 平多/平空确认：平多绿、平空红（手动委托弹层 data-act=yes） */
html[data-theme="dark"] .confirm-flat-side .confirm-actions [data-act="yes"].confirm-btn-ok:not(.confirm-btn-danger),
html[data-theme="light"] .confirm-flat-side .confirm-actions [data-act="yes"].confirm-btn-ok:not(.confirm-btn-danger) {
  background: var(--up) !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .confirm-flat-side .confirm-actions [data-act="yes"].confirm-btn-ok:not(.confirm-btn-danger):hover,
html[data-theme="light"] .confirm-flat-side .confirm-actions [data-act="yes"].confirm-btn-ok:not(.confirm-btn-danger):hover {
  background: var(--up-solid) !important;
  color: #fff !important;
}
html[data-theme="dark"] .confirm-flat-side .confirm-actions [data-act="yes"].confirm-btn-danger,
html[data-theme="light"] .confirm-flat-side .confirm-actions [data-act="yes"].confirm-btn-danger {
  background: var(--down) !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .confirm-flat-side .confirm-actions [data-act="yes"].confirm-btn-danger:hover,
html[data-theme="light"] .confirm-flat-side .confirm-actions [data-act="yes"].confirm-btn-danger:hover {
  background: var(--down-solid) !important;
  color: #fff !important;
}
html[data-theme="dark"] .flat-manual-field > span,
html[data-theme="dark"] .flat-manual-hint {
  color: var(--muted) !important;
}
html[data-theme="dark"] .flat-manual-mark-chip b {
  color: var(--ink) !important;
}
html[data-theme="dark"] .flat-manual-field input {
  background: var(--panel-2, #1a222c) !important;
  color: var(--ink) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .flat-manual-all {
  background: var(--solid-bg) !important;
  border-color: transparent !important;
  color: #fff !important;
}
html[data-theme="dark"] .confirm-btn-ok:hover,
html[data-theme="dark"] .target-sheet .confirm-btn-ok:hover,
html[data-theme="dark"] .fee-tip-modal .confirm-btn-ok:hover {
  background: var(--chip-hover) !important;
  color: #fff !important;
}
/* 改价弹窗：确认改价 = 白底黑字（对齐全部开始主按钮） */
html[data-theme="dark"] .confirm-amend .confirm-btn-ok,
html[data-theme="dark"] .fee-tip-modal.confirm-amend .confirm-btn-ok {
  background: #fff !important;
  color: #111 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .confirm-amend .confirm-btn-ok:hover,
html[data-theme="dark"] .fee-tip-modal.confirm-amend .confirm-btn-ok:hover {
  background: #f0f0f0 !important;
  color: #111 !important;
}
html[data-theme="dark"] .fee-tip-modal .params-sheet-card .params-save,
html[data-theme="dark"] .fee-tip-modal .params-sheet-card .btn.main.params-save {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  box-shadow: none !important;
}
/* 长跑看板：死黑底；描边跟「框+箭头」整块外形（接缝处不画横线） */


html[data-theme="dark"] .run-stats-pop {
  background: #000 !important;
  color: #e8eef2 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter:
    drop-shadow(0 0 0.65px rgba(255, 255, 255, 0.45))
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}
html[data-theme="dark"] .run-stats-pop::before {
  background: #000 !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}
html[data-theme="dark"] .run-stats-daybook-btn {
  background: var(--chip-bg) !important;
  color: var(--teal) !important;
  border: 1px solid var(--ok-border) !important;
}
html[data-theme="dark"] .run-stats-daybook-btn:hover {
  filter: none;
  background: var(--ok-soft) !important;
}
/* 黑气泡统一：描边跟「框+箭头」整块外形；接缝处不画横线（勿给箭头单独 drop-shadow） */

html[data-theme="dark"] .bias-tip,
html[data-theme="dark"] .fold-tip,
html[data-theme="dark"] .ui-help-tip,
html[data-theme="dark"] .pnl-tip,
html[data-theme="dark"] .holding-status-bubble,
html[data-theme="dark"] .radar-kpi-tip,
html[data-theme="dark"] .info-pop-inner {
  background: #000 !important;
  color: #e8eef2 !important;
  box-shadow: none !important;
  filter:
    drop-shadow(0 0 0.65px rgba(255, 255, 255, 0.45))
    drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
}
html[data-theme="dark"] .bias-tip::after,
html[data-theme="dark"] .bias-tip.bias-tip-fixed::after,
html[data-theme="dark"] .fold-tip::after,
html[data-theme="dark"] .fold-tip.fold-tip-portal::after,
html[data-theme="dark"] .ui-help-tip::before,
html[data-theme="dark"] .pnl-tip::after,
html[data-theme="dark"] .holding-status-bubble::before,
html[data-theme="dark"] .radar-kpi-tip::after,
html[data-theme="dark"] .info-pop-inner::before {
  box-shadow: none !important;
  filter: none !important;
}
html[data-theme="dark"] .bias-tip::after,
html[data-theme="dark"] .bias-tip.bias-tip-fixed::after,
html[data-theme="dark"] .fold-tip.fold-tip-portal.is-above::after,
html[data-theme="dark"] .pnl-tip.is-above::after,
html[data-theme="dark"] .ui-help-tip.is-above::before,
html[data-theme="dark"] .radar-kpi-tip.is-above::after,
html[data-theme="dark"] .info-pop-inner::before {
  border-top-color: #000 !important;
}
html[data-theme="dark"] .bias-tip.bias-tip-fixed.is-below::after,
html[data-theme="dark"] .fold-tip::after,
html[data-theme="dark"] .fold-tip.fold-tip-portal::after,
html[data-theme="dark"] .pnl-tip::after,
html[data-theme="dark"] .holding-status-bubble::before,
html[data-theme="dark"] .radar-kpi-tip::after,
html[data-theme="dark"] .ui-help-tip::before,
html[data-theme="dark"] .info-pop.info-pop-below .info-pop-inner::before {
  border-bottom-color: #000 !important;
}
/* 状态气泡：黑底上用四向描边画出整圈线框（含箭头），避免和页面糊成一块 */

html[data-theme="dark"] .holding-status-bubble,
html[data-theme="dark"] body > .holding-status-bubble.status-bubble-portal {
  background: #000 !important;
  border: 0 !important;
  box-shadow: none !important;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.2))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.2))
    drop-shadow(1px 0 0 rgba(255, 255, 255, 0.2))
    drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.2))
    drop-shadow(0 16px 48px rgba(0, 0, 0, 0.55)) !important;
}
html[data-theme="dark"] .fold-tug-bubble,
html[data-theme="dark"] .target-bubble {
  --bubble-fill: #000;
  --bubble-line: rgba(255, 255, 255, 0.16);
  filter:
    drop-shadow(0 1px 0 var(--bubble-line))
    drop-shadow(0 -1px 0 var(--bubble-line))
    drop-shadow(1px 0 0 var(--bubble-line))
    drop-shadow(-1px 0 0 var(--bubble-line))
    drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}
html[data-theme="dark"] .fold-tug-bubble.tone-flat,
html[data-theme="dark"] .target-bubble.tone-flat {
  --bubble-fill: #000;
}
html[data-theme="dark"] .target-bubble.tone-done,
html[data-theme="dark"] .target-bubble.tone-up,
html[data-theme="dark"] .fold-tug-bubble.tone-long {
  --bubble-fill: var(--up);
}
html[data-theme="dark"] .target-bubble.tone-down,
html[data-theme="dark"] .fold-tug-bubble.tone-short {
  --bubble-fill: var(--down, #c0392b);
}
html[data-theme="dark"] .fold-tug-bubble-txt,
html[data-theme="dark"] .target-bubble-txt {
  color: #fff !important;
  background: var(--bubble-fill, #000) !important;
  box-shadow: none !important;
  border: 0 !important;
}
html[data-theme="dark"] .fold-tug-bubble.tone-flat .fold-tug-bubble-txt,
html[data-theme="dark"] .target-bubble.tone-flat .target-bubble-txt {
  background: #000 !important;
}
.fold-tug-bubble.is-empty,
.fold-tug-bubble[hidden] {
  display: none !important;
}
/* 目标/博弈气泡尖角描边见 07-callout-unify（勿在此关掉 ::before/::after） */
/* 气泡弹窗：白天夜间统一深色底 + 浅色字，不跟工具皮肤改白 */

body > .ui-help-tip.ui-help-tip-portal:not([hidden]),
html[data-theme="dark"] body > .ui-help-tip.ui-help-tip-portal:not([hidden]) {
  z-index: 32100 !important;
  pointer-events: auto !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #000 !important;
  color: #e8eef2 !important;
  box-shadow: none !important;
  filter:
    drop-shadow(0 0 0.65px rgba(255, 255, 255, 0.45))
    drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
}
/* 帮助中心 sheet=33040，通用 portal 32100 会沉到弹层下面 */

html[data-theme="dark"] body > .ui-help-tip.ui-help-tip-portal.help-hub-step-tip:not([hidden]),
body > .ui-help-tip.ui-help-tip-portal.help-hub-step-tip:not([hidden]) {
  z-index: 33120 !important;
}
/* 气泡内所有字：白天夜间统一浅色，不被 --ink/--muted 洗成深色 */

.run-stats-pop,
.run-stats-pop *:not(svg):not(path):not(button),
.ui-help-tip,
.ui-help-tip *:not(svg):not(path):not(button),
.fold-tip,
.fold-tip *:not(svg):not(path):not(button),
.bias-tip,
.bias-tip *:not(svg):not(path):not(button),
.pnl-tip,
.pnl-tip *:not(svg):not(path),
.holding-status-bubble,
.holding-status-bubble *:not(svg):not(path),
.info-pop-inner,
.info-pop-inner *:not(svg):not(path):not(button),
.hold-heal-pop-card,
.hold-heal-pop-card *:not(svg):not(path):not(button) {
  color: #e8eef2 !important;
  -webkit-text-fill-color: #e8eef2 !important;
}
.run-stats-pop .up,
.run-stats-pop b.up,
.fold-tip-row.up b,
.fold-tip-row.up-row b,
.fold-tip-duo .tip-l,
.pnl-tip.up b,
.run-stats-grid-q b.is-ok {
  color: #7ddea8 !important;
  -webkit-text-fill-color: #7ddea8 !important;
}
.run-stats-pop .down,
.run-stats-pop b.down,
.fold-tip-row.down b,
.fold-tip-row.down-row b,
.fold-tip-duo .tip-s,
.pnl-tip.down b,
.run-stats-grid-q b.is-bad {
  color: #f0a0a8 !important;
  -webkit-text-fill-color: #f0a0a8 !important;
}
.run-stats-daybook-btn,
.hold-heal-pop-acts button {
  color: #e8eef2 !important;
  -webkit-text-fill-color: #e8eef2 !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
html[data-theme="dark"] body > .ui-help-tip.ui-help-tip-portal.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]) {
  display: grid !important;
}
html[data-theme="dark"] body > .ui-help-tip.ui-help-tip-portal::before,
body > .ui-help-tip.ui-help-tip-portal::before {
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
}
body > .ui-help-tip.ui-help-tip-portal[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* 账户盈亏 / 日历 / 日账 */


html[data-theme="dark"] .pnl-hub-tabs {
  background: rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .pnl-hub-tab {
  background: transparent !important;
  color: var(--muted) !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .pnl-hub-tab.on {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .pnl-fee-toggle {
  color: var(--muted);
  border-color: rgba(154, 168, 181, 0.35);
  background: transparent;
}
html[data-theme="dark"] .pnl-fee-toggle:hover,
html[data-theme="dark"] .pnl-fee-toggle:focus-visible,
html[data-theme="dark"] .pnl-fee-toggle.on {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(217, 119, 6, 0.16);
}
html[data-theme="dark"] .pnl-gross-toggle {
  color: var(--muted);
  border-color: rgba(154, 168, 181, 0.35);
  background: transparent;
}
html[data-theme="dark"] .pnl-gross-toggle:hover,
html[data-theme="dark"] .pnl-gross-toggle:focus-visible,
html[data-theme="dark"] .pnl-gross-toggle.on {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(148, 163, 184, 0.14);
  border-style: dashed;
}
html[data-theme="dark"] .pnl-chart-zoom {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
/* 盈亏弹窗「导出」：夜间与账户选择框同色（chip），勿用浅底白钮 */

html[data-theme="dark"] .pnl-hub-card .pnl-export-btn,
html[data-theme="dark"] .pnl-export-btn,
html[data-theme="dark"] .pnl-hub-head-left .pnl-export-btn {
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  border: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
/* 账户 / 时间选择：未点击时的底色与账本「导出」相同。实色渐变盖住系统下拉的浅灰底。 */
html[data-theme="light"] .pnl-account-select,
html[data-theme="light"] .me-pnl-account-select,
html[data-theme="light"] .pnl-range-select,
html[data-theme="light"] .pnl-hub-head-left .pnl-account-select,
html[data-theme="light"] .pnl-hub-head-left .pnl-range-select,
html[data-theme="light"] .pnl-account-select:hover,
html[data-theme="light"] .pnl-range-select:hover,
html[data-theme="light"] .me-pnl-account-select:hover,
html[data-theme="light"] .pnl-export-btn,
html[data-theme="light"] .pnl-hub-head-left .pnl-export-btn {
  -webkit-appearance: none !important;
  appearance: none !important;
  color-scheme: light;
  background: #fff !important;
  background-color: #fff !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}
html[data-theme="light"] .pnl-account-select,
html[data-theme="light"] .me-pnl-account-select,
html[data-theme="light"] .pnl-range-select,
html[data-theme="light"] .pnl-hub-head-left .pnl-account-select,
html[data-theme="light"] .pnl-hub-head-left .pnl-range-select {
  background-image: linear-gradient(#fff, #fff), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237a919c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: center, right 8px center !important;
  background-size: 100% 100%, 12px 8px !important;
}
html[data-theme="dark"] .pnl-account-select,
html[data-theme="dark"] .me-pnl-account-select,
html[data-theme="dark"] .pnl-range-select,
html[data-theme="dark"] .pnl-hub-head-left .pnl-account-select,
html[data-theme="dark"] .pnl-hub-head-left .pnl-range-select,
html[data-theme="dark"] .pnl-account-select:hover,
html[data-theme="dark"] .pnl-range-select:hover,
html[data-theme="dark"] .me-pnl-account-select:hover,
html[data-theme="dark"] .pnl-account-select:focus,
html[data-theme="dark"] .pnl-range-select:focus,
html[data-theme="dark"] .me-pnl-account-select:focus {
  -webkit-appearance: none !important;
  appearance: none !important;
  color-scheme: light;
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  background-image: linear-gradient(var(--solid-bg), var(--solid-bg)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: center, right 8px center !important;
  background-size: 100% 100%, 12px 8px !important;
  color: var(--solid-fg) !important;
  -webkit-text-fill-color: var(--solid-fg) !important;
  border: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .daybook-actions .daybook-btn,
html[data-theme="dark"] .book-page .daybook-btn {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  border: 0 !important;
}
/* 账本月份切换 ‹ ›：夜间纯白 */

html[data-theme="dark"] .book-month-nav .daybook-btn.ghost,
html[data-theme="dark"] .pnl-hub-card .book-month-nav .daybook-btn.ghost,
html[data-theme="dark"] .book-page .book-month-nav .daybook-btn.ghost {
  background: transparent !important;
  color: #fff !important;
  border: 0 !important;
}
html[data-theme="dark"] .book-month-nav .daybook-btn.ghost:hover,
html[data-theme="dark"] .pnl-hub-card .book-month-nav .daybook-btn.ghost:hover {
  color: #fff !important;
  opacity: 0.85;
}
html[data-theme="dark"] .pnl-hub-card .pnl-export-btn:hover,
html[data-theme="dark"] .pnl-export-btn:hover,
html[data-theme="dark"] .pnl-hub-head-left .pnl-export-btn:hover {
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .pnl-spark {
  background: var(--panel-2) !important;
  color: var(--ink) !important;
}
/* 弹窗内大图：跟 hub 卡片/顶底栏同 panel，勿再用 panel-2 分层 */

html[data-theme="dark"] .pnl-pop-chart-wrap,
html[data-theme="dark"] .pnl-pop-chart-wrap .pnl-spark-lg {
  background: var(--panel) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .book-cal,
html[data-theme="dark"] .book-table-wrap,
html[data-theme="dark"] .book-day-detail,
html[data-theme="dark"] .book-hero {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .book-cal,
html[data-theme="dark"] .pnl-hub-card .book-cal,
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi6,
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-chart-sec,
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-chart-wrap,
html[data-theme="dark"] .pnl-hub-card .pnl-rates-chart-sec {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .pnl-rates-kpi-board,
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi-board,
html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi-board {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi-hero,
html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi-hero {
  background: transparent !important;
  border: 1px solid var(--card-line) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpis5,
html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpis5 {
  background: transparent !important;
  border: 1px solid var(--card-line) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi5,
html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi5 {
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid var(--card-line) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi5:hover,
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi5:focus-visible,
html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi5:hover,
html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi5:focus-visible {
  background: var(--solid-bg) !important;
}
html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi5:last-child,
html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi5:last-child {
  border-right: 0 !important;
}
@media (max-width: 720px) {
  html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi5,
  html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi5 {
    border-right: 1px solid var(--card-line) !important;
    border-bottom: 1px solid var(--card-line) !important;
  }
  html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi5:nth-child(3n),
  html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi5:nth-child(3n) {
    border-right: 0 !important;
  }
  html[data-theme="dark"] .fee-tip-modal.pnl-hub-sheet .pnl-rates-kpi5:nth-child(n+4),
  html[data-theme="dark"] .pnl-hub-card .pnl-rates-kpi5:nth-child(n+4) {
    border-bottom: 0 !important;
  }
}
/* 日账弹窗：净盈亏卡片跟走势图同一套马赛克 + 向下渐隐 */

html[data-theme="dark"] .book-day-pop-hero {
  background: #000 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .book-day-pop-hero.up {
  background: linear-gradient(180deg, #10241e 0%, #0a1612 22%, #050a08 55%, #000 100%) !important;
}
html[data-theme="dark"] .book-day-pop-hero.down {
  background: linear-gradient(180deg, #241014 0%, #160a0c 22%, #0a0506 55%, #000 100%) !important;
}
html[data-theme="dark"] .book-day-pop-hero.up::before,
html[data-theme="dark"] .book-day-pop-hero.down::before {
  background-size: 4px 4px !important;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 28%, rgba(0, 0, 0, 0.18) 58%, transparent 88%) !important;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 28%, rgba(0, 0, 0, 0.18) 58%, transparent 88%) !important;
}
html[data-theme="dark"] .book-day-pop-hero.up::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='2' height='2' fill='%232ecf9a' fill-opacity='0.5'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] .book-day-pop-hero.down::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='2' height='2' fill='%23f05a72' fill-opacity='0.5'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] .book-day-pop-unit {
  color: #fff !important;
}
html[data-theme="dark"] .book-cal-week span,
html[data-theme="dark"] .book-cal-cell .num,
html[data-theme="dark"] .book-cal:has(.book-cal-cell.is-selected) .book-cal-cell.is-today:not(.is-selected) .num {
  color: var(--muted) !important;
  background: transparent !important;
}
html[data-theme="dark"] .book-cal-cell.is-today .num,
html[data-theme="dark"] .book-cal-cell.is-selected .num,
html[data-theme="dark"] .book-cal-cell:not(.empty):not(.is-today):hover .num {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
}
html[data-theme="dark"] .book-day-flow-btn {
  background: var(--solid-bg) !important;
  background-color: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  -webkit-text-fill-color: var(--solid-fg) !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .book-day-flow-btn:hover {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
}
html[data-theme="dark"] .book-hero-lab,
html[data-theme="dark"] .book-hero-meta,
html[data-theme="dark"] .book-hero-stats dt {
  color: var(--muted) !important;
}
html[data-theme="dark"] .book-hero-stats dd {
  color: var(--ink) !important;
}
html[data-theme="dark"] .daybook-kpi > div {
  background: var(--panel) !important;
}
html[data-theme="dark"] .daybook-kpi span,
html[data-theme="dark"] .daybook-lead {
  color: var(--muted) !important;
}
/* 流水明细表头 / 导出 */


html[data-theme="dark"] .flow-detail-table th {
  background: var(--panel-2) !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .flow-detail-table td {
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .flow-detail-table .flow-pnl-num.up {
  color: #3dd68c !important;
}
html[data-theme="dark"] .flow-detail-table .flow-pnl-num.down {
  color: #ff6b81 !important;
}
html[data-theme="dark"] .flow-detail-table .flow-pnl-num.flat {
  color: var(--muted) !important;
}
/* 流水标签：夜间高对比，避免浅底浅字看不清 */

html[data-theme="dark"] .flow-tag.tag-ok {
  background: var(--chip-bg) !important;
  color: #7de0c9 !important;
}
html[data-theme="dark"] .flow-tag.tag-warn {
  background: rgba(201, 162, 39, 0.24) !important;
  color: #f0d060 !important;
}
html[data-theme="dark"] .flow-tag.tag-bad {
  background: rgba(229, 84, 109, 0.24) !important;
  color: #f5a8b4 !important;
}
html[data-theme="dark"] .flow-tag.tag-muted {
  background: rgba(180, 190, 205, 0.2) !important;
  color: #e6ebf0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
html[data-theme="dark"] .flow-detail-export-btn,
html[data-theme="dark"] .tl-export-btn,
html[data-theme="dark"] .flow-detail-head-actions .flow-detail-export-btn {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .flow-detail-export-btn:hover,
html[data-theme="dark"] .tl-export-btn:hover,
html[data-theme="dark"] .flow-detail-head-actions .flow-detail-export-btn:hover {
  background: var(--solid-bg) !important;
  color: var(--solid-fg) !important;
}
/* 成员选择（全局单元） */


html[data-theme="dark"] .fleet-member-dd-trigger,
html[data-theme="dark"] .fleet-member-dd-panel,
html[data-theme="dark"] .sleeve-acc-pick {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .fleet-member-dd-trigger {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b98a8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
}
html[data-theme="dark"] .fleet-member-dd-summary,
html[data-theme="dark"] .fleet-member-dd-name,
html[data-theme="dark"] .fleet-member-dd-chk,
html[data-theme="dark"] .sleeve-acc-pick-row,
html[data-theme="dark"] .sleeve-acc-pick-name {
  color: var(--ink) !important;
}
html[data-theme="dark"] .fleet-member-dd-row.is-on,
html[data-theme="dark"] .fleet-member-dd-row.is-lead,
html[data-theme="dark"] .sleeve-acc-pick-row.is-on {
  background: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .member-pill {
  background: var(--chip-bg) !important;
  color: var(--ink) !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .member-pill.on {
  background: var(--chip-bg) !important;
  color: var(--teal) !important;
  border-color: var(--ok-border) !important;
}
/* 配置说明 sheet */


html[data-theme="dark"] .pro-ops-info-backdrop {
  background: var(--modal-scrim, rgba(6, 10, 16, 0.55));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme="dark"] .pro-ops-info-panel {
  background: var(--panel) !important;
  color: var(--ink) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55) !important;
}
html[data-theme="dark"] .pro-ops-info-head,
html[data-theme="dark"] .info-sec {
  border-color: transparent !important;
}
html[data-theme="dark"] .info-sec h4,
html[data-theme="dark"] .info-lead,
html[data-theme="dark"] .pro-ops-info-head b {
  color: var(--ink) !important;
}
html[data-theme="dark"] .pro-ops-info-head-ico,
html[data-theme="dark"] .pro-ops-info-head-ico svg,
html[data-theme="dark"] .info-sec h4 svg {
  color: #fff !important;
}
html[data-theme="dark"] .info-tag {
  background: var(--chip-bg) !important;
  color: var(--teal) !important;
}
html[data-theme="dark"] .pro-ops-info-body p,
html[data-theme="dark"] .info-sec p {
  color: var(--muted) !important;
}
html[data-theme="dark"] .info-foot {
  color: #b8c0c8 !important;
  background: #3a424c !important;
}
/* 参数模式条：夜间白字、无色底板 */


html[data-theme="dark"] .params-mode-banner,
html[data-theme="dark"] .params-mode-banner.is-sleeve,
html[data-theme="dark"] .params-mode-banner.is-train,
html[data-theme="dark"] .params-mode-banner.is-fleet {
  background: transparent !important;
  color: #fff !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-radius: 0 !important;
}
/* 目标设置滑条轨道 */


html[data-theme="dark"] .target-sheet .confirm-actions .confirm-btn-cancel {
  background: var(--chip-bg) !important;
  color: var(--ink) !important;
}
/* —— 夜间色板：轨道/分层再柔化 —— */


html[data-theme="dark"] .flow-view-toggle {
  background: var(--chip-bg, #121212) !important;
}
html[data-theme="dark"] .flow-view-btn {
  color: var(--muted) !important;
}
html[data-theme="dark"] .flow-view-btn.on {
  background: var(--solid-bg, #1c1c1c) !important;
  color: var(--solid-fg, #fff) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] #hold-detail-sheet .flow-view-toggle {
  background: #1a1a1a !important;
}
html[data-theme="dark"] #hold-detail-sheet .flow-view-btn {
  color: rgba(255, 255, 255, 0.55) !important;
}
html[data-theme="dark"] #hold-detail-sheet .flow-view-btn.on {
  background: #2a2a2a !important;
  color: #fff !important;
}
html[data-theme="dark"] .flow-kpi-strip {
  color: var(--muted) !important;
}
html[data-theme="dark"] .target-bar,
html[data-theme="dark"] .lh-stepper-bar,
html[data-theme="dark"] .app .target-bar,
html[data-theme="dark"] .app .lh-stepper-bar {
  background: color-mix(in srgb, #8c8c8c 26%, #000) !important;
}
html[data-theme="dark"] .fold-tug-bar,
html[data-theme="dark"] .app .fold-tug-bar {
  background: #2a313c !important;
}
html[data-theme="dark"] .lh-stepper-dot {
  background: #000 !important;
  border-color: color-mix(in srgb, #8c8c8c 40%, #000) !important;
  box-shadow: 0 0 0 2px #000 !important;
}
html[data-theme="dark"] .lh-stepper-step.is-active .lh-stepper-dot,
html[data-theme="dark"] .lh-stepper-step.is-done .lh-stepper-dot {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
}
html[data-theme="dark"] .earn.down,
html[data-theme="dark"] .app .earn.down {
  color: var(--down);
}
html[data-theme="dark"] .earn.up,
html[data-theme="dark"] .app .earn.up {
  color: var(--up);
}
html[data-theme="dark"] .holding-main,
html[data-theme="dark"] .holding > .holding-detail-tail[open],
html[data-theme="dark"] .pro-ops-box {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
}
html[data-theme="dark"] .home-stack > .holdings .holding-main {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}
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 {
  box-shadow: none;
}
html[data-theme="dark"] .holding > .holding-detail-tail:not([open]) > summary {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border-color: var(--line);
}
html[data-theme="dark"] .shell {
  background: var(--bg);
}
html[data-theme="dark"] .app {
  background: var(--bg) !important;
}
/* —— 夜间：分割线统一跟 --line —— */


html[data-theme="dark"] .mini-row,
html[data-theme="dark"] .fold-row,
html[data-theme="dark"] .fold-sec,
html[data-theme="dark"] .flow-sum,
html[data-theme="dark"] .flow-inline-bar,
html[data-theme="dark"] .acc-item,
html[data-theme="dark"] .acc-more-foot,
html[data-theme="dark"] .pro-row,
html[data-theme="dark"] .sleeve-unit-card,
html[data-theme="dark"] .cfg-block,
html[data-theme="dark"] .me-skin-block,
html[data-theme="dark"] .me-sheet-row,
html[data-theme="dark"] .holding + .holding,
html[data-theme="dark"] .product + .product {
  border-color: var(--line) !important;
}
/* —— 夜间：所有弹窗关闭 X 纯白 —— */


html[data-theme="dark"] .book-day-x,
html[data-theme="dark"] .fee-x,
html[data-theme="dark"] .me-sheet-x,
html[data-theme="dark"] .pro-ops-info-close,
html[data-theme="dark"] .auth-close,
html[data-theme="dark"] .pnl-hub-head-right .book-day-x,
html[data-theme="dark"] .flow-detail-head .book-day-x,
html[data-theme="dark"] .cycle-bills-head .book-day-x,
html[data-theme="dark"] .fee-tip-modal .book-day-x,
html[data-theme="dark"] .fee-tip-modal .fee-x,
html[data-theme="dark"] .fee-float-tools .fee-x,
html[data-theme="dark"] .pos-float-tools .fee-x,
html[data-theme="dark"] .ai-float .fee-x {
  color: #fff !important;
  opacity: 0.92;
  background: transparent !important;
}
html[data-theme="dark"] .book-day-x:hover,
html[data-theme="dark"] .fee-x:hover,
html[data-theme="dark"] .me-sheet-x:hover,
html[data-theme="dark"] .pro-ops-info-close:hover,
html[data-theme="dark"] .auth-close:hover,
html[data-theme="dark"] .pnl-hub-head-right .book-day-x:hover,
html[data-theme="dark"] .flow-detail-head .book-day-x:hover,
html[data-theme="dark"] .cycle-bills-head .book-day-x:hover,
html[data-theme="dark"] .fee-tip-modal .book-day-x:hover,
html[data-theme="dark"] .fee-tip-modal .fee-x:hover,
html[data-theme="dark"] .fee-float-tools .fee-x:hover,
html[data-theme="dark"] .pos-float-tools .fee-x:hover,
html[data-theme="dark"] .ai-float .fee-x:hover {
  color: #fff !important;
  opacity: 1;
}
/* —— 夜间：图标/添加入口改灰白 —— */


html[data-theme="dark"] .fleet-group-ico,
html[data-theme="dark"] .fleet-group-ico svg,
html[data-theme="dark"] .pro-ops-mode-head .fleet-group-ico,
html[data-theme="dark"] .pro-ops-mode-head .fleet-group-ico svg,
html[data-theme="dark"] .app .fleet-group-ico,
html[data-theme="dark"] .app .fleet-group-ico svg,
html[data-theme="dark"] .fpool-panel .fleet-group-ico,
html[data-theme="dark"] .fpool-panel .fleet-group-ico svg {
  color: #fff !important;
  opacity: 1;
}
html[data-theme="dark"] .cfg-kv-main .acc-ico,
html[data-theme="dark"] .app .cfg-kv-main .acc-ico,
html[data-theme="dark"] .cfg-kv-main .acc-ico svg {
  color: #fff !important;
}
html[data-theme="dark"] .me-gear,
html[data-theme="dark"] .acc-panel-head .me-gear,
html[data-theme="dark"] .app .me-gear {
  color: #e6ebf0 !important;
}
html[data-theme="dark"] .me-gear:hover,
html[data-theme="dark"] .acc-panel-head .me-gear:hover,
html[data-theme="dark"] .app .me-gear:hover {
  color: #fff !important;
  background: transparent !important;
}
html[data-theme="dark"] .acc-ico,
html[data-theme="dark"] .acc-item .acc-ico,
html[data-theme="dark"] .acc-item:not(.off) .acc-ico,
html[data-theme="dark"] .app .acc-item:not(.off) .acc-ico {
  color: #e6ebf0 !important;
}
html[data-theme="dark"] .acc-add-row,
html[data-theme="dark"] .app .acc-add-row,
html[data-theme="dark"] .acc-add-row-plus {
  color: #e6ebf0 !important;
}
html[data-theme="dark"] .hold-tool-btn:not(.run-stats-btn.warn):not(.hold-run-ico-btn.stop):not(.hold-run-ico-btn.paused-active),
html[data-theme="dark"] .app .hold-tool-btn:not(.run-stats-btn.warn):not(.hold-run-ico-btn.paused-active),
html[data-theme="dark"] .holding-head-actions .hold-tool-btn:not(.run-stats-btn.warn):not(.hold-run-ico-btn.paused-active),
html[data-theme="dark"] .holding-head-actions .ai-ico-btn,
html[data-theme="dark"] .holding-head-actions .pos-btn,
html[data-theme="dark"] .holding-head-actions .info-btn,
html[data-theme="dark"] .ai-ico-btn,
html[data-theme="dark"] .pos-btn,
html[data-theme="dark"] .info-btn,
html[data-theme="dark"] .run-stats-btn:not(.warn) {
  color: #e6ebf0 !important;
}
html[data-theme="dark"] .hold-run-ico-btn.paused-active,
html[data-theme="dark"] .holding-head-actions .hold-run-ico-btn.paused-active,
html[data-theme="dark"] .app .hold-run-ico-btn.paused-active {
  color: var(--down, #d4535c) !important;
}
html[data-theme="dark"] .hold-tool-btn:hover:not(.run-stats-btn.warn),
html[data-theme="dark"] .hold-tool-btn.on:not(.run-stats-btn.warn),
html[data-theme="dark"] .holding-head-actions .ai-ico-btn:hover,
html[data-theme="dark"] .holding-head-actions .ai-ico-btn.on,
html[data-theme="dark"] .ai-ico-btn:hover,
html[data-theme="dark"] .ai-ico-btn.on,
html[data-theme="dark"] .pos-btn:hover,
html[data-theme="dark"] .pos-btn.on,
html[data-theme="dark"] .info-btn:hover,
html[data-theme="dark"] .info-btn.on,
html[data-theme="dark"] .run-stats-btn.on:not(.warn) {
  color: #fff !important;
  background: transparent !important;
}
/* —— 账户 K 线浮窗（执行盯盘） —— */



.kline-float-layer {
  z-index: 60;
  pointer-events: none;
}
.kline-float-layer.on {
  pointer-events: none;
}
.kline-float-layer .kline-float {
  pointer-events: auto;
}
.pos-float.kline-float {
  width: min(960px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 72px));
  min-width: 560px;
  min-height: 400px;
  max-width: min(1200px, calc(100vw - 16px));
  max-height: calc(100vh - 24px);
  overscroll-behavior-x: none;
}
.kline-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.kline-head-logo {
  margin: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}
.kline-title-logo {
  width: 32px;
  height: 32px;
  color: var(--teal);
}
.kline-title-logo .logo-mc {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.kline-acct-wrap {
  flex-shrink: 1;
  min-width: 0;
  max-width: 140px;
  margin: 0;
  cursor: pointer;
}
.kline-sym-wrap {
  max-width: 118px;
}
.kline-venue-wrap {
  max-width: 96px;
}
/* 账户卡打开的 K 线：隐藏账户/品种选择，交易所只显示该卡所属所 */

#kline-sheet.kline-entry-account .kline-acct-wrap:not(.kline-venue-wrap),
#kline-sheet[data-kline-entry="account"] .kline-acct-wrap:not(.kline-venue-wrap),
.pos-float.kline-float.kline-entry-account .kline-acct-wrap:not(.kline-venue-wrap),
body.kline-entry-account #kline-sheet .kline-acct-wrap:not(.kline-venue-wrap),
body[data-kline-entry="account"] #kline-sheet .kline-acct-wrap:not(.kline-venue-wrap),
#kline-sheet.kline-entry-account .kline-sym-wrap,
#kline-sheet[data-kline-entry="account"] .kline-sym-wrap,
body.kline-entry-account #kline-sheet .kline-sym-wrap,
body[data-kline-entry="account"] #kline-sheet .kline-sym-wrap {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  max-width: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
#kline-sheet.kline-entry-account .kline-venue-wrap .kline-acct-sel:disabled,
.pos-float.kline-float.kline-entry-account .kline-venue-wrap .kline-acct-sel:disabled,
body[data-kline-entry="account"] #kline-venue-sel:disabled {
  opacity: 1;
  cursor: default;
  background-image: none;
  padding-right: 8px;
  color: var(--text);
}
.kline-acct-sel {
  display: block;
  width: 100%;
  max-width: 140px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2, var(--panel));
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  padding: 3px 22px 3px 8px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.kline-sym-wrap .kline-acct-sel {
  max-width: 118px;
}
.pos-float.kline-float.is-fs {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  z-index: 12040;
}
.kline-float-layer.is-fs {
  z-index: 12040 !important;
}
.pos-float.kline-float.is-fs .pos-resize {
  display: none;
}
/* 全屏：藏 ± 与关闭 X；保留外扩/还原图标，点它回到弹窗 */

.pos-float.kline-float.is-fs #kline-scale-down,
.pos-float.kline-float.is-fs #kline-scale-up,
.pos-float.kline-float.is-fs #kline-sheet-close {
  display: none !important;
}
.pos-float.kline-float .pos-float-tools {
  flex-shrink: 0;
}
.pos-float.kline-float.is-fs #kline-fullscreen {
  display: inline-flex !important;
  order: 20;
}
.kline-fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kline-fs-btn .kline-fs-ico {
  display: block;
  flex-shrink: 0;
}
.kline-acct-sel:disabled {
  opacity: 0.85;
  cursor: default;
}
.kline-acct-sel:focus-visible {
  outline: 2px solid var(--teal, var(--up));
  outline-offset: 1px;
}
.kline-head-sub {
  display: none !important;
}
/* 手机：K 线独立全屏页（工具栏显隐见下方，须在 base 规则之后） */

@media (max-width: 720px) {
  body.kline-page-open {
    overflow: hidden;
  }
  body.kline-page-open .dock {
    visibility: hidden;
    pointer-events: none;
  }
  .kline-float-layer.on.is-page,
  .kline-float-layer.is-page {
    pointer-events: auto;
    background: var(--bg, #0b1220);
    z-index: 12050 !important;
  }
  .kline-float-layer.on.is-page .kline-float,
  .pos-float.kline-float.is-page {
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !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;
    border-radius: 0 !important;
    box-shadow: none !important;
    touch-action: manipulation;
  }
  .pos-float.kline-float.is-page .pos-resize,
  .pos-float.kline-float.is-page #kline-fullscreen,
  .pos-float.kline-float.is-page #kline-scale-down,
  .pos-float.kline-float.is-page #kline-scale-up,
  .kline-float-layer.is-page .pos-resize,
  .kline-float-layer.is-page #kline-fullscreen,
  .kline-float-layer.is-page #kline-scale-down,
  .kline-float-layer.is-page #kline-scale-up {
    display: none !important;
  }
  .pos-float.kline-float.is-page #kline-sheet-close,
  .kline-float-layer.is-page #kline-sheet-close {
    display: inline-flex !important;
  }
  /* 手机全屏：图区与 ECharts 根节点贴屏幕左缘 */
  .pos-float.kline-float.is-page .kline-chart-wrap,
  .kline-float-layer.is-page .kline-chart-wrap {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
  }
  .pos-float.kline-float.is-page .kline-chart,
  .kline-float-layer.is-page #kline-chart,
  .pos-float.kline-float.is-page #kline-chart {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    left: 0 !important;
    border-radius: 0 !important;
  }
  .pos-float.kline-float.is-page #kline-chart > div,
  .pos-float.kline-float.is-page .kline-chart > div {
    margin: 0 !important;
    left: 0 !important;
  }
  .pos-float.kline-float.is-page .kline-legend {
    left: 2px;
  }
  .pos-float.kline-float.is-page .kline-sub-legend {
    left: 2px !important;
  }
}
.kline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 10px 0;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.kline-period-sel-wrap {
  display: none;
  margin: 0;
  flex-shrink: 0;
}
.kline-period-sel {
  display: block;
  box-sizing: border-box;
  min-width: 72px;
  max-width: 96px;
  height: auto;
  min-height: 0;
  padding: 3px 22px 3px 8px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2, var(--panel));
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.kline-period-sel:focus-visible {
  outline: 2px solid rgba(0,0,0,0.2);
  outline-offset: 1px;
}
.kline-tools-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  justify-content: center;
}
.kline-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.kline-tools-more {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.kline-tools-more:hover,
.kline-tools-wrap.is-open .kline-tools-more {
  color: var(--ink);
  background: var(--panel-2, #eef2f5);
}
.kline-tools-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  min-width: 132px;
  padding: 6px;
  gap: 2px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel, #fff);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}
.kline-tools-menu[hidden] {
  display: none !important;
}
.kline-tools-menu-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  line-height: 1.2;
}
.kline-tools-menu-item:hover,
.kline-tools-menu-item.on {
  background: var(--panel-2, #eef2f5);
}
.kline-tool-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.kline-tool-btn:hover,
.kline-tool-btn.on {
  color: var(--ink);
  background: var(--panel-2, #eef2f5);
}
/* 手机工具栏：周期进顶栏贴品种；第二排展开工具靠左 + 标记价靠右 */

@media (max-width: 720px) {
  .pos-float.kline-float .pos-float-head {
    gap: 5px;
    padding: 6px 8px 4px;
  }
  .pos-float.kline-float .kline-head-main {
    gap: 5px;
    flex-wrap: nowrap;
  }
  .pos-float.kline-float .kline-title-logo,
  .pos-float.kline-float .kline-title-logo .logo-mc {
    width: 40px;
    height: 40px;
  }
  .pos-float.kline-float .kline-acct-wrap {
    max-width: 104px;
  }
  .pos-float.kline-float .kline-sym-wrap {
    max-width: 96px;
  }
  .pos-float.kline-float .kline-acct-sel {
    max-width: 104px;
    /* 恢复原先选择框体量；字略小于桌面即可 */
    font-size: 10px !important;
    line-height: 1.3;
    min-height: 28px;
    height: 28px;
    padding: 4px 20px 4px 7px;
    background-position: calc(100% - 11px) 55%, calc(100% - 6px) 55%;
  }
  .pos-float.kline-float .kline-sym-wrap .kline-acct-sel {
    max-width: 96px;
    font-size: 10px !important;
  }
  .kline-head-main .kline-period-sel-wrap {
    display: block !important;
    flex-shrink: 0;
  }
  .kline-head-main .kline-period-sel {
    min-height: 28px;
    height: 28px;
    min-width: 58px;
    max-width: 70px;
    padding: 4px 20px 4px 7px;
    font-size: 10px !important;
    line-height: 1.3;
    background-position: calc(100% - 11px) 55%, calc(100% - 6px) 55%;
  }
  .kline-toolbar {
    flex-wrap: nowrap;
    gap: 3px;
    padding: 1px 6px 5px;
    align-items: center;
    justify-content: flex-start;
  }
  .kline-periods {
    display: none !important;
  }
  .kline-tools-wrap {
    flex: 0 1 auto;
    min-width: 0;
    justify-content: flex-start;
  }
  .kline-tools {
    display: flex !important;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
    min-width: 0;
  }
  .kline-tools-more,
  .kline-tools-menu {
    display: none !important;
  }
  .kline-tool-btn {
    padding: 3px 4px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
  }
  .kline-meta {
    margin-left: auto;
    min-width: 0;
    gap: 4px;
    font-size: 12px;
    justify-content: flex-end;
  }
  .kline-ohlc-vol {
    margin-left: 0;
  }
}
.kline-ma-leg {
  display: none !important;
}
.kline-chart-wrap {
  flex: 1;
  min-height: 0;
  padding: 0;
  display: flex;
  position: relative;
  touch-action: none;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  overflow: hidden;
}
.kline-pop {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 80;
  max-width: min(320px, calc(100% - 24px));
  max-height: min(420px, calc(100% - 24px));
  /* 下拉卡片本身圆角；overflow:auto 会按直角裁阴影，四个角会缺一块 */
  overflow: visible;
  pointer-events: auto;
}
.kline-pop-px > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.kline-pop-px > button em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  opacity: 0.72;
  font-weight: 600;
}
.kline-pop-px > button.on em {
  opacity: 1;
}
/* OKX 风「前往日期」：居中遮罩，盖住十字光标 */

.kline-pop.is-goto {
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: none;
  max-height: none;
  overflow: auto;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.kline-pop.is-set {
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: none;
  max-height: none;
  overflow: auto;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.kline-pop.is-ind {
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: none;
  max-height: none;
  overflow: auto;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.kline-ind-modal {
  width: min(680px, 100%);
  max-height: min(620px, calc(100vh - 48px));
  background: #1a1d24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  color: #e8eef2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html:not([data-theme="dark"]) .kline-ind-modal {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.kline-ind-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}
.kline-ind-head b {
  font-size: 15px;
  font-weight: 750;
}
.kline-ind-tabs {
  display: flex;
  gap: 18px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
html:not([data-theme="dark"]) .kline-ind-tabs {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
.kline-ind-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(232, 238, 242, 0.45);
  font-size: 13px;
  font-weight: 650;
  padding: 10px 0 12px;
  cursor: pointer;
  position: relative;
}
html:not([data-theme="dark"]) .kline-ind-tab {
  color: rgba(15, 23, 42, 0.4);
}
.kline-ind-tab.on {
  color: #fff;
}
html:not([data-theme="dark"]) .kline-ind-tab.on {
  color: #0f172a;
}
.kline-ind-tab.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #fff;
  border-radius: 2px 2px 0 0;
}
html:not([data-theme="dark"]) .kline-ind-tab.on::after {
  background: #0f172a;
}
.kline-ind-body {
  display: grid;
  grid-template-columns: 168px 1fr;
  min-height: 300px;
  flex: 1;
  overflow: hidden;
}
.kline-ind-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  overflow: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}
html:not([data-theme="dark"]) .kline-ind-side {
  border-right-color: rgba(15, 23, 42, 0.08);
  background: #f4f6f8;
}
.kline-ind-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: 22px 1fr 14px;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 9px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.kline-ind-item.on {
  background: rgba(255, 255, 255, 0.08);
}
html:not([data-theme="dark"]) .kline-ind-item.on {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.kline-ind-item-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.kline-ind-item-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
}
.kline-ind-item-go {
  opacity: 0.45;
}
.kline-ind-pane {
  padding: 14px 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kline-ind-pane-title {
  font-size: 14px;
  font-weight: 750;
}
.kline-ind-ma-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kline-ind-ma-row,
.kline-ind-style-row,
.kline-ind-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}
.kline-ind-ma-name {
  width: 40px;
  font-size: 12px;
  font-weight: 650;
}
.kline-ind-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.kline-ind-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
}
.kline-ind-num {
  width: 72px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 650;
}
html:not([data-theme="dark"]) .kline-ind-num {
  border-color: rgba(15, 23, 42, 0.14);
  background: #f4f6f8;
}
.kline-ind-width {
  appearance: none;
  height: 30px;
  min-width: 56px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 0 8px;
  font-size: 12px;
}
html:not([data-theme="dark"]) .kline-ind-width {
  border-color: rgba(15, 23, 42, 0.14);
  background: #f4f6f8;
}
.kline-ind-field > span {
  min-width: 48px;
  font-size: 13px;
  font-weight: 650;
}
.kline-ind-desc {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.75;
}
html:not([data-theme="dark"]) .kline-ind-desc {
  border-top-color: rgba(15, 23, 42, 0.08);
}
.kline-ind-desc b {
  display: block;
  margin-bottom: 6px;
  opacity: 1;
}
.kline-ind-desc p {
  margin: 0;
}
.kline-ind-hint {
  margin: 0;
  font-size: 11px;
  opacity: 0.45;
}
.kline-ind-okx-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  flex-wrap: wrap;
}
.kline-ind-okx-lab {
  width: 44px;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 650;
  color: rgba(232, 238, 242, 0.88);
}
.kline-ind-okx-lab.wide {
  width: auto;
  min-width: 88px;
}
html:not([data-theme="dark"]) .kline-ind-okx-lab {
  color: rgba(15, 23, 42, 0.78);
}
.kline-ind-style {
  appearance: none;
  height: 30px;
  min-width: 64px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 0 8px;
  font-size: 12px;
}
html:not([data-theme="dark"]) .kline-ind-style {
  border-color: rgba(15, 23, 42, 0.14);
  background: #f4f6f8;
}
.kline-ind-rsi-bg-row .kline-ind-okx-lab.wide {
  min-width: 72px;
}
.kline-ind-rsi-bg-row .kline-set-swatch {
  width: 22px;
  height: 22px;
}
.kline-ind-rsi-bg-row .kline-ind-range {
  flex: 1 1 90px;
  max-width: 160px;
}
.kline-ind-range {
  flex: 1 1 120px;
  min-width: 100px;
  max-width: 200px;
  height: 4px;
  accent-color: var(--ink);
  cursor: pointer;
}
.kline-ind-range-val {
  min-width: 40px;
  font-size: 12px;
  font-weight: 650;
  opacity: 0.7;
  text-align: right;
}
.kline-ind-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
html:not([data-theme="dark"]) .kline-ind-foot {
  border-top-color: rgba(15, 23, 42, 0.08);
}
/* 手机：指标弹窗收窄侧栏、压紧控件，避免右侧裁切 */

@media (max-width: 720px) {
  .kline-pop.is-ind {
    padding: 10px 8px;
    align-items: stretch;
  }
  .kline-ind-modal {
    width: 100%;
    max-width: 100%;
    max-height: min(88dvh, calc(100vh - 20px));
    border-radius: 12px;
    min-width: 0;
    box-sizing: border-box;
  }
  .kline-ind-head {
    padding: 12px 12px 6px;
  }
  .kline-ind-tabs {
    gap: 14px;
    padding: 0 12px;
  }
  .kline-ind-body {
    grid-template-columns: minmax(88px, 30%) minmax(0, 1fr);
    min-height: 0;
    min-width: 0;
  }
  .kline-ind-side {
    padding: 8px 4px;
    min-width: 0;
  }
  .kline-ind-item {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 4px;
    padding: 8px 6px;
    font-size: 12px;
  }
  .kline-ind-item-go {
    display: none;
  }
  .kline-ind-item-lab {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .kline-ind-pane {
    padding: 10px 8px 12px;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .kline-ind-pane-title {
    font-size: 13px;
  }
  .kline-ind-ma-row,
  .kline-ind-style-row,
  .kline-ind-field,
  .kline-ind-okx-row {
    gap: 6px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .kline-ind-ma-row {
    display: grid;
    grid-template-columns: 18px 28px minmax(0, 1fr) 44px 22px;
    align-items: center;
    gap: 6px;
  }
  .kline-ind-ma-name {
    width: auto;
    font-size: 11px;
  }
  .kline-ind-num {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 28px;
    padding: 0 6px;
    font-size: 12px;
    box-sizing: border-box;
  }
  .kline-ind-width {
    min-width: 0;
    width: 44px;
    height: 28px;
    padding: 0 4px;
    font-size: 11px;
  }
  .kline-ind-style {
    min-width: 0;
    width: auto;
    max-width: 72px;
    height: 28px;
    padding: 0 4px;
    font-size: 11px;
  }
  .kline-ind-okx-lab {
    width: 36px;
    font-size: 12px;
  }
  .kline-ind-okx-lab.wide {
    min-width: 0;
    flex: 0 1 auto;
  }
  .kline-ind-field > span {
    min-width: 36px;
    font-size: 12px;
  }
  .kline-set-swatch {
    width: 20px;
    height: 20px;
  }
  .kline-ind-foot {
    padding: 10px 12px 12px;
    gap: 8px;
  }
}
.kline-set-modal {
  width: min(520px, 100%);
  background: #1a1d24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  color: #e8eef2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(560px, calc(100vh - 48px));
}
html:not([data-theme="dark"]) .kline-set-modal {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.kline-set-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
html:not([data-theme="dark"]) .kline-set-head {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
.kline-set-head b {
  font-size: 15px;
  font-weight: 750;
}
.kline-set-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.7;
}
.kline-set-x:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}
.kline-set-body {
  display: grid;
  grid-template-columns: 88px 1fr;
  min-height: 280px;
  flex: 1;
  overflow: hidden;
}
.kline-set-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}
html:not([data-theme="dark"]) .kline-set-side {
  border-right-color: rgba(15, 23, 42, 0.08);
  background: #f4f6f8;
}
.kline-set-nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(232, 238, 242, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
html:not([data-theme="dark"]) .kline-set-nav {
  color: rgba(15, 23, 42, 0.45);
}
.kline-set-nav.on {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
html:not([data-theme="dark"]) .kline-set-nav.on {
  color: #0f172a;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.kline-set-main {
  padding: 14px 18px 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kline-set-sec-title {
  font-size: 13px;
  font-weight: 750;
  margin-top: 4px;
  color: inherit;
}
.kline-set-sub {
  font-size: 12px;
  font-weight: 650;
  opacity: 0.55;
}
.kline-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.kline-set-row.is-field {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.kline-set-lab {
  min-width: 52px;
  font-size: 13px;
  font-weight: 650;
}
.kline-set-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
}
.kline-set-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
}
.kline-set-swatches {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.kline-set-swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-block;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
html:not([data-theme="dark"]) .kline-set-swatch {
  border-color: rgba(15, 23, 42, 0.18);
}
.kline-set-swatch input[type="color"] {
  appearance: none;
  border: 0;
  padding: 0;
  width: 32px;
  height: 32px;
  position: absolute;
  left: -7px;
  top: -7px;
  cursor: pointer;
  background: transparent;
}
.kline-set-split-swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #12b76a 50%, #e85d6c 50%);
  flex-shrink: 0;
}
.kline-set-select {
  appearance: none;
  min-width: 88px;
  height: 30px;
  padding: 0 26px 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e8eef2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  color: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
html:not([data-theme="dark"]) .kline-set-select {
  border-color: rgba(15, 23, 42, 0.14);
  background-color: #f4f6f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color: #0f172a;
}
.kline-set-hint {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.45;
}
.kline-set-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
html:not([data-theme="dark"]) .kline-set-foot {
  border-top-color: rgba(15, 23, 42, 0.08);
}
.kline-set-foot-r {
  display: flex;
  gap: 10px;
}
.kline-set-reset {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  opacity: 0.75;
  padding: 6px 4px;
}
.kline-set-reset:hover {
  opacity: 1;
}
.kline-set-cancel,
.kline-set-ok {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-width: 72px;
}
.kline-set-cancel {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
html:not([data-theme="dark"]) .kline-set-cancel {
  border-color: rgba(15, 23, 42, 0.18);
}
.kline-set-ok {
  background: #fff;
  color: #111;
}
html:not([data-theme="dark"]) .kline-set-ok {
  background: #0f172a;
  color: #fff;
}
.kline-goto-modal {
  width: min(380px, 100%);
  background: #1a1d24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  color: #e8eef2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html:not([data-theme="dark"]) .kline-goto-modal {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.kline-goto-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
html:not([data-theme="dark"]) .kline-goto-head {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
.kline-goto-tabs {
  display: flex;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.kline-goto-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(232, 238, 242, 0.55);
  font-size: 13px;
  font-weight: 650;
  padding: 8px 10px 10px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
html:not([data-theme="dark"]) .kline-goto-tab {
  color: rgba(15, 23, 42, 0.45);
}
.kline-goto-tab.on {
  color: #fff;
}
html:not([data-theme="dark"]) .kline-goto-tab.on {
  color: #0f172a;
}
.kline-goto-tab.on::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}
html:not([data-theme="dark"]) .kline-goto-tab.on::after {
  background: #0f172a;
}
.kline-goto-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(232, 238, 242, 0.7);
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}
.kline-goto-x:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
html:not([data-theme="dark"]) .kline-goto-x {
  color: rgba(15, 23, 42, 0.55);
}
html:not([data-theme="dark"]) .kline-goto-x:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
}
.kline-goto-pane {
  padding: 14px 14px 4px;
}
.kline-goto-pane-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(232, 238, 242, 0.5);
}
html:not([data-theme="dark"]) .kline-goto-pane-hint {
  color: rgba(15, 23, 42, 0.45);
}
.kline-goto-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.kline-goto-field {
  position: relative;
  display: block;
  margin: 0;
}
.kline-goto-field input {
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e8eef2;
  border-radius: 8px;
  padding: 9px 34px 9px 10px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
html:not([data-theme="dark"]) .kline-goto-field input {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f4f6f8;
  color: #0f172a;
}
.kline-goto-field-ico {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(232, 238, 242, 0.45);
  pointer-events: none;
  display: flex;
}
html:not([data-theme="dark"]) .kline-goto-field-ico {
  color: rgba(15, 23, 42, 0.4);
}
.kline-goto-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.kline-goto-cal-title {
  font-size: 14px;
  font-weight: 700;
}
.kline-goto-cal-nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.kline-goto-cal-nav:hover {
  background: rgba(255, 255, 255, 0.06);
}
html:not([data-theme="dark"]) .kline-goto-cal-nav:hover {
  background: rgba(15, 23, 42, 0.06);
}
.kline-goto-cal-week,
.kline-goto-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.kline-goto-cal-week {
  margin-bottom: 4px;
}
.kline-goto-cal-week span {
  text-align: center;
  font-size: 11px;
  font-weight: 650;
  color: rgba(232, 238, 242, 0.42);
  padding: 4px 0;
}
html:not([data-theme="dark"]) .kline-goto-cal-week span {
  color: rgba(15, 23, 42, 0.4);
}
.kline-cal-day {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  height: 34px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.kline-cal-day:hover:not(:disabled):not(.is-on) {
  background: rgba(255, 255, 255, 0.06);
}
html:not([data-theme="dark"]) .kline-cal-day:hover:not(:disabled):not(.is-on) {
  background: rgba(15, 23, 42, 0.06);
}
.kline-cal-day.is-mute {
  opacity: 0.28;
  cursor: default;
}
.kline-cal-day.is-on {
  background: #fff !important;
  color: #111 !important;
  font-weight: 800;
}
html:not([data-theme="dark"]) .kline-cal-day.is-on {
  background: #0f172a !important;
  color: #fff !important;
}
.kline-cal-day.is-mid {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0;
}
html:not([data-theme="dark"]) .kline-cal-day.is-mid {
  background: rgba(15, 23, 42, 0.08);
}
.kline-goto-range-fields {
  margin-bottom: 8px;
}
.kline-goto-anchor-list {
  display: flex;
  flex-direction: column;
  padding: 4px 16px 8px;
}
.kline-goto-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.kline-goto-switch-row:last-child {
  border-bottom: 0;
}
html:not([data-theme="dark"]) .kline-goto-switch-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
.kline-goto-switch-row.is-select {
  cursor: default;
}
.kline-goto-switch-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.kline-goto-switch-text b {
  font-size: 14px;
  font-weight: 650;
  color: inherit;
}
.kline-goto-switch-text em {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(232, 238, 242, 0.42);
}
html:not([data-theme="dark"]) .kline-goto-switch-text em {
  color: rgba(15, 23, 42, 0.45);
}
.kline-goto-switch {
  appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #3a3f46;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s ease;
  margin: 0;
}
.kline-goto-switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.kline-goto-switch:checked {
  background: var(--up);
}
.kline-goto-switch:checked::after {
  transform: translateX(18px);
}
html:not([data-theme="dark"]) .kline-goto-switch {
  background: color-mix(in srgb, #8c8c8c 26%, #fff);
}
html:not([data-theme="dark"]) .kline-goto-switch:checked {
  background: var(--up);
}
.kline-goto-select {
  appearance: none;
  min-width: 72px;
  height: 32px;
  padding: 0 28px 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e8eef2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
html:not([data-theme="dark"]) .kline-goto-select {
  border-color: rgba(15, 23, 42, 0.14);
  background-color: #f4f6f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color: #0f172a;
}
.kline-goto-range-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kline-goto-range-row > button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.kline-goto-range-row > button:hover {
  background: rgba(255, 255, 255, 0.08);
}
html:not([data-theme="dark"]) .kline-goto-range-row > button {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f4f6f8;
}
.kline-goto-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px 14px;
}
.kline-goto-btn-cancel,
.kline-goto-btn-go {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-width: 72px;
}
.kline-goto-btn-cancel {
  background: transparent;
  color: #e8eef2;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.kline-goto-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
}
html:not([data-theme="dark"]) .kline-goto-btn-cancel {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.18);
}
.kline-goto-btn-go {
  background: #fff;
  color: #111;
}
.kline-goto-btn-go:hover {
  filter: brightness(0.96);
}
html:not([data-theme="dark"]) .kline-goto-btn-go {
  background: #0f172a;
  color: #fff;
}
.kline-goto-anchor-pos {
  margin-top: 8px;
}
.kline-pop-card {
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.kline-pop-title {
  font-size: 12px;
  font-weight: 750;
  color: var(--ink);
  margin-top: 4px;
}
.kline-pop-card > button,
.kline-pop-row > button {
  appearance: none;
  border: 0;
  text-align: left;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.kline-pop-card > button:hover,
.kline-pop-row > button:hover,
.kline-pop-card > button.on,
.kline-pop-row > button.on {
  color: var(--ink);
  background: var(--panel-2, #eef2f5);
}
.kline-pop-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.kline-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  padding: 4px 2px;
  cursor: pointer;
}
.kline-pop-ok {
  margin-top: 6px !important;
  background: var(--ink) !important;
  color: var(--panel, #fff) !important;
  text-align: center !important;
}
.kline-pop-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}
.kline-pop-goto input[type="datetime-local"] {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2, #f5f7f9);
  color: var(--ink);
  font-size: 12px;
}
.kline-pop-hint {
  font-size: 11px;
  color: var(--muted);
  margin-right: 4px;
}
html[data-theme="dark"] .kline-tool-btn.on,
html[data-theme="dark"] .kline-tool-btn:hover,
html[data-theme="dark"] .kline-pop-card > button.on,
html[data-theme="dark"] .kline-pop-row > button.on {
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef2;
}
html[data-theme="dark"] .kline-pop-card {
  background: #151a22;
  border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .kline-pop-ok {
  background: #e8eef2 !important;
  color: #0f172a !important;
}
.kline-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.kline-periods button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.kline-periods button:hover {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.05);
}
.kline-periods button.on {
  color: var(--ink);
  background: var(--panel-2, #eef2f5);
}
.kline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.kline-meta b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.kline-meta b.is-up {
  color: var(--up);
}
.kline-meta b.is-down {
  color: var(--down);
}
.kline-ma-leg {
  display: none !important;
}
.kline-legend {
  position: absolute;
  left: 6px;
  top: 2px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: min(920px, calc(100% - 72px));
  background: transparent;
  pointer-events: none;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  color: rgba(232, 238, 242, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
/* display:flex 会盖住 UA 的 [hidden]，副图放大时必须强制隐藏主图例 */

.kline-legend[hidden],
.kline-chart-wrap.is-sub-expanded .kline-legend {
  display: none !important;
}
/* 副图放大：价格轴标记价签不该出现在成交量/指标轴上 */

.kline-chart-wrap.is-sub-expanded .kline-px-badge {
  display: none !important;
}
html:not([data-theme="dark"]) .kline-legend {
  color: rgba(15, 23, 42, 0.88);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.65);
}
.kline-leg-row {
  display: flex;
  /* 与框线弹窗一致：按文字基线对齐，避免 center 导致 ▾ 偏下、字样偏上 */
  align-items: baseline;
  gap: 4px;
  min-height: 0;
  font-size: 11px;
  line-height: 1.35;
}
.kline-leg-row[hidden] {
  display: none !important;
}
.kline-leg-tog {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: middle;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.88;
  -webkit-mask: none;
  mask: none;
  background-color: transparent;
  transform: none;
  -webkit-tap-highlight-color: transparent;
}
html:not([data-theme="dark"]) .kline-leg-tog {
  color: inherit;
  background-color: transparent;
}
.kline-leg-tog[aria-expanded="false"] {
  -webkit-mask: none;
  mask: none;
}
.kline-leg-tog::before {
  content: none;
  display: none;
}
.kline-leg-tog:hover {
  opacity: 1;
}
.kline-leg-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
  min-height: 0;
  font-size: inherit;
  line-height: inherit;
  transform: none;
}
.kline-leg-head {
  display: inline;
  height: auto;
  line-height: inherit;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: baseline;
}
.kline-leg-detail {
  display: none;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  line-height: inherit;
}
.kline-leg-row.is-open .kline-leg-detail {
  display: inline-flex;
  align-items: baseline;
}
.kline-leg-ma,
.kline-ohlc-item,
.kline-ohlc-chg {
  vertical-align: baseline;
}
.kline-ohlc-break {
  display: none;
}
/* 桌面：两行容器摊平为同一行 */

.kline-ohlc-line {
  display: contents;
}
.kline-sub-divider {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 2px solid rgba(21, 32, 43, 0.32);
  pointer-events: none;
  box-sizing: border-box;
}
html[data-theme="dark"] .kline-sub-divider {
  border-top-color: rgba(255, 255, 255, 0.28);
}
.kline-sub-divider[hidden] {
  display: none !important;
}
.kline-sub-legend {
  position: absolute;
  z-index: 6;
  left: 14px;
  /* 默认按桌面右轴宽；手机由 positionKlineSubLegend 内联覆盖为 padR */
  right: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  color: rgba(232, 238, 242, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
  padding: 0;
  background: transparent;
  border: 0;
}
html:not([data-theme="dark"]) .kline-sub-legend {
  color: rgba(15, 23, 42, 0.88);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.65);
}
.kline-sub-legend[hidden] {
  display: none !important;
}
.kline-sub-leg-left {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}
.kline-sub-legend .kline-leg-tog {
  margin-top: 0;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  font-size: 15px;
  letter-spacing: 0;
  pointer-events: auto;
  cursor: pointer;
  flex-shrink: 0;
}
.kline-sub-leg-main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
  overflow: visible;
  pointer-events: auto;
  cursor: pointer;
}
.kline-sub-leg-title {
  font-weight: 750;
  white-space: nowrap;
  letter-spacing: 0.02em;
  pointer-events: auto;
  flex-shrink: 0;
}
.kline-sub-leg-title[hidden] {
  display: none !important;
}
.kline-sub-leg-title-inline {
  font-weight: 750;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  margin-right: 2px;
}
.kline-sub-leg-detail {
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
  overflow: visible;
  pointer-events: none;
}
.kline-sub-legend.is-open .kline-sub-leg-detail {
  display: flex;
}
.kline-sub-leg-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  max-width: 100%;
}
.kline-sub-leg-detail > span {
  white-space: nowrap;
}
.kline-sub-legend:not(.is-open) .kline-sub-leg-title {
  opacity: 0.92;
}
/* 手机：主/副图例；OHLC 两行；MA/超级趋势字号放大一档 */

@media (max-width: 720px) {
  .kline-legend {
    left: 4px;
    top: 1px;
    max-width: calc(100% - 48px);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.3;
    gap: 1px;
  }
  .kline-leg-row {
    font-size: 11px;
    line-height: 1.3;
    gap: 3px;
    flex-wrap: nowrap;
  }
  /* 折叠箭头：主 K / 因子均线同尺寸同图标 */
  .kline-legend .kline-leg-tog,
  .okx-factor-ma-leg-tog {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 16px;
    font-weight: 700;
    opacity: 0.92;
    margin: -7px 0 -7px -6px;
    padding: 0;
    color: inherit;
    transform: none;
  }
  .kline-leg-main {
    flex-wrap: nowrap;
    gap: 0 5px;
    overflow: hidden;
  }
  .kline-leg-detail {
    flex-wrap: nowrap !important;
    gap: 0 5px;
    overflow: hidden;
  }
  .kline-leg-row.is-open .kline-leg-detail {
    display: inline-flex;
    flex-wrap: nowrap;
  }
  /* OHLC 手机：第1行开高低，第2行收涨跌（时间仍在上一行）；折叠时必须能藏住 */
  .kline-leg-row[data-leg="ohlc"] {
    align-items: flex-start;
  }
  .kline-leg-row[data-leg="ohlc"] .kline-leg-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px 0;
    overflow: visible;
    max-width: 100%;
  }
  .kline-leg-row[data-leg="ohlc"] .kline-leg-head {
    display: block;
    white-space: nowrap;
  }
  /* 折叠：只收开高低收/涨跌，时间仍留 */
  .kline-leg-row[data-leg="ohlc"]:not(.is-open) .kline-leg-detail {
    display: none !important;
  }
  .kline-leg-row[data-leg="ohlc"]:not(.is-open) .kline-leg-head {
    display: block !important;
  }
  .kline-leg-row[data-leg="ohlc"].is-open .kline-leg-detail {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 1px 0 !important;
    max-width: 100%;
    overflow: visible !important;
  }
  .kline-leg-row[data-leg="ohlc"] .kline-ohlc-line {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0 6px;
    width: 100%;
  }
  .kline-leg-row[data-leg="ohlc"] .kline-ohlc-line-extra {
    display: none !important;
  }
  .kline-leg-head,
  .kline-leg-ma,
  .kline-ohlc-item,
  .kline-ohlc-chg,
  .kline-leg-sr-sup,
  .kline-leg-sr-res {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .kline-ohlc-item,
  .kline-ohlc-chg {
    font-size: 11px;
  }
  .kline-leg-ma,
  .kline-leg-row[data-leg="ma"] .kline-leg-detail,
  .kline-leg-row[data-leg="st"] .kline-leg-detail,
  .kline-leg-row[data-leg="ma"] .kline-leg-head,
  .kline-leg-row[data-leg="st"] .kline-leg-head {
    font-size: 11px;
  }
  /* MA：一排优先，放不下再折行 */
  .kline-leg-row[data-leg="ma"] .kline-leg-main {
    overflow: visible;
    max-width: 100%;
  }
  .kline-leg-row[data-leg="ma"].is-open .kline-leg-detail {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 2px 8px !important;
    overflow: visible !important;
    max-width: 100%;
  }
  .kline-leg-ma-line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
    width: auto;
    max-width: 100%;
  }
  .kline-sub-legend {
    left: 8px;
    right: 42px;
    font-size: 11px;
    line-height: 1.25;
    gap: 4px;
  }
  .kline-sub-leg-left {
    gap: 4px;
    overflow: visible;
  }
  .kline-sub-leg-main,
  .kline-sub-leg-detail {
    overflow: visible;
  }
  .kline-sub-leg-line {
    gap: 0 6px;
  }
  .kline-sub-leg-title,
  .kline-sub-leg-title-inline,
  .kline-sub-leg-pair,
  .kline-sub-leg-pair i,
  .kline-sub-leg-pair b {
    white-space: nowrap;
    font-size: 11px;
  }
  .kline-sub-legend .kline-leg-tog {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    font-size: 16px;
  }
}
.kline-sub-leg-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  pointer-events: auto;
  align-self: flex-start;
  margin-top: 0;
}
/* 副图放大/还原：纯图标，无背景卡片 */

.kline-sub-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(15, 23, 42, 0.58);
  box-shadow: none;
  opacity: 1;
  cursor: pointer;
}
.kline-sub-expand:hover,
.kline-sub-expand:focus-visible {
  color: rgba(15, 23, 42, 0.88);
  background: transparent;
  border: 0;
  outline: none;
}
.kline-sub-expand.is-on {
  color: rgba(15, 23, 42, 0.58);
  background: transparent;
  border: 0;
}
html[data-theme="dark"] .kline-sub-expand {
  background: transparent;
  border: 0;
  color: rgba(232, 238, 242, 0.72);
  box-shadow: none;
}
html[data-theme="dark"] .kline-sub-expand:hover,
html[data-theme="dark"] .kline-sub-expand:focus-visible {
  color: rgba(232, 238, 242, 0.95);
  background: transparent;
  border: 0;
}
html[data-theme="dark"] .kline-sub-expand.is-on {
  color: rgba(232, 238, 242, 0.72);
  background: transparent;
  border: 0;
}
.kline-sub-expand svg {
  display: block;
}
/* 放大后：还原按钮仍在副图画布右上（轴栏内侧） */

.kline-sub-legend.is-expanded {
  left: 8px !important;
  right: 42px !important;
}
.kline-sub-legend.is-expanded .kline-sub-leg-tools {
  order: 0;
  margin-right: 0;
  margin-left: auto;
}
.kline-sub-leg-pair {
  white-space: nowrap;
}
.kline-sub-leg-pair i {
  font-style: normal;
  font-weight: 600;
  opacity: 0.78;
  margin-right: 4px;
}
.kline-sub-leg-pair b {
  font-weight: 750;
}
.kline-leg-row[data-leg="ohlc"]:not(.is-open) .kline-leg-head {
  display: inline;
}
.kline-leg-row[data-leg="ohlc"].is-open .kline-leg-head {
  margin-right: 2px;
}
.kline-leg-row[data-leg="ma"].is-open .kline-leg-head,
.kline-leg-row[data-leg="st"].is-open .kline-leg-head,
.kline-leg-row[data-leg="sr"].is-open .kline-leg-head {
  display: none;
}
.kline-leg-ma {
  white-space: nowrap;
}
.kline-leg-ma-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  width: auto;
  max-width: 100%;
}
.kline-leg-row[data-leg="ma"].is-open .kline-leg-detail {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.kline-leg-sr-sup {
  color: #2ecf9a;
}
.kline-leg-sr-res {
  color: #f05a72;
}
html:not([data-theme="dark"]) .kline-leg-sr-sup {
  color: #178f7a;
}
html:not([data-theme="dark"]) .kline-leg-sr-res {
  color: #d4535c;
}
html .mkt-coin-sheet .kline-leg-sr-sup { color: #2ecf9a; }
html .mkt-coin-sheet .kline-leg-sr-res { color: #f05a72; }
.kline-ohlc {
  display: none !important;
}
.kline-ohlc-item b {
  font-weight: 700;
  margin-left: 2px;
}
.kline-ohlc-chg {
  font-weight: 750;
}
.kline-ohlc-chg.is-up {
  color: var(--up);
}
.kline-ohlc-chg.is-down {
  color: #c45b55;
}
.kline-ohlc-vol {
  opacity: 0.9;
}
.kline-sync {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.kline-sync.is-live {
  color: var(--teal, var(--up));
}
.kline-sync.is-warn {
  color: var(--warn, #c9892a);
}
.kline-sync.is-err {
  color: var(--down, #d4535c);
}
/* 标记延迟：画布左下角、时间刻度内侧 */

.kline-mark-age {
  position: absolute;
  left: 8px;
  bottom: 40px;
  z-index: 8;
  pointer-events: none;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: rgba(232, 236, 241, 0.82);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.kline-mark-age.is-warn {
  color: #e0b15a;
}
.kline-mark-age.is-err {
  color: #f05a72;
}
@media (max-width: 720px) {
  .kline-mark-age {
    left: 6px;
    bottom: 32px;
    font-size: 10px;
  }
}
/* 手机：工具栏文案与右侧标记价/同步状态同字号（须在 .kline-meta/.kline-sync 之后） */

@media (max-width: 720px) {
  .pos-float.kline-float .kline-tool-btn,
  .pos-float.kline-float .kline-meta,
  .pos-float.kline-float .kline-sync {
    font-size: 12px;
  }
}
.kline-chart-wrap {
  flex: 1;
  min-height: 0;
  padding: 0;
  display: flex;
  position: relative;
  touch-action: none;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  overflow: hidden;
}
.kline-chart {
  flex: 1;
  min-height: 280px;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
/* OKX 式：标记价 + 本根K线倒计时，落在右侧价格轴 */

.kline-px-badge {
  position: absolute;
  right: 4px;
  z-index: 12;
  transform: translateY(-50%);
  margin: 0;
  padding: 3px 7px 2px;
  min-width: 58px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: #e85d6c;
  border-radius: 2px;
  pointer-events: none;
  box-shadow: none;
  white-space: nowrap;
  isolation: isolate;
}
.kline-px-badge-px {
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.kline-px-badge-cd {
  display: block;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  opacity: 0.92;
  letter-spacing: 0.04em;
}
.kline-px-badge.is-up {
  background: var(--up-solid, var(--up));
  color: #fff !important;
}
.kline-px-badge.is-down {
  background: var(--down-solid, var(--down));
  color: #fff !important;
}
@media (max-width: 720px) {
  .kline-px-badge {
    right: 2px;
    padding: 2px 5px 1px;
    min-width: 46px;
    font-size: 9px;
    border-radius: 2px;
  }
  .kline-px-badge-px {
    font-size: 9px;
  }
  .kline-px-badge-cd {
    font-size: 8px;
  }
}
html:not([data-theme="dark"]) .kline-px-badge {
  background: #e11d48;
}
html:not([data-theme="dark"]) .kline-px-badge.is-up {
  background: var(--up-solid, var(--up));
}
html:not([data-theme="dark"]) .kline-px-badge.is-down {
  background: var(--down-solid, var(--down));
}
/* 打开样式/指标/设置等浮层时，隐藏轴上价签，避免压在弹窗上 */

.kline-chart-wrap.has-kline-pop .kline-px-badge {
  visibility: hidden;
}
.kline-chart-wrap.need-click-interact::after {
  content: "点击图表启用交互";
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 5;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  color: #e8eef2;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
html:not([data-theme="dark"]) .kline-chart-wrap.need-click-interact::after {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
}
/* 价位线：默认无线上色块；悬停/固定时右侧箭头气泡 */

.kline-lv-badges {
  display: none;
}
.kline-chart.is-lv-hot,
.kline-chart.is-mark-hot {
  cursor: pointer;
}
.kline-lv-tip {
  position: absolute;
  z-index: 30;
  display: none;
  max-width: min(240px, 70%);
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(18, 24, 32, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: #e8eef2;
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  transform: translate(-100%, -50%);
}
.kline-lv-tip.is-open {
  display: block;
}
.kline-lv-tip.is-pinned {
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  border-color: rgba(232, 93, 108, 0.45);
}
.kline-lv-tip.is-mark.is-pinned {
  border-color: rgba(255, 255, 255, 0.14);
  min-width: 148px;
  padding: 10px 12px;
}
.kline-lv-tip.is-mark.is-buy.is-pinned {
  border-color: rgba(22, 163, 74, 0.45);
}
.kline-lv-tip.is-mark.is-sell.is-pinned {
  border-color: rgba(225, 29, 72, 0.45);
}
.kline-lv-tip.is-mark.is-phase.is-pinned {
  border-color: rgba(100, 116, 139, 0.45);
}
.kline-lv-tip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  margin-top: -5px;
  border: 5px solid transparent;
  border-left-color: rgba(18, 24, 32, 0.94);
}
.kline-lv-tip.is-arrow-right::after {
  left: -5px;
  right: auto;
  border-left-color: transparent;
  border-right-color: rgba(18, 24, 32, 0.94);
}
.kline-lv-tip.is-arrow-left::after {
  right: -5px;
  left: auto;
  border-right-color: transparent;
  border-left-color: rgba(18, 24, 32, 0.94);
}
.kline-lv-tip-row {
  display: block;
  padding: 1px 0;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.45;
}
.kline-mark-tip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.kline-mark-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  background: #64748b;
}
.kline-lv-tip.is-buy .kline-mark-badge {
  background: #16a34a;
}
.kline-lv-tip.is-sell .kline-mark-badge {
  background: #e11d48;
}
.kline-mark-tip-title {
  font-size: 12px;
  font-weight: 700;
  color: inherit;
}
.kline-mark-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.kline-mark-tip-row span {
  color: rgba(232, 238, 242, 0.62);
  font-weight: 500;
}
.kline-mark-tip-row b {
  font-weight: 700;
  color: inherit;
  text-align: right;
}
.kline-mark-tip-note {
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.88;
  margin-bottom: 4px;
  word-break: break-word;
  white-space: normal;
}
.kline-mark-tip-foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  opacity: 0.5;
  font-weight: 500;
}
html:not([data-theme="dark"]) .kline-lv-tip {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
html:not([data-theme="dark"]) .kline-lv-tip::after {
  border-left-color: rgba(255, 255, 255, 0.97);
}
html:not([data-theme="dark"]) .kline-lv-tip.is-arrow-right::after {
  border-left-color: transparent;
  border-right-color: rgba(255, 255, 255, 0.97);
}
html:not([data-theme="dark"]) .kline-lv-tip.is-arrow-left::after {
  border-right-color: transparent;
  border-left-color: rgba(255, 255, 255, 0.97);
}
html:not([data-theme="dark"]) .kline-mark-tip-row span {
  color: rgba(15, 23, 42, 0.48);
}
html:not([data-theme="dark"]) .kline-mark-tip-foot {
  border-top-color: rgba(15, 23, 42, 0.08);
}
.kline-chart.is-y-scale {
  cursor: ns-resize;
}
.kline-chart.is-x-scale {
  cursor: ew-resize;
}
.kline-chart-wrap.okx-gest-grab .kline-chart,
.kline-chart.okx-gest-grab {
  cursor: grab !important;
}
.kline-chart-wrap.okx-gest-grabbing .kline-chart,
.kline-chart.okx-gest-grabbing {
  cursor: grabbing !important;
}
/* OKX 纵轴拉伸手势仍可用；底角示意图标按需求不显示 */

.kline-y-stretch {
  display: none !important;
}
.hold-tool-btn.kline-btn.on {
  color: var(--teal, var(--up));
}
html[data-theme="dark"] .kline-periods button.on {
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef2;
}
html[data-theme="dark"] .kline-periods button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e8eef2;
}
html[data-theme="dark"] .kline-toolbar {
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .kline-period-sel {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.04);
  color: #e8eef2;
}
html[data-theme="dark"] .kline-tools-more:hover,
html[data-theme="dark"] .kline-tools-wrap.is-open .kline-tools-more {
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef2;
}
html[data-theme="dark"] .kline-tools-menu {
  background: #151a22;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .kline-tools-menu-item {
  color: #e8eef2;
}
html[data-theme="dark"] .kline-tools-menu-item:hover,
html[data-theme="dark"] .kline-tools-menu-item.on {
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .kline-ohlc-chg.is-up {
  color: var(--up);
}
html[data-theme="dark"] .kline-ohlc-chg.is-down {
  color: #f07178;
}
/* 电脑侧栏页：内容不满一屏时文档不滚动。min-height 含内边距，避免 100vh 再叠加 padding。 */
html,
body {
  margin: 0;
}
@media (min-width: 900px) {
  .shell,
  .app,
  .page-admin .app-admin {
    box-sizing: border-box;
  }
  .app,
  .page-admin .app-admin {
    min-height: 100dvh;
  }
  body.page-admin .shell {
    padding-top: 0;
    min-height: 100dvh;
  }
  body.page-admin .admin-panel,
  body.page-admin #admin-tab-me.admin-panel.on,
  body.page-admin #admin-tab-products.admin-panel.on {
    padding-bottom: 24px;
  }
}

/* OMX 壳 / WebClip：横屏时强制竖屏视口（系统无法锁方向时的兜底） */
@media (orientation: landscape) and (max-height: 720px) {
  html.omx-native-shell.omx-portrait-enforce {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100vh;
    height: 100vw;
    max-width: 100vh;
    max-height: 100vw;
    overflow: hidden;
    transform: rotate(-90deg);
    transform-origin: left top;
    -webkit-transform: rotate(-90deg);
    -webkit-transform-origin: left top;
    touch-action: manipulation;
  }
  html.omx-native-shell.omx-portrait-enforce body {
    width: 100vh;
    height: 100vw;
    max-width: 100vh;
    max-height: 100vw;
    overflow: hidden;
  }
}

/* OMX 描述文件强制更新（OKX 式弹层 + 滑动更新，不可关闭） */
html.omx-update-lock,
html.omx-update-lock body,
html.nctv-update-lock,
html.nctv-update-lock body {
  overflow: hidden !important;
  touch-action: none;
}
.omx-update-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
}
.omx-update-gate-card {
  width: min(100%, 340px);
  text-align: left;
  padding: 22px 20px 20px;
  border-radius: 16px;
  background: #2a2d33;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}
.omx-update-gate-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: #f5f7fa;
  letter-spacing: 0.01em;
}
.omx-update-gate-body {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}
.omx-update-gate-body strong {
  color: #fff;
  font-weight: 600;
}
.omx-update-slide {
  position: relative;
  height: 52px;
  border-radius: 26px;
  background: #0b0e11;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.omx-update-slide.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.omx-update-slide.is-done .omx-update-slide-label {
  opacity: 0;
}
.omx-update-slide-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 44px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.omx-update-slide-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #0b0e11;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  cursor: grab;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.omx-update-slide-thumb:active {
  cursor: grabbing;
}
.omx-update-slide-thumb svg {
  width: 20px;
  height: 20px;
  display: block;
}
.omx-update-gate-hint {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
}
