:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0f;
  --bg2: #1a1a1a;
  --bg3: #242424;
  --border: #333;
  --text: #e8e6e3;
  --muted: #787776;
  --text-secondary: #c8c8c8;
  --text-dim: #999;
  --accent: #52419f;
  --accent2: #6b5bb5;
  --link-hover: #c4b5fd;
  --green: #10cc55;
  --red: #ff2323;
  --hover-bg: #2a2a2a;
  --sticky-bg: #1a1a1a;
  --shadow: rgba(0, 0, 0, 0.4);
  --row-hover: rgba(82, 65, 159, 0.12);
  --row-highlight: #2a2218;
  --surface-overlay: rgba(255, 255, 255, 0.05);
  --panel-head-bg: rgba(0, 0, 0, 0.18);
  --panel-head-border: rgba(255, 255, 255, 0.05);
  --on-accent: #fff;
  --env-code-a: #ffffff;
  --switch-bg: #3a3a3a;
  --switch-knob: #888;
  --table-head-bg: #3d3d3d;
  --table-head-hover: #4a4a4a;
  --table-head-text: #c8c8c8;
  --table-row-bg: #141414;
  --table-row-alt: #1f1915;
  --table-row-border: #2a2520;
  --header-h: 56px;
  --header-main-h: 56px;
  --announcement-h: 0px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f6;
  --bg2: #ffffff;
  --bg3: #eef1f5;
  --border: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --text-secondary: #374151;
  --text-dim: #6b7280;
  --accent: #52419f;
  --accent2: #6b5bb5;
  --link-hover: #4338ca;
  --green: #059669;
  --red: #dc2626;
  --hover-bg: #e5e7eb;
  --sticky-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --row-hover: rgba(82, 65, 159, 0.08);
  --row-highlight: rgba(82, 65, 159, 0.1);
  --surface-overlay: rgba(0, 0, 0, 0.04);
  --panel-head-bg: rgba(0, 0, 0, 0.04);
  --panel-head-border: rgba(0, 0, 0, 0.08);
  --on-accent: #fff;
  --env-code-a: #111827;
  --switch-bg: #d1d5db;
  --switch-knob: #ffffff;
  --table-head-bg: #e5e7eb;
  --table-head-hover: #d1d5db;
  --table-head-text: #374151;
  --table-row-bg: #ffffff;
  --table-row-alt: #f9fafb;
  --table-row-border: #e5e7eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  width: 100%;
  height: 100%;
}

body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: #0f0f0f;
  background: var(--bg);
  color: #e8e6e3;
  color: var(--text);
}

.header {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  -ms-flex-align: stretch;
  align-items: stretch;
  width: 100%;
  gap: 0;
  padding: 0;
  height: auto;
  min-height: var(--header-main-h, 56px);
  background: #1a1a1a;
  background: var(--bg2);
  border-bottom: 1px solid #333;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  min-width: 0;
}

.header-main {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: justify;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  height: var(--header-main-h, 56px);
  min-width: 0;
}

.header-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-buy-member {
  appearance: none;
  border: 1px solid rgba(47, 111, 237, 0.45);
  background: rgba(47, 111, 237, 0.12);
  color: #1d4fbf;
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-buy-member:hover {
  background: rgba(47, 111, 237, 0.2);
}
.main-trial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.main-trial-actions .btn-primary,
.main-trial-actions .btn-secondary {
  flex: 1 1 140px;
}

.header-controls label { font-size: 13px; color: var(--muted); }

.site-announcement {
  width: 100%;
  height: 32px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 196, 80, 0.35);
  background: linear-gradient(90deg, #3a2a12 0%, #4a3518 50%, #3a2a12 100%);
  color: #ffe8a8;
  overflow: hidden;
  position: relative;
  z-index: 101;
}
.site-announcement.hidden { display: none !important; }
.site-announcement-viewport {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.site-announcement.is-static .site-announcement-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-announcement-track {
  display: inline-flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  will-change: transform;
  animation: none;
}
.site-announcement.is-scroll .site-announcement-track {
  animation-name: site-announcement-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.site-announcement-text {
  display: inline-block;
  padding: 0 64px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 32px;
  color: inherit;
}
.site-announcement.is-static .site-announcement-text {
  padding: 0 16px;
}
.site-announcement.is-static .site-announcement-text.is-dup {
  display: none;
}
@keyframes site-announcement-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .site-announcement.is-scroll .site-announcement-track { animation: none; }
}

[data-theme="light"] .site-announcement {
  background: linear-gradient(90deg, #fff4d6 0%, #ffe9b0 50%, #fff4d6 100%);
  color: #7a4b00;
  border-top-color: rgba(180, 120, 20, 0.35);
}

.user-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  font-size: 13px;
}

.user-menu-toggle {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  margin: 0;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  height: 32px;
  line-height: 1;
  white-space: nowrap;
}

.user-menu-toggle:hover,
.user-menu-toggle[aria-expanded="true"] {
  color: var(--link-hover);
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 10px 0 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px var(--shadow);
  z-index: 120;
}

/* 填补按钮与菜单之间空隙，避免悬停移入时闪断 */
.user-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.user-menu-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.user-bar-name { font-weight: 600; color: var(--text); }
.user-bar-status { color: var(--muted); font-size: 12px; }

.device-session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.device-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
}

.device-session-meta {
  min-width: 0;
  flex: 1;
}

.device-session-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.device-session-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.device-session-current {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--accent2);
}

.device-kick-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
}

.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  box-sizing: border-box;
  text-decoration: none;
}

.user-menu-item:hover {
  background: var(--hover-bg);
}

.btn-link {
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.btn-link:hover { text-decoration: underline; }

.user-menu .btn-link,
.user-menu .user-menu-item {
  padding: 8px 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.user-menu .btn-link:hover,
.user-menu .user-menu-item:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.qq-group-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 196px;
  width: 268px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 14px;
  box-shadow: none;
  z-index: 130;
}

.qq-group-popover.hidden { display: none; }

.qq-group-popover-inner,
.qq-group-panel .modal-body {
  text-align: center;
}

.qq-group-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #242038 0%, var(--bg2) 38%, var(--bg2) 100%);
  border: 1px solid #3d3560;
  box-shadow: 0 12px 32px var(--shadow);
}

.qq-group-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.qq-group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #b7a8ef;
  background: rgba(82, 65, 159, 0.28);
  border: 1px solid rgba(107, 91, 181, 0.45);
}

.qq-group-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: 0.02em;
}

.qq-group-no-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.qq-group-no-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.qq-group-no-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 220px;
  border: 1px solid #4a4170;
  background: rgba(82, 65, 159, 0.16);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.qq-group-no-btn:hover {
  border-color: var(--accent2);
  background: rgba(82, 65, 159, 0.28);
  transform: translateY(-1px);
}

.qq-group-no-btn:active {
  transform: translateY(0);
}

.qq-group-no-btn.is-copied {
  border-color: #5d9b6c;
  background: rgba(61, 140, 84, 0.18);
}

.qq-group-no-value {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c4b6f5;
  font-variant-numeric: tabular-nums;
}

.qq-group-no-action {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #efeaff;
  background: rgba(107, 91, 181, 0.35);
  border: 1px solid rgba(183, 168, 239, 0.35);
  border-radius: 6px;
  padding: 2px 7px;
}

.qq-group-no-btn.is-copied .qq-group-no-action {
  background: rgba(61, 140, 84, 0.4);
  border-color: rgba(120, 190, 140, 0.45);
}

.qq-group-qr-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.qq-group-qr-frame {
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(145deg, #8b7cd6 0%, #5a4aad 55%, #3d7ec9 100%);
  box-shadow: 0 8px 20px rgba(82, 65, 159, 0.35);
}

.qq-group-qr {
  display: block;
  width: 168px;
  height: 168px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  box-sizing: border-box;
}

.qq-group-popover .qq-group-qr {
  width: 152px;
  height: 152px;
}

.qq-group-tip {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}

.qq-group-panel.auth-modal-panel {
  max-width: 360px;
}

.qq-group-panel .modal-header {
  justify-content: center;
  position: relative;
  border-bottom: 1px solid #34304a;
  background: #1f1c2c;
}

.qq-group-panel .modal-header h2 {
  text-align: center;
}

.qq-group-panel .modal-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.qq-group-panel .modal-body {
  padding: 16px 18px 20px;
}

.qq-group-panel .qq-group-card {
  box-shadow: none;
}

[data-theme="light"] .qq-group-card {
  background: linear-gradient(180deg, #f3f0fb 0%, var(--bg2) 42%, var(--bg2) 100%);
  border-color: #d5ceea;
}

[data-theme="light"] .qq-group-badge {
  color: var(--accent);
  background: rgba(82, 65, 159, 0.1);
  border-color: rgba(82, 65, 159, 0.22);
}

[data-theme="light"] .qq-group-no-btn {
  border-color: #cfc6e8;
  background: rgba(82, 65, 159, 0.06);
}

[data-theme="light"] .qq-group-no-btn:hover {
  background: rgba(82, 65, 159, 0.12);
}

[data-theme="light"] .qq-group-no-value {
  color: var(--accent);
}

[data-theme="light"] .qq-group-no-action {
  color: #fff;
  background: var(--accent2);
  border-color: transparent;
}

[data-theme="light"] .qq-group-panel .modal-header {
  background: #f7f5fc;
  border-bottom-color: #e4dff2;
}

.admin-contact-qr-preview {
  margin: 8px 0 4px;
  min-height: 40px;
}

.admin-contact-qr-img {
  max-width: 220px;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
}

.tab.hidden { display: none; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.auth-gate.hidden { display: none; }

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.cst-page {
  max-width: 720px;
  margin: 12px auto 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
}

.cst-promo-inner { max-width: 640px; }

.cst-title {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
}

.cst-subtitle {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.cst-platform {
  margin: 0 0 16px;
  color: #e8b84a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.cst-features {
  margin: 0 0 16px;
  padding-left: 1.15em;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.cst-features li { margin: 0 0 6px; }

.cst-tips {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(82, 65, 159, 0.12);
  border: 1px solid rgba(82, 65, 159, 0.28);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.cst-tips p { margin: 0 0 6px; }
.cst-tips p:last-child { margin-bottom: 0; }

.cst-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cst-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-width: 140px;
}

.cst-download-btn.hidden { display: none; }

.cst-download-hint {
  font-size: 12px;
  color: var(--muted);
}

.cst-version {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-disclaimer {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.auth-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.auth-form label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

.auth-form label.auth-remember {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}

.auth-form label.auth-remember input[type="checkbox"] {
  display: inline-block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--accent, #52419f);
  cursor: pointer;
}

.auth-form label.auth-remember span {
  display: inline;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.auth-submit { width: 100%; margin-top: 8px; }

.auth-switch {
  text-align: center;
  margin-top: 16px;
}

.auth-captcha-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-captcha-label {
  flex: 1;
  margin-bottom: 0 !important;
}

.auth-captcha-img-wrap {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0;
  background: #f3f4f6;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
}

.auth-captcha-img-wrap:hover { opacity: 0.9; }

.auth-captcha-img {
  display: block;
  width: 120px;
  height: 40px;
  overflow: hidden;
  background: #e8eaed;
  color: #333;
  font-size: 12px;
  line-height: 40px;
  text-align: center;
}

.auth-captcha-img img,
.auth-captcha-img svg {
  display: block;
  width: 120px;
  height: 40px;
}

.cell-masked {
  color: var(--muted);
  letter-spacing: 1px;
  user-select: none;
}

.auth-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  white-space: pre-line;
}

.auth-error.hidden { display: none; }

.auth-success {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  white-space: pre-line;
}

.auth-success.hidden { display: none; }

.global-toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%) translateY(-120%);
  z-index: 10000;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 10px;
  background: #166534;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  white-space: pre-line;
  text-align: center;
}

.global-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.global-toast.is-warning {
  background: #be123c;
  box-shadow: 0 10px 30px rgba(190, 18, 60, 0.35);
}

.pz-warning-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(92vw, 360px);
  pointer-events: none;
}

.pz-warning-toast-item {
  pointer-events: auto;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #fecdd3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  color: #111;
  font-size: 13px;
  line-height: 1.4;
  animation: pzWarnIn 0.2s ease;
}

.pz-warning-toast-item strong {
  display: block;
  color: #be123c;
  margin-bottom: 2px;
}

.pz-warning-toast-item button {
  margin-top: 6px;
  border: 0;
  background: #be123c;
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

@keyframes pzWarnIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-hint { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

.redeem-shop { margin-bottom: 14px; }
.redeem-price-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #f5f7fb;
  border-radius: 10px;
  font-size: 13px;
}
.redeem-price-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.redeem-price-row strong { color: var(--ink, #1a1a1a); }
.redeem-price-row span { color: var(--muted); font-variant-numeric: tabular-nums; }
.redeem-buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.redeem-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
a.redeem-buy-btn.btn-primary,
a.redeem-buy-btn.btn-secondary {
  line-height: 1.3;
}
.redeem-steps { margin-top: 4px; }

.auth-field {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
}

.auth-modal-panel { max-width: 420px; }
.modal-body { padding: 16px 20px 20px; }

.admin-modal-panel {
  max-width: 920px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.admin-page-body {
  min-height: 100vh;
  background: var(--bg);
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-page-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.admin-page-user {
  font-size: 13px;
  color: var(--muted);
}

.admin-page-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-page-main {
  width: 100%;
  max-width: min(1680px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.admin-page-body-inner {
  padding: 20px 0 0;
  overflow: visible;
}

.admin-table-wrap-page {
  max-height: none;
}

.admin-gate {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-gate.hidden { display: none; }

.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  border: none;
  background: none;
  color: var(--muted);
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-panel h3 {
  font-size: 14px;
  margin: 16px 0 8px;
  color: var(--text);
}

.admin-panel h3:first-child { margin-top: 0; }
.guling-sync-box { margin: 0 0 12px; }
.guling-sync-table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
}
.guling-sync-table th,
.guling-sync-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #2a2a33);
}
.guling-sync-table th { color: var(--muted, #8a8a96); font-weight: 600; }
.guling-sync-ok { color: #4ade80; }
.guling-sync-warn { color: #f5c84c; }
.guling-sync-err { color: #ff8b95; }

.admin-panel h4 {
  font-size: 13px;
  margin: 12px 0 6px;
  color: var(--text);
  font-weight: 600;
}

.admin-ziwei-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  margin-bottom: 10px;
}

.admin-ziwei-block {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.admin-ziwei-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-ziwei-group-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.admin-mode-editor {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-mode-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 11px;
  border-radius: 3px;
  color: #c4b5fd;
  border: 1px solid rgba(196, 181, 253, 0.45);
}

.admin-mode-filter-cell {
  min-width: 180px;
  max-width: 360px;
}

.admin-mode-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.admin-mode-filter-chip {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.admin-mode-filter-stack {
  font-size: 11px;
  color: var(--muted);
  margin-left: 2px;
}

.admin-mode-filter-empty {
  font-size: 12px;
  color: var(--muted);
}

.admin-modes-toolbar {
  align-items: center;
}

.admin-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.admin-check-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.admin-gen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.admin-gen-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.admin-gen-result {
  font-size: 13px;
  margin-bottom: 12px;
  word-break: break-all;
}

.admin-card-export {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg3);
}

.admin-card-export.hidden { display: none; }

.admin-card-export-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.admin-card-export-text {
  width: 100%;
  min-height: 160px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  resize: vertical;
}

.admin-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  font-size: 13px;
  color: var(--text);
}

.admin-card-stats-plans {
  color: var(--muted);
  font-size: 12px;
}

.admin-card-batch {
  margin-top: 4px;
}

.admin-card-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.card-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.card-status-unused {
  background: color-mix(in srgb, #4caf78 22%, transparent);
  color: #7dcea0;
}

.card-status-used {
  background: color-mix(in srgb, #5b8def 22%, transparent);
  color: #8bb4ff;
}

.card-status-void {
  background: color-mix(in srgb, #f07178 18%, transparent);
  color: #f07178;
}

.admin-table-wrap { max-height: 420px; overflow: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.admin-table th { color: var(--muted); font-weight: 500; }

.admin-sync-timing {
  font-size: 12px;
  line-height: 1.45;
  min-width: 220px;
  max-width: 360px;
}
.admin-sync-timing details {
  margin-top: 4px;
}
.admin-sync-timing summary {
  cursor: pointer;
  color: var(--muted);
}
.admin-sync-timing ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.admin-sync-msg {
  max-width: 280px;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-msg {
  margin-left: 12px;
  font-size: 13px;
  color: var(--muted);
}

.admin-user-toolbar {
  margin-bottom: 12px;
}

.admin-user-toolbar .input {
  min-width: 220px;
}

.admin-member-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.admin-stat-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 88px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.admin-stat-chip:hover {
  border-color: var(--accent, #7c6af7);
}

.admin-stat-chip.is-active {
  border-color: var(--accent, #7c6af7);
  box-shadow: 0 0 0 1px var(--accent, #7c6af7);
}

.admin-stat-chip .admin-stat-label {
  font-size: 12px;
  color: var(--muted);
}

.admin-stat-chip strong {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-stat-chip.is-expired strong {
  color: #d97706;
}

.admin-user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-user-actions input[type="date"] {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.green-track-price-readonly {
  display: inline-block;
  min-width: 48px;
  text-align: right;
  color: var(--text);
}

.theme-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-picker-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.theme-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.theme-select:hover,
.theme-select:focus {
  border-color: var(--accent2);
  outline: none;
}

/* 交易日历 */
.date-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-picker-label {
  display: inline-flex;
  align-items: center;
  height: 32px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

.date-picker-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.date-picker-day-nav {
  width: 28px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.date-picker-day-nav:hover:not(:disabled) {
  border-color: var(--accent2);
  background: var(--hover-bg);
}

.date-picker-day-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.date-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  min-width: 118px;
  justify-content: space-between;
}

.date-picker-trigger:hover,
.date-picker-trigger[aria-expanded="true"] {
  border-color: var(--accent2);
  background: var(--hover-bg);
}

.date-picker-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.date-picker-caret {
  color: var(--muted);
  font-size: 11px;
}

.date-picker-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 216px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 8px;
  z-index: 200;
}

.date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
}

.date-picker-jump {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.date-picker-jump select {
  height: 24px;
  max-width: 88px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 0 2px;
  cursor: pointer;
}

.date-picker-nav {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.date-picker-nav:hover {
  border-color: var(--accent2);
  background: var(--hover-bg);
}

.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.date-picker-weekdays {
  margin-bottom: 4px;
}

.date-picker-weekdays span {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  padding: 2px 0;
  line-height: 1.2;
}

.date-picker-day,
.date-picker-day-empty {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border-radius: 4px;
  padding: 0;
}

.date-picker-day-empty {
  pointer-events: none;
}

.date-picker-day {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: default;
}

.date-picker-day.is-available {
  color: var(--text);
  cursor: pointer;
  background: rgba(82, 65, 159, 0.18);
}

.date-picker-day.is-available:hover {
  background: rgba(82, 65, 159, 0.35);
}

.date-picker-day.is-selected {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.date-picker-day.is-selected:hover {
  background: var(--accent2);
}

.date-picker-day.is-pending {
  outline: 1px dashed var(--accent2);
  outline-offset: -2px;
}

.date-picker-day.is-other-month {
  opacity: 0.35;
}

.date-picker-hint {
  display: none;
}

select, .input {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.btn:hover { background: var(--accent2); }
.btn-secondary { background: var(--bg3); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--hover-bg); }

.tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
a.tab {
  text-decoration: none;
  display: inline-block;
}
#panel-guling.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.guling-frame {
  width: 100%;
  flex: 1;
  min-height: calc(100vh - var(--header-h, 56px) - 12px);
  border: 0;
  background: #101014;
}
#panel-btplaza.active:has(#btMobileFrame:not(.hidden)) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.bt-m-frame {
  width: 100%;
  flex: 1;
  min-height: calc(100vh - var(--header-h, 56px) - 12px);
  border: 0;
  background: #101014;
}
.tab.active { background: var(--accent); color: var(--on-accent); }
.tab:hover:not(.active) { background: var(--bg3); color: var(--text); }

.tab-live-label {
  position: relative;
  display: inline-block;
  line-height: 1.2;
}

.live-tab-update-badge {
  position: absolute;
  left: auto;
  right: -8px;
  top: -7px;
  transform: none;
  z-index: 2;
  padding: 0 3px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.tab.active .live-tab-update-badge {
  background: #fff;
  color: #dc2626;
}

.live-tab-update-badge.hidden {
  display: none !important;
}

.tab-dropdown {
  position: relative;
  flex-shrink: 0;
}

.tab-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tab-dropdown-caret {
  font-size: 11px;
  opacity: 0.85;
  line-height: 1;
}

.tab-dropdown-menu {
  position: fixed;
  z-index: 300;
  min-width: 148px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  display: none;
  flex-direction: column;
  gap: 2px;
}

.tab-dropdown-menu.is-open {
  display: flex;
}

.tab-dropdown-menu.hidden {
  display: none !important;
}

.tab-dropdown-item {
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.tab-dropdown-item:hover,
.tab-dropdown-item.is-active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.membership-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 24px 16px;
}

.membership-gate-card {
  width: min(420px, 100%);
  padding: 28px 24px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg2));
  text-align: center;
}

.membership-gate-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
}

.membership-gate-text {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.membership-gate-redeem {
  min-width: 140px;
  min-height: 42px;
}

html.no-membership th.sortable {
  cursor: not-allowed;
  opacity: 0.72;
}

.app-error {
  margin: 12px 20px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 35, 35, 0.12);
  border: 1px solid rgba(255, 35, 35, 0.35);
  color: var(--red);
  font-size: 13px;
}
.app-error.hidden { display: none; }
.hidden { display: none !important; }

.env-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: #ff6600;
  margin: 0 0 12px;
}

[data-theme="light"] .env-panel-title {
  color: #c2410c;
}

/* 大环境：与官方配色一致 */
.env-code-a { color: var(--env-code-a); }
.env-code-b { color: var(--red); }
.env-code-c { color: var(--green); }
.env-state-main-fall { color: var(--green); }
.env-state-main-rise { color: var(--red); }
.env-state-rotation { color: var(--muted); }
.env-score-up { color: var(--red); }
.env-score-down { color: var(--green); }
.env-strength { color: var(--text); }
.env-arrow {
  margin-left: 2px;
  font-size: 12px;
  line-height: 1;
}

main {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 16px 20px;
  box-sizing: border-box;
}

#mainApp,
.panel.active {
  width: 100%;
  max-width: 100%;
}

#panel-selection .selection-layout {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: stretch;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  gap: 16px;
  height: calc(100vh - 88px);
  height: calc(100vh - var(--header-h) - 32px);
  min-height: 420px;
}

#panel-selection .content {
  -ms-flex: 1 1 0px;
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  min-height: 0;
}

#panel-selection .toolbar {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 100%;
}

#panel-selection .table-wrap {
  -ms-flex: 1 1 0px;
  flex: 1 1 0%;
  width: 100%;
  min-height: 0;
  max-height: none;
}

#panel-selection .scroll-status {
  flex-shrink: 0;
}

#panel-selection .selection-main-row {
  --intraday-list-pct: var(--xc-selection-split, 60);
  display: flex;
  flex: 1 1 0%;
  min-height: 0;
  gap: 0;
  width: 100%;
}

#panel-selection .selection-list-col {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(var(--intraday-list-pct) * 1%);
  width: calc(var(--intraday-list-pct) * 1%);
  max-width: none;
  min-width: 240px;
  min-height: 0;
}

#panel-selection .selection-list-col .table-wrap {
  flex: 1 1 0%;
  min-height: 0;
}

#panel-intraday .intraday-page-layout {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  gap: 0;
  height: calc(100vh - 88px);
  height: calc(100vh - var(--header-h) - 32px);
  min-height: 420px;
}

#panel-intraday .intraday-jingsuan-sidebar,
#intradayJingsuanSplit,
#intradayShowJingsuan,
label.toolbar-dropdown-item:has(#intradayShowJingsuan) {
  display: none !important;
}

#panel-intraday .ij-breadth,
#panel-selection .ij-breadth,
#panel-kpdesk .ij-breadth {
  flex-shrink: 0;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border);
}

#panel-intraday .ij-breadth-row,
#panel-selection .ij-breadth-row,
#panel-kpdesk .ij-breadth-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
}

#panel-intraday .ij-breadth-name,
#panel-selection .ij-breadth-name,
#panel-kpdesk .ij-breadth-name {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--text);
}

#panel-intraday .ij-breadth-up,
#panel-intraday .ij-breadth-down,
#panel-selection .ij-breadth-up,
#panel-selection .ij-breadth-down,
#panel-kpdesk .ij-breadth-up,
#panel-kpdesk .ij-breadth-down {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#panel-intraday .ij-breadth-up,
#panel-selection .ij-breadth-up,
#panel-kpdesk .ij-breadth-up { color: var(--red); }
#panel-intraday .ij-breadth-down,
#panel-selection .ij-breadth-down,
#panel-kpdesk .ij-breadth-down { color: var(--green); margin-left: auto; }

#panel-intraday .ij-breadth-up b,
#panel-intraday .ij-breadth-down b,
#panel-selection .ij-breadth-up b,
#panel-selection .ij-breadth-down b,
#panel-kpdesk .ij-breadth-up b,
#panel-kpdesk .ij-breadth-down b {
  font-weight: 700;
}

#panel-intraday .ij-breadth-meter,
#panel-selection .ij-breadth-meter,
#panel-kpdesk .ij-breadth-meter {
  display: flex;
  height: 4px;
  margin-top: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.18);
}

#panel-intraday .ij-breadth-meter .ij-breadth-upbar,
#panel-selection .ij-breadth-meter .ij-breadth-upbar,
#panel-kpdesk .ij-breadth-meter .ij-breadth-upbar {
  background: var(--red);
  width: 0;
}

#panel-intraday .ij-breadth-meter .ij-breadth-downbar,
#panel-selection .ij-breadth-meter .ij-breadth-downbar,
#panel-kpdesk .ij-breadth-meter .ij-breadth-downbar {
  background: var(--green);
  width: 0;
}

#panel-intraday .ij-indices {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

#panel-intraday .ij-index {
  display: flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

#panel-intraday .ij-index-name {
  color: var(--muted);
  flex-shrink: 0;
}

#panel-intraday .ij-index-px,
#panel-intraday .ij-index-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

#panel-intraday .ij-index-px {
  color: var(--text);
}

#panel-intraday .ij-index-pct.flat {
  color: var(--muted);
  font-weight: 500;
}

#panel-intraday .intraday-jingsuan-head {
  flex-shrink: 0;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(82, 65, 159, 0.14) 0%, transparent 100%);
}

#panel-intraday .intraday-jingsuan-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

#panel-intraday .intraday-jingsuan-list {
  flex: 1 1 0%;
  min-height: 80px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#panel-intraday .ij-vsplit {
  flex: 0 0 6px;
  height: 6px;
  margin: 0;
  border-radius: 3px;
  background: transparent;
  cursor: row-resize;
  position: relative;
  touch-action: none;
  user-select: none;
}

#panel-intraday .ij-vsplit::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 2px;
  height: 2px;
  border-radius: 2px;
  background: rgba(127, 127, 127, 0.45);
}

#panel-intraday .ij-vsplit:hover::before,
#panel-intraday .intraday-jingsuan-sidebar.is-v-resizing .ij-vsplit::before {
  background: rgba(236, 128, 141, 0.85);
}

#panel-intraday .intraday-jingsuan-sidebar.is-v-resizing {
  cursor: row-resize;
  user-select: none;
}

#panel-intraday .ij-live {
  flex: 1 1 0%;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  border-top: 0;
  overflow: hidden;
}

#panel-intraday .intraday-jingsuan-sidebar.ij-hide-list .intraday-jingsuan-list {
  display: none;
}

#panel-intraday .ij-live-head {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(82, 65, 159, 0.1) 0%, transparent 100%);
}

#panel-intraday .ij-live-feed {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 8px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#panel-intraday .ij-live-item {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(127, 127, 127, 0.12);
  font-size: 12px;
  line-height: 1.4;
}

#panel-intraday .ij-live-item:last-child {
  border-bottom: 0;
}

#panel-intraday .ij-live-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#panel-intraday .ij-live-text {
  color: var(--text);
  word-break: break-word;
}

#panel-intraday .ij-live-empty {
  margin: 6px 2px;
  font-size: 12px;
  color: var(--muted);
}

#panel-intraday .ij-cols,
#panel-intraday .ij-stock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.2em 3.2em 3.2em;
  gap: 4px;
  align-items: center;
}

#panel-intraday .ij-id {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

#panel-intraday .ij-cols {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 2px 6px 6px;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg2, #1a1a1a);
}

#panel-intraday .ij-group {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
  overflow: hidden;
}

#panel-intraday .ij-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  background: var(--panel-head-bg);
  border-bottom: 1px solid var(--panel-head-border);
}

#panel-intraday .ij-group-bar {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  flex-shrink: 0;
}

#panel-intraday .ij-group-head h3 {
  margin: 0;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panel-intraday .ij-stock {
  appearance: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 5px 6px;
  cursor: pointer;
}

#panel-intraday .ij-stock:hover,
#panel-intraday .ij-stock.is-chart-active {
  background: rgba(82, 65, 159, 0.12);
}

#panel-intraday .ij-stock.is-chart-active {
  outline: 1px solid rgba(236, 128, 141, 0.55);
}

#panel-intraday .ij-code {
  flex: 0 0 auto;
}

#panel-intraday .ij-code,
#panel-intraday .ij-val {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#panel-intraday .ij-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

#panel-intraday .ij-val {
  text-align: right;
  font-weight: 600;
}

#panel-intraday .ij-val.flat {
  color: var(--muted);
  font-weight: 500;
}

#panel-intraday .ij-empty {
  margin: 8px 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

#panel-intraday .content {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
}

#panel-intraday .toolbar {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 100%;
}

#panel-intraday .intraday-main-row {
  --intraday-list-pct: var(--xc-intraday-split, 60); /* 默认 左列表:右图表 = 3:2 */
  display: flex;
  flex: 1 1 0%;
  min-height: 0;
  gap: 0;
  width: 100%;
  padding: 0 8px 0 0;
}

#panel-intraday .intraday-list-col {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(var(--intraday-list-pct) * 1%);
  width: calc(var(--intraday-list-pct) * 1%);
  max-width: none;
  min-width: 240px;
  min-height: 0;
}

#panel-intraday .intraday-list-col .pz-warning-panel {
  margin: 0 0 6px;
  max-height: min(120px, 16vh);
}

#panel-intraday .intraday-list-col .pz-warning-table-wrap.table-wrap,
#panel-intraday .intraday-list-col .pz-warning-table-wrap {
  max-height: min(72px, 10vh);
}

#panel-intraday .intraday-list-col .table-wrap {
  -ms-flex: 1 1 0px;
  flex: 1 1 0%;
  width: 100%;
  min-height: 0;
  max-height: none;
}

#panel-intraday .table-wrap {
  -ms-flex: 1 1 0px;
  flex: 1 1 0%;
  width: 100%;
  min-height: 0;
  max-height: none;
}

#panel-intraday .scroll-status {
  flex-shrink: 0;
}

.intraday-split-handle {
  flex: 0 0 6px;
  width: 6px;
  margin: 0 2px;
  border-radius: 3px;
  background: transparent;
  cursor: col-resize;
  position: relative;
  align-self: stretch;
  touch-action: none;
  user-select: none;
}

html.side-fsk-off .intraday-chart-dock,
html.side-fsk-off .intraday-split-handle {
  display: none !important;
}
html.side-fsk-off #panel-selection .selection-list-col,
html.side-fsk-off #panel-intraday .intraday-list-col,
html.side-fsk-off .jingsuan-main,
html.side-fsk-off .watchlist-list-col {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
}

.intraday-split-handle::before {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 2px;
  width: 2px;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.35);
}

.intraday-split-handle:hover::before,
.intraday-main-row.is-resizing .intraday-split-handle::before,
.selection-main-row.is-resizing .intraday-split-handle::before,
.intraday-page-layout.is-resizing .intraday-split-handle::before {
  background: rgba(236, 128, 141, 0.85);
}

.intraday-main-row.is-resizing,
.selection-main-row.is-resizing,
.intraday-page-layout.is-resizing {
  cursor: col-resize;
  user-select: none;
}

.intraday-main-row.is-resizing iframe,
.intraday-main-row.is-resizing canvas,
.selection-main-row.is-resizing iframe,
.selection-main-row.is-resizing canvas,
.intraday-page-layout.is-resizing iframe,
.intraday-page-layout.is-resizing canvas {
  pointer-events: none;
}

.intraday-chart-dock {
  flex: 1 1 0%;
  width: auto;
  max-width: none;
  min-width: 280px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px 10px;
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  background: var(--bg2, #1a1a1a);
  overflow: hidden;
}

.intraday-chart-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  min-height: 22px;
}

.intraday-chart-head strong {
  font-size: 13px;
}

.intraday-chart-meta,
.intraday-chart-status {
  font-size: 11px;
  color: var(--muted, #888);
}

.pz-chart-view-toggle {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--border, #444);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.pz-chart-view-toggle[hidden] {
  display: none !important;
}

.pz-chart-view-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted, #999);
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  cursor: pointer;
}

.pz-chart-view-btn + .pz-chart-view-btn {
  border-left: 1px solid var(--border, #444);
}

.pz-chart-view-btn:hover {
  color: var(--text, #e8e6e3);
  background: rgba(255, 255, 255, 0.04);
}

.pz-chart-view-btn.is-active {
  color: var(--text, #e8e6e3);
  background: rgba(236, 128, 141, 0.22);
}

[data-kline-index][hidden],
#klineIndexBtn[hidden],
#btKlineIndexBtn[hidden],
.kpdesk-index-card[hidden],
.kpdesk-index-handle[hidden] {
  display: none !important;
}

.tab[data-tab="jingsuan"],
.m-tabbar-item[data-tab="jingsuan"],
.tab[data-tab="pzhtpool"],
#mMinePzhtPool,
.tab[data-tab="feedchannel"],
.m-tabbar-item[data-tab="feedchannel"] {
  display: none !important;
}

.live-page {
  width: 100%;
  max-width: 720px;
  min-width: 0;
  margin: 0 auto;
  padding: 8px 12px 28px;
  box-sizing: border-box;
}
.live-subtabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 12px;
}
.live-subtab {
  flex: 0 0 auto;
  border: 1px solid var(--border, #2a3a4d);
  background: transparent;
  color: var(--muted, #8b9bb4);
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.live-subtab.is-active {
  background: #2a3344;
  color: #e8e6e3;
  border-color: #4a6a8a;
}
.live-subpane {
  display: none;
}
.live-subpane.is-active {
  display: block;
}

.pz-chart-index-btn,
.pz-chart-expand-btn {
  appearance: none;
  border: 1px solid var(--border, #444);
  background: transparent;
  color: var(--muted, #999);
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.pz-chart-index-btn.is-active,
.kline-icon-btn.is-active {
  color: #38bdf8;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}
.honghu-check[hidden],
button[data-honghu][hidden] {
  display: none !important;
}
.honghu-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 6px 0 2px;
  font-size: 12px;
  color: var(--muted, #999);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.honghu-check input {
  margin: 0;
  accent-color: #ffd400;
}
.pz-chart-index-btn:disabled,
.kline-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pz-chart-index-btn.is-loading,
.kline-icon-btn.is-loading {
  opacity: 0.72;
}

.pz-chart-expand-btn:hover {
  color: var(--text, #e8e6e3);
  background: rgba(255, 255, 255, 0.04);
}

.pz-chart-watchlist-btn {
  appearance: none;
  border: 1px solid #db2777;
  background: #9d174d;
  color: #fce7f3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.pz-chart-watchlist-btn:hover {
  background: #be185d;
  border-color: #f472b6;
  color: #fff;
}
.pz-chart-watchlist-btn.is-on {
  background: #831843;
  border-color: #be185d;
}
.pz-chart-watchlist-btn[hidden] {
  display: none !important;
}

.intraday-chart-block {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.intraday-chart-block.is-fs,
.intraday-chart-block.is-kline {
  flex: 1 1 0%;
  min-height: 0;
}

/* 底部排名 dock 占高时：只显示选中的一张图 */
.intraday-chart-dock.is-solo {
  gap: 4px;
}

.intraday-chart-dock.is-solo .intraday-chart-block:not(.is-active) {
  display: none;
}

.intraday-chart-dock.is-solo .intraday-chart-block.is-active {
  flex: 1 1 0%;
  min-height: 0;
}

.intraday-chart-dock.is-solo .pz-fs-chart,
.intraday-chart-dock.is-solo .pz-kline-chart {
  min-height: 160px;
}

.intraday-chart-label .js-tdx-toggle {
  font-size: 11px;
  padding: 3px 8px;
  font-weight: 600;
}

.intraday-chart-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text, #e8e6e3);
}

.kline-ma-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
  user-select: none;
  letter-spacing: 0;
}

.kline-ma-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.kline-ma-legend-item i {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 1px;
}

.kline-ma-legend-item.ma5 i { background: #f0b429; }
.kline-ma-legend-item.ma10 i { background: #60a5fa; }
.kline-ma-legend-item.ma20 i { background: #e879f9; }

.kline-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding-right: 16px;
}

.kline-status-row .kline-status {
  flex: 1 1 auto;
  min-width: 0;
}

.kline-range-hint {
  margin: 0 16px 4px;
  font-size: 12px;
  color: var(--muted, #9ca3af);
  flex-shrink: 0;
}

.kline-range-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 16px 6px;
  flex-shrink: 0;
}

.kline-range-stats[hidden] {
  display: none;
}

.kline-range-stats--side {
  margin: 0 0 4px;
  font-size: 11px;
}

.kline-range-stat {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, #334155);
  background: var(--bg2, #1a1a1a);
  font-size: 12px;
  color: var(--muted, #9ca3af);
}

.kline-range-stat strong {
  color: var(--text, #e8e6e3);
  font-weight: 600;
}

.kline-range-stat .pos { color: #ef4444; }
.kline-range-stat .neg { color: #22c55e; }
.kline-range-stat .na { color: var(--muted, #9ca3af); }

.pz-fs-chart,
.pz-kline-chart {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  /* 禁止 echarts canvas 画出容器，叠到隔壁图上 */
  overflow: hidden;
}

.pz-fs-chart.is-empty,
.pz-kline-chart.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border, #333);
  border-radius: 8px;
  background: rgba(127, 127, 127, 0.06);
}

.pz-fs-chart.is-empty::before,
.pz-kline-chart.is-empty::before {
  content: attr(data-empty-hint);
  display: block;
  max-width: 12em;
  padding: 0 12px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted, #787776);
  pointer-events: none;
  user-select: none;
}

.pz-fs-chart.is-empty > *,
.pz-kline-chart.is-empty > * {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 单图模式才给较高下限；双图跟 flex 分高，避免笔记本叠图 */
.intraday-chart-dock.is-solo .pz-fs-chart {
  min-height: 180px;
}

@media (max-height: 820px) {
  .intraday-chart-dock:not(.is-solo) .pz-fs-chart,
  .intraday-chart-dock:not(.is-solo) .pz-kline-chart {
    min-height: 0;
  }
}

#intradayTable tbody tr.stock-row.is-chart-active,
#stockTable tbody tr.stock-row.is-chart-active {
  outline: 1px solid rgba(236, 128, 141, 0.55);
  background: rgba(236, 128, 141, 0.12);
}

@media (max-width: 900px) {
  #panel-intraday .intraday-page-layout {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  #panel-intraday .intraday-jingsuan-sidebar {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: 280px;
  }
  #intradayJingsuanSplit {
    display: none;
  }
  #panel-intraday .intraday-main-row,
  #panel-selection .selection-main-row {
    flex-direction: column;
  }
  #panel-intraday .intraday-list-col,
  #panel-selection .selection-list-col {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
  .intraday-split-handle {
    display: none;
  }
  .intraday-chart-dock {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: min(280px, 36vh);
  }
  #panel-intraday .intraday-list-col .pz-warning-panel {
    max-height: min(140px, 18vh);
  }
}

/* 环境/方向/模式：内嵌到底部 dock，不跳独立页 */
.rank-dock-split {
  flex: 0 0 8px;
  height: 8px;
  margin: 2px 0 0;
  cursor: row-resize;
  touch-action: none;
  position: relative;
  user-select: none;
  border-radius: 4px;
  background: transparent;
}

.rank-dock-split[hidden] {
  display: none !important;
}

.rank-dock-split::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: rgba(167, 139, 250, 0.45);
}

.rank-dock-split:hover::before,
.content.is-rank-resizing .rank-dock-split::before,
#panel-selection .content.is-rank-resizing .rank-dock-split::before {
  background: rgba(196, 181, 253, 0.9);
}

.content.is-rank-resizing,
#panel-selection .content.is-rank-resizing {
  cursor: row-resize;
  user-select: none;
}

.content.is-rank-resizing iframe,
.content.is-rank-resizing canvas,
#panel-selection .content.is-rank-resizing iframe,
#panel-selection .content.is-rank-resizing canvas {
  pointer-events: none;
}

.rank-dock {
  --rank-dock-h: min(40vh, 380px);
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: var(--rank-dock-h);
  min-height: 140px;
  max-height: min(70vh, 640px);
  margin-top: 0;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 8px;
  background: var(--bg2, #1a1a1a);
  overflow: hidden;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
}

.rank-dock.hidden {
  display: none;
}

.rank-dock-close {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 5;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(196, 181, 253, 0.4);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: #e9d5ff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.rank-dock-close:hover {
  background: rgba(167, 139, 250, 0.35);
  border-color: #c4b5fd;
  color: #fff;
}

.rank-dock-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rank-dock-body .toolbar {
  display: none;
}

.mode-view-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 4px 36px 4px 10px;
}

.rank-dock-body .mode-view-bar {
  display: flex;
}

.rank-dock-body .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.rank-dock-body .scroll-status,
#envScrollStatus,
#directionScrollStatus,
#modeScrollStatus {
  display: none !important;
}

.rank-dock-body .dataset-block {
  width: min(480px, 78vw);
  min-width: 300px;
  max-width: 520px;
  flex: 0 0 auto;
}

.tab.is-dock-on,
.m-tabbar-item.is-dock-on {
  color: #c4b5fd;
  box-shadow: inset 0 -2px 0 #a78bfa;
}


.snapshot-select {
  width: auto;
  min-width: 108px;
  padding: 4px 8px;
}

.snapshot-latest {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #78716c;
  white-space: nowrap;
  vertical-align: middle;
}

.snapshot-latest.is-follow {
  color: #c2410c;
}

/* 竞价页左侧与右侧等高，不受通用 .sidebar max-height 限制 */
#panel-selection .sidebar.selection-sidebar {
  -ms-flex: 0 0 280px;
  flex: 0 0 280px;
  width: 280px;
  padding: 0;
  max-height: none;
  height: 100%;
  overflow: hidden;
  -ms-flex-item-align: stretch;
  align-self: stretch;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  min-height: 0;
}

#panel-selection .selection-sidebar-head {
  flex-shrink: 0;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(82, 65, 159, 0.14) 0%, transparent 100%);
}

#panel-selection .selection-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

#panel-selection .selection-sidebar-hint {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

#panel-selection .selection-sidebar-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

#panel-selection .selection-highlights {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#panel-selection .selection-highlights::-webkit-scrollbar {
  width: 6px;
}

#panel-selection .selection-highlights::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

#panel-selection .highlight-group {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
  overflow: hidden;
}

#panel-selection .highlight-group:last-child {
  margin-bottom: 0;
}

#panel-selection .highlight-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--panel-head-bg);
  border-bottom: 1px solid var(--panel-head-border);
}

#panel-selection .highlight-group-bar {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  flex-shrink: 0;
}

#panel-selection .highlight-group-head h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  line-height: 1.3;
}

#panel-selection .highlight-group-body {
  padding: 4px 6px 6px;
}

#panel-selection .highlight-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 40px 5.6em;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 6px;
  border-radius: 6px;
  font-size: 12px;
  transition: background 0.15s ease;
}

#panel-selection .highlight-item:hover {
  background: rgba(82, 65, 159, 0.12);
}

#panel-selection .highlight-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--surface-overlay);
}

#panel-selection .highlight-rank-1 {
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
}

#panel-selection .highlight-rank-2 {
  color: var(--text-secondary);
  background: var(--surface-overlay);
}

#panel-selection .highlight-rank-3 {
  color: #c2410c;
  background: rgba(234, 88, 12, 0.14);
}

#panel-selection .highlight-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

#panel-selection .highlight-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

#panel-selection .highlight-count-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

#panel-selection .highlight-count {
  flex-shrink: 0;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-variant-numeric: tabular-nums;
}

#panel-selection .highlight-boost {
  justify-self: stretch;
  text-align: right;
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#panel-selection .highlight-boost.env-score-up {
  background: rgba(255, 35, 35, 0.12);
}

#panel-selection .highlight-boost.env-score-down {
  background: rgba(16, 204, 85, 0.12);
}

#panel-selection .highlight-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 8px;
  text-align: center;
}

.panel { display: none; }
.panel.active { display: block; }

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.filter-group { margin-bottom: 16px; }
.filter-group h3 { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.mode-list.scroll { max-height: 260px; overflow-y: auto; }

.mode-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}
.mode-item:hover { background: var(--bg3); }
.mode-item input { accent-color: var(--accent); }
.mode-item .count { margin-left: auto; color: var(--muted); font-size: 12px; }

.radio { display: block; font-size: 13px; margin: 6px 0; cursor: pointer; }
.radio input { margin-right: 6px; accent-color: var(--accent); }

.content { -ms-flex: 1 1 0px; flex: 1 1 0%; min-width: 0; width: 100%; }

.toolbar {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 10px;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  background: #1a1a1a;
  background: var(--bg2);
  border: 1px solid #333;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.toolbar label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

.mode-view-switch {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line, #3a3a3a);
  border-radius: 6px;
  overflow: hidden;
}
.mode-view-btn {
  padding: 2px 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
}
.mode-view-btn.is-active {
  color: #fff;
  background: #6735a6;
  font-weight: 600;
}
#modeSessionSwitch {
  gap: 0;
}
#modeSessionSwitch .mode-view-btn {
  margin: 0;
}
#modeSessionSwitch #modeMyBtn {
  border: none;
  border-radius: 0;
  margin: 0;
}
.mode-fav-btn {
  margin-left: 4px;
  padding: 0 5px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
  cursor: pointer;
  vertical-align: middle;
}
.mode-fav-btn.is-on {
  color: #fff;
  background: #6735a6;
  border-color: #6735a6;
}
.dataset-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.dataset-chips::-webkit-scrollbar { display: none; }

.dataset-chip {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.dataset-chip:hover {
  color: var(--text);
}

.dataset-chip.is-active {
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 600;
}

.dataset-block {
  flex: 0 0 auto;
  width: min(520px, 85vw);
  min-width: 320px;
  max-width: 560px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dataset-block.is-focused {
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.35);
}

.block-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px;
  margin: 0 0 10px;
  border-radius: 8px;
  background: rgba(82, 65, 159, 0.16);
  border: 1px solid rgba(82, 65, 159, 0.35);
}

.block-filter-bar.hidden { display: none; }

.block-filter-label {
  font-size: 12px;
  color: var(--muted);
}

.block-filter-chip {
  font-size: 13px;
  color: var(--text);
}

.block-filter-code {
  margin-left: 6px;
  font-size: 11px;
  color: var(--accent2);
}

.block-filter-clear {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.block-filter-clear:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.tag-filter-bar {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 12px;
  margin: 0 0 10px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.08);
}

.tag-filter-bar.hidden { display: none; }

.tag-filter-title {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  line-height: 24px;
}

.tag-filter-body {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  min-width: 0;
}

.tag-filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.tag-filter-group-label {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.tag-filter-stack {
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.tag-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.18);
}

.tag-filter-clear-all {
  margin-left: auto;
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.18);
  color: #fde68a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.tag-filter-clear-all:hover {
  background: rgba(251, 191, 36, 0.3);
  border-color: #fbbf24;
  color: #fff;
}

[data-theme="light"] .tag-filter-bar {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: none;
}

[data-theme="light"] .tag-filter-title {
  color: #b45309;
}

[data-theme="light"] .tag-filter-chip {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .tag-filter-clear-all {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(180, 83, 9, 0.4);
}

[data-theme="light"] .tag-filter-clear-all:hover {
  color: #78350f;
  background: rgba(245, 158, 11, 0.24);
  border-color: #b45309;
}

.block-count-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  margin-left: 4px;
  padding: 1px 6px;
  border: 1px solid rgba(82, 65, 159, 0.45);
  border-radius: 999px;
  background: rgba(82, 65, 159, 0.18);
  color: var(--accent2);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  vertical-align: baseline;
  line-height: 1.4;
}

.block-count-btn:hover {
  background: rgba(82, 65, 159, 0.32);
  border-color: var(--accent2);
  color: #fff;
}

.block-count-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--accent2);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  vertical-align: baseline;
  line-height: 1.4;
  user-select: none;
}

.block-count-check:hover {
  color: #fff;
}

.block-count-check.is-checked {
  color: #fff;
}

.block-count-input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--accent2);
  cursor: pointer;
  flex-shrink: 0;
}

.block-count-num {
  line-height: 1.2;
}

#directionTablesContainer tbody tr:has(.block-count-input),
#modeTablesContainer tbody tr:has(.block-count-input),
#envTablesContainer tbody tr:has(.block-count-input) {
  cursor: pointer;
}

#directionTablesContainer tbody tr:has(.block-count-check.is-checked),
#modeTablesContainer tbody tr:has(.block-count-check.is-checked),
#envTablesContainer tbody tr:has(.block-count-check.is-checked) {
  background: rgba(82, 65, 159, 0.2);
}

.dataset-block-label {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  white-space: nowrap;
  flex-shrink: 0;
}

.dataset-block-table {
  overflow-x: auto;
  flex: 1;
  min-width: 0;
}

.dataset-block table {
  width: 100%;
}

#envTablesContainer,
#directionTablesContainer,
#modeTablesContainer {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  min-width: min-content;
  width: max-content;
  padding-bottom: 4px;
}

#envTableWrap,
#directionTableWrap,
#modeTableWrap {
  overflow-x: auto;
  overflow-y: auto;
  cursor: grab;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

#envTableWrap.is-dragging,
#directionTableWrap.is-dragging,
#modeTableWrap.is-dragging {
  cursor: grabbing;
  user-select: none;
}

#envTableWrap::-webkit-scrollbar,
#directionTableWrap::-webkit-scrollbar,
#modeTableWrap::-webkit-scrollbar {
  height: 8px;
}

#envTablesContainer:not(:has(.dataset-block)),
#directionTablesContainer:not(:has(.dataset-block)),
#modeTablesContainer:not(:has(.dataset-block)) {
  display: block;
  min-width: 0;
  width: 100%;
}

.empty-hint {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.toolbar-stocks {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.toolbar-stocks.is-collapsed {
  gap: 8px;
}

.toolbar-stocks-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.toolbar-stocks.is-collapsed .toolbar-stocks-body {
  gap: 8px;
}

/* 收起仅隐藏搜索/设置行，保留上方价位透视与特色因子，以及同行已筛选条 */
.toolbar-stocks.is-collapsed .toolbar-meta-row .toolbar-row-content {
  display: none;
}

.toolbar-stocks.is-collapsed .toolbar-meta-row {
  justify-content: flex-start;
  width: 100%;
  margin-left: 0;
}

.toolbar-row-content {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 10px;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.toolbar-search-input {
  width: 140px;
  min-width: 120px;
  max-width: 180px;
  flex: 0 1 140px;
}

.toolbar-active-filters {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.toolbar-active-filters:empty,
.toolbar-active-filters:not(:has(.toolbar-inline-filter:not(.hidden))) {
  display: none;
}

/* 板块/已筛选并入搜索同一行，不再单独占两行 */
.toolbar-inline-filter.block-filter-bar,
.toolbar-inline-filter.tag-filter-bar {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  padding: 4px 8px;
  gap: 6px 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  align-items: center;
  max-width: 100%;
}

.toolbar-inline-filter .block-filter-clear,
.toolbar-inline-filter .tag-filter-clear-all {
  margin-left: 4px;
}

.toolbar-inline-filter .tag-filter-body {
  flex-wrap: nowrap;
}

.toolbar-inline-filter .tag-filter-title {
  line-height: 1.2;
}

.toolbar-dropdown-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toolbar-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

.toolbar-dropdown .board-filters {
  flex-wrap: wrap;
  gap: 8px 10px;
  width: 100%;
}

.toolbar-dropdown .board-toggle-divider {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  width: 100%;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.toolbar-extra,
.toolbar-filter-extra {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.toolbar-filter-extra > #priceViewHost,
.toolbar-filter-extra > #intradayPriceViewHost {
  flex: 1 1 280px;
  min-width: min(100%, 260px);
  max-width: 420px;
  box-sizing: border-box;
}

.toolbar-filter-extra > #specialFactorHost,
.toolbar-filter-extra > #intradaySpecialFactorHost {
  flex: 2 1 560px;
  min-width: min(100%, 420px);
  max-width: 100%;
  box-sizing: border-box;
}

.toolbar-filter-extra > #auctionFillHost {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.toolbar-filter-extra .price-view-filter {
  height: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 窄屏并排放不下时标签可换行，避免撑出屏幕；特色因子保持固定行数 */
.toolbar-filter-extra .price-view-filter-line {
  flex-wrap: wrap;
}

.toolbar-filter-extra .price-view-filter:not(.special-factor-filter) .price-view-filter-groups {
  flex-wrap: wrap;
  overflow-x: visible;
  row-gap: 6px;
}

.toolbar-filter-extra .price-view-filter:not(.special-factor-filter) .price-view-filter-group {
  flex-shrink: 1;
  flex-wrap: wrap;
  max-width: 100%;
}

.toolbar-filter-extra .price-view-filter-tags {
  flex-wrap: wrap;
  flex-shrink: 1;
  max-width: 100%;
}

.toolbar-filter-extra .special-factor-filter .price-view-filter-line {
  flex-wrap: nowrap;
}

.toolbar-filter-extra .special-factor-filter .price-view-filter-groups {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.toolbar-filter-extra .special-factor-filter .price-view-filter-group {
  flex-shrink: 0;
  max-width: none;
}

.toolbar-filter-extra .special-factor-filter .price-view-filter-tags {
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* 筛选项关闭时整块不占位，另一侧自动拉满 */
#priceViewHost:has(.price-view-filter.hidden),
#specialFactorHost:has(.price-view-filter.hidden),
#auctionFillHost:has(.price-view-filter.hidden),
#intradayPriceViewHost:has(.price-view-filter.hidden),
#intradaySpecialFactorHost:has(.price-view-filter.hidden) {
  display: none;
}

@media (max-width: 1100px) {
  .toolbar-filter-extra > #priceViewHost,
  .toolbar-filter-extra > #specialFactorHost,
  .toolbar-filter-extra > #auctionFillHost,
  .toolbar-filter-extra > #intradayPriceViewHost,
  .toolbar-filter-extra > #intradaySpecialFactorHost {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }
}

.toolbar-row-toggle {
  flex-shrink: 0;
  margin-left: auto;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
  white-space: nowrap;
  line-height: 1.4;
}

.toolbar-row-toggle:hover {
  color: var(--text);
}

.toolbar-row,
.toolbar-meta-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.toolbar-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.toolbar-menu-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.toolbar-menu-btn:hover,
.toolbar-menu-btn.is-open,
.toolbar-menu-btn.is-toggle[aria-pressed="true"] {
  border-color: rgba(167, 139, 250, 0.55);
  color: #ede9fe;
  background: rgba(167, 139, 250, 0.16);
}

.toolbar-menu-btn.js-refresh-data-btn.is-busy,
.toolbar-menu-btn.js-refresh-data-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.toolbar-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 220px;
  max-width: min(92vw, 520px);
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toolbar-dropdown.toolbar-dropdown-wide {
  left: auto;
  right: 0;
  min-width: min(calc(100vw - 24px), 560px);
  max-width: min(calc(100vw - 24px), 640px);
  max-height: min(60vh, 420px);
  overflow: auto;
}

.toolbar-dropdown.hidden,
.toolbar-dropdown[hidden] {
  display: none !important;
}

.toolbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.toolbar-dropdown-item input {
  accent-color: var(--accent);
}

.toolbar-dropdown .col-toggles {
  width: 100%;
}

.board-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.board-filters-label {
  font-size: 12px;
  color: var(--muted);
}

.board-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.board-toggle input { accent-color: var(--accent); }
.board-toggle-select {
  cursor: default;
  gap: 8px;
}
.board-toggle-select select.input {
  min-width: 72px;
  width: auto;
  height: 26px;
  padding: 0 8px;
  font-size: 13px;
}

.board-toggle-divider {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.col-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.col-toggles-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}

.col-toggles-hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-right: 8px;
}

.col-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  cursor: grab;
  user-select: none;
  white-space: nowrap;
}
.col-toggle input { accent-color: var(--accent); cursor: pointer; }
.col-toggle-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 2px;
  color: var(--muted);
  letter-spacing: 1px;
  font-size: 14px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}
.col-toggle.is-dragging,
.col-toggle.is-dragging .col-toggle-grip { cursor: grabbing; }
.col-toggle.is-dragging { opacity: 0.45; }
.col-toggle.is-drag-over { outline: 1px dashed var(--accent); border-radius: 6px; }

.col-hidden { display: none; }

/* 价位透视 / 特色因子筛选 */
.price-view-filter {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  padding: 4px 8px;
  overflow: hidden;
}

.fill-filter {
  display: flex;
  flex-direction: column;
  height: auto;
  box-sizing: border-box;
}
.fill-filter-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-width: 0;
}
.fill-filter-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px 6px;
  align-items: center;
  position: relative;
  min-width: 0;
  overflow-x: auto;
}
.fill-filter-line-single {
  width: 100%;
}
.fill-filter-line-single .price-view-filter-title {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12px;
}
.fill-filter-line-single .filter-current-hint {
  flex: 0 1 72px;
  min-width: 0;
  max-width: 96px;
}
.fill-filter-line-single .price-view-reset {
  flex: 0 0 auto;
  margin-left: auto;
}
.fill-filter-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 0 2px;
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
}
.fill-filter-row > span:first-child {
  width: 24px;
  flex: 0 0 24px;
  color: var(--muted);
}
.fill-filter-row input[type="text"] {
  width: 36px;
  min-width: 32px;
  flex: 0 0 36px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  padding: 0 3px;
  font-size: 11px;
}
.fill-filter-dir input[type="text"] {
  width: 72px;
  min-width: 56px;
  flex: 0 0 72px;
}
.fill-filter-guling select {
  width: 52px;
  min-width: 48px;
  flex: 0 0 52px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  padding: 0 2px;
  font-size: 11px;
}
.fill-tilde {
  color: var(--muted);
}
.fill-unit {
  color: var(--muted);
  font-size: 11px;
  flex: 0 0 auto;
}
.limit-up-days {
  color: var(--neg, #ef4444);
  font-variant-numeric: tabular-nums;
}

/* 桌面：价位透视 / 特色因子回到工具栏主区域，列头弹层仍可作补充入口 */

.th-with-filter {
  white-space: nowrap;
}

.th-with-filter .th-label {
  margin-right: 2px;
}

/* 有筛选按钮的列：排序标记在前，筛选图标在后 */
th.sortable.th-with-filter::after {
  content: none;
}

.th-with-filter .th-sort-mark {
  display: inline-block;
  margin: 0 2px 0 1px;
  font-size: 11px;
  line-height: 1;
  opacity: 0.35;
  vertical-align: middle;
}

.th-with-filter .th-sort-mark::before {
  content: "⇅";
}

th.sortable.th-with-filter.sort-asc .th-sort-mark,
th.sortable.th-with-filter.sort-desc .th-sort-mark {
  opacity: 1;
  color: var(--accent2);
}

th.sortable.th-with-filter.sort-asc .th-sort-mark::before { content: "↑"; }
th.sortable.th-with-filter.sort-desc .th-sort-mark::before { content: "↓"; }

.th-filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 4px;
  vertical-align: middle;
  border: 1px solid rgba(167, 139, 250, 0.55);
  border-radius: 4px;
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
  cursor: pointer;
  opacity: 1;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.th-filter-trigger:hover,
.th-filter-trigger.is-open {
  color: #ede9fe;
  background: rgba(167, 139, 250, 0.32);
  border-color: #a78bfa;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.35);
}

.th-filter-trigger.is-active {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.22);
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35);
}

.th-filter-trigger.hidden {
  display: none;
}

[data-theme="light"] .th-filter-trigger {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.45);
}

[data-theme="light"] .th-filter-trigger:hover,
[data-theme="light"] .th-filter-trigger.is-open {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.18);
  border-color: #7c3aed;
  box-shadow: none;
}

[data-theme="light"] .th-filter-trigger.is-active {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
  border-color: #f59e0b;
}

.col-filter-popover {
  position: fixed;
  z-index: 1200;
  min-width: 320px;
  max-width: min(440px, calc(100vw - 16px));
  padding: 10px 12px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2, #1e1e1e);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.col-filter-popover.hidden {
  display: none;
}

.col-filter-popover-wide {
  max-width: min(560px, calc(100vw - 16px));
}

.col-filter-popover .price-view-filter-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.col-filter-popover .price-view-filter-title {
  font-size: 13px;
}

.col-filter-section {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.col-filter-section .price-view-filter-label {
  min-width: 3.5em;
  width: auto;
  padding-top: 4px;
  flex-shrink: 0;
}

.col-filter-section .price-view-filter-tags {
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
}

[data-theme="light"] .col-filter-popover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.special-factor-filter .price-view-filter-head-row,
.price-view-filter .price-view-filter-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.filter-current-hint {
  flex: 1;
  min-width: 80px;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-current-hint.is-empty {
  font-weight: 400;
  color: var(--muted);
}

.price-view-filter .price-view-filter-line + .price-view-filter-line,
.special-factor-filter .price-view-filter-line + .price-view-filter-line {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.special-factor-filter .price-view-filter-line {
  display: flex;
  align-items: center;
  min-width: 0;
}

.special-factor-filter .price-view-filter-line .price-view-filter-groups {
  flex: 1;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.special-factor-filter .price-view-filter-group {
  flex-shrink: 0;
}

.special-factor-filter .price-view-filter-line.is-xpc-limit-row .price-view-filter-groups {
  flex-wrap: nowrap;
}

.price-view-filter-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.price-view-filter-title {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.price-view-filter-groups {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.price-view-filter-groups::-webkit-scrollbar {
  height: 4px;
}

.price-view-filter-groups::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.price-view-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.price-view-filter-sep {
  flex-shrink: 0;
  width: 1px;
  height: 18px;
  background: var(--border);
}

.price-view-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.price-view-stack-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: relative;
}

.price-view-stack-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.price-view-switch {
  position: relative;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: var(--switch-bg);
  transition: background 0.2s;
}

.price-view-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--switch-knob);
  transition: transform 0.2s, background 0.2s;
}

.price-view-stack-toggle input:checked + .price-view-switch {
  background: rgba(168, 85, 247, 0.35);
}

.price-view-stack-toggle input:checked + .price-view-switch::after {
  transform: translateX(14px);
  background: #a855f7;
}

.price-view-reset {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.price-view-reset:hover { color: var(--text); }

.price-view-filter-label {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.price-view-filter-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.price-view-filter-btn {
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s, opacity 0.12s;
}

.price-view-filter-btn:hover { opacity: 0.9; }

.price-view-filter-btn.is-active {
  font-weight: 700;
  box-shadow: 0 0 0 2px #ffffff;
}

.price-view-cell {
  white-space: normal;
  max-width: 220px;
}

.price-view-tag {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.price-view-tag:last-child { margin-right: 0; }

.special-factor-cell {
  white-space: normal;
  max-width: 240px;
}

.special-factor-tag {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.special-factor-tag:last-child { margin-right: 0; }

.stats { margin-left: auto; font-size: 13px; color: var(--muted); }

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #333;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #1a1a1a;
  background: var(--bg2);
  max-height: calc(100vh - 180px);
}

table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }

thead { position: sticky; top: 0; background: var(--bg3); z-index: 1; }

th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }

th { color: var(--muted); font-weight: 500; font-size: 12px; }

th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable:hover { color: var(--text); background: rgba(82, 65, 159, 0.15); }
th.sortable.sort-active { color: var(--accent2); }
th.sortable::after {
  content: " ⇅";
  opacity: 0.35;
  font-size: 11px;
}
th.sortable.sort-asc::after { content: " ↑"; opacity: 1; color: var(--accent2); }
th.sortable.sort-desc::after { content: " ↓"; opacity: 1; color: var(--accent2); }

tbody tr:hover { background: rgba(82, 65, 159, 0.12); }

.pos { color: var(--red); }
.neg { color: var(--green); }

/* 竞价页股票列表（参考官方样式） */
#stockTable {
  font-size: 13px;
}

#stockTable thead th {
  background: var(--table-head-bg);
  color: var(--table-head-text);
  font-weight: 500;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}

#stockTable thead th.sortable:hover {
  background: var(--table-head-hover);
  color: var(--text);
}

#stockTable thead th.th-metric-xcjw {
  background: #3d2060;
  color: #e9d5ff;
}

#stockTable thead th.th-metric-jssb {
  background: #4a2020;
  color: #fecaca;
}

#stockTable thead th.th-metric-cjs {
  background: #1a3050;
  color: #bfdbfe;
}

#stockTable thead th.th-metric-sls {
  background: #163c3c;
  color: #99f6e4;
}

#stockTable thead th.th-metric-direction {
  background: var(--table-head-bg);
}

#stockTable tbody tr {
  background: var(--table-row-bg);
}

#stockTable tbody tr:nth-child(even) {
  background: var(--table-row-alt);
}

#stockTable tbody td {
  padding: 5px 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--table-row-border);
  line-height: 1.35;
}

#stockTable .cell-idx {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  width: 42px;
}

#stockTable .cell-code {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text);
}

#stockTable .cell-name {
  color: var(--text);
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#stockTable .pct-badge {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

#stockTable .pct-badge.pos { color: var(--red); }
#stockTable .pct-badge.neg { color: var(--green); }
#stockTable .pct-badge.flat { color: var(--muted); }

#stockTable .price-signed,
#intradayTable .price-signed {
  font-variant-numeric: tabular-nums;
}
#stockTable .price-signed.pos,
#intradayTable .price-signed.pos { color: var(--red); }
#stockTable .price-signed.neg,
#intradayTable .price-signed.neg { color: var(--green); }
#stockTable .price-signed.flat,
#intradayTable .price-signed.flat { color: var(--text); }

#stockTable .cell-price {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
}

html:not(.has-live-quote):not(.has-list-live) #stockTable [data-col="live_price"],
html:not(.has-live-quote):not(.has-list-live) #intradayTable [data-col="live_price"] {
  display: none !important;
}

#stockTable .cell-live-price,
#intradayTable .cell-live-price {
  white-space: nowrap;
  min-width: 4.5em;
}

#stockTable .cell-live-price .live-pct,
#intradayTable .cell-live-price .live-pct {
  font-size: 11px;
  margin-left: 2px;
  opacity: 0.9;
}

.pz-warning-panel {
  margin: 4px 12px 6px;
  padding: 4px 10px 6px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(236, 128, 141, 0.08), transparent 70%);
  flex-shrink: 0;
  max-height: min(180px, 24vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.pz-warning-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  min-height: 28px;
}
.pz-warning-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.pz-warning-title {
  font-size: 13px;
  margin-right: 0;
  line-height: 1.2;
}
.pz-warning-meta,
.pz-warning-status {
  font-size: 11px;
  color: var(--muted, #6b7280);
  line-height: 1.2;
}
.pz-warning-status {
  margin: 0;
  flex-shrink: 0;
}
.pz-warning-status:empty,
.pz-warning-status.is-quiet {
  display: none;
}
.pz-warning-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pz-warning-actions .btn-secondary {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.3;
}
.pz-warning-body {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.pz-warning-body.is-collapsed {
  display: none;
}
.pz-warning-table-wrap {
  max-height: min(130px, 18vh);
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}
/* 盘中页 .table-wrap 会 flex:1 / max-height:none，预警表必须单独压住 */
#panel-intraday .pz-warning-table-wrap.table-wrap,
#panel-intraday .pz-warning-table-wrap {
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  max-height: min(130px, 18vh);
  min-height: 0;
  overflow: auto;
}
.pz-warning-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.pz-warning-table th,
.pz-warning-table td {
  padding: 3px 6px;
  border-bottom: 1px solid var(--border, #eee);
  text-align: left;
  white-space: nowrap;
}
.pz-warning-table th {
  position: sticky;
  top: 0;
  background: var(--bg, #fff);
  z-index: 1;
  font-weight: 600;
  color: var(--muted, #6b7280);
}
.pz-warning-table tr.is-clickable {
  cursor: pointer;
}
.pz-warning-table tr.is-clickable:hover {
  background: rgba(236, 128, 141, 0.12);
}
.pz-warning-table .pos { color: var(--red, #ef4444); }
.pz-warning-table .neg { color: var(--green, #16a34a); }
@media (max-width: 900px) {
  .pz-warning-panel {
    margin: 4px 8px 6px;
    max-height: min(200px, 28vh);
  }
  #panel-intraday .pz-warning-table-wrap.table-wrap,
  #panel-intraday .pz-warning-table-wrap {
    max-height: min(120px, 18vh);
  }
}

#stockTable .cell-metric {
  font-variant-numeric: tabular-nums;
  text-align: left;
}

#stockTable .metric-zero {
  color: var(--muted);
  font-size: 13px;
}

#stockTable .metric-xcjw {
  color: #c084fc;
  font-size: 13px;
}

#stockTable .metric-jsjl {
  color: #ff6633;
  font-size: 13px;
}

#stockTable .metric-jsjl-neg,
#intradayTable .metric-jsjl-neg,
#kanpanTable .metric-jsjl-neg,
#xc5dTable .metric-jsjl-neg,
#zwpoolTable .metric-jsjl-neg,
#xdqbpoolTable .metric-jsjl-neg,
#zw5dTable .metric-jsjl-neg,
#gw5dTable .metric-jsjl-neg,
#xdqb5dTable .metric-jsjl-neg,
#xcwallTable .metric-jsjl-neg,
#xyjcTable .metric-jsjl-neg,
#bdpoolTable .metric-jsjl-neg,
#gwpoolTable .metric-jsjl-neg,
.kpdesk-table .metric-jsjl-neg {
  color: #22c55e;
}

#stockTable .metric-jssb {
  color: #f87171;
  font-size: 13px;
}

#stockTable .metric-short_line_score {
  color: #2dd4bf;
  font-size: 13px;
}

#intradayTable .metric-cjs {
  color: #60a5fa;
  font-size: 13px;
}

#intradayTable .metric-jsjl {
  color: #ff6633;
  font-size: 13px;
}

#intradayTable {
  font-size: 13px;
}

#intradayTable thead th {
  background: var(--table-head-bg);
  color: var(--table-head-text);
  font-weight: 500;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}

#intradayTable thead th.sortable:hover {
  background: var(--table-head-hover);
  color: var(--text);
}

#intradayTable thead th.th-metric-xcpzqb {
  background: #4a2020;
  color: #fecaca;
}

#intradayTable thead th.th-metric-xcpzdx {
  background: #143528;
  color: #86efac;
}

#intradayTable thead th.th-metric-xczpqb {
  background: #1a3050;
  color: #bfdbfe;
}

#intradayTable thead th.th-metric-jsjl {
  background: #4a2418;
  color: #fdba74;
}

#intradayTable thead th.th-metric-direction {
  background: var(--table-head-bg);
}

#intradayTable tbody tr { background: var(--table-row-bg); }
#intradayTable tbody tr:nth-child(even) { background: var(--table-row-alt); }
#intradayTable tbody td {
  padding: 5px 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--table-row-border);
  line-height: 1.35;
}
#intradayTable .cell-idx {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  width: 42px;
}
#intradayTable .cell-code { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text); }
#intradayTable .cell-name {
  color: var(--text);
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
#intradayTable .pct-badge { font-variant-numeric: tabular-nums; font-size: 12px; }
#intradayTable .pct-badge.pos { color: var(--red); }
#intradayTable .pct-badge.neg { color: var(--green); }
#intradayTable .pct-badge.flat { color: var(--muted); }
#intradayTable .cell-price { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
#intradayTable .cell-metric { font-variant-numeric: tabular-nums; }
#intradayTable .metric-zero { color: var(--muted); font-size: 13px; }
#intradayTable .metric-xcpzqb { color: #f87171; font-size: 13px; }
#intradayTable .metric-xcpzdx { color: #4ade80; font-size: 13px; }
#intradayTable .metric-xczpqb { color: #60a5fa; font-size: 13px; }
#intradayTable .metric-jsjl { color: #ff6633; font-size: 13px; }
#intradayTable .market-cap,
#intradayTable .industry-cell,
#intradayTable .direction-cell,
#intradayTable .price-view-cell,
#intradayTable .special-factor-cell {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.green-track-table .metric-xcjw { color: #c084fc; }
.green-track-table .metric-jssb { color: #f87171; }
.green-track-table .metric-cjs { color: #60a5fa; }

.green-track-table thead th.th-metric-xcjw {
  background: #3d2060;
  color: #e9d5ff;
}

.green-track-table thead th.th-metric-jssb {
  background: #4a2020;
  color: #fecaca;
}

.green-track-table thead th.th-metric-cjs {
  background: #1a3050;
  color: #bfdbfe;
}

#stockTable .market-cap {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
}

#stockTable .cap-main { color: var(--text-secondary); }
#stockTable .cap-tag { margin-left: 4px; font-size: 11px; color: var(--text-dim); }

#stockTable .industry-cell {
  max-width: 100px;
  color: var(--text-dim);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#stockTable .guling-subject-cell,
#intradayTable .guling-subject-cell {
  max-width: 200px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gl-subj-text {
  margin-right: 8px;
}
.gl-subj-text:last-child { margin-right: 0; }
.gl-subj-text[data-sid] { cursor: pointer; }
.gl-subj-text.is-hot { color: #f5c84c; }
.gl-subj-text.is-dalong { color: #ff8b95; }
.gl-subj-text.is-n0 { color: #c4b5fd; }
.gl-subj-text.is-n1 { color: #7dd3fc; }
.gl-subj-text.is-n2 { color: #86efac; }
.gl-subj-text.is-n3 { color: #e0a06a; }
.gl-subj-text.is-n4 { color: #f9a8d4; }
.gl-subj-text[data-sid]:hover { filter: brightness(1.15); }
[data-theme="light"] .gl-subj-text.is-hot { color: #b45309; }
[data-theme="light"] .gl-subj-text.is-dalong { color: #be123c; }
[data-theme="light"] .gl-subj-text.is-n0 { color: #6d28d9; }
[data-theme="light"] .gl-subj-text.is-n1 { color: #0369a1; }
[data-theme="light"] .gl-subj-text.is-n2 { color: #047857; }
[data-theme="light"] .gl-subj-text.is-n3 { color: #c2410c; }
[data-theme="light"] .gl-subj-text.is-n4 { color: #be185d; }

#stockTable .direction-cell {
  max-width: 360px;
  color: var(--text-secondary);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#stockTable [data-col="xc_exclusive_direction"].direction-cell {
  max-width: 280px;
}

.exclusive-direction-table {
  min-width: 1280px;
}

#stockTable .price-view-cell,
#stockTable .special-factor-cell {
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

#stockTable .price-view-tag,
#stockTable .special-factor-tag {
  margin-right: 6px;
}

#stockTable .price-view-tag:last-child,
#stockTable .special-factor-tag:last-child {
  margin-right: 0;
}

#stockTable .stock-row:hover {
  background: var(--row-highlight) !important;
}

.table-msg,
.table-msg td {
  text-align: center !important;
  color: var(--muted) !important;
}

.table-msg-action {
  margin-top: 10px;
}

.table-msg-error,
.table-msg-error td {
  color: var(--red) !important;
}

.page-msg {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.page-msg-error {
  color: var(--red);
}

.scroll-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

#stockScrollStatus,
#intradayScrollStatus {
  display: none !important;
  margin: 0;
  min-height: 0;
}

.direction-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.industry-cell { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.market-cap { white-space: nowrap; }

.stock-row { cursor: pointer; }

.modal.hidden { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.modal-panel {
  position: relative;
  width: min(960px, 96vw);
  max-height: 90vh;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.kline-panel {
  width: min(1480px, 98vw);
  height: min(900px, 92vh);
  max-height: 92vh;
}

.kline-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.kline-stock-list {
  width: 228px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--bg2, rgba(0, 0, 0, 0.18));
}

.kline-stock-list.is-track {
  width: 312px;
}

.kline-stock-list[hidden] {
  display: none;
}

.kline-stock-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.kline-stock-list-count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kline-stock-list-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.kline-stock-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.kline-stock-item:hover {
  background: var(--row-hover);
}

.kline-stock-item.is-active {
  background: rgba(82, 65, 159, 0.28);
}

.kline-stock-item-idx {
  flex-shrink: 0;
  width: 28px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.kline-stock-item-meta {
  min-width: 0;
  flex: 1;
}

.kline-stock-item-name {
  display: block;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kline-stock-item-code {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.kline-stock-item-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.kline-stock-item-prices .profit-up,
.kline-stock-item-prices .profit-down,
.kline-stock-item-prices .profit-flat,
.kline-stock-item-prices .profit-na {
  font-weight: 600;
}

.kline-stock-list-empty {
  padding: 16px 12px;
  font-size: 12px;
  color: var(--muted);
}

.kline-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}


.modal.kline-fullscreen {
  padding: 0;
}

.kline-panel.is-fullscreen {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  border: none;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.kline-panel .modal-header {
  cursor: default;
  user-select: none;
  position: relative;
  padding: 12px 168px 10px 16px;
  align-items: flex-start;
}

.kline-panel .modal-header .kline-controls,
.kline-panel .modal-header .kline-header-actions,
.kline-panel .modal-header select {
  cursor: auto;
  user-select: auto;
}

.kline-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.kline-icon-btn {
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.kline-icon-btn:hover {
  color: var(--text);
  border-color: var(--accent2);
}

.kline-controls .js-tdx-toggle {
  font-weight: 600;
  color: var(--text);
}

.kline-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}
.kline-controls label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.kline-title-wrap { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; order: 1; align-items: flex-start; }
.kline-code-line {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--muted);
}
.kline-code-line[hidden] { display: none !important; }
.chart-stock-code {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--muted, #888);
}
.intraday-chart-head strong:has(.chart-stock-code),
.day-fs-popover-title:has(.chart-stock-code) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  gap: 1px;
}
.kline-subtitle {
  font-size: 12px;
  color: var(--muted);
  flex: 1 1 100%;
  order: 2;
  min-width: 0;
}
.kline-controls { order: 4; }
.kline-mobile-view-toggle { order: 3; margin-left: auto; }

html:not(.is-mobile) .kline-mobile-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border, #444);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
}

html:not(.is-mobile) .kline-mobile-view-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted, #999);
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  cursor: pointer;
}

html:not(.is-mobile) .kline-mobile-view-btn + .kline-mobile-view-btn {
  border-left: 1px solid var(--border, #444);
}

html:not(.is-mobile) .kline-mobile-view-btn:hover {
  color: var(--text, #e8e6e3);
  background: rgba(255, 255, 255, 0.04);
}

html:not(.is-mobile) .kline-mobile-view-btn.is-active {
  color: var(--text, #e8e6e3);
  background: rgba(236, 128, 141, 0.22);
}

html:not(.is-mobile) .kline-controls {
  margin-left: 8px;
}

.kline-controls[hidden] {
  display: none !important;
}

html:not(.is-mobile) .kline-panel.pc-view-fs .kline-chart,
html:not(.is-mobile) .kline-panel.pc-view-fs #klineStatus,
html:not(.is-mobile) .kline-panel.pc-view-fs .kline-status-row {
  display: none !important;
}

html:not(.is-mobile) .kline-panel.pc-view-k .kline-intraday-section {
  display: none !important;
}

html:not(.is-mobile) .kline-panel.pc-view-fs .kline-intraday-section:not(.hidden) {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  height: auto;
  flex: 1 1 auto;
  min-height: 420px;
  z-index: auto;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

html:not(.is-mobile) .kline-panel.pc-view-fs .kline-intraday-close {
  display: none;
}

html:not(.is-mobile) .kline-panel.pc-view-fs .kline-intraday-chart {
  min-height: 420px;
}

html:not(.is-mobile) .kline-panel.pc-view-both .kline-main {
  overflow: hidden;
}

html:not(.is-mobile) .kline-panel.pc-view-both.has-intraday .kline-chart {
  order: 2;
  flex: 1.15 1 0;
  min-height: 220px;
}

html:not(.is-mobile) .kline-panel.pc-view-both .kline-intraday-section:not(.hidden) {
  order: 1;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  height: auto;
  flex: 0.95 1 0;
  min-height: 200px;
  z-index: auto;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

html:not(.is-mobile) .kline-panel.pc-view-both .kline-intraday-close {
  display: none;
}

html:not(.is-mobile) .kline-panel.pc-view-both .kline-intraday-chart {
  min-height: 160px;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: var(--text); }

.greentrack-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.greentrack-hint {
  font-size: 12px;
  color: var(--muted);
}

#panel-rank1pnl .greentrack-toolbar {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
  -ms-flex-align: center;
  align-items: center;
}

#panel-rank1pnl .greentrack-hint {
  min-width: 0;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panel-rank1pnl .rank1-pnl-range-group,
.rank1-pnl-range-group {
  display: -ms-flexbox !important;
  display: flex !important;
  -ms-flex-direction: row !important;
  flex-direction: row !important;
  -ms-flex-wrap: nowrap !important;
  flex-wrap: nowrap !important;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
}

#panel-rank1pnl .rank1-pnl-range-group > * {
  display: inline-block;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  vertical-align: middle;
}

#panel-rank1pnl .rank1-pnl-range-lbl {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

#panel-rank1pnl .rank1-pnl-range-group > .rank1-pnl-range-lbl:first-child {
  margin-left: 0;
}

#panel-rank1pnl .rank1-pnl-range-group input[type="date"] {
  width: auto;
  max-width: none;
  font-size: 12px;
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  margin-left: 6px;
}

#panel-rank1pnl .rank1-pnl-range-group .btn-secondary {
  margin-left: 8px;
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--accent2);
}

.rank1-pnl-chart-wrap {
  width: 100%;
  margin: 0 0 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 8px 4px;
  box-sizing: border-box;
}
.rank1-pnl-chart-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 4px 8px 8px;
}
.rank1-pnl-chart-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.rank1-pnl-chart-filters input {
  accent-color: var(--accent2, #6b5bb5);
  margin: 0;
}
.rank1-pnl-chart-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.rank1-pnl-chart {
  width: 100%;
  height: 280px;
  min-height: 280px;
}

.rank1-pnl-table tbody tr {
  cursor: pointer;
}
.rank1-pnl-trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}
.rank1-pnl-trend em {
  font-style: normal;
}
.rank1-pnl-spark {
  display: block;
  flex: 0 0 auto;
  opacity: 0.95;
}
.rank1-pnl-trend.is-up { color: var(--red); }
.rank1-pnl-trend.is-down { color: var(--green); }
.rank1-pnl-trend.is-flat { color: #8b93a3; }
.rank1-pnl-trend.is-na {
  color: #6b7280;
  font-weight: 500;
}
.rank1-pnl-table tbody tr.is-active {
  outline: 1px solid var(--accent2);
}
.rank1-pnl-detail {
  margin-top: 12px;
}
.rank1-pnl-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.green-track-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 10px;
}

.green-track-stat {
  flex: 1 1 160px;
  min-width: 150px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.green-track-stat-label {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.35;
}

.green-track-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  margin-top: 2px;
}

.green-track-stat-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.green-track-next-col {
  font-size: 12px;
  color: var(--muted);
  vertical-align: top;
}

.green-track-table th,
.green-track-table td {
  text-align: center;
  white-space: nowrap;
}

.green-track-table .green-track-subhead th {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  padding-top: 0;
}

.green-track-date {
  text-align: left !important;
  vertical-align: top;
  font-weight: 600;
}

.green-track-next {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

.green-track-rank {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.green-track-empty {
  color: var(--muted);
  text-align: center !important;
}

.green-track-stock-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--accent2);
  font: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(130, 110, 220, 0.45);
  text-underline-offset: 2px;
}

.green-track-stock-link:hover {
  color: var(--link-hover);
}

.green-track-price-input {
  width: 100%;
  min-width: 52px;
  max-width: 72px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--bg2);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.green-track-price-input:hover {
  border-color: var(--border);
}

.green-track-price-input:focus {
  outline: none;
  border-color: var(--accent2);
  background: var(--bg);
}

.green-track-price-input.manual {
  border-color: rgba(255, 180, 80, 0.45);
  background: rgba(255, 180, 80, 0.08);
}

.green-track-price-input.saving {
  opacity: 0.55;
}

.green-track-profit-cell {
  white-space: nowrap;
}

.monthly-track-content {
  padding: 0 12px 16px;
}

.monthly-track-content .table-wrap {
  overflow: auto;
  max-height: calc(100vh - 280px);
}

.sim-track-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}

.sim-track-stat {
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
}

.sim-track-stat-label {
  font-size: 11px;
  color: var(--muted, #787776);
  margin-bottom: 4px;
}

.sim-track-stat-value {
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.sim-track-months {
  margin-bottom: 16px;
}

.sim-month-table,
.sim-day-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.sim-month-table th,
.sim-month-table td,
.sim-day-table th,
.sim-day-table td {
  padding: 6px 8px;
  border: 1px solid var(--border, #333);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sim-month-table th:first-child,
.sim-month-table td:first-child,
.sim-day-table td:nth-child(1),
.sim-day-table td:nth-child(2),
.sim-day-table td:nth-child(3) {
  text-align: left;
}

.sim-month-table thead th,
.sim-day-table thead th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

.sim-month-table .monthly-total-row td {
  font-weight: 600;
}

.sim-month-sub {
  display: none;
}

.sim-day-head td {
  text-align: left !important;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}

.sim-day-net {
  float: right;
  font-weight: 650;
}

.sim-skip-row td {
  color: var(--muted, #787776);
}

.sim-status-filled { color: var(--muted, #9a9a9a); }
.sim-status-open { color: #60a5fa; }
.sim-status-skipped { color: var(--muted, #787776); }

.sim-mode-green { color: #60a5fa; }
.sim-mode-jw { color: #c084fc; }
.sim-mode-hpqb { color: #f87171; }

.monthly-compare-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.monthly-compare-table th,
.monthly-compare-table td {
  padding: 6px 8px;
  border: 1px solid var(--border, #333);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.monthly-compare-table th:first-child,
.monthly-compare-table td:first-child {
  text-align: left;
}

.monthly-compare-table thead th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

.monthly-compare-table .monthly-strategy-head {
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  min-width: 156px;
  border-bottom: 1px solid var(--border, #333);
}

.monthly-compare-table .monthly-strategy-sep {
  border-left: 2px solid rgba(255, 255, 255, 0.22);
  padding-left: 10px;
}

.monthly-compare-table .monthly-strategy-sep-major {
  border-left-width: 3px;
  border-left-color: rgba(255, 255, 255, 0.32);
}

.monthly-compare-table thead .monthly-strategy-sep {
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.08);
}

.monthly-compare-table tbody td.monthly-strategy-sep {
  padding-left: 10px;
}

.monthly-compare-table .monthly-subhead th {
  top: 36px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #787776);
}

.monthly-compare-table .monthly-mode-head {
  min-width: 48px;
}

.monthly-compare-table .monthly-month-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--sticky-bg);
  font-weight: 600;
  min-width: 72px;
}

.monthly-compare-table thead .monthly-month-col {
  z-index: 3;
}

.monthly-compare-table .monthly-total-row td {
  font-weight: 600;
}

.monthly-compare-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
}

.monthly-compare-table tbody tr:hover .monthly-month-col {
  background-color: rgba(255, 255, 255, 0.06);
}

.profit-up { color: var(--red); font-variant-numeric: tabular-nums; }
.profit-down { color: var(--green); font-variant-numeric: tabular-nums; }
.profit-flat { color: var(--muted); font-variant-numeric: tabular-nums; }
.profit-na { color: var(--muted); }

/* 明亮主题补充 */
[data-theme="dark"] #panel-selection .highlight-rank-1 {
  color: #ffd666;
  background: rgba(255, 214, 102, 0.12);
}

[data-theme="dark"] #panel-selection .highlight-rank-3 {
  color: #e8a86b;
  background: rgba(232, 168, 107, 0.12);
}

[data-theme="light"] #stockTable thead th.th-metric-xcjw {
  background: #f3e8ff;
  color: #7e22ce;
}

[data-theme="light"] #stockTable thead th.th-metric-jssb {
  background: #fee2e2;
  color: #b91c1c;
}

[data-theme="light"] #stockTable thead th.th-metric-cjs {
  background: #dbeafe;
  color: #1d4ed8;
}

[data-theme="light"] #stockTable thead th.th-metric-sls {
  background: #ccfbf1;
  color: #0f766e;
}

[data-theme="light"] #intradayTable thead th.th-metric-xcpzqb {
  background: #fee2e2;
  color: #b91c1c;
}

[data-theme="light"] #intradayTable thead th.th-metric-xcpzdx {
  background: #dcfce7;
  color: #15803d;
}

[data-theme="light"] #intradayTable thead th.th-metric-xczpqb {
  background: #dbeafe;
  color: #1d4ed8;
}

[data-theme="light"] #intradayTable thead th.th-metric-jsjl {
  background: #ffedd5;
  color: #c2410c;
}

[data-theme="light"] #intradayTable .metric-xcpzqb { color: #dc2626; }
[data-theme="light"] #intradayTable .metric-xcpzdx { color: #16a34a; }
[data-theme="light"] #intradayTable .metric-xczpqb { color: #2563eb; }
[data-theme="light"] #intradayTable .metric-jsjl { color: #c2410c; }
[data-theme="light"] #stockTable .metric-jsjl-neg,
[data-theme="light"] #intradayTable .metric-jsjl-neg,
[data-theme="light"] #kanpanTable .metric-jsjl-neg,
[data-theme="light"] .kpdesk-table .metric-jsjl-neg {
  color: #16a34a;
}

[data-theme="light"] .env-state-rotation {
  color: var(--muted);
}

[data-theme="light"] #stockTable .pct-badge.pos { color: var(--red); }
[data-theme="light"] #stockTable .pct-badge.neg { color: var(--green); }
[data-theme="light"] #stockTable .metric-xcjw { color: #9333ea; }
[data-theme="light"] #stockTable .metric-jsjl { color: #c2410c; }
[data-theme="light"] #stockTable .metric-jssb { color: #dc2626; }
[data-theme="light"] #stockTable .metric-cjs { color: #2563eb; }
[data-theme="light"] #stockTable .metric-short_line_score { color: #0d9488; }

[data-theme="light"] .green-track-table .metric-xcjw { color: #9333ea; }
[data-theme="light"] .green-track-table .metric-jssb { color: #dc2626; }
[data-theme="light"] .green-track-table .metric-cjs { color: #2563eb; }

[data-theme="light"] .green-track-table thead th.th-metric-xcjw {
  background: #f3e8ff;
  color: #7e22ce;
}

[data-theme="light"] .green-track-table thead th.th-metric-jssb {
  background: #fee2e2;
  color: #b91c1c;
}

[data-theme="light"] .green-track-table thead th.th-metric-cjs {
  background: #dbeafe;
  color: #1d4ed8;
}

[data-theme="light"] .date-picker-popover {
  box-shadow: 0 8px 24px var(--shadow);
}

[data-theme="light"] .price-view-filter-btn.is-active {
  box-shadow: 0 0 0 2px #111111;
}

[data-theme="light"] .filter-current-hint:not(.is-empty) {
  color: #b45309;
}

[data-theme="light"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .monthly-compare-table thead th {
  background: var(--bg3);
}

[data-theme="light"] .monthly-compare-table .monthly-strategy-sep {
  border-left-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .monthly-compare-table .monthly-strategy-sep-major {
  border-left-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] tbody tr:hover {
  background: var(--row-hover);
}

[data-theme="light"] .green-track-table tbody tr:hover {
  background: var(--row-hover);
}

.kline-status {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--muted);
  min-height: 32px;
  flex-shrink: 0;
}
.kline-chart {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.kline-panel.has-intraday .kline-chart {
  flex: 3 1 0;
  min-height: 320px;
}

html:not(.is-mobile) .kline-panel.has-intraday .kline-chart {
  flex: 1 1 auto;
  min-height: 220px;
}

.kline-intraday-section {
  border-top: 1px solid var(--border);
  flex: 2 1 0;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

html:not(.is-mobile) .kline-panel:not(.pc-view-both):not(.pc-view-fs) .kline-intraday-section:not(.hidden) {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  width: auto;
  height: min(780px, 82%);
  flex: none;
  min-height: 420px;
  z-index: 12;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.kline-intraday-section.hidden {
  display: none;
}

.kline-intraday-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 0;
}

.kline-intraday-head .kline-intraday-close {
  margin-left: auto;
}

.kline-intraday-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.kline-intraday-close {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.kline-intraday-close:hover { color: var(--text); }

.kline-intraday-status {
  padding: 6px 16px;
  font-size: 12px;
  color: var(--muted);
  min-height: 24px;
}

.kline-intraday-chart {
  width: 100%;
  flex: 1 1 auto;
  min-height: 180px;
  height: auto;
}

.kline-panel.is-fullscreen .kline-chart {
  min-height: 0;
}

.kline-panel.is-fullscreen .kline-intraday-section {
  min-height: 0;
}

.day-fs-popover {
  position: fixed;
  z-index: 1100;
  right: 24px;
  bottom: 24px;
  width: min(1100px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 72px));
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.day-fs-popover.hidden {
  display: none;
}

.day-fs-popover-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 0;
  flex-shrink: 0;
}

.day-fs-popover-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.day-fs-popover-close {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.day-fs-popover-close:hover {
  color: var(--text);
}

.day-fs-popover-status {
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
  min-height: 22px;
  flex-shrink: 0;
}

.day-fs-popover-chart {
  width: 100%;
  flex: 1 1 auto;
  min-height: 180px;
}

@media (max-width: 900px) {
  #panel-selection .selection-layout {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  #panel-selection .table-wrap {
    flex: none;
    max-height: calc(100vh - 280px);
  }
  #panel-selection .sidebar.selection-sidebar {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    max-height: 320px;
  }
  #panel-selection .selection-highlights { flex: none; overflow-y: auto; }
  .sidebar { width: 100%; max-height: 240px; }
}

.th-short { display: none; }
.xc-stock-name {
  display: inline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  line-height: 1.35;
  vertical-align: middle;
}
.xc-stock-code { display: none; }
.m-panel-tools,
.m-cols-panel,
.m-sub-panel,
.m-tabbar,
.m-sheet,
.m-market-chrome,
.m-rank-chrome,
.m-track-hub,
.m-mine-panel,
.m-filter-sheet,
.m-stock-cards,
.m-top5-strip,
#panel-m-track,
#panel-m-mine { display: none; }

.admin-sync-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 16px;
}

.admin-account-card {
  margin-bottom: 16px;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2, rgba(255, 255, 255, 0.03));
}
.admin-account-card-head h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}
.admin-account-card-head .admin-sync-hint {
  margin: 0 0 14px;
  max-width: 52em;
}
.admin-account-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 14px 16px;
  margin-bottom: 14px;
}
.admin-account-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.admin-account-field .input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.admin-account-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .admin-account-fields {
    grid-template-columns: 1fr;
  }
}

.admin-sync-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.admin-sync-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.admin-sync-row .input {
  width: auto;
  min-width: 100px;
}

.admin-sync-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 24px;
  flex-wrap: wrap;
}

/* —— 后台策略回测 —— */
.admin-bt-modes {
  display: grid;
  gap: 8px;
  margin: 8px 0 16px;
}
.admin-bt-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 8px 10px;
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
}
.admin-bt-mode-row label.admin-bt-mode-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  margin: 0;
}
.admin-bt-mode-row .admin-bt-mode-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.admin-bt-mode-row .admin-bt-mode-top .input {
  width: 72px;
}
.admin-bt-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 8px;
}
.admin-bt-chart-head h4 {
  margin: 0;
}
.admin-bt-chart-toggles {
  display: inline-flex;
  gap: 8px;
}
.admin-bt-chart-btn.is-active {
  border-color: #38bdf8;
  color: #e0f2fe;
  background: rgba(56, 189, 248, 0.16);
}
.admin-bt-chart-wrap {
  width: 100%;
  min-height: 340px;
  position: relative;
  overflow: visible;
}
.admin-bt-chart {
  width: 100%;
  height: 340px;
  min-height: 340px;
  border: 1px solid var(--border, #334155);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  position: relative;
  overflow: hidden;
}
/* 只约束 echarts 主画布，不要波及 tooltip */
.admin-bt-chart > div:first-child {
  width: 100% !important;
  height: 100% !important;
}
.admin-bt-fold {
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
  padding: 0;
  background: rgba(15, 23, 42, 0.28);
}
.admin-bt-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  user-select: none;
}
.admin-bt-fold > summary::-webkit-details-marker { display: none; }
.admin-bt-fold > summary::before {
  content: "▸";
  color: #94a3b8;
  width: 1em;
}
.admin-bt-fold[open] > summary::before { content: "▾"; }
.admin-bt-fold > summary > span:first-of-type {
  font-weight: 600;
  color: var(--text, #e2e8f0);
}
.admin-bt-fold-hint {
  color: var(--muted, #94a3b8);
  font-size: 12px;
}
.admin-bt-fold-count {
  margin-left: auto;
  color: #38bdf8;
  font-size: 12px;
}
.admin-bt-fold .admin-bt-tags {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
}
.admin-bt-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.admin-bt-form .admin-bt-fill {
  height: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.admin-bt-form .admin-bt-fill .fill-filter-line {
  flex: none;
}
.admin-bt-form .fill-filter-row input[type="text"] {
  width: 40px;
  flex-basis: 40px;
}
.admin-bt-form .fill-filter-dir input[type="text"] {
  width: 88px;
  flex-basis: 88px;
}
.admin-bt-form .fill-filter-guling select {
  width: 56px;
  flex-basis: 56px;
}
.admin-bt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
}
@media (min-width: 1200px) {
  .admin-bt-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    align-items: end;
  }
  .admin-bt-row label {
    min-width: 0;
  }
  .admin-bt-row .input,
  .admin-bt-row select {
    width: 100%;
    min-width: 0;
  }
}
.admin-bt-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.admin-bt-row .input,
.admin-bt-row select {
  min-width: 140px;
}
.admin-bt-select-row {
  align-items: flex-start;
}
.admin-bt-select-row label {
  min-width: 220px;
  flex: 1;
}
.admin-bt-multiselect {
  min-height: 188px;
  width: 100%;
  min-width: 220px;
}
#adminPanelBacktest .price-view-filter {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.bt-factor-tag-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
  gap: 10px;
  align-items: stretch;
}
.bt-factor-tag-row .price-view-filter-head-row {
  flex-wrap: wrap;
}
.bt-factor-tag-row .filter-current-hint {
  min-width: 0;
  flex: 1 1 80px;
}
#adminPanelBacktest .special-factor-filter .price-view-filter-line .price-view-filter-groups,
#adminPanelBacktest .special-factor-filter .price-view-filter-line.is-xpc-limit-row .price-view-filter-groups {
  flex-wrap: wrap;
  overflow: visible;
}
#adminPanelBacktest .special-factor-filter .price-view-filter-group {
  flex-shrink: 1;
}
#adminPanelBacktest .special-factor-filter .price-view-filter-tags {
  flex-wrap: wrap;
}
@media (max-width: 1100px) {
  .bt-factor-tag-row {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1200px) {
  .admin-bt-select-row {
    grid-template-columns: 1fr 1fr;
  }
  #btModePickBox .admin-bt-select-row {
    grid-template-columns: 2fr 1fr;
  }
}
.admin-bt-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 13px;
}
.admin-bt-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-bt-tag-group {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
}
.admin-bt-tag-group-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.admin-bt-history {
  margin: 16px 0 8px;
}
.admin-bt-history-wrap {
  max-height: 280px;
  overflow: auto;
}
#btPlazaMemberChart {
  width: 100%;
  height: 340px;
  min-height: 340px;
}
#panel-btplaza .admin-bt-history-wrap {
  max-height: 360px;
}
.bt-plaza-on {
  color: #2f9e44;
  font-weight: 600;
}
.bt-plaza-off {
  color: var(--muted, #888);
}
.admin-bt-history-wrap .admin-bt-hist-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
  position: sticky;
  right: 0;
  background: var(--bg2, #1a1a1a);
}
.admin-bt-history-wrap .admin-bt-hist-actions .btn-danger {
  padding: 4px 10px;
}
.admin-bt-history-wrap tr.is-current td {
  background: rgba(236, 128, 141, 0.12);
}
.admin-bt-cond {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted, #9aa);
  white-space: normal;
  word-break: break-word;
}
.admin-bt-cond-cell {
  white-space: normal;
  word-break: break-word;
  min-width: 220px;
  line-height: 1.45;
  font-size: 12px;
}
.admin-bt-result {
  margin-top: 8px;
}
.admin-bt-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
  margin: 10px 0 16px;
}
.admin-bt-summary-grid > div {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-bt-summary-grid span {
  font-size: 12px;
  color: var(--muted);
}
.admin-bt-summary-grid b {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}
.admin-bt-stock-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--accent2, #8b7cf6);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(130, 110, 220, 0.45);
  text-underline-offset: 2px;
}
.admin-bt-stock-link:hover {
  color: var(--link-hover, #a78bfa);
}
#btTradesTable .admin-bt-sell-edit {
  width: 5.8em;
  padding: 2px 6px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--bg, #111);
  border: 1px solid var(--border, #444);
  border-radius: 4px;
}
#btTradesTable .admin-bt-sell-edit.is-edited {
  border-color: #f59e0b;
  color: #fbbf24;
}
.admin-bt-kline-panel {
  width: min(1280px, 96vw);
  height: min(900px, 92vh);
  max-height: 92vh;
}
.admin-bt-kline-chart-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.admin-bt-kline-chart {
  flex: 1 1 auto;
  min-height: 280px;
  height: auto;
}
.admin-bt-kline-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.admin-bt-kline-nav[hidden] {
  display: none;
}
.admin-bt-kline-nav-pos {
  min-width: 3.2em;
  text-align: center;
  font-size: 12px;
  color: var(--muted, #9ca3af);
  font-variant-numeric: tabular-nums;
}
.admin-bt-kline-nav-btn {
  border: 1px solid var(--border, #475569);
  background: var(--bg3, #222);
  color: var(--text, #e8e6e3);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.admin-bt-kline-nav-btn:hover:not(:disabled) {
  border-color: var(--accent2, #818cf8);
  color: #fff;
}
.admin-bt-kline-nav-btn.is-next {
  background: #4f46e5;
  border-color: #6366f1;
  color: #fff;
}
.admin-bt-kline-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.admin-bt-kline-panel.has-intraday .admin-bt-kline-chart-wrap {
  flex: 1 1 48%;
  min-height: 180px;
}
html:not(.is-mobile) .admin-bt-kline-panel .kline-intraday-section:not(.hidden) {
  display: flex !important;
  position: relative !important;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  height: 46%;
  min-height: 260px;
  z-index: 5;
  box-shadow: none;
  border-radius: 0;
  background: var(--bg2);
}
.admin-bt-kline-panel.has-intraday .admin-bt-kline-chart {
  min-height: 180px;
}
.admin-bt-kline-panel .kline-intraday-chart {
  min-height: 220px;
}
.admin-bt-kline-mark-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 8px;
}
.admin-bt-kline-mark-stats[hidden] {
  display: none;
}
.admin-bt-kline-stat {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, #334155);
  background: var(--bg2, #1a1a1a);
  font-size: 12px;
  color: var(--muted, #9ca3af);
}
.admin-bt-kline-stat strong {
  color: var(--text, #e8e6e3);
  font-weight: 600;
}
.admin-bt-kline-stat .pos { color: #ef4444; }
.admin-bt-kline-stat .neg { color: #22c55e; }
.admin-bt-kline-stat .na { color: var(--muted, #9ca3af); }
.admin-bt-kline-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted, #9ca3af);
  line-height: 1.45;
}

.admin-bt-detail-wrap {
  max-height: 420px;
  overflow: auto;
}
.admin-bt-daily-wrap {
  max-height: 360px;
  overflow: auto;
}
#btDailyTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg2, #1a1a1a);
}
#btTradesTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg2, #1a1a1a);
}
#btTradesTable .admin-bt-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
}
#btTradesTable .admin-bt-sort-btn:hover {
  color: var(--accent2, #8b7cf6);
}
#btTradesTable .admin-bt-sort-btn .admin-bt-sort-ind {
  font-size: 10px;
  opacity: 0.35;
  min-width: 1em;
}
#btTradesTable .admin-bt-sort-btn.is-active .admin-bt-sort-ind {
  opacity: 1;
  color: var(--accent2, #8b7cf6);
}
#btTradesTable td.pos { color: #ef4444; }
#btTradesTable td.neg { color: #22c55e; }
#btTradesTable td.admin-bt-num {
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 5.5em;
}

.admin-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0 20px;
}

/* —— 后台直播频道 —— */
.admin-feed-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-feed-url-row .input {
  flex: 1 1 240px;
  min-width: 0;
}
.admin-feed-nums {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-feed-nums .admin-live-field {
  flex: 1 1 140px;
}
.admin-live-box {
  margin-top: 0;
  padding: 18px 18px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--bg2)) 0%, var(--bg2) 48%);
}

.admin-live-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.admin-live-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.admin-live-desc {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-live-date {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.admin-live-date .input {
  min-width: 160px;
  min-height: 40px;
}

.admin-live-paste {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  margin-bottom: 16px;
}

.admin-live-paste-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.admin-live-textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.5;
}

.admin-live-paste-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 10px;
}

.admin-live-paste-tip {
  font-size: 12px;
  color: var(--muted);
}

.admin-live-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-live-slot {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-live-slot.is-filled {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.admin-live-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-live-slot-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.admin-live-slot-badge.is-evening {
  color: #0f766e;
  background: color-mix(in srgb, #14b8a6 16%, transparent);
}

.admin-live-slot-badge.is-intraday {
  color: #c2410c;
  background: color-mix(in srgb, #f97316 16%, transparent);
}

.admin-live-clear-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-live-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.admin-live-field .input {
  width: 100%;
  min-height: 40px;
}

.admin-live-field-pw .input {
  max-width: 160px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.admin-live-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 4px;
}

.admin-live-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-live-raw {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-all;
}

.admin-live-history {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.admin-live-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.admin-live-history-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.admin-live-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-live-history-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.admin-live-hist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.admin-live-hist-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-live-hist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-live-hist-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.admin-live-hist-tag.is-evening {
  color: #0f766e;
  background: color-mix(in srgb, #14b8a6 14%, transparent);
}

.admin-live-hist-tag.is-empty {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 12%, transparent);
}

.admin-live-hist-del {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .admin-live-slots {
    grid-template-columns: 1fr;
  }

  .admin-live-box {
    padding: 14px 12px 12px;
  }

  .admin-live-date {
    width: 100%;
  }

  .admin-live-date .input {
    width: 100%;
  }

  .admin-live-footer-actions .btn-primary,
  .admin-live-footer-actions .btn-secondary,
  .admin-live-paste-actions .btn-primary {
    width: 100%;
  }

  .admin-live-history-head .btn-secondary {
    width: 100%;
  }
}

.admin-expire-user-name {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.admin-expire-date-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.admin-expire-date-input {
  width: 100%;
  min-height: 44px;
  font-size: 16px; /* 避免 iOS 自动放大 */
  padding: 10px 12px;
}

.admin-expire-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.admin-expire-actions .auth-submit,
.admin-expire-actions .btn-secondary {
  width: 100%;
  min-height: 44px;
}

/* —— 管理后台手机适配 —— */
@media (max-width: 768px) {
  .admin-page-header {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-page-title {
    font-size: 18px;
  }

  .admin-page-main {
    padding: 12px 12px 32px;
    max-width: none;
  }

  .admin-page-body-inner {
    padding-top: 12px;
  }

  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    padding: 0 8px;
    scrollbar-width: none;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tab {
    flex: 0 0 auto;
    padding: 10px 12px;
    white-space: nowrap;
    font-size: 13px;
  }

  .admin-gen-row,
  .admin-user-toolbar,
  .admin-modes-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-member-stats {
    gap: 8px;
  }

  .admin-stat-chip {
    min-width: calc(50% - 8px);
    flex: 1 1 calc(50% - 8px);
  }

  .admin-msg {
    margin-left: 0;
  }

  .admin-check-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-sync-form,
  .admin-ziwei-form {
    flex-direction: column;
    gap: 12px;
  }

  .admin-sync-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .admin-sync-row .input,
  .admin-sync-row select,
  .admin-sync-row input[type="time"],
  .admin-sync-row input[type="number"],
  .admin-sync-row input[type="text"] {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    font-size: 16px;
  }

  .admin-sync-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-sync-actions .btn-primary,
  .admin-sync-actions .btn-secondary {
    width: 100%;
    min-height: 44px;
  }

  .admin-table-wrap,
  .admin-table-wrap-page,
  .admin-users-wrap {
    max-height: none;
    overflow: visible;
  }

  /* 用户管理：表格改为卡片，避免横向挤压与日历裁切 */
  .admin-users-table thead {
    display: none;
  }

  .admin-users-table,
  .admin-users-table tbody,
  .admin-users-table tr,
  .admin-users-table td {
    display: block;
    width: 100%;
  }

  .admin-users-table tr.admin-user-row {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
  }

  .admin-users-table td {
    border: none;
    padding: 6px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
  }

  .admin-users-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    min-width: 3.5em;
  }

  .admin-users-table td.admin-user-actions {
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
  }

  .admin-users-table td.admin-user-actions::before {
    margin-bottom: 6px;
  }

  .admin-user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .admin-user-actions .btn-secondary,
  .admin-user-actions .btn-danger {
    width: 100%;
    min-height: 40px;
    font-size: 13px;
    padding: 8px 10px;
  }

  .admin-user-actions .btn-danger {
    grid-column: 1 / -1;
  }

  /* 其他宽表同样横向可滚，避免整页被撑破 */
  .admin-table-wrap-page:not(.admin-users-wrap) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-mobile-modal {
    width: calc(100vw - 24px);
    max-width: none;
    max-height: min(92vh, 100%);
    margin: 12px auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-mobile-modal .modal-body {
    padding: 14px 16px 20px;
    overflow: visible;
  }

  .admin-mobile-modal .auth-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .admin-mobile-modal .auth-form input {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .modal {
    align-items: flex-start;
    padding: 8px 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— 直播频道 —— */
.live-channel-panel {
  min-width: 0;
  max-width: 100%;
  padding: 0 0 8px;
  box-sizing: border-box;
}

.live-channel-header {
  margin-bottom: 16px;
}

.live-channel-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.live-channel-hint,
.live-channel-date {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.live-channel-howto {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg2));
}

.live-channel-howto-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.live-channel-howto-list {
  margin: 0;
  padding-left: 1.25em;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.live-channel-howto-list li + li {
  margin-top: 2px;
}

.live-channel-howto-list code {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.live-channel-howto-list strong {
  font-weight: 700;
  color: var(--accent);
}

.live-channel-cards {
  display: grid;
  gap: 12px;
}

.live-channel-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: 12px;
  padding: 16px;
}

.live-channel-card.is-empty {
  opacity: 0.85;
}

.live-channel-card-badge {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}

.live-channel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.live-channel-card-head .live-channel-card-badge {
  margin-bottom: 0;
}

.live-channel-card-time {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
}

.live-channel-summary-body {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  word-break: break-word;
}

.admin-live-summary {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
}

.admin-live-summary.is-filled {
  border-color: color-mix(in srgb, var(--accent, #3b82f6) 45%, var(--border));
}

.admin-live-slot-badge.is-summary {
  background: color-mix(in srgb, #5b8def 22%, transparent);
  color: #8bb4ff;
}

.live-channel-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.live-channel-card-link:hover {
  filter: brightness(1.05);
}

.live-channel-password-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 8px;
}

.live-channel-password-label {
  font-size: 13px;
  color: var(--muted);
}

.live-channel-password-value {
  min-width: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.live-channel-copy-pw-btn {
  margin-left: auto;
  min-height: 36px;
}

.live-channel-wechat-tip {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.live-channel-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 12px;
}

.live-channel-qr {
  width: 200px;
  height: 200px;
  display: block;
}

.live-channel-qr-fallback {
  color: #666;
  font-size: 13px;
  padding: 24px;
  text-align: center;
}

.live-channel-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.live-channel-card-actions .btn-primary {
  width: auto;
  min-width: 140px;
  min-height: 44px;
}

.live-channel-choose {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.live-channel-way {
  min-width: 0;
  max-width: 100%;
  padding: 12px 0;
  border-top: 1px dashed var(--border, #e5e7eb);
}

.live-channel-way:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.live-channel-way-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.live-channel-way-plat {
  font-weight: 700;
  font-size: 14px;
}

.live-channel-hist-open {
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

.live-channel-hist-open:hover {
  text-decoration: underline;
}

.live-channel-qr-modal .btn-primary {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
}

.live-channel-card-url {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: 1.45;
}

.live-channel-card-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.live-channel-history {
  margin-top: 24px;
}

.live-channel-hist-title {
  margin: 0 0 10px;
  font-size: 15px;
}

.live-channel-hist-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 12px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.live-channel-hist-row > span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-end;
}

.live-channel-hist-row a {
  color: var(--accent);
}

.live-channel-hist-row .muted {
  color: var(--muted);
}

/* —— 图文频道 —— */
.feed-channel-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

.feed-channel-header {
  margin-bottom: 16px;
}

.feed-channel-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.feed-channel-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.feed-channel-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feed-channel-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg2);
  border-radius: 10px;
  border: 1px dashed var(--border);
}

.feed-channel-item {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--text);
}

.feed-channel-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.feed-channel-text {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="dark"] .feed-channel-text {
  color: #f7f4ef;
}

[data-theme="light"] .feed-channel-text {
  color: #111827;
}

.admin-feed-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--text);
}

.admin-feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-feed-meta {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.admin-feed-preview {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-feed-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.admin-feed-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-feed-zoom {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
}

.admin-feed-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.admin-feed-editor {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-feed-editor.hidden {
  display: none;
}

.admin-feed-textarea {
  width: 100%;
  min-height: 96px;
  color: var(--text);
  background: var(--bg);
}

.feed-channel-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.feed-channel-img-btn {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.feed-channel-img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--bg3);
  cursor: zoom-in;
}

.feed-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 32px;
  background: rgba(0, 0, 0, 0.88);
  box-sizing: border-box;
}

.feed-image-viewer.hidden {
  display: none !important;
}

.feed-image-viewer img {
  max-width: min(1100px, 96vw);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.feed-image-viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 768px) {
  .feed-channel-panel {
    padding: 12px 8px 28px;
  }
  .feed-channel-img {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  html.is-mobile #panel-livechannel.active,
  html.is-mobile #panel-feedchannel.active {
    flex: 1 1 0%;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .live-channel-panel {
    padding: 12px 8px 28px;
  }

  .live-channel-card-link {
    width: 100%;
  }
}

/* Mobile APP styles: see mobile.css */

/* IE10/11：gap 无效、flex 子项 width:auto 不会撑满，右侧会出现大块空白 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  html,
  body,
  #mainApp,
  main,
  .panel.active,
  #panel-selection .selection-layout,
  #panel-selection .content,
  #panel-intraday .content,
  .toolbar,
  .table-wrap {
    width: 100%;
    max-width: 100%;
  }

  .header {
    display: -ms-flexbox;
    -ms-flex-align: center;
    -ms-flex-pack: justify;
  }

  #panel-selection .selection-layout {
    display: -ms-flexbox;
    -ms-flex-align: stretch;
  }

  #panel-selection .sidebar.selection-sidebar {
    -ms-flex: 0 0 280px;
    margin-right: 16px;
  }

  #panel-selection .content,
  #panel-intraday .content {
    display: -ms-flexbox;
    -ms-flex-direction: column;
    -ms-flex: 1 1 0px;
  }

  #panel-selection .table-wrap,
  #panel-intraday .table-wrap {
    -ms-flex: 1 1 0px;
    width: 100%;
  }

  table {
    width: 100%;
  }
}

/* 今日精算 */
#panel-jingsuan.active {
  overflow: hidden;
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 88px);
  height: calc(100vh - var(--header-h) - 32px);
}
.jingsuan-layout {
  --intraday-list-pct: var(--xc-jingsuan-split, 62);
  display: flex;
  flex: 1 1 0%;
  min-height: 0;
  gap: 0;
  width: 100%;
}
.jingsuan-main {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(var(--intraday-list-pct) * 1%);
  width: calc(var(--intraday-list-pct) * 1%);
  min-width: 280px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.jingsuan-wrap {
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 12px;
}
.jingsuan-layout.is-resizing {
  cursor: col-resize;
  user-select: none;
}
.jingsuan-layout.is-resizing iframe,
.jingsuan-layout.is-resizing canvas {
  pointer-events: none;
}
.jingsuan-layout.is-resizing .intraday-split-handle::before {
  background: rgba(236, 128, 141, 0.85);
}
@media (max-width: 900px) {
  .jingsuan-layout {
    flex-direction: column;
  }
  .jingsuan-main {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
  #panel-jingsuan .intraday-split-handle {
    display: none;
  }
  #panel-jingsuan .intraday-chart-dock {
    flex: 0 0 auto;
    width: 100%;
    height: min(280px, 36vh);
  }
}
.jingsuan-section-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.jingsuan-section-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.jingsuan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 18px 20px;
  align-items: start;
}
.jingsuan-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.jingsuan-card-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.jingsuan-card-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.jingsuan-card-count::before { content: "×"; }
.jingsuan-card-body {
  flex: 1 1 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: visible;
}
/* 单模式仅 1 只：卡片别拉太宽 */
.jingsuan-cards.is-single-mode .jingsuan-card[data-stock-count="1"] .jingsuan-card-body {
  max-width: 560px;
}
/* 股票很多时卡内再分列；少量保持纵向，信息一行一行看全 */
.jingsuan-card.is-multi-stock .jingsuan-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px 16px;
  align-content: start;
}
.jingsuan-card.is-dense-stock .jingsuan-card-body {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px 12px;
}
.jingsuan-cards.is-single-mode .jingsuan-card.is-multi-stock .jingsuan-card-body {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.jingsuan-stock-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main time"
    "metrics metrics"
    "foot foot";
  align-items: start;
  gap: 10px 14px;
  padding: 10px 4px;
  min-width: 0;
}
.jingsuan-stock-block + .jingsuan-stock-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dotted rgba(255, 255, 255, 0.14);
}
.jingsuan-card.is-multi-stock .jingsuan-stock-block {
  margin-top: 0;
  padding: 10px 6px;
  border-radius: 6px;
}
.jingsuan-card.is-multi-stock .jingsuan-stock-block + .jingsuan-stock-block {
  margin-top: 0;
  padding-top: 10px;
  border-top: 0;
}
.jingsuan-stock-block.is-clickable {
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.jingsuan-stock-block.is-clickable:hover {
  background: rgba(255, 255, 255, 0.04);
}
.jingsuan-stock-block.is-clickable:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #3b82f6) 70%, transparent);
  outline-offset: 2px;
}
.jingsuan-stock-block.is-chart-active {
  outline: 1px solid rgba(236, 128, 141, 0.55);
  background: rgba(236, 128, 141, 0.12);
}
[data-theme="light"] .jingsuan-stock-block.is-clickable:hover {
  background: rgba(15, 23, 42, 0.04);
}
.jingsuan-stock-main {
  grid-area: main;
  min-width: 0;
}
.jingsuan-stock {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.jingsuan-time {
  grid-area: time;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
  padding-top: 2px;
}
.jingsuan-metrics {
  grid-area: metrics;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  min-width: 0;
  overflow: visible;
}
.jingsuan-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.jingsuan-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5em;
  padding: 1px 6px;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 3px;
  border: 1px solid;
  background: transparent;
}
.jingsuan-tag-open {
  color: #4ea1ff;
  border-color: #4ea1ff;
}
.jingsuan-tag-pct {
  color: #b388ff;
  border-color: #b388ff;
}
.jingsuan-tag-pnl {
  color: #ff9f43;
  border-color: #ff9f43;
}
.jingsuan-val {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.jingsuan-val.flat { color: var(--muted); }
.jingsuan-card-foot {
  grid-area: foot;
  margin: 0;
  padding: 0;
  border: none;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  word-break: break-word;
  white-space: normal;
  overflow: visible;
}
.jingsuan-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
}
[data-theme="light"] .jingsuan-card-body {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .jingsuan-stock-block + .jingsuan-stock-block {
  border-top-color: rgba(0, 0, 0, 0.12);
}

/* —— 交易铁律 —— */
.trading-rules-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}
.trading-rules-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.trading-rules-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.trading-rules-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.trading-rules-intro {
  margin: 0 0 22px;
  padding: 12px 14px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
  color: #ef4444;
  letter-spacing: 0.01em;
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 0 8px 8px 0;
}
.trading-rules-section {
  margin: 0 0 28px;
}
.trading-rules-section-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 650;
  color: var(--text);
}
.trading-rules-p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}
.trading-rules-figure {
  margin: 14px 0 18px;
  padding: 0;
}
.trading-rules-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
}
.trading-rules-figure figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.trading-rules-disclaimer {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
html.is-mobile .trading-rules-page {
  padding: 4px 12px 88px;
}
html.is-mobile .trading-rules-title {
  font-size: 20px;
}
html.is-mobile .trading-rules-intro {
  font-size: 17px;
  padding: 10px 12px;
  margin-bottom: 18px;
}
html.is-mobile .trading-rules-section-title {
  font-size: 16px;
}
html.is-mobile .trading-rules-p {
  font-size: 14px;
  line-height: 1.7;
}

/* ===== 大盘看盘（开盘啦）——与站点风格统一 ===== */
#panel-watch.active {
  display: block;
  overflow: auto;
  padding: 0;
  min-height: calc(100vh - var(--header-h, 56px));
  background: var(--bg);
}

.watch-shell {
  --watch-up: var(--red);
  --watch-down: var(--green);
  max-width: 1480px;
  margin: 0 auto;
  padding: 14px 16px 28px;
  color: var(--text);
}

.watch-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.watch-brand {
  min-width: 0;
}

.watch-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.watch-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.watch-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.watch-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(82, 65, 159, 0.35);
  color: var(--link-hover, #c4b5fd);
  font-size: 12px;
  background: rgba(82, 65, 159, 0.12);
}

.watch-live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
}

.watch-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  grid-template-areas:
    "breadth live live"
    "plates hot news"
    "pool pool pool";
  gap: 12px;
  align-items: stretch;
}

.watch-breadth { grid-area: breadth; }
.watch-live { grid-area: live; }
.watch-plates { grid-area: plates; }

.watch-plate-table {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.watch-plate-head,
.watch-plate-row {
  display: grid;
  grid-template-columns: minmax(52px, 1.15fr) 54px 44px 58px 48px 56px;
  gap: 4px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.watch-plate-head {
  flex-shrink: 0;
  padding: 0 4px 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}

.watch-plate-body {
  overflow: auto;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.watch-plate-row {
  padding: 6px 4px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.watch-plate-row:hover {
  border-color: var(--border);
  background: var(--row-hover);
}

.watch-plate-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-plate-code {
  color: var(--muted);
  font-size: 11px;
}

.watch-plate-num {
  text-align: right;
}

.watch-plate-amt {
  text-align: right;
  color: var(--text-secondary);
  font-size: 11px;
}

.watch-plate-num.is-up { color: var(--watch-up); }
.watch-plate-num.is-down { color: var(--watch-down); }
.watch-plate-num.is-flat { color: var(--muted); }

@media (max-width: 760px) {
  .watch-plate-head,
  .watch-plate-row {
    grid-template-columns: minmax(48px, 1fr) 48px 40px 52px 44px 52px;
    gap: 2px;
    font-size: 11px;
  }
}
.watch-hot { grid-area: hot; }
.watch-news { grid-area: news; }
.watch-pool { grid-area: pool; }

.watch-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  padding: 12px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.watch-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -12px -12px 12px;
  padding: 10px 12px;
  background: var(--panel-head-bg);
  border-bottom: 1px solid var(--panel-head-border);
  flex-shrink: 0;
}

.watch-card-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.watch-card-tag {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
  background: var(--bg3);
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-breadth-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.watch-breadth-stat {
  text-align: center;
}

.watch-breadth-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.watch-breadth-stat strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.1;
}

.watch-breadth-stat.is-up strong { color: var(--watch-up); }
.watch-breadth-stat.is-down strong { color: var(--watch-down); }

.watch-breadth-meter {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
}

.watch-breadth-meter-up {
  background: var(--watch-up);
  width: 50%;
  transition: width 0.35s ease;
}

.watch-breadth-meter-down {
  background: var(--watch-down);
  width: 50%;
  transition: width 0.35s ease;
}

.watch-limit-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.watch-limit-chip {
  border-radius: 6px;
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-secondary);
}

.watch-limit-chip b {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.watch-limit-chip.is-up { color: var(--watch-up); }
.watch-limit-chip.is-up b { color: var(--watch-up); }
.watch-limit-chip.is-down { color: var(--watch-down); }
.watch-limit-chip.is-down b { color: var(--watch-down); }
.watch-limit-chip.is-flat { color: var(--muted); }

.watch-buckets {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  gap: 2px;
  align-items: end;
  height: 52px;
  margin-top: auto;
}

.watch-bucket {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.watch-bucket span {
  display: block;
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: var(--muted);
  opacity: 0.35;
  transition: height 0.3s ease;
}

.watch-bucket.is-up span { background: var(--watch-up); opacity: 0.85; }
.watch-bucket.is-down span { background: var(--watch-down); opacity: 0.85; }
.watch-bucket.is-flat span { background: var(--muted); opacity: 0.45; }

.watch-capacity-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.watch-muted { color: var(--muted); }

.watch-capacity-chart {
  height: 88px;
  width: 100%;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg3);
}

.watch-live-feed {
  flex: 1 1 auto;
  min-height: 200px;
  max-height: 420px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.watch-live-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg3);
}

.watch-live-time {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.watch-live-user {
  font-size: 11px;
  color: var(--accent2);
  margin-bottom: 2px;
}

.watch-live-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
}

.watch-live-stocks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.watch-live-stock {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.watch-live-stock.up { color: var(--watch-up); }
.watch-live-stock.down { color: var(--watch-down); }

.watch-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 340px;
  overflow: auto;
}

.watch-list.is-dense { max-height: 280px; }

.watch-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.watch-row:hover {
  border-color: var(--border);
  background: var(--row-hover);
}

.watch-row-idx {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.watch-row-name {
  font-size: 13px;
  font-weight: 600;
}

.watch-row-sub {
  font-size: 11px;
  color: var(--muted);
}

.watch-row-pct {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.watch-row-pct.is-up { color: var(--watch-up); }
.watch-row-pct.is-down { color: var(--watch-down); }
.watch-row-pct.is-flat { color: var(--muted); }

.watch-news-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 340px;
  overflow: auto;
}

.watch-news-item {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg3);
}

.watch-news-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.watch-news-title {
  font-size: 13px;
  line-height: 1.45;
}

.watch-pool-plates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.watch-pool-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-secondary);
}

.watch-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
}

.watch-gate-wrap {
  max-width: 520px;
  margin: 48px auto;
}

@media (max-width: 1100px) {
  .watch-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "breadth live"
      "plates hot"
      "news pool";
  }
}

@media (max-width: 760px) {
  .watch-shell { padding: 10px 10px 88px; }
  .watch-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .watch-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "breadth"
      "live"
      "plates"
      "hot"
      "news"
      "pool";
  }
  .watch-breadth-stat strong { font-size: 24px; }
  .watch-live-feed { max-height: 240px; }
}

/* 盘中起爆实盘配置 */
.pzqb-trade-title { font-size: 1.1rem; margin: 0 8px 0 0; }
.pzqb-trade-hint { color: var(--muted, #8b9bb4); font-size: 13px; margin: 8px 16px; line-height: 1.5; }
.pzqb-trade-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 14px; padding: 8px 16px 16px; }
.pzqb-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pzqb-field input[type=checkbox] { width: auto; margin-right: 6px; }
.pzqb-trade-toolbar { flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 720px) {
  .pzqb-trade-form { grid-template-columns: 1fr 1fr; }
}

/* 自选股 */
.watchlist-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px 12px 8px;
  height: calc(100vh - var(--header-h, 56px) - 32px);
  min-height: 420px;
  box-sizing: border-box;
}
.watchlist-shell.is-gated > :not(.watchlist-gate) {
  visibility: hidden;
  pointer-events: none;
}
.watchlist-gate {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 25, 0.92);
}
.watchlist-gate[hidden] {
  display: none !important;
}
.watchlist-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.watchlist-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.watchlist-title {
  margin: 0;
  font-size: 14px;
  display: inline;
  flex-shrink: 0;
}
.pzht-mode-toggle {
  display: inline-flex;
  margin-left: 10px;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  overflow: hidden;
  vertical-align: middle;
}
.pzht-mode-btn {
  background: transparent;
  color: #9aa7b5;
  border: 0;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.pzht-mode-btn.is-active {
  background: #2a3344;
  color: #e8e6e3;
}
.watchlist-meta {
  display: none;
}
.guchi-pnl-line {
  margin: 0 4px 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text, #e7ecf3);
}
.watchlist-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.watchlist-add-input {
  width: 148px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border, #2a3a4d);
  background: var(--panel, #1a2332);
  color: var(--text, #e7ecf3);
}
.watchlist-groups-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.watchlist-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  flex: 0 1 auto;
}
.watchlist-group-tab {
  border: 1px solid var(--border, #2a3a4d);
  background: transparent;
  color: var(--muted, #8b9bb4);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.3;
}
.watchlist-group-tab:hover {
  color: var(--text, #e7ecf3);
  border-color: #4a5d73;
}
.watchlist-group-tab.is-active {
  background: #2a3344;
  color: #e8e6e3;
  border-color: #4a6a8a;
}
.watchlist-groups-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}
.watchlist-group-btn {
  border: 1px solid var(--border, #2a3a4d);
  background: transparent;
  color: var(--muted, #8b9bb4);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 12px;
  cursor: pointer;
}
.watchlist-group-btn:hover {
  color: var(--text, #e7ecf3);
}
.watchlist-group-btn.is-danger:hover {
  color: #f87171;
  border-color: #7f3d3d;
}
.watchlist-group-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#watchlistTable .wl-actions {
  white-space: nowrap;
}
#watchlistTable .wl-move,
#watchlistTable .wl-del {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border, #2a3a4d);
  background: transparent;
  color: var(--muted, #8b9bb4);
  cursor: pointer;
}
#watchlistTable .wl-del:hover {
  color: #f87171;
}
#watchlistTable .wl-move {
  max-width: 88px;
  margin-right: 4px;
}
#pzhtPoolMainRow {
  --intraday-list-pct: var(--xc-pzhtpool-split, 58);
}
#kanpanMainRow {
  --intraday-list-pct: var(--xc-kanpan-split, 58);
}
#gwpoolMainRow {
  --intraday-list-pct: var(--xc-gwpool-split, 58);
}
#zwpoolMainRow {
  --intraday-list-pct: var(--xc-zwpool-split, 58);
}
#xdqbpoolMainRow {
  --intraday-list-pct: var(--xc-xdqbpool-split, 58);
}
#gw5dMainRow {
  --intraday-list-pct: var(--xc-gw5d-split, 58);
}
#zw5dMainRow {
  --intraday-list-pct: var(--xc-zw5d-split, 58);
}
#xdqb5dMainRow {
  --intraday-list-pct: var(--xc-xdqb5d-split, 58);
}
#xcwallMainRow {
  --intraday-list-pct: var(--xc-xcwall-split, 58);
}
#xyjcMainRow {
  --intraday-list-pct: var(--xc-xyjc-split, 58);
}
#bdpoolMainRow {
  --intraday-list-pct: var(--xc-bdpool-split, 58);
}
#xc5dMainRow {
  --intraday-list-pct: var(--xc-xc5d-split, 58);
}
.guchi-page {
  display: flex;
  flex-direction: column;
  padding: 8px 12px 8px;
  height: calc(100vh - var(--header-h, 56px) - 32px);
  min-height: 420px;
  box-sizing: border-box;
}
.guchi-page .watchlist-shell {
  height: auto;
  min-height: 0;
  flex: 1 1 0%;
  padding: 0;
}
.guchi-toolbar {
  margin-bottom: 8px;
  overflow: visible;
}
.guchi-toolbar .toolbar-dropdown {
  z-index: 60;
}
.guchi-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}
.guchi-subtab {
  border: 1px solid var(--border, #2a3a4d);
  background: transparent;
  color: var(--muted, #8b9bb4);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.35;
}
.guchi-subtab:hover {
  color: var(--text, #e7ecf3);
  border-color: #4a5d73;
}
.guchi-subtab.is-active {
  background: #2a3344;
  color: #e8e6e3;
  border-color: #4a6a8a;
}
.guchi-pane {
  display: none;
  flex: 1 1 0%;
  min-height: 0;
}
.guchi-pane.is-active {
  display: flex;
  flex-direction: column;
}
.guchi-pane .watchlist-main-row {
  flex: 1 1 0%;
  min-height: 0;
}
.watchlist-main-row {
  --intraday-list-pct: var(--xc-watchlist-split, 58);
  display: flex;
  flex: 1 1 0%;
  min-height: 0;
  gap: 0;
  width: 100%;
}
.watchlist-list-col {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(var(--intraday-list-pct) * 1%);
  width: calc(var(--intraday-list-pct) * 1%);
  max-width: none;
  min-width: 280px;
  min-height: 0;
}
.watchlist-table-wrap {
  flex: 1 1 0%;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
#kanpanTable .kanpan-mode {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
/* 小草股池 / 吸筹城墙 / 小阳建仓：每种模式固定一色（表头+数值） */
#kanpanTable thead th.th-metric-cjs,
#xc5dTable thead th.th-metric-cjs,
#zwpoolTable thead th.th-metric-cjs,
#xdqbpoolTable thead th.th-metric-cjs,
#zw5dTable thead th.th-metric-cjs,
#gw5dTable thead th.th-metric-cjs,
#xdqb5dTable thead th.th-metric-cjs,
#xcwallTable thead th.th-metric-cjs,
#xyjcTable thead th.th-metric-cjs,
#bdpoolTable thead th.th-metric-cjs { color: #60a5fa; }
#kanpanTable thead th.th-metric-jssb,
#xc5dTable thead th.th-metric-jssb,
#zwpoolTable thead th.th-metric-jssb,
#xdqbpoolTable thead th.th-metric-jssb,
#zw5dTable thead th.th-metric-jssb,
#gw5dTable thead th.th-metric-jssb,
#xdqb5dTable thead th.th-metric-jssb,
#xcwallTable thead th.th-metric-jssb,
#xyjcTable thead th.th-metric-jssb,
#bdpoolTable thead th.th-metric-jssb { color: #f87171; }
#kanpanTable thead th.th-metric-xcjw,
#xc5dTable thead th.th-metric-xcjw,
#zwpoolTable thead th.th-metric-xcjw,
#xdqbpoolTable thead th.th-metric-xcjw,
#zw5dTable thead th.th-metric-xcjw,
#gw5dTable thead th.th-metric-xcjw,
#xdqb5dTable thead th.th-metric-xcjw,
#xcwallTable thead th.th-metric-xcjw,
#xyjcTable thead th.th-metric-xcjw,
#bdpoolTable thead th.th-metric-xcjw { color: #c084fc; }
#kanpanTable thead th.th-metric-jsjl,
#xc5dTable thead th.th-metric-jsjl,
#zwpoolTable thead th.th-metric-jsjl,
#xdqbpoolTable thead th.th-metric-jsjl,
#zw5dTable thead th.th-metric-jsjl,
#gw5dTable thead th.th-metric-jsjl,
#xdqb5dTable thead th.th-metric-jsjl,
#xcwallTable thead th.th-metric-jsjl,
#xyjcTable thead th.th-metric-jsjl,
#bdpoolTable thead th.th-metric-jsjl { color: #fb923c; }
#kanpanTable thead th.th-metric-xcpzqb,
#xc5dTable thead th.th-metric-xcpzqb,
#zwpoolTable thead th.th-metric-xcpzqb,
#xdqbpoolTable thead th.th-metric-xcpzqb,
#zw5dTable thead th.th-metric-xcpzqb,
#gw5dTable thead th.th-metric-xcpzqb,
#xdqb5dTable thead th.th-metric-xcpzqb,
#xcwallTable thead th.th-metric-xcpzqb,
#xyjcTable thead th.th-metric-xcpzqb,
#bdpoolTable thead th.th-metric-xcpzqb { color: #f472b6; }
#kanpanTable .metric-zero,
#xc5dTable .metric-zero,
#zwpoolTable .metric-zero,
#xdqbpoolTable .metric-zero,
#zw5dTable .metric-zero,
#gw5dTable .metric-zero,
#xdqb5dTable .metric-zero,
#xcwallTable .metric-zero,
#xyjcTable .metric-zero,
#bdpoolTable .metric-zero { color: var(--muted, #787776); }
#kanpanTable .metric-cjs,
#xc5dTable .metric-cjs,
#zwpoolTable .metric-cjs,
#xdqbpoolTable .metric-cjs,
#zw5dTable .metric-cjs,
#gw5dTable .metric-cjs,
#xdqb5dTable .metric-cjs,
#xcwallTable .metric-cjs,
#xyjcTable .metric-cjs,
#bdpoolTable .metric-cjs { color: #60a5fa; }
#kanpanTable .metric-jssb,
#xc5dTable .metric-jssb,
#zwpoolTable .metric-jssb,
#xdqbpoolTable .metric-jssb,
#zw5dTable .metric-jssb,
#gw5dTable .metric-jssb,
#xdqb5dTable .metric-jssb,
#xcwallTable .metric-jssb,
#xyjcTable .metric-jssb,
#bdpoolTable .metric-jssb { color: #f87171; }
#kanpanTable .metric-xcjw,
#xc5dTable .metric-xcjw,
#zwpoolTable .metric-xcjw,
#xdqbpoolTable .metric-xcjw,
#zw5dTable .metric-xcjw,
#gw5dTable .metric-xcjw,
#xdqb5dTable .metric-xcjw,
#xcwallTable .metric-xcjw,
#xyjcTable .metric-xcjw,
#bdpoolTable .metric-xcjw { color: #c084fc; }
#kanpanTable .metric-jsjl,
#xc5dTable .metric-jsjl,
#zwpoolTable .metric-jsjl,
#xdqbpoolTable .metric-jsjl,
#zw5dTable .metric-jsjl,
#gw5dTable .metric-jsjl,
#xdqb5dTable .metric-jsjl,
#xcwallTable .metric-jsjl,
#xyjcTable .metric-jsjl,
#bdpoolTable .metric-jsjl { color: #fb923c; }
#kanpanTable .metric-xcpzqb,
#xc5dTable .metric-xcpzqb,
#zwpoolTable .metric-xcpzqb,
#xdqbpoolTable .metric-xcpzqb,
#zw5dTable .metric-xcpzqb,
#gw5dTable .metric-xcpzqb,
#xdqb5dTable .metric-xcpzqb,
#xcwallTable .metric-xcpzqb,
#xyjcTable .metric-xcpzqb,
#bdpoolTable .metric-xcpzqb { color: #f472b6; }
#kanpanTable .cell-metric,
#xc5dTable .cell-metric,
#zwpoolTable .cell-metric,
#xdqbpoolTable .cell-metric,
#zw5dTable .cell-metric,
#gw5dTable .cell-metric,
#xdqb5dTable .cell-metric,
#xcwallTable .cell-metric,
#xyjcTable .cell-metric,
#bdpoolTable .cell-metric { font-variant-numeric: tabular-nums; }
#kanpanTable .kanpan-tsig.up,
#xc5dTable .kanpan-tsig.up,
#zwpoolTable .kanpan-tsig.up,
#xdqbpoolTable .kanpan-tsig.up,
#zw5dTable .kanpan-tsig.up,
#gw5dTable .kanpan-tsig.up,
#xdqb5dTable .kanpan-tsig.up,
#xcwallTable .kanpan-tsig.up,
#xyjcTable .kanpan-tsig.up,
#bdpoolTable .kanpan-tsig.up { color: #ff2323; font-weight: 600; }
#kanpanTable .kanpan-tsig.down,
#xc5dTable .kanpan-tsig.down,
#zwpoolTable .kanpan-tsig.down,
#xdqbpoolTable .kanpan-tsig.down,
#zw5dTable .kanpan-tsig.down,
#gw5dTable .kanpan-tsig.down,
#xdqb5dTable .kanpan-tsig.down,
#xcwallTable .kanpan-tsig.down,
#xyjcTable .kanpan-tsig.down,
#bdpoolTable .kanpan-tsig.down { color: #10cc55; font-weight: 600; }
#kanpanTable .kanpan-mode,
#gwpoolTable .kanpan-mode,
#xc5dTable .kanpan-mode,
#zwpoolTable .kanpan-mode,
#xdqbpoolTable .kanpan-mode,
#zw5dTable .kanpan-mode,
#gw5dTable .kanpan-mode,
#xdqb5dTable .kanpan-mode {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
#kanpanTable .guchi-concept,
#gwpoolTable .guchi-concept,
#xc5dTable .guchi-concept,
#zwpoolTable .guchi-concept,
#xdqbpoolTable .guchi-concept,
#zw5dTable .guchi-concept,
#gw5dTable .guchi-concept,
#xdqb5dTable .guchi-concept,
#xcwallTable .guchi-concept,
#xyjcTable .guchi-concept,
#bdpoolTable .guchi-concept {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted, #8b9bb4);
}
/* 股池表按内容收紧列宽，避免 width:100% 把列撑开留白 */
#kanpanTable,
#xc5dTable,
#zwpoolTable,
#xdqbpoolTable,
#zw5dTable,
#gw5dTable,
#xdqb5dTable,
#xcwallTable,
#xyjcTable,
#bdpoolTable {
  width: max-content;
  min-width: 0;
  table-layout: auto;
}
#kanpanTable th,
#kanpanTable td,
#xc5dTable th,
#zwpoolTable th,
#xdqbpoolTable th,
#zw5dTable th,
#gw5dTable th,
#xdqb5dTable th,
#xc5dTable td,
#zwpoolTable td,
#xdqbpoolTable td,
#zw5dTable td,
#gw5dTable td,
#xdqb5dTable td,
#xcwallTable th,
#xcwallTable td,
#xyjcTable th,
#xyjcTable td,
#bdpoolTable th,
#bdpoolTable td {
  padding: 6px 3px;
}
#kanpanTable .cell-metric,
#xc5dTable .cell-metric,
#zwpoolTable .cell-metric,
#xdqbpoolTable .cell-metric,
#zw5dTable .cell-metric,
#gw5dTable .cell-metric,
#xdqb5dTable .cell-metric,
#xcwallTable .cell-metric,
#xyjcTable .cell-metric,
#bdpoolTable .cell-metric,
#gwpoolTable .cell-metric,
#kanpanTable .cell-pct,
#gwpoolTable .cell-pct,
#xc5dTable .cell-pct,
#zwpoolTable .cell-pct,
#xdqbpoolTable .cell-pct,
#zw5dTable .cell-pct,
#gw5dTable .cell-pct,
#xdqb5dTable .cell-pct,
#xcwallTable .cell-pct,
#xyjcTable .cell-pct,
#bdpoolTable .cell-pct,
#kanpanTable .cell-price,
#gwpoolTable .cell-price,
#xc5dTable .cell-price,
#zwpoolTable .cell-price,
#xdqbpoolTable .cell-price,
#zw5dTable .cell-price,
#gw5dTable .cell-price,
#xdqb5dTable .cell-price,
#xcwallTable .cell-price,
#xyjcTable .cell-price,
#bdpoolTable .cell-price {
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}
#xcwallTable .kanpan-mode,
#xyjcTable .kanpan-mode,
#bdpoolTable .kanpan-mode {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
#xcwallTable .xcwall-act,
#xyjcTable .xyjc-act,
#bdpoolTable .bdpool-act,
#xc5dTable .xc5d-act,
#zwpoolTable .xc5d-act,
#xdqbpoolTable .xc5d-act,
#zw5dTable .xc5d-act,
#gw5dTable .xc5d-act,
#xdqb5dTable .xc5d-act {
  white-space: nowrap;
  text-align: center;
}
#xcwallTable .xcwall-del-btn,
#xyjcTable .xyjc-del-btn,
#bdpoolTable .bdpool-del-btn,
#xc5dTable .xc5d-del-btn,
#zwpoolTable .xc5d-del-btn,
#xdqbpoolTable .xc5d-del-btn,
#zw5dTable .xc5d-del-btn,
#gw5dTable .xc5d-del-btn,
#xdqb5dTable .xc5d-del-btn {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.3;
}
#watchlistTable,
#pzhtPoolTable,
#kanpanTable,
#gwpoolTable,
#xc5dTable,
#zwpoolTable,
#xdqbpoolTable,
#zw5dTable,
#gw5dTable,
#xdqb5dTable,
#xcwallTable,
#xyjcTable,
#bdpoolTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#pzhtPoolTable {
  font-size: 12px;
  width: max-content;
  min-width: 100%;
}
#watchlistTable th,
#watchlistTable td,
#pzhtPoolTable th,
#pzhtPoolTable td,
#xcwallTable th,
#xcwallTable td,
#xyjcTable th,
#xyjcTable td,
#bdpoolTable th,
#bdpoolTable td,
#kanpanTable th,
#kanpanTable td,
#gwpoolTable th,
#gwpoolTable td,
#xc5dTable th,
#zwpoolTable th,
#xdqbpoolTable th,
#zw5dTable th,
#gw5dTable th,
#xdqb5dTable th,
#xc5dTable td,
#zwpoolTable td,
#xdqbpoolTable td,
#zw5dTable td,
#gw5dTable td,
#xdqb5dTable td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #2a3a4d);
  text-align: left;
  white-space: nowrap;
}
#watchlistTable th,
#watchlistTable td {
  padding: 5px 7px;
}
#pzhtPoolTable th,
#pzhtPoolTable td {
  padding: 5px 6px;
}
#pzhtPoolTable th {
  font-size: 11px;
  font-weight: 600;
}
#watchlistTable th,
#pzhtPoolTable th {
  color: var(--muted, #8b9bb4);
  font-weight: 500;
  position: sticky;
  top: 0;
  background: var(--bg, #0f1419);
  z-index: 1;
}
#watchlistTable thead th.sortable:hover,
#pzhtPoolTable thead th.sortable:hover {
  color: var(--text);
  background: var(--table-head-hover, rgba(82, 65, 159, 0.22));
}
#watchlistTable thead th.sortable.sort-active,
#pzhtPoolTable thead th.sortable.sort-active {
  color: var(--accent2);
}
#watchlistTable thead th.th-metric-cjs { color: #60a5fa; }
#watchlistTable thead th.th-metric-jssb { color: #f87171; }
#watchlistTable thead th.th-metric-xcjw { color: #c084fc; }
#watchlistTable thead th.th-metric-xcpzqb { color: #f87171; }
#watchlistTable .metric-cjs { color: #60a5fa; }
#watchlistTable .metric-jssb { color: #f87171; }
#watchlistTable .metric-xcjw { color: #c084fc; }
#watchlistTable .metric-xcpzqb { color: #f87171; }
#watchlistTable tbody tr,
#pzhtPoolTable tbody tr {
  cursor: pointer;
}
#watchlistTable tbody tr:hover,
#pzhtPoolTable tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
#watchlistTable tbody tr.stock-row.is-chart-active,
#pzhtPoolTable tbody tr.stock-row.is-chart-active {
  background: rgba(56, 189, 248, 0.12);
}
#watchlistTable .pct-up,
#pzhtPoolTable .pct-up { color: #ef4444; }
#watchlistTable .pct-down,
#pzhtPoolTable .pct-down { color: #22c55e; }
#pzhtPoolTable .th-pick,
#pzhtPoolTable td.td-pick {
  width: 36px;
  text-align: center;
}
#pzhtPoolTable tbody tr.is-picked {
  background: rgba(34, 197, 94, 0.08);
}
.pzht-pool-filters {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--border, #2a3a4d);
  border-radius: 8px;
  background: var(--panel, #1a2332);
  flex-shrink: 0;
}
.pzht-pool-filters > summary {
  cursor: pointer;
  color: var(--muted, #8b9bb4);
  font-size: 12px;
  user-select: none;
}
.pzht-pool-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
}
.pzht-pool-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted, #8b9bb4);
}
.pzht-pool-filter-grid input,
.pzht-pool-filter-grid select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border, #2a3a4d);
  background: var(--bg, #0f1419);
  color: var(--text, #e7ecf3);
}
.pzht-pool-filter-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text, #e7ecf3);
}
.pzht-pool-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.pzht-pool-filter-msg {
  font-size: 12px;
  color: var(--muted, #8b9bb4);
}
.pzht-pool-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #fbbf24;
}
.pzht-pool-hint[hidden] {
  display: none !important;
}
#panel-watchlist .intraday-chart-dock,
#panel-pzhtpool .intraday-chart-dock {
  flex: 1 1 0%;
  min-width: 280px;
  min-height: 0;
}
@media (max-width: 900px) {
  .watchlist-main-row {
    flex-direction: column;
  }
  .watchlist-list-col {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-height: min(52vh, 480px);
  }
  #panel-watchlist .intraday-chart-dock,
  #panel-pzhtpool .intraday-chart-dock {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    height: min(280px, 36vh);
  }
}
#klineWatchlistBtn {
  color: #fce7f3;
  background: #9d174d;
  border-color: #db2777;
  font-weight: 600;
}
#klineWatchlistBtn:hover {
  color: #fff;
  background: #be185d;
  border-color: #f472b6;
}
#klineWatchlistBtn.is-on {
  background: #831843;
  border-color: #be185d;
  color: #fce7f3;
}
#klineWatchlistBtn[hidden] {
  display: none !important;
}
#klineWatchlistBtn:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 720px) {
  .watchlist-toolbar { align-items: stretch; flex-direction: column; }
  .watchlist-toolbar-left { width: 100%; }
  .watchlist-toolbar-right { width: 100%; }
  .watchlist-add-input { flex: 1; width: auto; min-width: 0; }
  .watchlist-groups-row { width: 100%; }
  .watchlist-shell {
    height: auto;
    min-height: 0;
    padding-bottom: 20px;
  }
}

.admin-tab-badge {
  display: inline-block;
  min-width: 1.1em;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 8px;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  vertical-align: middle;
}
.admin-msg-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.admin-msg-card {
  padding: 12px 14px;
  border: 1px solid var(--line, #e4eaf1);
  border-radius: 10px;
  background: var(--card, #fff);
}
.admin-msg-card.is-pending { border-color: #e7c37a; }
.admin-msg-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 13px;
  color: var(--muted, #6d7b90);
}
.admin-msg-body, .admin-msg-reply-view {
  margin: 8px 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}
.admin-msg-state { font-weight: 600; }
.admin-msg-card.is-pending .admin-msg-state { color: #c0392b; }
.admin-msg-card.is-replied .admin-msg-state { color: #128a52; }
.user-msg-thread {
  max-height: 42vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 12px;
}
.user-msg-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f7fb;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}
.user-msg-item time { display: block; color: var(--muted, #6d7b90); font-size: 12px; margin-bottom: 4px; }
.user-msg-item .user-msg-reply {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #d5dde8;
  color: #1b4d9e;
}
.user-msg-empty { color: var(--muted); font-size: 13px; }
.user-msg-compose { width: 100%; min-height: 72px; resize: vertical; }

.name-mark {
  display: inline-block;
  margin-left: 2px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 14px;
  height: 14px;
  border-radius: 2px;
  vertical-align: 1px;
  font-weight: 600;
  white-space: nowrap;
}
.name-mark.is-alert { background: #5c2b2b; color: #ffb4b4; }
.name-mark.is-yidong { background: #6b2a12; color: #ffc4a8; }
.name-mark.is-lead { background: #5a1f1f; color: #ff8a8a; }
.name-mark.is-ladder { background: #4a3a14; color: #ffd37a; }
.name-mark.is-theme { background: #1e3a4c; color: #8fd4ff; }
.name-mark.is-lei { background: #e23b3b; color: #fff; }
.name-mark.is-yi { background: #e23b3b; color: #fff; }
.name-mark.is-yiw { background: #f5a623; color: #1a1208; }
.xc-stock-cell:has(.name-flags),
td[data-col="stock_name"]:has(.name-flags) { position: relative; }
.name-flags {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 2;
  display: inline-flex;
  gap: 1px;
  pointer-events: none;
}
.name-flags .name-mark {
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  font-size: 11px;
  line-height: 15px;
  text-align: center;
  vertical-align: top;
}
.xc-stock-cell:has(.name-flags) .xc-stock-name,
td[data-col="stock_name"]:has(> .name-flags) { padding-right: 18px; }
.xc-stock-cell:has(.name-flags .is-lei):has(.name-flags .is-yi) .xc-stock-name,
.xc-stock-cell:has(.name-flags .is-lei):has(.name-flags .is-yiw) .xc-stock-name,
td[data-col="stock_name"]:has(.is-lei):has(.is-yi),
td[data-col="stock_name"]:has(.is-lei):has(.is-yiw) { padding-right: 34px; }
[data-theme="light"] .name-mark.is-alert { background: #fde8e8; color: #b42318; }
[data-theme="light"] .name-mark.is-yidong { background: #ffead5; color: #b54708; }
[data-theme="light"] .name-mark.is-lead { background: #ffe4e4; color: #c01048; }
[data-theme="light"] .name-mark.is-ladder { background: #fff4d6; color: #9a6700; }
[data-theme="light"] .name-mark.is-theme { background: #e6f4ff; color: #175cd3; }
.score-wr {
  display: none;
  margin-left: 2px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 14px;
  height: 14px;
  border-radius: 2px;
  vertical-align: 1px;
  font-weight: 600;
  white-space: nowrap;
}
html.show-score-wr .score-wr { display: inline-block; }
.score-wr.is-win { background: #3a1616; color: #ff8a8a; }
.score-wr.is-lose { background: #163a2a; color: #5ee9a3; }
[data-theme="light"] .score-wr.is-win { background: #fee4e2; color: #b42318; }
[data-theme="light"] .score-wr.is-lose { background: #d1fadf; color: #067647; }
.theme-replay-panel { padding: 8px 12px 20px; max-width: none; }
.theme-replay-hint { color: var(--muted); font-size: 13px; margin: 0 0 8px; line-height: 1.5; }
.tr-page { display: flex; flex-direction: column; gap: 14px; }
.tr-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: flex-start;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  border-left: 4px solid var(--tr-phase, var(--accent));
}
.tr-hero-main { flex: 1 1 280px; min-width: 0; }
.tr-phase {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1.5px solid var(--tr-phase, var(--accent));
  color: var(--tr-phase, var(--accent2));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tr-desc { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.tr-subhint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.tr-sentiments { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.tr-sent-item { display: flex; flex-direction: column; gap: 4px; }
.tr-sent-item em { font-style: normal; font-size: 11px; color: var(--muted); }
.tr-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg3);
  color: var(--text);
}
.tr-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.tr-kpi {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}
.tr-kpi .k { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.tr-kpi .v { font-size: 18px; font-weight: 750; letter-spacing: 0.02em; line-height: 1.2; }
.tr-kpi.is-bull .v { color: var(--red); }
.tr-kpi.is-bear .v { color: var(--green); }
.tr-boards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tr-board-chip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
}
.tr-board-chip b { color: var(--text); font-weight: 700; margin-left: 4px; }
.tr-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px 14px;
}
.tr-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tr-block-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.tr-block-head span { font-size: 12px; color: var(--muted); }
.tr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tr-chip {
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.4;
}
.tr-chip b { font-weight: 650; color: var(--muted); }
.tr-chip.is-on {
  border-color: var(--accent2);
  background: rgba(82, 65, 159, 0.22);
  color: var(--text);
}
.tr-ladder { display: flex; flex-direction: column; gap: 10px; }
.tr-ladder-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
}
.tr-height {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 4px;
}
.tr-height-name { font-size: 13px; font-weight: 750; color: var(--red); }
.tr-height-n {
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: rgba(255, 35, 35, 0.16);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}
.tr-scard {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 8px 7px;
  cursor: pointer;
  min-width: 0;
}
.tr-scard:hover { border-color: var(--accent2); background: var(--hover-bg); }
.tr-scard.is-dim { opacity: 0.28; }
.tr-scard.is-on { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }
.tr-scard.is-fail { background: rgba(120, 120, 120, 0.12); }
.tr-scard.is-fail .tr-sname { text-decoration: line-through; color: var(--muted); }
.tr-stop {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tr-stop.is-ow { color: #f59e0b; }
.tr-stop.is-ok { color: var(--red); }
.tr-stop.is-up { color: var(--red); }
.tr-stop.is-dn { color: var(--green); }
.tr-stop.is-flat { color: var(--muted); }
.tr-sname { margin-top: 2px; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-stheme { margin-top: 1px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-failx {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}
.tr-dragon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.tr-dcard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.tr-dhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tr-dname { font-size: 14px; font-weight: 750; }
.tr-dpct { font-size: 13px; font-weight: 700; }
.tr-dpct.is-up { color: var(--red); }
.tr-dpct.is-dn { color: var(--green); }
.tr-dmeta { font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 500; }
.tr-dstocks { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-dstock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
  cursor: pointer;
  max-width: 100%;
}
.tr-dstock:hover { border-color: var(--accent2); }
.tr-dlab {
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 3px;
  background: #ff5f5f;
  color: #fff;
  line-height: 16px;
}
.tr-alerts { display: grid; gap: 8px; }
.tr-alert-col h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 650; }
.tr-alert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.tr-acard {
  border: 1px solid var(--border);
  border-left: 3px solid #c24141;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.tr-acard:hover { background: var(--hover-bg); }
.tr-acard.is-severe { border-left-color: #ff2323; }
.tr-aname { font-size: 13px; font-weight: 700; }
.tr-atitle { margin-top: 3px; font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.tr-ameta { margin-top: 4px; font-size: 11px; color: var(--muted); }
.tr-trend { width: 100%; border-collapse: collapse; font-size: 12px; }
.tr-trend th, .tr-trend td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tr-trend th { color: var(--muted); font-weight: 600; background: var(--panel-head-bg); }
.tr-trend td:nth-child(n+4) { text-align: right; }
.tr-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
[data-theme="light"] .tr-height-n { background: rgba(220, 38, 38, 0.12); }
[data-theme="light"] .tr-scard.is-fail { background: #f3f4f6; }

.tr-dash {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.tr-group {
  background: color-mix(in srgb, var(--bg3) 55%, transparent);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 8px 8px;
  min-width: 0;
}
.tr-group-h {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 2px 4px 8px;
  line-height: 1.2;
}
.tr-group-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}
.tr-cell {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px 10px;
  min-width: 0;
}
.tr-span-4 { grid-column: span 4; }
.tr-span-5 { grid-column: span 5; }
.tr-span-6 { grid-column: span 6; }
.tr-span-7 { grid-column: span 7; }
.tr-span-8 { grid-column: span 8; }
.tr-span-12 { grid-column: span 12; }
.tr-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 6px;
  align-items: stretch;
}
.tr-metrics-root {
  display: flex;
  flex-direction: column;
}
.tr-pair-dt {
  --tr-dt-h: 520px;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: stretch;
}
.tr-pair-dt > .tr-cell-dt,
.tr-pair-dt > .tr-cell-dtlist {
  height: var(--tr-dt-h);
  max-height: var(--tr-dt-h);
  min-height: 0;
  overflow: hidden;
}
.tr-pair-75 {
  /* 近10日 review.jpg 宽1180、高约3200–4900，展示框 1960×0.9 */
  --tr-ths-h: 1764px;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: stretch;
}
.tr-pair-75 > .tr-stack-scroll {
  height: var(--tr-ths-h);
  max-height: var(--tr-ths-h);
  min-height: 0;
  overflow: hidden;
  overflow: clip;
  align-self: stretch;
}
.tr-pair-75 .tr-stack-scroll > .tr-cell {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
}
.tr-pair-75 .tr-stack-scroll > .tr-cell .tr-cell-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tr-pair-75 > .tr-cell-ths {
  height: var(--tr-ths-h);
  max-height: var(--tr-ths-h);
  min-height: 0;
  overflow: hidden;
  overflow: clip;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}
.tr-pair > .tr-stack,
.tr-pair > .tr-cell {
  grid-column: auto;
  min-width: 0;
  height: 100%;
}
.tr-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tr-stack > .tr-cell { width: 100%; }
.tr-stack-fill {
  align-self: stretch;
}
.tr-stack-fill > .tr-cell:last-child {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tr-stack-fill > .tr-cell:last-child .tr-cell-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tr-stack-fill .tr-hist {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tr-stack-fill .tr-hist-plot {
  flex: 1 1 auto;
  height: auto;
  min-height: 148px;
}
.tr-cell-fill {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tr-cell-fill .tr-cell-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tr-cell-fill .tr-mt {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.tr-cell-fill .tr-mt table {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
}
.tr-cell-fill .tr-mt tr { height: calc(100% / 13); }
.tr-cell-fill .tr-mt th,
.tr-cell-fill .tr-mt td {
  padding: 10px 6px;
  vertical-align: middle;
}
.tr-rowspan-2 {
  grid-row: auto;
  align-self: start;
}
.tr-cell-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.tr-cell-head h3 { margin: 0; font-size: 13px; font-weight: 700; }
.tr-cell-head span { font-size: 11px; color: var(--muted); }
.tr-cell-body { min-height: 40px; }
.tr-weather { display: flex; flex-direction: column; gap: 8px; }
.tr-wx-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.tr-wx-phase { display: flex; gap: 10px; align-items: flex-start; min-width: 0; flex: 1; }
.tr-wx-phase .tr-phase { flex: 0 0 auto; margin-top: 2px; }
.tr-wx-phase .tr-desc { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); }
.tr-wx-score { text-align: right; flex: 0 0 auto; line-height: 1.05; }
.tr-wx-score b { display: block; font-size: 32px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.tr-wx-score em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.tr-wx-index { display: flex; gap: 8px; align-items: baseline; font-size: 16px; font-weight: 700; }
.tr-wx-stats {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 14px;
}
.tr-wx-stats b { font-size: 16px; font-variant-numeric: tabular-nums; }
.tr-wx-lab { color: var(--muted); font-size: 13px; }
.tr-wx-vol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.tr-wx-vol b { font-size: 16px; }
.tr-index-row { display: flex; gap: 10px; align-items: baseline; margin: 8px 0; font-size: 16px; font-weight: 700; }
.tr-adv, .tr-vol { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--muted); }
.tr-adv b, .tr-vol span { font-weight: 700; }
.is-up { color: var(--red); }
.is-dn { color: var(--green); }
.tr-hist { display: flex; flex-direction: column; gap: 6px; }
.tr-hist-plot {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  align-items: stretch;
  height: 168px;
  gap: 3px;
}
.tr-hist-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  height: 100%;
}
.tr-hist-n {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.tr-hist-n.is-up { color: var(--red); }
.tr-hist-n.is-dn { color: var(--green); }
.tr-hist-n.is-flat { color: var(--muted); }
.tr-hist-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  padding-top: 16px;
  box-sizing: border-box;
}
.tr-hist-bar {
  position: relative;
  width: 78%;
  max-width: 32px;
  min-height: 4px;
  border-radius: 3px 3px 0 0;
}
.tr-hist-bar.up { background: var(--red); }
.tr-hist-bar.dn { background: var(--green); }
.tr-hist-bar.flat { background: #9ca3af; }
.tr-hist-lab {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
  transform: scale(0.92);
}
.tr-hist-col:first-child .tr-hist-lab { color: var(--red); font-weight: 700; }
.tr-hist-col:last-child .tr-hist-lab { color: var(--green); font-weight: 700; }
.tr-hist-meter { display: flex; height: 6px; border-radius: 2px; overflow: hidden; }
.tr-hist-meter .up { background: var(--red); }
.tr-hist-meter .dn { background: var(--green); }
.tr-hist-sum {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
.tr-limit-chart { width: 100%; height: 280px; overflow: hidden; }
.tr-bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; overflow-x: auto; }
.tr-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 18px; flex: 0 0 18px; }
.tr-bar-up, .tr-bar-dn { width: 8px; border-radius: 2px 2px 0 0; }
.tr-bar-up { background: var(--red); }
.tr-bar-dn { background: var(--green); margin-top: 2px; border-radius: 0 0 2px 2px; }
.tr-bar-col i { font-style: normal; font-size: 9px; color: var(--muted); margin-top: 4px; }
.tr-spark { display: flex; align-items: flex-end; gap: 3px; height: 52px; margin: 8px 0; }
.tr-spark span { width: 8px; border-radius: 2px; background: var(--red); display: inline-block; }
.tr-spark span.is-dn { background: var(--green); }
.tr-slots { display: grid; grid-template-columns: 1fr; gap: 8px; }
.tr-slot { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-size: 12px; color: var(--muted); }
.tr-slot b { font-size: 16px; color: var(--text); }
.tr-slot.is-bull b { color: var(--red); }
.tr-slot.is-bear b { color: var(--green); }
.tr-slot em { font-style: normal; font-size: 11px; }
.tr-wv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0; }
.tr-wv-side { min-width: 0; padding: 0 12px 0 0; }
.tr-wv-side + .tr-wv-side { border-left: 1px solid var(--border); padding: 0 0 0 16px; }
.tr-wv-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.2;
}
.tr-wv-title i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.tr-wv-title b { font-weight: 700; color: inherit; }
.tr-wv-title em { font-style: normal; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.tr-wv-title.is-up, .tr-wv-title.is-up em { color: var(--red); }
.tr-wv-title.is-dn, .tr-wv-title.is-dn em { color: var(--green); }
.tr-wv-head, .tr-wv-row, .tr-wv-theme {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 62px 72px 72px;
  gap: 6px;
  align-items: center;
}
.tr-wv-head {
  color: var(--muted);
  font-size: 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
}
.tr-wv-head span:not(:first-child),
.tr-wv-row span:not(:first-child),
.tr-wv-theme span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.tr-wv-theme {
  font-weight: 700;
  padding: 10px 0 4px;
  font-size: 14px;
}
.tr-wv-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 5px 0;
  cursor: pointer;
  font-size: 13px;
}
.tr-wv-row:hover { background: var(--hover-bg); }
.tr-wv-name { display: flex; gap: 6px; align-items: center; min-width: 0; }
.tr-wv-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-wv-tag {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
}
.tr-wv-px { font-variant-numeric: tabular-nums; color: var(--text); }
.tr-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tr-two-col h4 { margin: 0 0 8px; font-size: 13px; }
.tr-theme-line { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.tr-mt { overflow-x: auto; }
.tr-mt table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 720px; }
.tr-mt th, .tr-mt td {
  padding: 9px 6px;
  border: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tr-mt th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg2);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  width: 72px;
  min-width: 72px;
}
.tr-mt-phase { font-weight: 700; letter-spacing: 4px; }
.tr-mt-sent { position: relative; font-weight: 600; overflow: hidden; }
.tr-mt-hit { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; display: block; }
.tr-mt-hit svg { width: 16px; height: 16px; display: block; }
.tr-mt-cmt { font-size: 11px; }
.tr-table-wrap { overflow: auto; max-height: 300px; }
.tr-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tr-table th, .tr-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tr-table th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--bg2); }
.tr-table tr[data-tr-stock] { cursor: pointer; }
.tr-table tr[data-tr-stock]:hover { background: var(--hover-bg); }
.tr-ths img { width: 100%; max-width: 100%; height: auto; border-radius: 8px; display: block; pointer-events: none; }
.tr-cell-ths .tr-cell-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tr-cell-ths .tr-ths {
  position: static;
  height: auto;
}
.tr-cell-ths .tr-ths img {
  width: 100%;
  height: auto;
  object-fit: unset;
  pointer-events: none;
}
.tr-cycles { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tr-cycle { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--bg3); }
.tr-muted { color: var(--muted); font-style: normal; font-size: 11px; }
.tr-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.tr-flow { display: flex; flex-direction: column; gap: 8px; }
.tr-flow-chart { width: 100%; min-height: 240px; }
.tr-flow-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.tr-flow-toggles { display: flex; gap: 6px; align-items: center; }
.tr-flow-toggles button {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.tr-flow-toggles button.is-on { color: var(--text); border-color: var(--text); font-weight: 700; }
.tr-flow-asof { font-size: 12px; color: var(--muted); }
.tr-mbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.tr-mtabs, .tr-mbar-right { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.tr-mtabs span, .tr-mbar-right span { cursor: pointer; padding-bottom: 4px; }
.tr-mtabs span.is-on, .tr-mbar-right span.is-on {
  color: var(--text);
  font-weight: 700;
  border-bottom: 2px solid var(--red, #ef4444);
}
.tr-mbar-right button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 0 0 4px;
  cursor: pointer;
}
.tr-mbar-right button.is-on {
  color: var(--text);
  font-weight: 700;
  border-bottom: 2px solid var(--red, #ef4444);
}
.tr-mkpis, .tr-mboards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.tr-mkpi, .tr-mboard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 10px 8px;
  min-width: 0;
}
.tr-mkpi .k, .tr-mboard .k { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.tr-mkpi .v, .tr-mboard .v { display: block; font-size: 20px; font-weight: 800; line-height: 1.15; }
.tr-mboard em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; color: var(--muted); }
.tr-metrics-chart { width: 100%; height: 240px; }
.tr-rank-pane[hidden] { display: none !important; }
.tr-mtabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 0 0 4px;
  cursor: pointer;
}
.tr-mtabs button.is-on {
  color: var(--text);
  font-weight: 700;
  border-bottom: 2px solid var(--red, #ef4444);
}
.tr-turn { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.tr-turn-chart { width: 100%; min-height: 280px; }
.tr-fund {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 1fr) minmax(280px, 1.15fr);
  gap: 8px 18px;
  align-items: start;
}
.tr-fund-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 56px 64px 76px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  padding: 3px 0;
  min-height: 26px;
  line-height: 1.3;
}
.tr-fund-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  min-height: 24px;
  padding-bottom: 4px;
}
.tr-fund-head span { text-align: right; }
.tr-fund-head span:first-child { text-align: left; }
.tr-fund-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-fund-amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.tr-fund-cap, .tr-fund-row span:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.tr-tornado { display: flex; flex-direction: column; gap: 0; padding-top: 0; }
.tr-tornado-head { min-height: 24px; }
.tr-tornado-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 26px;
}
.tr-tornado-row .is-l, .tr-tornado-row .is-r {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tr-tornado-row .is-r { text-align: right; }
.tr-tornado-bars { display: grid; grid-template-columns: 1fr 1fr; height: 12px; }
.tr-tornado-bars .l, .tr-tornado-bars .r { display: flex; align-items: stretch; min-width: 0; }
.tr-tornado-bars .l { justify-content: flex-end; }
.tr-tornado-bars i { display: block; height: 100%; min-width: 2px; }
.tr-tornado-bars .l i { background: var(--red); border-radius: 2px 0 0 2px; }
.tr-tornado-bars .r i { background: var(--green); border-radius: 0 2px 2px 0; }
.tr-foot { grid-column: 1 / -1; color: var(--muted); font-size: 12px; margin: 0; }
.tr-dt-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.tr-dt-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
.tr-dt-card-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.tr-dt-card-h em { font-style: normal; font-weight: 700; }
.tr-dt-card-v {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  font-style: normal;
}
.tr-dt-card-d { margin: 0; font-size: 11px; color: var(--muted); }
.tr-dt-card-v.is-up, .tr-dt-card-d.is-up { color: var(--red); }
.tr-dt-card-v.is-dn, .tr-dt-card-d.is-dn { color: var(--green); }
.tr-dt-chart { width: 100%; height: 240px; }
.tr-dt-root {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.tr-pair-dt .tr-dt-chart {
  flex: 1 1 auto;
  min-height: 240px;
  height: auto;
}
.tr-dtlist-root {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.tr-pair-dt .tr-dtlist-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.tr-dtlist-wrap {
  overflow-x: hidden;
}
.tr-dtlist-wrap .tr-table {
  table-layout: auto;
  width: 100%;
}
.tr-dtlist-wrap .tr-table th,
.tr-dtlist-wrap .tr-table td {
  padding: 6px 12px 6px 0;
  white-space: nowrap;
  width: 1%;
  vertical-align: top;
}
.tr-dtlist-wrap .tr-table th:nth-last-child(-n+2),
.tr-dtlist-wrap .tr-table td:nth-last-child(-n+2),
.tr-dtlist-wrap .tr-dt-seats {
  white-space: normal;
  width: 22%;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.tr-dtlist-wrap .tr-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.tr-dtlist-wrap .tr-mini { white-space: nowrap; padding-right: 8px; }
.tr-hm-stk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 1px 8px 1px 0;
  font-size: 12px;
  vertical-align: middle;
}
.tr-hm-stk em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.tr-pos {
  font-style: normal;
  font-size: 10px;
  line-height: 1.3;
  padding: 0 4px;
  border-radius: 3px;
  border: 1px solid currentColor;
  flex: none;
}
.tr-pos.is-open { color: var(--red); }
.tr-pos.is-close { color: var(--green); }
.tr-tall { max-height: 420px; }
.tr-tl-scroll { overflow: auto; max-height: 640px; }
.tr-tl-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.tr-tl-table th, .tr-tl-table td { border: 1px solid var(--border); vertical-align: top; padding: 6px 6px; word-break: keep-all; overflow-wrap: normal; }
.tr-tl-lv { width: 42px; text-align: center; color: var(--muted); font-weight: 700; background: var(--bg); }
.tr-tl-day { font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; }
.tr-tl-dates th { text-align: center; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tr-tl-item { display: flex; align-items: center; gap: 4px; line-height: 1.45; min-width: 0; flex-wrap: nowrap; }
.tr-tl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-tl-item > span:last-child { flex: none; white-space: nowrap; }
.tr-tl-up, .tr-tl-dn, .tr-tl-flat { font-style: normal; font-weight: 700; font-size: 11px; flex: none; }
.tr-tl-up { color: #fb7185; }
.tr-tl-dn { color: #22c55e; }
.tr-tl-flat { color: var(--muted); }
.tr-tl-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tr-tl-foot button { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 4px; width: 24px; height: 24px; cursor: pointer; }
.tr-tl-foot button:disabled { opacity: 0.4; cursor: default; }
.tr-tl-legend { display: flex; gap: 8px; align-items: center; }
.tr-rank-n { display: inline-flex; min-width: 22px; justify-content: center; }
.tr-rank-n.is-top1, .tr-rank-n.is-top2, .tr-rank-n.is-top3 {
  background: var(--red); color: #fff; border-radius: 4px; font-weight: 800; padding: 0 5px;
}
.tr-rank-n.is-top2 { background: #f97316; }
.tr-rank-n.is-top3 { background: #fb923c; }
.tr-down h4 { margin: 8px 0 6px; font-size: 13px; }
.tr-seat { display: inline-flex; gap: 4px; align-items: center; margin: 2px 8px 2px 0; font-size: 12px; }
.tr-seat b { font-weight: 650; }
.tr-tag { margin-left: 4px; font-style: normal; font-size: 10px; padding: 0 4px; border-radius: 3px; background: rgba(239,68,68,.15); color: var(--red); }
.tr-mini { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 4px 0 0; }
.tr-seats { white-space: normal; }
.tr-dpool-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-count-lab { font-size: 12px; color: var(--muted); }
.tr-count-seg { display: flex; gap: 8px; align-items: center; }
.tr-count-seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 0;
  cursor: pointer;
}
.tr-count-seg button.is-on { color: var(--red, #ef4444); font-weight: 700; }
.tr-dpool-tools select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  min-width: 96px;
}
.tr-dpool-wrap { overflow: auto; max-height: 560px; }
.tr-dpool-table th, .tr-dpool-table td { font-variant-numeric: tabular-nums; }
.tr-dpool-table th.num, .tr-dpool-table td:nth-child(n+4) { text-align: right; }
.tr-dpool-table th.is-sort { cursor: pointer; user-select: none; }
.tr-dpool-theme { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.tr-dpool-name { display: flex; align-items: center; gap: 4px; font-weight: 650; }
.tr-board-tag, .tr-st {
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  border-radius: 3px;
  padding: 0 3px;
  line-height: 1.4;
}
.tr-board-tag { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.tr-st { background: rgba(239, 68, 68, 0.18); color: var(--red); }
.tr-dpool-rank { text-align: center; color: var(--muted); }
@media (max-width: 1100px) {
  .tr-group-grid .tr-span-4,
  .tr-group-grid .tr-span-5,
  .tr-group-grid .tr-span-6,
  .tr-group-grid .tr-span-7,
  .tr-group-grid .tr-span-8,
  .tr-span-4, .tr-span-5, .tr-span-6, .tr-span-7, .tr-span-8 { grid-column: span 12; }
  .tr-rowspan-2 { grid-row: auto; }
  .tr-two-col { grid-template-columns: 1fr; }
  .tr-wv { grid-template-columns: 1fr; }
  .tr-wv-side + .tr-wv-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
  .tr-metrics { grid-template-columns: repeat(2, 1fr); }
  .tr-fund { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1fr); }
  .tr-turn { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

/* 盯盘：左指数 / 中四池 / 右分时K */
#panel-kpdesk.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h, 56px) - 8px);
  min-height: 0;
  box-sizing: border-box;
}
.kpdesk-m-chrome { display: none; }
.kpdesk-page {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 8px 8px;
  box-sizing: border-box;
}
.kpdesk-page.is-resizing {
  user-select: none;
}
.kpdesk-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.kpdesk-left { flex: var(--xc-kpdesk-c1, 22) 1 180px; gap: 6px; overflow: auto; }
.kpdesk-mid { flex: var(--xc-kpdesk-c2, 46) 1 240px; position: relative; z-index: 3; }
.kpdesk-right { flex: var(--xc-kpdesk-c3, 32) 1 220px; }
.kpdesk-left > .kpdesk-breadth { flex: 0 0 auto; }
.kpdesk-left > section.kpdesk-card:nth-of-type(1) { flex: var(--xc-kpdesk-l1, 20) 1 56px; }
.kpdesk-left > section.kpdesk-card:nth-of-type(2) { flex: var(--xc-kpdesk-l2, 20) 1 56px; }
.kpdesk-left > section.kpdesk-card:nth-of-type(3) { flex: var(--xc-kpdesk-l3, 60) 1 120px; }
.kpdesk-left > section.kpdesk-card.kpdesk-sentiment-card { flex: 0 0 auto; min-height: 0; }
.kpdesk-left > section.kpdesk-card.kpdesk-sectors-card { flex: 0 1 auto; min-height: 0; }
.kpdesk-left > section.kpdesk-card.kpdesk-themes-card { flex: 1 1 auto; max-height: none; min-height: 0; }
.kpdesk-themes-card .kpdesk-theme { flex: 1 1 0; min-height: 28px; }
.kpdesk-mid > .kpdesk-card:nth-child(1) { flex: var(--xc-kpdesk-m1, 16) 1 56px; }
.kpdesk-mid > .kpdesk-card:nth-child(3) { flex: var(--xc-kpdesk-m2, 28) 1 70px; }
.kpdesk-mid > .kpdesk-card:nth-child(5) { flex: var(--xc-kpdesk-m3, 28) 1 70px; }
.kpdesk-mid > .kpdesk-card:nth-child(7) { flex: var(--xc-kpdesk-m4, 28) 1 70px; }
.kpdesk-right > .kpdesk-card:nth-child(1) { flex: var(--xc-kpdesk-r1, 50) 1 80px; }
.kpdesk-right > .kpdesk-card:nth-child(3) { flex: var(--xc-kpdesk-r2, 50) 1 80px; }
.kpdesk-col-handle,
.kpdesk-row-handle {
  position: relative;
  background: transparent;
  touch-action: none;
  user-select: none;
}
.kpdesk-col-handle {
  cursor: col-resize;
  flex: 0 0 6px;
  width: 6px;
  align-self: stretch;
}
.kpdesk-row-handle {
  cursor: row-resize;
  flex: 0 0 6px;
  height: 6px;
  width: 100%;
}
.kpdesk-col-handle::before,
.kpdesk-row-handle::before {
  content: "";
  position: absolute;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.35);
}
.kpdesk-col-handle::before {
  top: 12%;
  bottom: 12%;
  left: 2px;
  width: 2px;
}
.kpdesk-row-handle::before {
  left: 12%;
  right: 12%;
  top: 2px;
  height: 2px;
}
.kpdesk-col-handle:hover::before,
.kpdesk-row-handle:hover::before,
.kpdesk-page.is-resizing .kpdesk-col-handle::before,
.kpdesk-col.is-resizing .kpdesk-row-handle::before {
  background: rgba(148, 163, 184, 0.85);
}
.kpdesk-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg2, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  overflow: hidden;
}
.kpdesk-pool {
  overflow: visible;
}
.kpdesk-pool .kpdesk-card-head {
  position: relative;
  z-index: 8;
  overflow: visible;
}
.kpdesk-cols-wrap {
  flex: 0 0 auto;
}
.kpdesk-cols-btn {
  font-size: 11px;
  line-height: 1.2;
  padding: 2px 8px;
  border-radius: 6px;
}
.kpdesk-cols-menu {
  z-index: 50;
}
.kpdesk-left .kpdesk-card-head {
  padding: 3px 8px 2px;
}
.kpdesk-left .kpdesk-card-head h3 { font-size: 12px; }
.kpdesk-left .kpdesk-chart { min-height: 52px; }
#panel-kpdesk .kpdesk-breadth {
  padding: 6px 8px 5px;
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  background: var(--bg3, #242424);
}
#panel-kpdesk .kpdesk-breadth .ij-indices {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  margin-top: 6px;
}
#panel-kpdesk .kpdesk-breadth .ij-index {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
#panel-kpdesk .kpdesk-breadth .ij-index-name {
  color: var(--muted, #787776);
  flex-shrink: 0;
}
#panel-kpdesk .kpdesk-breadth .ij-index-px,
#panel-kpdesk .kpdesk-breadth .ij-index-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
#panel-kpdesk .kpdesk-breadth .ij-index-px { color: var(--text, #e8e6e3); }
#panel-kpdesk .kpdesk-breadth .ij-index-pct.flat {
  color: var(--muted, #787776);
  font-weight: 500;
}
.kpdesk-card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 10px 4px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border, #333);
}
.kpdesk-card-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #e8e6e3);
}
.kpdesk-card-meta {
  font-size: 12px;
  color: var(--muted, #787776);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
}
.kpdesk-chart {
  flex: 1 1 auto;
  min-height: 80px;
  height: 100%;
  width: 100%;
}
.kpdesk-placeholder-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #787776);
  font-size: 13px;
}
.kpdesk-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.kpdesk-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.kpdesk-table th,
.kpdesk-table td {
  padding: 3px 6px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--table-row-border, #2a2520);
}
.kpdesk-table th[data-col="stock_code"],
.kpdesk-table td[data-col="stock_code"],
.kpdesk-table th[data-col="stock_name"],
.kpdesk-table td[data-col="stock_name"],
.kpdesk-table th[data-col="concept"],
.kpdesk-table td[data-col="concept"],
.kpdesk-table th[data-col="mode_names"],
.kpdesk-table td[data-col="mode_names"] {
  text-align: left;
}
.kpdesk-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-head-bg, #3d3d3d);
  color: var(--table-head-text, #c8c8c8);
  font-weight: 500;
}
.kpdesk-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}
.kpdesk-table thead th.sortable:hover {
  color: var(--text, #eee);
  background: rgba(82, 65, 159, 0.28);
}
.kpdesk-table tbody tr {
  cursor: pointer;
}
.kpdesk-table tbody tr:hover {
  background: var(--row-hover, rgba(82, 65, 159, 0.12));
}
.kpdesk-table tbody tr.is-chart-active {
  background: var(--row-highlight, #2a2218);
}
.kpdesk-table td.empty {
  text-align: center;
  color: var(--muted, #787776);
  cursor: default;
  padding: 16px 8px;
}
.kpdesk-table thead th.th-metric-cjs,
.kpdesk-table .metric-cjs { color: #60a5fa; }
.kpdesk-table thead th.th-metric-jssb,
.kpdesk-table .metric-jssb { color: #f87171; }
.kpdesk-table thead th.th-metric-xcjw,
.kpdesk-table .metric-xcjw { color: #c084fc; }
.kpdesk-table thead th.th-metric-jsjl,
.kpdesk-table .metric-jsjl { color: #fb923c; }
.kpdesk-table thead th.th-metric-xcpzqb,
.kpdesk-table .metric-xcpzqb { color: #f472b6; }
.kpdesk-table .metric-zero { color: var(--muted, #787776); }
.kpdesk-table .kanpan-tsig.up { color: #ff2323; font-weight: 600; }
.kpdesk-table .kanpan-tsig.down { color: #10cc55; font-weight: 600; }
.kpdesk-table .cell-pct.pos,
.kpdesk-table .pos { color: var(--red); }
.kpdesk-table .cell-pct.neg,
.kpdesk-table .neg { color: var(--green); }
.kpdesk-table .guchi-concept {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted, #8b9bb4);
}
.kpdesk-table .kanpan-mode {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpdesk-sectors-card,
.kpdesk-themes-card,
.kpdesk-sentiment-card {
  overflow: hidden;
}
.kpdesk-sentiment-card .kp-emo-words { margin-left: auto; font-size: 12px; }
.kpdesk-sentiment-card .kp-emo-words:not([hidden]) + .kpdesk-card-meta { margin-left: 0; }
.kpdesk-sentiment {
  padding: 2px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kp-emo-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kp-emo-meter { flex: 1 1 auto; min-width: 0; }
.kp-emo-track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #10cc55, #eab308 55%, #ff2323);
}
.kp-emo-pin {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: #f5f5f4;
  transform: translateX(-1px);
}
.kp-emo-scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  min-height: 14px;
  font-size: 10px;
  color: var(--muted, #787776);
}
.kp-emo-heat {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  color: #fafaf9;
  font-variant-numeric: tabular-nums;
}
.kp-emo-words {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}
.kp-emo-words b {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 5px;
  border-radius: 4px;
  text-align: center;
}
.kp-emo-words b.is-bad { color: #4ade80; background: rgba(16, 204, 85, 0.18); }
.kp-emo-words b.is-mid { color: #fbbf24; background: rgba(234, 179, 8, 0.18); }
.kp-emo-words b.is-good { color: #fb7185; background: rgba(255, 35, 35, 0.18); }
.kp-emo-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.kp-emo-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding: 2px 5px 3px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.kp-emo-stat-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.kp-emo-stat-row {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.kp-emo-stat-row em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.4;
}
.kp-emo-stat-row b {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
}
.kp-emo-stat-row.is-today b { font-size: 15px; }
.kp-emo-stat-row.is-yday b { font-size: 12px; font-weight: 650; opacity: 0.72; }
.kp-emo-stat.is-zt {
  background: rgba(255, 45, 45, 0.16);
  border-color: rgba(255, 80, 80, 0.45);
}
.kp-emo-stat.is-zt .kp-emo-stat-name,
.kp-emo-stat.is-zt .is-today b { color: #ff5b5b; }
.kp-emo-stat.is-zt .is-today em { color: #ffd0d0; background: rgba(255, 45, 45, 0.35); }
.kp-emo-stat.is-dt {
  background: rgba(16, 185, 90, 0.16);
  border-color: rgba(52, 211, 120, 0.45);
}
.kp-emo-stat.is-dt .kp-emo-stat-name,
.kp-emo-stat.is-dt .is-today b { color: #3dde7a; }
.kp-emo-stat.is-dt .is-today em { color: #d1fae5; background: rgba(16, 185, 90, 0.35); }
.kp-emo-stat.is-lb {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.45);
}
.kp-emo-stat.is-lb .kp-emo-stat-name,
.kp-emo-stat.is-lb .is-today b { color: #fbbf24; }
.kp-emo-stat.is-lb .is-today em { color: #fef3c7; background: rgba(245, 158, 11, 0.38); }
.kp-emo-stat.is-gd {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(192, 132, 252, 0.5);
}
.kp-emo-stat.is-gd .kp-emo-stat-name,
.kp-emo-stat.is-gd .is-today b { color: #d8b4fe; }
.kp-emo-stat.is-gd .is-today em { color: #f3e8ff; background: rgba(168, 85, 247, 0.4); }
.kp-emo-stat .is-yday em { color: #a8a29e; background: rgba(255, 255, 255, 0.06); }
.kp-emo-stat .is-yday b { color: #d6d3d1; }
.kp-emo-calc {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
  padding-top: 1px;
  line-height: 1;
}
.kp-emo-calc em {
  font-style: normal;
  font-size: 11px;
  color: #8b93a7;
  margin-right: 3px;
}
.kp-emo-calc b {
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #f5f5f4;
}
.kp-emo-calc .is-ice b { color: #7dd3fc; }
.kp-emo-calc .is-sprout b { color: #4ade80; }
.kp-emo-calc .is-accel b { color: #fb923c; }
.kp-emo-calc .is-peak b { color: #fb7185; }
.kp-emo-calc .is-ebb b { color: #d6d3d1; }
.kp-emo-calc b.is-lb { color: #fbbf24; }
.kp-emo-calc b.is-hot { color: #fb923c; }
.kp-emo-calc b.is-up { color: #e93030; }
.kp-emo-calc b.is-down { color: #3dde7a; }
.kpdesk-themes {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 2px 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpdesk-theme {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  background: var(--bg3, #242424);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.kpdesk-theme:hover {
  border-color: color-mix(in srgb, var(--text, #e8e6e3) 22%, var(--border, #333));
}
.kpdesk-theme-rank {
  flex: 0 0 auto;
  min-width: 1.2em;
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #e8e6e3);
}
.kpdesk-theme-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpdesk-theme-sub {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted, #787776);
}
.kpdesk-theme-pct {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.kpdesk-sectors {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 2px 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpl-sec-card {
  flex: 0 0 auto;
  padding: 4px 6px 5px;
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  background: var(--bg3, #242424);
  cursor: pointer;
}
.kpl-sec-card:hover {
  border-color: color-mix(in srgb, var(--text, #e8e6e3) 22%, var(--border, #333));
}
.kpl-sec-card.is-open {
  border-color: color-mix(in srgb, var(--red) 45%, var(--border, #333));
}
.kpl-sec-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.kpl-sec-rank {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted, #787776);
  min-width: 1.2em;
}
.kpl-sec-rank.is-top {
  color: var(--text, #e8e6e3);
  font-weight: 700;
}
.kpl-sec-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpl-sec-code {
  margin-left: 4px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted, #787776);
}
.kpl-sec-pct {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.kpl-sec-str {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text, #e8e6e3);
  min-width: 3.2em;
  text-align: right;
}
.kpl-sec-meta,
.kpl-sec-counts {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted, #787776);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.kpl-sec-chip {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  border-radius: 4px;
  line-height: 1.6;
  font-size: 11px;
}
.kpl-sec-chip.is-up {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 16%, transparent);
}
.kpl-sec-chip.is-down {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 16%, transparent);
}
.kpl-sec-chip.is-dim {
  opacity: 0.45;
}
.kpl-sec-bar {
  display: flex;
  height: 8px;
  margin-top: 4px;
  gap: 2px;
  background: transparent;
}
.kpl-sec-seg {
  min-width: 6px;
  border-radius: 3px;
}
.kpl-sec-bins {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  margin-top: 3px;
  font-size: 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.kpl-sec-bins b {
  display: block;
  font-size: 12px;
  color: inherit;
  font-weight: 700;
}
.kpl-sec-bin-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: 1px;
}
.kpl-sec-members {
  display: none;
  margin-top: 6px;
  max-height: 200px;
  overflow: auto;
  border-top: 1px solid var(--border, #333);
  cursor: default;
}
.kpl-sec-card.is-open .kpl-sec-members {
  display: block;
}
.kpl-sec-members-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px 2px;
  font-size: 11px;
  color: var(--muted, #787776);
}
.kpl-sec-members-close {
  flex: 0 0 auto;
  border: 1px solid var(--border, #333);
  background: var(--bg2, #1c1c1c);
  color: var(--text, #e8e6e3);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.4;
  padding: 1px 8px;
  cursor: pointer;
}
.kpl-sec-members-close:hover {
  border-color: color-mix(in srgb, var(--text, #e8e6e3) 28%, var(--border, #333));
}
.kpl-sec-members-empty {
  padding: 10px 4px;
  text-align: center;
  color: var(--muted, #787776);
  font-size: 12px;
}
.kpl-sec-members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.kpl-sec-members-table th,
.kpl-sec-members-table td {
  padding: 4px 4px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--table-row-border, #2a2520);
}
.kpl-sec-members-table th {
  position: sticky;
  top: 0;
  background: var(--bg3, #242424);
  color: var(--muted, #787776);
  font-weight: 500;
  font-size: 11px;
}
.kpl-sec-members-table td.is-code,
.kpl-sec-members-table td.is-name,
.kpl-sec-members-table th:nth-child(1),
.kpl-sec-members-table th:nth-child(2) {
  text-align: left;
}
.kpl-sec-members-table td.is-name {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpl-sec-members-table tbody tr { cursor: pointer; }
.kpl-sec-members-table tbody tr:hover {
  background: var(--row-hover, rgba(82, 65, 159, 0.12));
}
.kpl-sec-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.kpl-sec-health {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 999px;
  line-height: 1.7;
  border: 1px solid var(--border, #333);
}
.kpl-sec-health.is-full { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.kpl-sec-health.is-mid { color: var(--text-secondary, #c8c8c8); }
.kpl-sec-health.is-solo { color: var(--muted, #787776); }
.kpl-sec-spark {
  width: 56px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
}

.quick-stock-finder {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1400;
  width: min(360px, calc(100vw - 24px));
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px var(--shadow);
  padding: 8px;
}
.quick-stock-finder.hidden {
  display: none;
}
.quick-stock-input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 0 10px;
  font-size: 15px;
  outline: none;
}
.quick-stock-input:focus {
  border-color: var(--accent2);
}
.quick-stock-list {
  margin-top: 6px;
  max-height: 320px;
  overflow: auto;
}
.quick-stock-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.quick-stock-item:hover,
.quick-stock-item.is-active {
  background: var(--row-hover);
}
.quick-stock-code {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  min-width: 64px;
}
.quick-stock-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-stock-mark {
  color: var(--accent2);
  font-weight: 600;
}
.quick-stock-empty,
.quick-stock-hint {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--muted);
}
html.is-mobile .quick-stock-finder {
  display: none !important;
}
.xc-stock-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.gl-chips {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  vertical-align: middle;
}
.gl-chip {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  max-width: 72px;
  padding: 0 5px;
  height: 16px;
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 999px;
  background: rgba(124, 92, 252, 0.12);
  color: #c4b5fd;
  font-size: 10px;
  line-height: 14px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#stockTable td[data-col="stock_name"],
#intradayTable td[data-col="stock_name"],
tr.stock-row td[data-col="stock_name"] {
  overflow: hidden;
  white-space: nowrap;
}
#stockTable .cell-name .gl-chips,
#intradayTable .cell-name .gl-chips,
tr.stock-row [data-col="stock_name"] .gl-chips,
.ij-id .gl-chips,
.jingsuan-stock-main .gl-chips {
  flex: 1 1 auto;
}
.gl-chip.is-hot { border-color: rgba(245, 200, 76, 0.45); background: rgba(245, 200, 76, 0.12); color: #f5c84c; }
.gl-chip.is-dalong { border-color: rgba(255, 77, 94, 0.4); background: rgba(255, 77, 94, 0.1); color: #ff8b95; }
.gl-chip.is-rise { border-color: rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.12); color: #7dd3fc; cursor: default; }
.gl-chip.is-lh { border-color: rgba(232, 160, 106, 0.4); background: rgba(232, 160, 106, 0.12); color: #e0a06a; cursor: default; }
.kline-gl-meta {
  display: block;
  flex: 1 1 100%;
  order: 5;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.4;
  writing-mode: horizontal-tb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kline-gl-meta[hidden] {
  display: none !important;
}
.kline-gl-meta .gl-subj-text {
  display: inline;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}
.kline-gl-meta .gl-chips {
  flex-wrap: wrap;
  max-width: none;
  overflow: visible;
}
.kline-gl-meta .gl-chip {
  max-width: 140px;
}
.kline-gl-reason {
  font-size: 12px;
  color: var(--muted);
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bt-lab-panel {
  padding: 0;
  min-height: 0;
}
.bt-lab {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 14px;
  padding: 12px 16px 28px;
  align-items: start;
}
.bt-lab.is-form-min {
  grid-template-columns: 44px minmax(0, 1fr);
}
@media (max-width: 1100px) {
  .bt-lab {
    grid-template-columns: 1fr;
  }
  .bt-lab-form {
    position: static;
    max-height: none;
  }
  .bt-lab.is-form-min {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .bt-lab.is-form-min .bt-lab-form {
    position: sticky;
    top: 8px;
    max-height: calc(100vh - 88px);
  }
}
.bt-lab-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.bt-lab-form {
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 88px);
  overflow: auto;
}
.bt-lab-fold-btn {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: 8px;
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1;
}
.bt-lab-fold-btn.is-text {
  font-size: 12px;
  height: 26px;
}
.bt-lab-fold-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}
.bt-lab.is-form-min .bt-lab-form {
  padding: 8px 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bt-lab.is-form-min .bt-lab-form > :not(#labBtFormFold) {
  display: none !important;
}
.bt-lab.is-form-min #labBtFormFold {
  writing-mode: vertical-rl;
  letter-spacing: 0.18em;
  height: auto;
  min-height: 120px;
  padding: 14px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.bt-lab-form-head {
  position: relative;
}
.bt-lab #labBtFormFold {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}
.bt-lab-form-head {
  padding-right: 44px;
}
.bt-lab.is-form-min #labBtFormFold {
  position: static;
  margin: 0;
}
.bt-lab-chart-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bt-lab-chart-card.is-min .bt-lab-chart {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.bt-lab-chart-card.is-min .bt-lab-chart-head {
  margin-bottom: 0;
}
.bt-lab-form-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.bt-lab-form-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.bt-lab-form-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding-right: 4px;
}
.bt-lab-overview-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bt-plaza-hall {
  padding: 12px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bt-plaza-hall.hidden {
  display: none;
}
.bt-plaza-hall-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.bt-plaza-hall-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
#btPlazaMemberSummary {
  margin: 8px 0 12px;
}
#btPlazaMemberChart {
  width: 100%;
  height: 320px;
  min-height: 280px;
  display: block;
}
.bt-plaza-trades-wrap {
  max-height: min(420px, 55vh);
}
.bt-lab-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.bt-lab-badge {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.bt-lab-seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.bt-lab-seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.bt-lab-seg button.is-on {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.bt-lab-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-bottom: 8px;
}
.bt-lab-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.bt-lab-fields .input,
.bt-lab-fill input,
.bt-lab-fill .input {
  width: 100%;
  min-width: 0;
  height: 30px;
  box-sizing: border-box;
}
.bt-lab-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}
.bt-lab-tags {
  margin-bottom: 8px;
  height: auto;
  overflow: hidden;
}
.bt-lab-tags .price-view-filter-head-row {
  margin-bottom: 4px;
}
.bt-lab-tags .price-view-filter-line {
  display: flex;
  align-items: center;
  height: auto;
  min-height: 28px;
}
.bt-lab-tags .price-view-filter-groups,
.bt-lab-tags.special-factor-filter .price-view-filter-line .price-view-filter-groups {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  row-gap: 0;
  scrollbar-width: thin;
  scrollbar-color: #64748b transparent;
}
.bt-lab-tags .price-view-filter-groups::-webkit-scrollbar,
.bt-lab-tags.special-factor-filter .price-view-filter-line .price-view-filter-groups::-webkit-scrollbar {
  height: 8px;
}
.bt-lab-tags .price-view-filter-groups::-webkit-scrollbar-thumb,
.bt-lab-tags.special-factor-filter .price-view-filter-line .price-view-filter-groups::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 4px;
}
.bt-lab-tags .price-view-filter-group,
.bt-lab-tags .price-view-filter-tags {
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.bt-lab-modes {
  width: 100%;
  min-height: 140px;
  margin-top: 6px;
}
.bt-lab-more {
  margin: 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: var(--bg);
}
.bt-lab-more .bt-lab-seg {
  margin-bottom: 10px;
}
.bt-lab-fill {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.bt-lab-fill label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bt-lab-fill input {
  width: 64px;
  flex: 1 1 56px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg2);
  color: var(--text);
  padding: 0 6px;
}
.bt-lab-boards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px 0;
  font-size: 13px;
}
.bt-lab-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--text);
}
.bt-lab-flags input[type="number"] {
  width: 64px;
  height: 26px;
}
.bt-lab-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.bt-lab-status {
  font-size: 12px;
  color: var(--muted);
  flex: 1 1 140px;
}
.bt-lab-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.bt-lab-overview {
  padding: 12px 16px 14px;
}
.bt-lab-overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.bt-lab-queue-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bt-lab-queue-meta h3 {
  margin: 0;
  font-size: 14px;
}
.bt-lab-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
}
.bt-lab-quota {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.bt-lab-quota-caption {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.bt-lab-quota-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.bt-lab-quota-cell {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.bt-lab-quota-cell b {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1.2;
}
.bt-lab-quota-cell b small {
  margin-left: 1px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.bt-lab-quota-cell.is-off b {
  font-size: 14px;
  color: var(--muted);
}
.bt-lab-quota-mine {
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.bt-lab-quota-mine.is-busy {
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
}
.bt-lab-overview .bt-lab-table-wrap {
  max-height: 140px;
  margin-top: 12px;
}
.bt-lab-kpis {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
}
.bt-lab-kpi {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
}
.bt-lab-kpi span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.bt-lab-kpi b {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.bt-lab-kpi b.is-up,
.bt-lab-table .is-up,
.bt-lab-list .is-up { color: #f43f5e; }
.bt-lab-kpi b.is-down,
.bt-lab-kpi b.is-dn,
.bt-lab-table .is-down,
.bt-lab-table .is-dn,
.bt-lab-list .is-down,
.bt-lab-list .is-dn { color: #10b981; }
.bt-lab-empty {
  grid-column: 1 / -1;
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: var(--bg2);
  font-size: 13px;
  line-height: 1.6;
}
.bt-lab-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}
.bt-lab-chart-head h3,
.bt-lab-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.bt-lab-skip {
  font-size: 12px;
  color: var(--muted);
}
.bt-lab-chart {
  height: 300px;
  width: 100%;
}
.bt-lab-table-wrap {
  overflow: auto;
  max-height: 360px;
  height: auto;
}
#labBtTradesCard {
  align-self: start;
  height: fit-content;
}
#labBtTradesCard .bt-lab-table-wrap {
  max-height: min(360px, 55vh);
}
.bt-lab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.bt-lab-table th,
.bt-lab-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.bt-lab-table th {
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: var(--bg2);
}
#labBtTradesBody tr[data-stock-id] {
  cursor: pointer;
}
#labBtTradesBody tr[data-stock-id]:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.bt-lab-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.9fr);
  gap: 12px;
  align-items: start;
  align-content: start;
}
.bt-lab-split:not(:has(#labBtTradesCard:not(.hidden))) {
  grid-template-columns: 1fr;
}
.bt-lab-history-card {
  min-height: 160px;
}
.bt-lab-st {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
}
.bt-lab-st.is-run { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.bt-lab-st.is-wait { background: rgba(245, 158, 11, 0.16); color: #d97706; }
@media (max-width: 1100px) {
  .bt-lab-split { grid-template-columns: 1fr; }
  .bt-lab-quota { flex-wrap: wrap; }
}
.bt-lab-list {
  font-size: 12px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
}
.bt-lab-hist-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.bt-lab-hist-row > [data-lab-run] {
  flex: 1;
  min-width: 0;
}
.bt-lab-list button {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  white-space: normal;
}
.bt-lab-list button:hover {
  border-color: var(--accent);
}
.bt-lab-hist-del,
.bt-lab-hist-pub {
  flex: 0 0 auto;
  align-self: stretch;
  padding: 9px 10px !important;
  white-space: nowrap !important;
}
.bt-lab-hist-del {
  color: #f43f5e !important;
}
.bt-lab-hist-del:hover {
  border-color: #f43f5e !important;
}
.bt-lab-hist-pub.is-on {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}
.bt-lab-list .muted { color: var(--muted); }
.bt-lab-list .cond {
  display: block;
  margin-top: 4px;
  white-space: normal;
  line-height: 1.45;
  word-break: break-word;
}
.bt-lab-cond-line {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  white-space: normal;
  word-break: break-word;
}
.jyds-desk {
  --jbg: #000;
  --jpanel: #050607;
  --jpanel2: #15191f;
  --jline: #343c48;
  --jline2: #1b222b;
  --jtext: #d7e2ef;
  --jmuted: #8b98aa;
  --jup: #f33;
  --jdown: #00d96f;
  --jyellow: #f4f000;
  --jblue: #3aa0ff;
  height: calc(100vh - 104px);
  min-height: 640px;
  display: flex;
  flex-direction: column;
  background: var(--jbg);
  color: var(--jtext);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  overflow: hidden;
}
.jyds-loading, .jyds-empty { color: var(--jmuted); font-size: 12px; padding: 16px 8px; text-align: center; }
.jyds-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 292px minmax(0, 1fr) 318px; }
.jyds-col { min-height: 0; overflow: auto; border-right: 1px solid var(--jline2); display: flex; flex-direction: column; background: #050607; }
.jyds-col:last-child { border-right: 0; border-left: 1px solid var(--jline2); }
.jyds-card { margin: 8px; padding: 8px; background: var(--jpanel); border: 1px solid var(--jline2); }
.jyds-card h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--jtext); }
.jyds-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.jyds-card-head b { font-size: 18px; font-variant-numeric: tabular-nums; }
.jyds-sub { color: var(--jmuted); font-size: 12px; }
.jyds-modes { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px 8px 0; }
.jyds-mode, .jyds-refresh {
  border: 1px solid var(--jline2); background: #0c1016; color: var(--jmuted);
  font-size: 12px; padding: 4px 8px; cursor: pointer;
}
.jyds-mode.is-on { color: var(--jyellow); border-color: var(--jyellow); background: #17140a; }
.jyds-refresh { margin-left: auto; }
.jyds-date { color: var(--jmuted); font-size: 12px; padding-right: 4px; }
.jyds-hit { margin: 8px; padding: 10px 12px; border: 1px solid var(--jyellow); background: #100e08; }
.jyds-hit-top { display: flex; justify-content: space-between; align-items: flex-start; }
.jyds-hit-name { font-size: 18px; font-weight: 700; }
.jyds-hit-type { color: var(--jmuted); font-size: 12px; margin-left: 8px; }
.jyds-hit-pct { font-size: 28px; font-weight: 700; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.jyds-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.jyds-chip { border: 1px solid var(--jline); background: #0b0e13; padding: 4px 8px; font-size: 12px; }
.jyds-hit-clock { color: var(--jyellow); font-size: 13px; text-align: right; }
.jyds-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.jyds-stat { background: #0b0e13; border: 1px solid var(--jline2); padding: 6px 8px; }
.jyds-stat i { display: block; color: var(--jmuted); font-style: normal; font-size: 11px; }
.jyds-stat b { font-size: 16px; font-variant-numeric: tabular-nums; }
.jyds-tablewrap { margin: 0 8px 8px; border: 1px solid var(--jline2); overflow: auto; flex: 1; min-height: 120px; }
.jyds-chart svg { display: block; width: 100%; }
.jyds-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.jyds-table th { position: sticky; top: 0; background: #10151c; color: var(--jmuted); font-weight: 500; text-align: right; padding: 6px 8px; }
.jyds-table th:nth-child(-n+3), .jyds-table td:nth-child(-n+3) { text-align: left; }
.jyds-table td { padding: 5px 8px; border-top: 1px solid var(--jline2); text-align: right; font-variant-numeric: tabular-nums; cursor: pointer; }
.jyds-table tr:hover td { background: #10161e; }
.jyds-table tr.is-on td { background: #1a120c; }
.jyds-quote { padding: 12px 12px 4px; }
.jyds-quote-name { font-size: 18px; font-weight: 700; }
.jyds-quote-px { display: flex; gap: 10px; align-items: baseline; margin-top: 4px; }
.jyds-quote-px b { font-size: 28px; font-variant-numeric: tabular-nums; }
.jyds-chart-label { color: var(--jmuted); font-size: 12px; padding: 8px 12px 0; }
.jyds-chart { min-height: 36px; }
.jyds-indexbar { display: flex; gap: 16px; align-items: center; height: 34px; padding: 0 12px; border-top: 1px solid var(--jline); background: #07090c; overflow: auto; white-space: nowrap; font-size: 12px; }
.jyds-indexbar b { font-weight: 600; margin-right: 6px; }
.jyds-desk .is-up { color: var(--jup); }
.jyds-desk .is-down { color: var(--jdown); }
.jyds-desk .is-flat { color: var(--jtext); }
.jyds-theme { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 3px 0; border-bottom: 1px solid var(--jline2); }
.jyds-note { color: var(--jtext); font-size: 12px; line-height: 1.5; }
.jyds-note span { color: var(--jmuted); }
@media (max-width: 1100px) {
  .jyds-desk { height: auto; min-height: 0; overflow: visible; }
  .jyds-grid { grid-template-columns: 1fr; }
  .jyds-col, .jyds-col:last-child { border: 0; }
  .jyds-tablewrap { max-height: 420px; }
}

.blei-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 28px;
  box-sizing: border-box;
}
.blei-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #2a3a4d);
}
.blei-title { margin: 0; font-size: 16px; flex: 0 0 auto; }
.blei-meta { margin-left: auto; color: var(--muted, #8b9bb4); font-size: 12px; white-space: nowrap; }
.blei-jumps { display: flex; flex-wrap: wrap; gap: 8px; }
.blei-jumps button {
  border: 1px solid var(--border, #2a3a4d);
  background: transparent;
  color: var(--muted, #8b9bb4);
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.blei-jumps button:hover { color: var(--text, #e8e6e3); border-color: rgba(255, 255, 255, 0.2); }
.blei-jumps button.is-active {
  color: #ffd0d0;
  border-color: rgba(255, 80, 80, 0.55);
  background: rgba(198, 40, 40, 0.18);
}
.yd-board { min-width: 0; }
.blei-board { display: flex; flex-direction: column; gap: 14px; }
.blei-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.blei-sec {
  min-width: 0;
  border: 1px solid var(--border, #2a3a4d);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  scroll-margin-top: 12px;
  overflow: hidden;
}
.blei-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border, #2a3a4d);
  background: rgba(255, 255, 255, 0.035);
}
.blei-sec-head h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.blei-count {
  min-width: 18px;
  padding: 0 7px;
  border-radius: 99px;
  background: rgba(233, 48, 48, 0.16);
  color: #ffb4b4;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.blei-sec-body { padding: 8px 12px 12px; }
.blei-sec.is-latest { border-top: 2px solid #e93030; }
.blei-sec.is-st { border-top: 2px solid #f5a623; }
.blei-sec.is-st .blei-count { background: rgba(245, 166, 35, 0.16); color: #f5d7a1; }
.blei-sec.is-delist { border-top: 2px solid #c62828; }
.blei-sec.is-sev { border-top: 2px solid #ff8a3d; }
.blei-sec.is-sev .blei-count { background: rgba(255, 138, 61, 0.16); color: #ffc7a3; }
.blei-sec .blei-groups { grid-template-columns: 1fr; gap: 12px; }
.blei-days { display: flex; flex-direction: column; }
.blei-dayline {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.blei-dayline:last-child { border-bottom: 0; }
.blei-dayline-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.blei-inline { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.blei-inline .blei-card-label { flex: 0 0 52px; margin: 3px 0 0; font-weight: 700; }
.blei-card-label.is-add { color: #ff8a8a; }
.blei-card-label.is-del { color: #8b9bb4; }
.blei-subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.blei-subtab {
  border: 1px solid var(--border, #2a3a4d);
  background: transparent;
  color: var(--muted, #8b9bb4);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
}
.blei-subtab.is-active {
  color: #ffd0d0;
  border-color: rgba(255, 80, 80, 0.55);
  background: rgba(198, 40, 40, 0.18);
}
.blei-latest { display: flex; flex-direction: column; gap: 16px; }
.blei-day { min-width: 0; }
.blei-day-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 12px;
}
.blei-date { color: #ff8a80; font-size: 13px; font-weight: 700; margin: 3px 0 0; font-variant-numeric: tabular-nums; }
.blei-card {
  border: 1px solid var(--border, #2a3a4d);
  border-radius: 8px;
  padding: 10px 12px 12px;
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}
.blei-card.is-add { border-color: rgba(233, 48, 48, 0.28); }
.blei-card.is-del { border-color: rgba(255, 255, 255, 0.08); }
.blei-card-label { font-size: 12px; color: var(--muted, #9aa4b2); margin-bottom: 8px; }
.blei-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.blei-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 18px 3px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  line-height: 1.4;
}
.blei-chip.is-add { background: rgba(233, 48, 48, 0.16); color: #ffb4b4; border-color: rgba(233, 48, 48, 0.28); }
.blei-chip.is-del { background: rgba(255, 255, 255, 0.05); color: #9aa4b2; border-color: rgba(255, 255, 255, 0.08); padding-right: 8px; }
.blei-st {
  font-style: normal;
  font-size: 10px;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  color: #d7d7d7;
}
.blei-tip {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.28);
  color: #e8c27a;
  font-size: 12px;
}
.blei-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
  gap: 16px 20px;
  align-items: start;
}
.blei-group { min-width: 0; margin: 0; }
.blei-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  font-size: 13.5px;
}
.blei-group-title i {
  width: 3px;
  height: 13px;
  border-radius: 1px;
  background: #3d7eff;
}
.blei-table-wrap { overflow-x: auto; }
.blei-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.blei-table th, .blei-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #2a3a4d);
  vertical-align: middle;
}
.blei-table th { color: #9a9a9a; font-weight: 500; font-size: 12px; text-align: left; }
.blei-table thead th { background: rgba(255, 255, 255, 0.03); }
.blei-table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.blei-table td:first-child, .blei-table th:first-child { white-space: nowrap; }
.blei-table th:last-child, .blei-table td:last-child { text-align: right; }
.blei-table th.is-hot, .blei-table th.is-hot button { color: #e8963c; }
.blei-table th button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.blei-table th button i { font-style: normal; opacity: 0.7; }
.blei-stock {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  padding: 0 18px 0 0;
  cursor: pointer;
}
.blei-mark {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.blei-mark.is-lei { background: #e23b3b; color: #fff; }
.blei-mark.is-yi { background: #f5a623; color: #1a1208; }
.blei-chip .blei-mark { top: 1px; right: 1px; }
.blei-stock:disabled { cursor: default; }
.blei-stock b { font-size: 13px; font-weight: 700; color: #f3f1ee; }
.blei-stock small { color: #9aa4b2; font-size: 11px; letter-spacing: 0.03em; }
.blei-tag {
  font-style: normal;
  margin-left: 4px;
  font-size: 10px;
  color: #e8963c;
}
.blei-mid { text-align: center; color: var(--text, #e8e6e3); }
.blei-pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.blei-pct.is-up { color: #e93030; }
.blei-pct.is-down { color: #43962c; }
.blei-pct.is-flat { color: var(--muted, #9a9a9a); font-weight: 500; }
.yd-table th:nth-child(2), .yd-table th:nth-child(3), .yd-price { text-align: right; }
.yd-table th:nth-child(4), .yd-plates { text-align: left; }
.yd-price { font-variant-numeric: tabular-nums; }
.yd-plates { display: flex; flex-wrap: wrap; gap: 4px; }
.yd-tag {
  background: rgba(255, 255, 255, 0.08);
  color: #b0b0b0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.4;
}
.sev-block { margin-bottom: 16px; }
.sev-hint { margin: 0 0 6px; color: var(--muted, #9aa4b2); font-size: 12px; }
.sev-lv {
  margin-left: 4px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  padding: 0 3px;
  border-radius: 2px;
  vertical-align: 1px;
}
.sev-lv.is-severe { background: rgba(233, 48, 48, 0.16); color: #e93030; }
.sev-lv.is-near { background: rgba(245, 166, 35, 0.16); color: #f5a623; }
.sev-lv.is-abnormal { background: rgba(154, 154, 154, 0.16); color: #9a9a9a; }
.sev-mix { text-align: right; }
.sev-mix b { display: block; font-variant-numeric: tabular-nums; }
.sev-mix b.is-up { color: #e93030; }
.sev-mix b.is-down { color: #43962c; }
.sev-mix b.is-flat { color: var(--muted, #9a9a9a); font-weight: 500; }
.sev-mix small { color: #9a9a9a; font-size: 11px; }
.sev-reason { text-align: left; color: var(--text, #e8e6e3); }
.sev-empty { text-align: center; color: var(--muted, #9a9a9a); }
.sev-val { display: contents; }
.sev-page { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.sev-table { table-layout: fixed; }
.sev-table td { vertical-align: middle; }
.sev-table td.sev-mix b { white-space: nowrap; }
.sev-table tr.is-live td:first-child { box-shadow: inset 3px 0 0 #e93030; }
.sev-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.sev-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--border, #2a3a4d);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #9aa4b2;
  font-size: 12px;
}
.sev-stat b { font-size: 16px; font-variant-numeric: tabular-nums; color: #f3f1ee; }
.sev-stat.is-live b { color: #ff8a80; }
.sev-stat.is-watch b { color: #f5d7a1; }
.sev-toolbar, .sev-recent-bar, .sev-query { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sev-toolbar {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #2a3a4d);
}
.sev-date { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted, #9aa4b2); font-size: 12px; }
.sev-date input, .sev-query .input {
  background: #121418;
  color: inherit;
  border: 1px solid var(--border, #2a3a4d);
  border-radius: 6px;
  padding: 4px 8px;
}
.sev-query { margin-bottom: 10px; }
.sev-query .input { width: 160px; }
.sev-query-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.sev-metric { font-variant-numeric: tabular-nums; font-weight: 700; }
.sev-metric.is-up, .sev-metric.is-trigger, .sev-mix small.is-trigger { color: #e93030; }
.sev-metric.is-down { color: #43962c; }
.sev-metric.is-flat { color: var(--muted, #9a9a9a); font-weight: 500; }
.sev-mix small { display: block; color: #9a9a9a; font-size: 11px; }
.sev-scope, .sev-status { font-size: 12px; font-weight: 700; }
.sev-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  line-height: 1.6;
  background: rgba(233, 48, 48, 0.16);
  color: #ff8a80;
}
.sev-status.is-miss, .sev-status.is-off {
  background: rgba(255, 255, 255, 0.06);
  color: #9aa4b2;
}
.sev-status.is-on { background: rgba(245, 166, 35, 0.16); color: #f5d7a1; }
.sev-scope {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #b0b0b0;
}
.sev-scope.is-next { background: rgba(245, 166, 35, 0.16); color: #f5a623; }
.sev-table td.sev-state, .sev-table th.sev-state { text-align: left; }
.sev-state small { display: block; margin-top: 2px; color: #9a9a9a; font-size: 11px; }
.sev-reason small { display: block; margin-top: 2px; }
.sev-panel {
  border: 1px solid var(--border, #2a3a4d);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px 12px;
}
.sev-recent {
  border: 1px solid var(--border, #2a3a4d);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px 12px;
}
.sev-recent-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sev-recent-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.sev-recent-head p { margin: 0; color: #9aa4b2; font-size: 12px; }
.sev-recent-bar { margin-bottom: 8px; }
.sev-recent-count { color: #9aa4b2; font-size: 12px; font-variant-numeric: tabular-nums; }
.sev-recent-pager { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: #9aa4b2; font-size: 12px; }
.sev-recent-bar button[disabled] { opacity: 0.45; cursor: default; }
.sev-query {
  padding: 4px 0 8px;
}


