/* 个股弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 33, 50, .45);
  backdrop-filter: blur(2px);
}
.modal-box {
  position: fixed;
  top: 7vh;
  left: 50%;
  z-index: 101;
  width: min(900px, 94vw);
  max-height: 84vh;
  padding: 16px;
  overflow: auto;
  transform: translateX(-50%);
  border: 1px solid #cdd8e1;
  border-radius: 9px;
  background: var(--card);
  box-shadow: 0 18px 50px rgba(20, 33, 50, .2);
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  min-width: 28px;
  min-height: 28px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}
.modal-close:hover { color: var(--accent); background: var(--surface); }
.modal-box h3 { margin: 0 0 7px; color: var(--accent); font-size: 16px; }
.modal-box h3 small { color: var(--muted); font-weight: 400; }
.theme-primary-picker {
  width: min(620px, 100%);
  margin: 0 auto;
  color: var(--ink-2);
}
.theme-primary-picker > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 34px 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.theme-primary-picker > header h3 { margin: 1px 0 0; }
.theme-primary-current {
  padding-top: 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.theme-primary-help {
  margin: 9px 0 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.theme-primary-options {
  display: grid;
  max-height: 52vh;
  overflow: auto;
  border-top: 1px solid var(--line-2);
}
.theme-primary-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: #fff;
  color: var(--ink-2);
  text-align: left;
}
.theme-primary-option.is-current {
  background: var(--teal-bg);
  box-shadow: inset 3px 0 0 var(--teal);
}
/* 外露位次控件(选择器行右端) */
.theme-primary-option .tp-rank {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}
.tp-rank-btn {
  min-height: 24px;
  min-width: 26px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #526174;
  font-size: 11.5px;
  font-weight: 750;
}
.tp-rank-btn:hover { border-color: #aab8c5; background: var(--surface); color: var(--accent); }
.tp-rank-btn.is-on {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.theme-primary-option > span { min-width: 0; }
.theme-primary-option strong,
.theme-primary-option small { display: block; }
.theme-primary-option strong { font-size: 13px; }
.theme-primary-option small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-primary-option em {
  flex: none;
  color: var(--teal);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
}
.theme-primary-picker > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 10px;
}
.modal-box.anomaly-modal-box {
  width: min(1180px, 95vw);
  padding: 0;
  overflow: hidden;
}
.anomaly-modal-box .modal-close {
  z-index: 2;
  top: 12px;
  right: 14px;
}
.anomaly-modal-box .modal-body {
  max-height: 84vh;
  overflow: auto;
}

