/* ==========================================================================
 * 回马枪选股器 · 全站样式
 * ========================================================================== */

:root {
  --bg: #0b0f14;
  --bg-panel: #131a22;
  --bg-panel2: #18212b;
  --bg-hover: #1e2936;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eef4;
  --text-dim: #9aa8b6;
  --text-mute: #6b7a89;
  --up: #f5455c;
  --down: #12b886;
  --gold: #f0b429;
  --blue: #4dabf7;
  --purple: #c77dff;
  --radius: 10px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(900px 420px at 12% -8%, rgba(240, 180, 41, 0.07), transparent 62%),
    radial-gradient(760px 380px at 88% -12%, rgba(77, 171, 247, 0.06), transparent 60%);
  background-repeat: no-repeat;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------- 顶栏 ------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  height: 56px;
  background: rgba(11, 15, 20, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--gold), #e8590c);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 900; color: #1a1200;
}
.brand small {
  font-size: 11px; font-weight: 500; color: var(--text-mute);
  letter-spacing: 0; margin-left: 2px;
}

.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav a.active { background: rgba(240, 180, 41, 0.14); color: var(--gold); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.clock {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  white-space: nowrap;
}
.clock .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-mute); margin-right: 6px; vertical-align: 1px;
}
.clock.live .dot { background: var(--down); box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.18); }

/* ------------------------------- 布局 ------------------------------- */
.wrap { max-width: 1360px; margin: 0 auto; padding: 18px 20px 64px; }

.panel {
  background: linear-gradient(180deg, var(--bg-panel), #111820);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.panel-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.panel-head h2 {
  margin: 0; font-size: 14px; font-weight: 650; letter-spacing: 0.4px;
}
.panel-head .hint { font-size: 12px; color: var(--text-mute); font-weight: 400; }
.panel-head .spacer { margin-left: auto; }

/* ------------------------------- 参数区 ------------------------------- */
.params {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 12px 14px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
  white-space: nowrap;
}
.field .unit { color: var(--text-mute); }

.control {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  background: var(--bg-panel2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.control:focus {
  border-color: rgba(240, 180, 41, 0.55);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.12);
}
select.control { cursor: pointer; }
select.control option { background: var(--bg-panel2); color: var(--text); }

/* ------------------------------- 按钮 ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg-panel2);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.06s;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, #f5c455, var(--gold));
  border-color: #d9a01f;
  color: #201703;
  font-weight: 650;
}
.btn-primary:hover { background: linear-gradient(180deg, #f8ce6c, #f2bb3c); }

.btn-ghost { background: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-danger { color: var(--up); border-color: rgba(245, 69, 92, 0.35); }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------- 工具条 ------------------------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 12px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.check input { accent-color: var(--gold); cursor: pointer; margin: 0; }

.status {
  font-size: 12.5px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
}
.status.err { color: var(--up); }
.status.ok { color: var(--down); }

.spinner {
  width: 12px; height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress {
  flex: 1;
  min-width: 120px;
  max-width: 260px;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), #ffd873);
  transition: width 0.2s ease;
}

/* ------------------------------- 统计卡 ------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  background: var(--bg-panel2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 13px;
}
.stat .k { font-size: 11.5px; color: var(--text-mute); margin-bottom: 3px; }
.stat .v {
  font-size: 20px;
  font-weight: 680;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: -0.4px;
}
.stat .v small { font-size: 12px; font-weight: 500; color: var(--text-dim); margin-left: 2px; }

/* ------------------------------- 表格 ------------------------------- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: auto;
  max-height: 72vh;
  background: var(--bg-panel);
}

table.grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  white-space: nowrap;
}

table.grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1a232e;
  color: var(--text-dim);
  font-weight: 560;
  font-size: 12px;
  text-align: right;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-strong);
  cursor: pointer;
  user-select: none;
}
table.grid thead th:first-child,
table.grid thead th.txt { text-align: left; }
table.grid thead th.sorted { color: var(--gold); }
table.grid thead th .arrow { opacity: 0.75; margin-left: 2px; font-size: 10px; }

table.grid tbody td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
}
table.grid tbody td.txt { text-align: left; font-family: inherit; font-size: 13px; }

table.grid tbody tr { cursor: pointer; transition: background 0.1s; }
table.grid tbody tr:hover { background: var(--bg-hover); }
table.grid tbody tr.self { background: rgba(240, 180, 41, 0.055); }

.code-cell { color: var(--text-dim); font-size: 12px; }
.name-cell { color: var(--text); font-weight: 560; }
.name-cell .star { color: var(--gold); margin-left: 3px; }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text-dim); }

/* 信号徽标 */
.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
}
.sig-a { background: rgba(245, 69, 92, 0.16); color: #ff7c8d; border-color: rgba(245, 69, 92, 0.4); }
.sig-b { background: rgba(77, 171, 247, 0.14); color: #7cc2fa; border-color: rgba(77, 171, 247, 0.36); }
.sig-w { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); border-color: var(--line-strong); }
.sig-x { background: rgba(120, 120, 120, 0.1); color: var(--text-mute); }

/* 评分条 */
.score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.score .bar {
  width: 42px; height: 4px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 3px;
  overflow: hidden;
}
.score .bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}
.score b { font-weight: 620; }

/* 空状态 */
.empty {
  padding: 54px 20px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}
.empty .big { font-size: 30px; margin-bottom: 10px; opacity: 0.5; }

/* ------------------------------- 抽屉（个股详情） ------------------------------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 60;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(760px, 94vw);
  background: #0f151d;
  border-left: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 0.26s cubic-bezier(0.22, 0.8, 0.3, 1);
  z-index: 61;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-head .title { font-size: 16px; font-weight: 680; }
.drawer-head .sub { font-size: 12px; color: var(--text-mute); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 30px; }
.drawer-close {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.drawer-close:hover { background: var(--bg-hover); color: var(--text); }

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px 12px;
  margin: 0 0 16px;
}
.kv { background: rgba(255, 255, 255, 0.03); border-radius: 7px; padding: 7px 10px; }
.kv .k { font-size: 11px; color: var(--text-mute); }
.kv .v {
  font-size: 14px; font-weight: 620;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.chart-box {
  position: relative;
  background: #0c1218;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 4px 4px;
  margin-bottom: 14px;
}
.chart-box canvas { display: block; width: 100%; }

.chart-tabs {
  display: flex;
  gap: 4px;
  padding: 4px 8px 0;
}
.chart-tabs button {
  padding: 4px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.chart-tabs button:hover { color: var(--text); }
.chart-tabs button.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }

.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 104px;
  padding: 7px 9px;
  background: rgba(22, 30, 40, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-size: 11.5px;
  line-height: 1.6;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.chart-tip .tip-date { color: var(--text-dim); margin-bottom: 3px; font-size: 11px; }
.chart-tip .tip-row { display: flex; justify-content: space-between; gap: 12px; }
.chart-tip .tip-row span { color: var(--text-mute); }

.legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-mute);
  padding: 2px 8px 4px;
}
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

.sub-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sub-table th, .sub-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.sub-table th { color: var(--text-mute); font-weight: 500; font-size: 11.5px; }
.sub-table td.txt, .sub-table th.txt { text-align: left; }

/* ------------------------------- 标签页 ------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button {
  padding: 9px 15px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }

/* ------------------------------- 提示条 ------------------------------- */
.alert {
  display: flex;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 12px;
  border: 1px solid;
}
.alert b { font-weight: 650; }
.alert-info { background: rgba(77, 171, 247, 0.08); border-color: rgba(77, 171, 247, 0.3); color: #9fd0fb; }
.alert-warn { background: rgba(240, 180, 41, 0.08); border-color: rgba(240, 180, 41, 0.32); color: #f3cf87; }
.alert-err { background: rgba(245, 69, 92, 0.08); border-color: rgba(245, 69, 92, 0.32); color: #f79aa5; }

/* ------------------------------- Toast ------------------------------- */
.toast-box {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(28, 38, 50, 0.97);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  animation: toastIn 0.22s ease;
  max-width: 86vw;
}
.toast.ok { border-color: rgba(18, 184, 134, 0.5); color: #7ee2bd; }
.toast.err { border-color: rgba(245, 69, 92, 0.5); color: #f79aa5; }
.toast.out { opacity: 0; transition: opacity 0.4s; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------- 自选股侧栏 ------------------------------- */
.layout-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 14px;
  align-items: start;
}

.watch-list { max-height: 460px; overflow-y: auto; margin: -4px -4px 0; }
.watch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
}
.watch-item:hover { background: var(--bg-hover); }
.watch-item .wc { color: var(--text-mute); font-size: 11.5px; font-family: ui-monospace, monospace; }
.watch-item .wn { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.watch-item .wx {
  opacity: 0; border: none; background: transparent; color: var(--text-mute);
  cursor: pointer; font-size: 14px; padding: 0 3px;
}
.watch-item:hover .wx { opacity: 1; }
.watch-item .wx:hover { color: var(--up); }

/* ------------------------------- 页脚 ------------------------------- */
.foot {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-mute);
  line-height: 1.9;
}
.foot .row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ------------------------------- 响应式 ------------------------------- */
@media (max-width: 1080px) {
  .layout-2col { grid-template-columns: 1fr; }
  .watch-list { max-height: 280px; }
}

@media (max-width: 760px) {
  .wrap { padding: 12px 12px 48px; }
  .topbar { padding: 0 12px; gap: 10px; height: 50px; }
  .brand small { display: none; }
  .nav a { padding: 5px 9px; font-size: 12.5px; }
  .params { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-wrap { max-height: 66vh; }
  .stat .v { font-size: 17px; }
  table.grid thead th, table.grid tbody td { padding: 7px 7px; }
  .drawer { width: 100vw; }
}

/* ==========================================================================
 * 手机端布局（卡片式，手机优先）
 * ========================================================================== */

body.noscroll { overflow: hidden; }

.mhead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 15, 20, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px 0;
}
.mhead-row {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px;
}
.mhead .brand-mark { width: 26px; height: 26px; }
.mhead .m-title {
  font-size: 17px; font-weight: 700; letter-spacing: 0.5px;
}
.mhead .clock { margin-left: auto; font-size: 11px; padding: 3px 7px; }

.mtabs { display: flex; gap: 6px; }
.mtabs a {
  flex: 1; text-align: center;
  padding: 9px 0 10px;
  font-size: 13.5px;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.mtabs a.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 650; }

.mwrap { padding: 12px 12px 96px; }

.mcard {
  background: linear-gradient(180deg, var(--bg-panel), #111820);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.mcard-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.mcard-head h2 { margin: 0; font-size: 14px; font-weight: 650; }
.mcard-head .hint { font-size: 11.5px; color: var(--text-mute); }
.mcard-head .spacer { margin-left: auto; }
.mcard-head select {
  height: 28px; padding: 0 8px;
  background: var(--bg-panel2); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 7px;
  font-size: 12px; font-family: inherit;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.grid2 .field label { font-size: 11.5px; margin-bottom: 4px; }
.grid2 .control { height: 38px; font-size: 15px; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-check {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-dim);
  user-select: none;
}
.chip-check input { accent-color: var(--gold); margin: 0; }
.chip-check.on { border-color: rgba(240,180,41,.55); color: var(--gold); }

.mact { display: flex; gap: 8px; margin-top: 14px; }
.mact .btn-primary { flex: 1; height: 44px; font-size: 15px; }
.mact .btn { height: 44px; padding: 0 14px; }
.mact-sm { display: flex; gap: 8px; margin-top: 8px; }
.mact-sm .btn { flex: 1; height: 34px; font-size: 12.5px; }

.mstatus {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  font-size: 12px; color: var(--text-dim);
  min-height: 18px;
}
.mstatus .progress { flex: 1; max-width: none; }

/* 顶部指标 */
.mstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.mstats .ms {
  background: var(--bg-panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
}
.mstats .ms .k { font-size: 10px; color: var(--text-mute); line-height: 1.25; }
.mstats .ms .v {
  font-size: 16px; font-weight: 700;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.mstats .ms .v small { font-size: 10px; font-weight: 400; color: var(--text-dim); }

/* 结果卡片 */
.res-list { display: flex; flex-direction: column; gap: 10px; }

.res-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.res-card:active { background: var(--bg-hover); }
.res-card.self { border-color: rgba(240,180,41,.4); background: rgba(240,180,41,.045); }

.res-top { display: flex; align-items: center; gap: 8px; }
.res-name { font-size: 15.5px; font-weight: 650; }
.res-code {
  font-size: 11.5px; color: var(--text-mute);
  font-family: ui-monospace, Menlo, monospace;
  margin-left: 5px;
}
.res-badge { margin-left: auto; }
.res-score {
  min-width: 34px; text-align: right;
  font-size: 17px; font-weight: 700;
  font-family: ui-monospace, Menlo, monospace;
  color: var(--gold);
}

.res-price {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 8px;
}
.res-price b { font-size: 20px; font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
.res-price .pct { font-size: 13.5px; font-weight: 600; }
.res-price .sub { font-size: 12px; color: var(--text-mute); }

.res-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.res-chips span {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.045);
  color: var(--text-dim);
  white-space: nowrap;
}
.res-chips span.hi { color: var(--gold); background: rgba(240,180,41,.1); }

.res-foot {
  display: flex; gap: 8px; align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.res-foot .btn { flex: 1; height: 32px; font-size: 12.5px; }
.res-foot .btn.detail { flex: 0 0 auto; padding: 0 14px; color: var(--text-dim); }

/* 空状态 */
.m-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-mute);
  font-size: 13px;
  line-height: 1.9;
}
.m-empty .ico { font-size: 34px; opacity: .45; margin-bottom: 8px; }

/* 打码 */
.masked {
  filter: blur(7px);
  color: #8a93a2;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* 底部试用 / 会员条 */
.trialbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(18, 25, 34, 0.97);
  border-top: 1px solid var(--line-strong);
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
  backdrop-filter: blur(10px);
}
.trialbar.locked {
  color: #ffd873;
  border-top-color: rgba(240,180,41,.5);
  background: rgba(42, 32, 10, 0.97);
}
.trialbar.expiring { color: #ffd873; cursor: pointer; }

/* 支付面板 */
.paymask {
  position: fixed; inset: 0;
  z-index: 120;
  background: rgba(0,0,0,.62);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.paymask.open { opacity: 1; pointer-events: auto; }

.paysheet {
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: #131c26;
  border-radius: 18px 18px 0 0;
  padding: 16px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.22,.8,.3,1);
  border-top: 1px solid var(--line-strong);
}
.paymask.open .paysheet { transform: translateY(0); }

.paysheet-head {
  display: flex; align-items: center;
  font-size: 15.5px; font-weight: 650;
  margin-bottom: 6px;
}
.paysheet-x {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.paysheet-tip {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 12px;
}

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.plan {
  padding: 12px 8px;
  border-radius: 11px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-panel2);
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  font-family: ui-monospace, Menlo, monospace;
  cursor: pointer;
}
.plan small { display: block; font-size: 11.5px; font-weight: 400; color: var(--text-mute); margin-top: 2px; font-family: inherit; }
.plan.on {
  border-color: var(--gold);
  background: rgba(240,180,41,.12);
  color: var(--gold);
}
.plan.on small { color: rgba(240,180,41,.8); }

.payqr {
  display: block;
  width: 210px; height: 210px;
  margin: 0 auto 8px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
}
.payqr-tip { text-align: center; font-size: 11.5px; color: var(--text-mute); margin-bottom: 12px; }

.payqr-missing {
  width: 210px;
  height: 210px;
  margin: 0 auto 8px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}
.payqr-missing span { font-size: 11.5px; color: var(--text-mute); }

.btn-unlock {
  width: 100%;
  height: 46px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(180deg, #f5c455, var(--gold));
  color: #201703;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.payerr { color: var(--up); font-size: 12px; text-align: center; margin-top: 8px; min-height: 16px; }
.paynote {
  font-size: 11px;
  color: var(--text-mute);
  text-align: center;
  line-height: 1.7;
  margin-top: 10px;
}

/* 桌面端把卡片放两列 */
@media (min-width: 720px) {
  .mwrap { max-width: 880px; margin: 0 auto; padding: 16px 16px 100px; }
  .grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mstats { grid-template-columns: repeat(5, 1fr); }
  .res-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .paysheet { max-width: 420px; margin: 0 auto; border-radius: 18px; margin-bottom: 4vh; }
  .paymask { align-items: center; }
}

/* ===== 双码付费面板（¥8.8 一月 / ¥29 永久 并排） ===== */
.paygrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}
.payitem { text-align: center; min-width: 0; }
.payprice {
  font-size: 19px;
  font-weight: 700;
  color: var(--gold);
  font-family: ui-monospace, Menlo, monospace;
  margin-bottom: 6px;
}
.payprice small { font-size: 11.5px; font-weight: 400; color: var(--text-mute); margin-left: 2px; font-family: inherit; }
.paygrid .payqr {
  display: block;
  width: 100%;
  height: auto;
  max-height: 190px;
  margin: 0 0 8px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 5px;
}
.payqrmissing {
  width: 100%;
  height: 160px;
  margin-bottom: 8px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-mute);
}
.paygrid .btn-unlock {
  height: 38px;
  padding: 0 6px;
  font-size: 12.5px;
  border-radius: 9px;
  line-height: 1.2;
  white-space: normal;
}

/* ===== 顶部导航改成按钮 ===== */
.mtabs { display: flex; gap: 8px; padding-bottom: 10px; }
.mtabs a {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  font-size: 13.5px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--bg-panel2);
  color: var(--text-dim);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.mtabs a.active {
  background: linear-gradient(180deg, #f5c455, var(--gold));
  border-color: #d9a01f;
  color: #201703;
  font-weight: 700;
}

/* ===== 分组标题 ===== */
.grp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 2px 9px;
}
.grp-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.grp-head .cnt { font-size: 12px; color: var(--text-mute); }
.grp-head .dot { width: 7px; height: 7px; border-radius: 4px; }
.grp-head.a .dot { background: var(--up); }
.grp-head.b .dot { background: var(--blue); }
.grp-head.c .dot { background: var(--text-mute); }

/* ===== 卡片序号 ===== */
.res-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 600;
  font-family: ui-monospace, Menlo, monospace;
  flex: none;
}

/* ===== 卡片迷你图 ===== */
.mini-chart {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
  background: #0c1218;
}

/* ===== 桌面端修正：分组标题通栏、顶部按钮限宽 ===== */
.grp-head { grid-column: 1 / -1; }

@media (min-width: 720px) {
  .mhead-row, .mtabs { max-width: 880px; margin-left: auto; margin-right: auto; }
  .mtabs a { padding: 9px 0; }
  .res-list .grp-head:first-child { margin-top: 0; }
}

/* ===== 分类切换按钮 ===== */
.cat-tabs {
  display: flex;
  gap: 8px;
  margin: 0 2px 12px;
}
.cat-tabs button {
  flex: 1;
  padding: 9px 2px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--bg-panel2);
  color: var(--text-dim);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cat-tabs button i {
  font-style: normal;
  font-size: 11px;
  opacity: .7;
  margin-left: 3px;
}
.cat-tabs button.active {
  border-color: var(--gold);
  background: rgba(240,180,41,.13);
  color: var(--gold);
  font-weight: 700;
}
.cat-tabs button.active i { opacity: 1; }
.cat-tabs button:disabled { opacity: .35; }

/* 分类按钮滚动定位时留出 sticky 头部的高度 */
#catTabs { scroll-margin-top: 96px; }
.grp-head { scroll-margin-top: 96px; }

/* ===== 卡密输入 ===== */
.paykey {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.paykey-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-panel2);
  color: var(--text);
  font-size: 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.5px;
  outline: none;
}
.paykey-input:focus {
  border-color: rgba(240,180,41,.55);
  box-shadow: 0 0 0 3px rgba(240,180,41,.12);
}
.paykey-input::placeholder { color: var(--text-mute); font-size: 11.5px; letter-spacing: 0; }
.paykey-btn {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #f5c455, var(--gold));
  color: #201703;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

/* ===== 发卡平台「去购买」按钮 ===== */
.paybuy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 4px 0 14px;
  padding: 16px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5c455, var(--gold));
  color: #201703;
  text-decoration: none;
  text-align: center;
}
.paybuy b { font-size: 16px; font-weight: 700; }
.paybuy span { font-size: 11.5px; opacity: .78; }
.paybuy:active { opacity: .85; }

/* ===== 筛选诊断行 ===== */
.diag {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-mute);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  line-height: 1.9;
}
.toast.warn { border-color: rgba(240, 180, 41, 0.5); color: #ffd873; }

/* ===== 实时标记 ===== */
.live-dot {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(18,184,134,.16);
  color: #4be0ae;
  border: 1px solid rgba(18,184,134,.35);
  margin-left: 4px;
  flex: none;
}

/* ===== 卡片内买入信号 ===== */
.sig-buy {
  display: none !important;   /* 按要求隐藏：倍量阳/点火/均线 明细块 */
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(240,180,41,.07);
  border: 1px solid rgba(240,180,41,.22);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sig-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sig-k { color: var(--gold); font-weight: 700; flex: none; letter-spacing: .5px; }
.sig-v {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 650;
  font-size: 13px;
}
.sig-tag {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 5px;
  flex: none;
}
.sig-tag.ok { background: rgba(245,69,92,.16); color: #ff8b9c; }
.sig-tag.wait { background: rgba(255,255,255,.07); color: var(--text-dim); }
.sig-note { margin-left: auto; font-size: 11px; color: var(--text-mute); }

/* ===== 通达信配色图例 ===== */
.chart-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--text-mute);
}
.chart-legend b {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: -5px;
}
.chart-legend .lgb { background: #ffd400; }
.chart-legend .lgd { background: #e040fb; }
.chart-legend .lgt { background: #12b886; }

/* ===== 四块导航：手机上缩小字号 ===== */
.mtabs a { font-size: 12.5px; padding: 9px 2px; }
@media (max-width: 400px) {
  .mtabs a { font-size: 11.5px; padding: 8px 0; }
}

/* ===== 五块导航：再缩一档 ===== */
.mtabs a { font-size: 11.5px; padding: 8px 1px; }
@media (max-width: 430px) {
  .mtabs a { font-size: 10.5px; padding: 8px 0; }
}

/* ===== 参数滑块 ===== */
.slider-wrap { display: flex; align-items: center; gap: 2px; }
.slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 3px; background: #2a2f3a; outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #f0b429; cursor: pointer; border: 2px solid #14171d;
  box-shadow: 0 0 0 3px rgba(240,180,41,.15);
}
.slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: #f0b429;
  cursor: pointer; border: 2px solid #14171d;
}
.slider-val {
  min-width: 46px; text-align: left; font-size: 13px; color: #f0b429; padding-left: 2px;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
