/* M11-P2-B1：自选关注页面骨架（dark 科技风，对齐资金驾驶舱）
 * M3-B：结构色 → 全局 Theme Contract；warn 等品牌态冻结
 */
:root,
html[data-theme="dark-default"] {
  /* Structure → Global Contract（fallback = 生产 Dark 无损） */
  --v2wl-bg: var(--color-bg-page, #030c16);
  --v2wl-panel: var(--color-bg-panel, #0a1626);
  --v2wl-panel-2: var(--color-bg-panel-2, #0e1c30);
  --v2wl-line: var(--color-border-card, rgba(120, 170, 255, 0.18));
  --v2wl-text: var(--color-text-primary, #e8f1ff);
  --v2wl-muted: var(--color-text-muted, #7f97b5);
  --v2wl-cyan: var(--color-accent, #4cf0ff);
  --v2wl-blue: var(--color-brand-secondary, #6aa8ff);
  /* Brand / state frozen */
  --v2wl-warn: #f0b429;
  --v2wl-radius: 14px;
}

html[data-theme="light"] {
  --v2wl-bg: var(--color-bg-page);
  --v2wl-panel: var(--color-bg-panel);
  --v2wl-panel-2: var(--color-bg-panel-2);
  --v2wl-line: var(--color-border-default);
  --v2wl-text: var(--color-text-primary);
  --v2wl-muted: var(--color-text-muted);
  --v2wl-cyan: var(--color-accent);
  --v2wl-blue: var(--color-brand-secondary);
  --v2wl-c17-th: var(--color-text-muted);
  --v2wl-c17-th-active: var(--color-text-secondary);
  --v2wl-c17-code: var(--color-text-muted);
  --v2wl-c18-th: var(--color-text-muted);
  --v2wl-c18-th-active: var(--color-text-secondary);
  /* Business FROZEN */
  --v2wl-warn: #f0b429;
  --v2wl-c17-up: #ff5b5b;
  --v2wl-c17-down: #19c37d;
}

/* M4-B-R1.2 / R2-B / R2-C：Watchlist Light Reference — 主表/Tab/Drawer 收口 */
html[data-theme="light"] .v2-wl-page {
  background-color: var(--v2wl-bg);
  color: var(--v2wl-text);
}
html[data-theme="light"] .v2-wl-brand {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--color-text-primary);
}
html[data-theme="light"] .v2-wl-btn {
  background: var(--color-bg-control);
  border-color: var(--color-border-control);
  color: var(--color-text-primary);
}
html[data-theme="light"] .v2-wl-btn:hover {
  background: var(--color-bg-control-hover);
  border-color: var(--color-border-selected);
  color: var(--color-text-primary);
}
html[data-theme="light"] .v2-wl-btn.primary {
  background: rgba(13, 148, 136, 0.14);
  border-color: rgba(13, 148, 136, 0.45);
  color: #0f766e;
}
html[data-theme="light"] .v2-wl-btn.danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.35);
}
html[data-theme="light"] .v2-wl-tab {
  background: var(--color-bg-control);
  border-color: var(--color-border-control);
  color: var(--color-text-secondary);
  box-shadow: none;
}
html[data-theme="light"] .v2-wl-tab:hover {
  color: var(--color-text-primary);
  border-color: var(--color-border-selected);
  background: rgba(37, 99, 235, 0.08);
}
html[data-theme="light"] .v2-wl-tab.active {
  color: #1e3a8a;
  background: rgba(37, 99, 235, 0.2);
  border-color: #2563eb;
  font-weight: 800;
  box-shadow: inset 3px 0 0 #2563eb;
}
html[data-theme="light"] .v2-wl-card,
html[data-theme="light"] .v2-wl-table-wrap {
  background: var(--v2wl-panel);
  border: 1px solid var(--color-border-card);
  color: var(--v2wl-text);
  box-shadow: var(--shadow-panel);
}
html[data-theme="light"] .v2-wl-table thead th,
html[data-theme="light"] .v2-wl-table th {
  color: var(--color-text-secondary);
  background: var(--color-bg-panel-2);
  border-bottom: 1px solid var(--color-border-strong);
  font-weight: 750;
}
html[data-theme="light"] .v2-wl-table td {
  color: var(--color-text-body);
  border-bottom: 1px solid var(--color-border-subtle);
}
/* R2-C：行间轻微斑马 + 可感知层级（非纯白融块） */
html[data-theme="light"] .v2-wl-table tbody tr:nth-child(even) td {
  background: rgba(37, 99, 235, 0.025);
}
html[data-theme="light"] .v2-wl-name,
html[data-theme="light"] .v2-wl-name-cell .nm {
  color: var(--color-text-primary);
  font-weight: 800;
}
html[data-theme="light"] .v2-wl-code,
html[data-theme="light"] .v2-wl-table .code,
html[data-theme="light"] .v2-wl-name-cell .cd,
html[data-theme="light"] .v2-wl-rk {
  color: var(--color-text-secondary);
  font-weight: 600;
}
html[data-theme="light"] .v2-wl-table .num.fund,
html[data-theme="light"] .v2-wl-table td.num:not(.pct-up):not(.pct-down) {
  color: var(--color-text-primary);
  font-weight: 700;
}
html[data-theme="light"] .v2-wl-table td.ok {
  color: #0f766e;
}
html[data-theme="light"] .v2-wl-top {
  border-bottom-color: var(--color-border-strong);
}
html[data-theme="light"] .v2-wl-trade-status,
html[data-theme="light"] .v2-wl-sep,
html[data-theme="light"] .v2-wl-pill.muted,
html[data-theme="light"] .v2-wl-status {
  color: var(--color-text-muted);
  opacity: 1;
}
html[data-theme="light"] .v2-wl-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.05);
}
html[data-theme="light"] .v2-wl-c19 tr.v2-wl-row.is-clickable:hover {
  background: rgba(37, 99, 235, 0.06);
}
html[data-theme="light"] .v2-wl-c19 tr.v2-wl-row.is-clickable:hover .v2-wl-name-cell .nm {
  color: var(--color-text-primary);
}
html[data-theme="light"] .v2-wl-table tbody tr.is-selected,
html[data-theme="light"] .v2-wl-table tbody tr.is-active,
html[data-theme="light"] .v2-wl-table tbody tr[aria-selected="true"] {
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 3px 0 0 #2563eb;
}
html[data-theme="light"] .v2-wl-c17 .th-sort:hover {
  color: var(--color-text-primary);
  background: rgba(37, 99, 235, 0.08);
}
html[data-theme="light"] .v2-wl-empty,
html[data-theme="light"] .v2-wl-card .empty {
  color: var(--color-text-muted);
  opacity: 1;
}
html[data-theme="light"] {
  --v2wl-line: var(--color-border-card);
  --v2wl-c17-th: var(--color-text-secondary);
  --v2wl-c18-th: var(--color-text-secondary);
  --v2wl-c17-code: var(--color-text-secondary);
}
/* R2-C：搜索空态 / 辅助列 / 表头排序箭头可读 */
html[data-theme="light"] .v2-wl-search-empty,
html[data-theme="light"] .v2-wl-hint,
html[data-theme="light"] .v2-wl-sub,
html[data-theme="light"] .v2-wl-meta {
  color: var(--color-text-muted);
  opacity: 1;
}
html[data-theme="light"] .v2-wl-table tbody tr:nth-child(odd) td {
  background: #fff;
}
html[data-theme="light"] .v2-wl-c17 .th-arrow {
  color: var(--color-text-secondary);
  opacity: 1;
}
html[data-theme="light"] .v2-wl-title {
  color: var(--color-text-primary);
  font-weight: 800;
}

/* M12-UI-A3：与题材中枢 theme_library.html .v2-mobile-back 对齐 */
.v2-mobile-back {
  display: none;
  position: fixed;
  left: 12px;
  top: calc(10px + env(safe-area-inset-top, 0px));
  z-index: 90;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--color-bg-panel, rgba(15, 35, 58, .92));
  border: 1px solid var(--color-border-control, rgba(120, 180, 255, .28));
  color: var(--color-text-primary, #dcecff);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 919px) {
  .v2-mobile-back { display: inline-flex !important; }
}
@media (min-width: 920px) {
  .v2-mobile-back { display: none !important; }
}

body.has-desktop-shell .v2-wl-page,
.v2-wl-page {
  color: var(--v2wl-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding: 8px 0 32px;
}

.v2-wl-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 4px 2px 12px;
  border-bottom: 1px solid var(--v2wl-line);
}

.v2-wl-brand-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.v2-wl-brand {
  font-size: 1.15rem;
  background: linear-gradient(135deg, #4cf0ff, #8f63ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.v2-wl-sep {
  color: var(--v2wl-muted);
  font-weight: 500;
}

.v2-wl-title {
  font-size: 1.05rem;
  color: var(--v2wl-text);
}

.v2-wl-trade-status {
  font-size: 12px;
  line-height: 1.3;
  color: var(--color-text-muted);
  white-space: nowrap;
  margin-right: 8px;
}

.v2-wl-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.v2-wl-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid var(--v2wl-line);
  background: var(--color-accent-soft);
  color: var(--v2wl-cyan);
}

.v2-wl-pill.muted {
  color: var(--v2wl-muted);
  background: var(--color-bg-elevated-soft);
}

.v2-wl-btn {
  appearance: none;
  border: 1px solid var(--v2wl-line);
  background: var(--color-bg-elevated-soft);
  color: var(--v2wl-text);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.v2-wl-btn:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-border-selected);
}

.v2-wl-btn.primary {
  background: var(--color-accent-soft);
  border-color: var(--color-border-selected);
  color: var(--v2wl-cyan);
  font-weight: 650;
}

.v2-wl-btn.ghost {
  background: transparent;
}

.v2-wl-btn.danger {
  color: #ff9b9b;
  border-color: rgba(255, 123, 123, 0.35);
}

.v2-wl-btn.danger:hover {
  background: rgba(255, 123, 123, 0.12);
}

.v2-wl-btn.sm {
  padding: 4px 10px;
  font-size: 0.74rem;
  border-radius: 8px;
}

.v2-wl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.v2-wl-tab {
  appearance: none;
  border: 1px solid var(--v2wl-line);
  background: var(--color-bg-elevated-soft);
  color: var(--v2wl-muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  cursor: pointer;
}

.v2-wl-tab:hover {
  color: var(--v2wl-text);
  border-color: var(--color-border-selected);
}

.v2-wl-tab.active {
  color: var(--v2wl-cyan);
  background: var(--color-accent-soft);
  border-color: var(--color-border-selected);
  font-weight: 650;
}

.v2-wl-card {
  background: linear-gradient(180deg, var(--v2wl-panel-2), var(--v2wl-panel));
  border: 1px solid var(--v2wl-line);
  border-radius: var(--v2wl-radius);
  box-shadow: var(--shadow-panel);
  padding: 14px 16px 16px;
}

.v2-wl-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.v2-wl-card-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.v2-wl-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid var(--v2wl-line);
  background: var(--color-accent-soft);
  color: var(--v2wl-blue);
}

.v2-wl-badge.mock {
  color: var(--v2wl-warn);
  background: rgba(240, 180, 41, 0.12);
  border-color: rgba(240, 180, 41, 0.35);
}

.v2-wl-block + .v2-wl-block {
  margin-top: 16px;
}

.v2-wl-block-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--v2wl-cyan);
}

.v2-wl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.v2-wl-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--v2wl-line);
  border-radius: 12px;
  background: var(--v2wl-panel);
}

.v2-wl-table th,
.v2-wl-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-subtle);
  text-align: left;
  white-space: nowrap;
}

.v2-wl-name {
  font-weight: 650;
  color: var(--v2wl-text);
  min-width: 5.5em;
}

.v2-wl-code {
  color: var(--v2wl-muted);
  font-variant-numeric: tabular-nums;
}

.v2-wl-table td.up,
.v2-wl-table td.pct-up {
  color: #ff6b6b;
}

.v2-wl-table td.down,
.v2-wl-table td.pct-down {
  color: #3dd68c;
}

.v2-wl-table td.flow-in {
  color: #3dd68c;
}

.v2-wl-table td.flow-out {
  color: #ff6b6b;
}

.v2-wl-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--v2wl-muted);
  max-width: 14em;
  white-space: nowrap;
}

.v2-wl-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7f97b5;
  box-shadow: 0 0 0 2px rgba(127, 151, 181, 0.2);
}

.v2-wl-status.ok .v2-wl-status-dot {
  background: #3dd68c;
  box-shadow: 0 0 0 2px rgba(61, 214, 140, 0.25);
}

.v2-wl-status.partial .v2-wl-status-dot {
  background: #f0b429;
  box-shadow: 0 0 0 2px rgba(240, 180, 41, 0.25);
}

.v2-wl-status.missing .v2-wl-status-dot,
.v2-wl-status.disabled .v2-wl-status-dot {
  background: #6b7c93;
}

.v2-wl-status.error .v2-wl-status-dot {
  background: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.25);
}

.v2-wl-table th {
  color: var(--v2wl-muted);
  font-weight: 600;
  font-size: 0.72rem;
}

.v2-wl-table td.ok {
  color: #5dffa8;
}

.v2-wl-table td.partial {
  color: var(--v2wl-warn);
}

.v2-wl-table td.missing {
  color: var(--v2wl-muted);
}

.v2-wl-table td.error {
  color: #ff7b7b;
}

.v2-wl-empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--v2wl-muted);
  font-size: 0.88rem;
  border: 1px dashed rgba(127, 151, 181, 0.35);
  border-radius: 10px;
}

.v2-wl-foot {
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--v2wl-muted);
}

.v2-wl-hint {
  margin: 0 0 12px;
  color: var(--v2wl-muted);
  font-size: 0.78rem;
}

.v2-wl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--v2wl-muted);
}

.v2-wl-field input,
.v2-wl-field select {
  appearance: none;
  border: 1px solid var(--v2wl-line);
  background: var(--color-bg-control, rgba(0, 0, 0, 0.25));
  color: var(--v2wl-text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.88rem;
  color-scheme: var(--color-scheme, dark);
}

.v2-wl-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-mask, rgba(2, 8, 16, 0.72));
  padding: 16px;
}

.v2-wl-modal-mask.hidden {
  display: none;
}

.v2-wl-modal {
  width: min(420px, 100%);
  background: linear-gradient(180deg, var(--v2wl-panel-2), var(--v2wl-panel));
  border: 1px solid var(--color-border-strong, rgba(76, 240, 255, 0.28));
  border-radius: var(--v2wl-radius);
  box-shadow: var(--shadow-floating);
  padding: 14px 16px 16px;
}

.v2-wl-modal.v2-wl-modal-wide {
  width: min(520px, 100%);
}

.v2-wl-modal-head,
.v2-wl-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v2-wl-modal-head h3 {
  margin: 0;
  font-size: 1rem;
}

.v2-wl-modal-body {
  margin: 14px 0;
}

.v2-wl-modal-foot {
  justify-content: flex-end;
}

.v2-wl-search-results {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--color-border-subtle, rgba(120, 170, 255, 0.14));
  border-radius: 10px;
  background: var(--color-bg-inset, rgba(0, 0, 0, 0.18));
  margin-bottom: 12px;
  min-height: 72px;
}

.v2-wl-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--color-border-subtle);
  cursor: pointer;
  font-size: 0.84rem;
}

.v2-wl-search-row:last-child {
  border-bottom: none;
}

.v2-wl-search-row:hover {
  background: var(--color-accent-soft);
}

.v2-wl-search-row.selected {
  background: var(--color-bg-selected-soft);
  box-shadow: inset 2px 0 0 0 var(--color-accent);
}

.v2-wl-search-row .meta {
  color: var(--v2wl-muted);
  font-size: 0.76rem;
}

.v2-wl-search-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--v2wl-muted);
  font-size: 0.8rem;
}

.v2-wl-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(76, 240, 255, 0.28);
  background: rgba(76, 240, 255, 0.06);
  font-size: 0.82rem;
}

.v2-wl-selected .label {
  color: var(--v2wl-muted);
}

.v2-wl-selected .value {
  color: var(--v2wl-cyan);
  font-weight: 650;
}

.v2-wl-etf-placeholder {
  padding: 16px 12px;
  text-align: center;
  color: var(--v2wl-muted);
  font-size: 0.82rem;
  border: 1px dashed rgba(127, 151, 181, 0.35);
  border-radius: 10px;
  margin-bottom: 12px;
}

.v2-wl-etf-placeholder.hidden,
.hidden {
  display: none !important;
}

.v2-wl-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--v2wl-line);
  background: var(--v2wl-panel-2);
  color: var(--v2wl-text);
  font-size: 0.82rem;
  box-shadow: var(--shadow-panel);
}

.v2-wl-toast.hidden {
  display: none;
}

/* M12-UI-A2/A3：窄屏补齐深色底；返回钮区域与内容区一致 */
@media (max-width: 768px) {
  html,
  body,
  body.has-desktop-shell {
    margin: 0 !important;
    background: var(--v2wl-bg) !important;
    color: var(--v2wl-text) !important;
    overflow-x: hidden;
  }
  body.has-desktop-shell .desktop-shell,
  body.has-desktop-shell .desktop-main {
    display: block !important;
    width: 100% !important;
    min-height: 100vh;
    background: var(--v2wl-bg) !important;
    padding: 0 !important;
  }
  body.has-desktop-shell .desktop-page-head {
    display: none !important;
  }
  .v2-wl-page {
    padding: calc(52px + env(safe-area-inset-top, 0px)) 12px calc(28px + env(safe-area-inset-bottom, 0px));
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    background: transparent;
    min-height: 100vh;
  }
  /* M23.8：标题避开左上角固定返回钮，避免重叠 */
  .v2-wl-top {
    padding-left: 76px;
    padding-right: 2px;
    box-sizing: border-box;
    align-items: flex-start;
  }
  .v2-wl-brand-line {
    flex-wrap: wrap;
    row-gap: 2px;
    max-width: 100%;
    min-width: 0;
  }
  .v2-wl-title {
    display: inline-block;
    line-height: 1.35;
  }
}

/* ========== M23.8 / M23.8.1：手机表格横滑 + 紧凑列宽 ========== */
.mobile-table-scroll {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .mobile-table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }
  /* 取消 C20 百分百栅格；固定列宽提高密度（操作嵌在末列） */
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf {
    display: table !important;
    table-layout: fixed !important;
    border-collapse: collapse;
    /* 40+120+75+100+80+55(操作) */
    width: 470px !important;
    min-width: 470px;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme {
    display: table !important;
    table-layout: fixed !important;
    border-collapse: collapse;
    /* 40+130+70+100+70+100+55(操作) */
    width: 565px !important;
    min-width: 565px;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table thead {
    display: table-header-group !important;
    width: auto !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table tbody {
    display: table-row-group !important;
    width: auto !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table thead tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table tbody tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock thead tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock tbody tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector thead tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector tbody tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf thead tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf tbody tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme thead tr,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme tbody tr {
    display: table-row !important;
    width: auto !important;
    grid-template-columns: none !important;
  }
  .v2-wl-c17 .mobile-table-scroll .v2-wl-table th,
  .v2-wl-c17 .mobile-table-scroll .v2-wl-table td,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table th,
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table td {
    box-sizing: border-box;
    max-width: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    padding-left: 6px;
    padding-right: 6px;
  }
  /* 股票 / 板块 / ETF：序号 名称 涨跌 资金 趋势(+操作) */
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock th:nth-child(1),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock td:nth-child(1),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector th:nth-child(1),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector td:nth-child(1),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf th:nth-child(1),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf td:nth-child(1) {
    width: 40px !important;
    min-width: 40px !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock th:nth-child(2),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock td:nth-child(2),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector th:nth-child(2),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector td:nth-child(2),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf th:nth-child(2),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf td:nth-child(2) {
    width: 120px !important;
    min-width: 120px !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock th:nth-child(3),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock td:nth-child(3),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector th:nth-child(3),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector td:nth-child(3),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf th:nth-child(3),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf td:nth-child(3) {
    width: 75px !important;
    min-width: 75px !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock th:nth-child(4),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock td:nth-child(4),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector th:nth-child(4),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector td:nth-child(4),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf th:nth-child(4),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf td:nth-child(4) {
    width: 100px !important;
    min-width: 100px !important;
  }
  /* 趋势 80 + 操作 55（删除钮嵌在 metric-last） */
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock th:nth-child(5),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-stock td:nth-child(5),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector th:nth-child(5),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-sector td:nth-child(5),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf th:nth-child(5),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-etf td:nth-child(5) {
    width: 135px !important;
    min-width: 135px !important;
    padding-right: 58px;
  }
  /* 题材：序号 名称 涨停 资金 热度 关联(+操作) */
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme th:nth-child(1),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme td:nth-child(1) {
    width: 40px !important;
    min-width: 40px !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme th:nth-child(2),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme td:nth-child(2) {
    width: 130px !important;
    min-width: 130px !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme th:nth-child(3),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme td:nth-child(3) {
    width: 70px !important;
    min-width: 70px !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme th:nth-child(4),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme td:nth-child(4) {
    width: 100px !important;
    min-width: 100px !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme th:nth-child(5),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme td:nth-child(5) {
    width: 70px !important;
    min-width: 70px !important;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme th:nth-child(6),
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table.cols-theme td:nth-child(6) {
    width: 155px !important;
    min-width: 155px !important;
    padding-right: 58px;
  }
  .v2-wl-c20 .mobile-table-scroll .v2-wl-table td.metric-last {
    position: relative;
    overflow: visible;
  }
}

/* ========== M15-C17：自选关注终端表 ========== */
.v2-wl-c17 {
  --v2wl-c17-th: #7fa9c8;
  --v2wl-c17-th-active: #a8d0ea;
  --v2wl-c17-code: #7f93aa;
  --v2wl-c17-up: #ff5b5b;
  --v2wl-c17-down: #19c37d;
}

.v2-wl-c17 .v2-wl-table-wrap {
  border-radius: 8px;
  border-color: rgba(127, 169, 200, 0.22);
}

.v2-wl-c17 .v2-wl-table {
  table-layout: fixed;
  width: 100%;
  font-size: 13px;
  line-height: 1.35;
}

.v2-wl-c17 .v2-wl-table th,
.v2-wl-c17 .v2-wl-table td {
  height: 32px;
  padding: 4px 6px;
  box-sizing: border-box;
  vertical-align: middle;
  border-bottom: 1px solid rgba(127, 169, 200, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.v2-wl-c17 .v2-wl-table th {
  color: var(--v2wl-c17-th);
  font-size: 11px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
}

.v2-wl-c17 .v2-wl-table th:nth-child(2) {
  text-align: left;
}

.v2-wl-c17 .v2-wl-table th:nth-child(4) {
  text-align: right;
}

.v2-wl-c17 .v2-wl-name-cell {
  text-align: left !important;
  white-space: normal;
  line-height: 1.25;
}

.v2-wl-c17 .v2-wl-name-cell .nm {
  font-size: 13px;
  font-weight: 650;
  color: var(--v2wl-text, #e8f2ff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-wl-c17 .v2-wl-name-cell .cd {
  font-size: 11px;
  font-weight: 400;
  color: var(--v2wl-c17-code);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.v2-wl-c17 .v2-wl-table td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.v2-wl-c17 .v2-wl-table td.fund {
  text-align: right;
}

.v2-wl-c17 .v2-wl-table td.ops {
  text-align: center;
}

.v2-wl-c17 .v2-wl-rk {
  text-align: center;
  color: var(--v2wl-c17-code);
  font-weight: 500;
  font-size: 12px;
}

.v2-wl-c17 .v2-wl-table td.pct-up,
.v2-wl-c17 .v2-wl-table td.up {
  color: var(--v2wl-c17-up) !important;
}

.v2-wl-c17 .v2-wl-table td.pct-down,
.v2-wl-c17 .v2-wl-table td.down {
  color: var(--v2wl-c17-down) !important;
}

.v2-wl-c17 .v2-wl-table td.flow-in {
  color: var(--v2wl-c17-up) !important;
}

.v2-wl-c17 .v2-wl-table td.flow-out {
  color: var(--v2wl-c17-down) !important;
}

.v2-wl-c17 .th-sort {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease, background 0.15s ease;
  border-radius: 3px;
}

.v2-wl-c17 .th-sort:hover {
  color: var(--v2wl-c17-th-active);
  background: rgba(127, 169, 200, 0.1);
}

.v2-wl-c17 .th-sort.is-active {
  color: var(--v2wl-c17-th-active);
  font-weight: 700;
}

.v2-wl-c17 .th-sort .th-label {
  font-size: 11px;
  color: inherit;
}

.v2-wl-c17 .th-sort .th-arrow {
  font-size: 11px;
  margin-left: 2px;
  color: inherit;
}

.v2-wl-c17 .th-sort:not(.is-active) .th-arrow:empty {
  display: none;
}

.v2-wl-c17 .v2-wl-btn.sm {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 11px;
}

.v2-wl-c17 .v2-wl-link {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.v2-wl-c17 .v2-wl-link:hover {
  color: var(--v2wl-c17-th-active);
  text-decoration: underline;
}

/* ========== M15-C18：信息密度 · 悬浮删除 · 去开发提示 ========== */
.v2-wl-c18 {
  --v2wl-c18-th: #7fa9c8;
  --v2wl-c18-th-active: #a8d0ea;
}

.v2-wl-c18 .v2-wl-table th,
.v2-wl-c18 .v2-wl-table td {
  height: 34px;
  padding: 3px 6px;
}

.v2-wl-c18 .v2-wl-table th {
  color: var(--v2wl-c18-th);
}

.v2-wl-c18 .v2-wl-badge[hidden] {
  display: none !important;
}

.v2-wl-c18 .v2-wl-table td.metric-last {
  position: relative;
  overflow: visible;
}

.v2-wl-c18 .v2-wl-row-ops {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: 6px;
  background: var(--v2wl-panel);
  box-shadow: var(--shadow-panel);
}

.v2-wl-c18 tbody tr:hover .v2-wl-row-ops,
.v2-wl-c18 tbody tr:focus-within .v2-wl-row-ops {
  opacity: 1;
  pointer-events: auto;
}

.v2-wl-c18 .v2-wl-row-ops .v2-wl-btn.sm {
  min-height: 22px;
  padding: 1px 8px;
  font-size: 11px;
}

@media (hover: none) {
  .v2-wl-c18 .v2-wl-row-ops {
    opacity: 0.9;
    pointer-events: auto;
  }
}

/* ========== M15-C19：列宽对齐 · 行点击详情 ========== */
.v2-wl-c19 .v2-wl-table {
  table-layout: fixed;
}

.v2-wl-c19 .v2-wl-table th,
.v2-wl-c19 .v2-wl-table td {
  box-sizing: border-box;
}

.v2-wl-c19 .v2-wl-table th:nth-child(1),
.v2-wl-c19 .v2-wl-table td.v2-wl-rk {
  text-align: center;
}

.v2-wl-c19 .v2-wl-table th:nth-child(2),
.v2-wl-c19 .v2-wl-name-cell {
  text-align: left !important;
}

.v2-wl-c19 .v2-wl-table th:nth-child(4) {
  text-align: right;
}

.v2-wl-c19 .v2-wl-table td.num {
  text-align: center;
}

.v2-wl-c19 .v2-wl-table td.fund {
  text-align: right;
}

.v2-wl-c19 tr.v2-wl-row.is-clickable {
  cursor: pointer;
}

.v2-wl-c19 tr.v2-wl-row.is-clickable:hover {
  background: rgba(127, 169, 200, 0.06);
}

/* Dark-only hover name tint (was washing out Light names) */
html[data-theme="dark-default"] .v2-wl-c19 tr.v2-wl-row.is-clickable:hover .v2-wl-name-cell .nm {
  color: #a8d0ea;
}
html[data-theme="light"] .v2-wl-c19 tr.v2-wl-row.is-clickable:hover .v2-wl-name-cell .nm {
  color: var(--color-text-primary);
}

/* ========== M15-C20 / M21-H14：Grid 列宽（按模块列数） ========== */
.v2-wl-c20 {
  /* 5 列：序号 · 名称 · 涨跌 · 资金 · 趋势 */
  --v2wl-grid-cols-5: minmax(0, 6%) minmax(0, 25%) repeat(3, minmax(0, 1fr));
  /* 6 列：序号 · 名称 · 涨停 · 资金 · 热度 · 关联股票 */
  --v2wl-grid-cols-6: minmax(0, 6%) minmax(0, 25%) repeat(4, minmax(0, 1fr));
}

.v2-wl-c20 .v2-wl-table-wrap {
  width: 100%;
}

.v2-wl-c20 .v2-wl-table.cols-stock,
.v2-wl-c20 .v2-wl-table.cols-sector,
.v2-wl-c20 .v2-wl-table.cols-etf,
.v2-wl-c20 .v2-wl-table.cols-theme {
  display: block;
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.v2-wl-c20 .v2-wl-table colgroup {
  display: none;
}

.v2-wl-c20 .v2-wl-table thead,
.v2-wl-c20 .v2-wl-table tbody {
  display: block;
  width: 100%;
}

.v2-wl-c20 .v2-wl-table.cols-stock thead tr,
.v2-wl-c20 .v2-wl-table.cols-stock tbody tr,
.v2-wl-c20 .v2-wl-table.cols-sector thead tr,
.v2-wl-c20 .v2-wl-table.cols-sector tbody tr,
.v2-wl-c20 .v2-wl-table.cols-etf thead tr,
.v2-wl-c20 .v2-wl-table.cols-etf tbody tr {
  display: grid;
  grid-template-columns: var(--v2wl-grid-cols-5);
  width: 100%;
  align-items: center;
  column-gap: 0;
}

.v2-wl-c20 .v2-wl-table.cols-theme thead tr,
.v2-wl-c20 .v2-wl-table.cols-theme tbody tr {
  display: grid;
  grid-template-columns: var(--v2wl-grid-cols-6);
  width: 100%;
  align-items: center;
  column-gap: 0;
}

.v2-wl-c20 .v2-wl-table thead tr,
.v2-wl-c20 .v2-wl-table tbody tr {
  display: grid;
  width: 100%;
  align-items: center;
  column-gap: 0;
}

.v2-wl-c20 .v2-wl-table th,
.v2-wl-c20 .v2-wl-table td {
  width: auto !important;
  max-width: none;
  min-width: 0;
}

/* 对齐：序号中 · 名称左 · 数字/资金中 */
.v2-wl-c20 .v2-wl-table th,
.v2-wl-c20 .v2-wl-table td.num,
.v2-wl-c20 .v2-wl-table td.fund,
.v2-wl-c20 .v2-wl-table td.v2-wl-rk,
.v2-wl-c20 .v2-wl-table td.ops,
.v2-wl-c20 .v2-wl-table td.metric-last {
  text-align: center !important;
}

.v2-wl-c20 .v2-wl-table th:nth-child(1) {
  text-align: center !important;
}

.v2-wl-c20 .v2-wl-table th:nth-child(2),
.v2-wl-c20 .v2-wl-name-cell {
  text-align: left !important;
}

.v2-wl-c20 .v2-wl-table th:nth-child(4) {
  text-align: center !important;
}

