/* Full-screen strategy detail */
.stage {
  display: none;
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  color: var(--text);
  flex-direction: column;
  overflow: hidden;
}
.stage.open { display: flex; }
body.stage-on { overflow: hidden; }
body.stage-on #app { visibility: hidden; pointer-events: none; }

.stage-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 20px; border-bottom: 1px solid var(--line);
  background: rgba(10,12,16,.96); flex-shrink: 0;
}
.stage-bar .back {
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.stage-bar .back:hover { border-color: var(--gold); color: var(--gold2); }
.stage-bar h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.stage-bar .sub { color: var(--muted); font-size: 13px; }
.stage-bar .tag { margin-left: 4px; }

.stage-body { flex: 1; overflow: auto; padding: 16px 22px 28px; }

.rule-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.rule-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px;
}
.rule-card h3 {
  margin: 0 0 8px; font-size: 13px; letter-spacing: .12em; color: var(--gold2);
  font-weight: 700;
}
.rule-card .text { font-size: 16px; line-height: 1.65; color: var(--text); }
.rule-card .note { margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--muted); }

.section-title {
  margin: 8px 0 12px; font-size: 15px; letter-spacing: .12em; color: var(--muted); font-weight: 700;
}

.chart-row {
  display: grid; grid-template-columns: 1fr 300px; gap: 12px;
  margin-bottom: 22px; min-height: 0;
}
.chart-main {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 8px 4px; display: flex; flex-direction: column; min-width: 0;
}
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 4px 8px 8px;
  font-size: 12px; color: var(--muted); line-height: 1.4;
}
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
#price-chart { width: 100%; height: 420px; }
#osc-chart { width: 100%; height: 140px; }
.chart-hint { padding: 2px 8px 8px; font-size: 12px; color: var(--dim); }

.trade-side {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  display: flex; flex-direction: column; min-height: 520px; max-height: 620px;
}
.trade-side h3 { margin: 0; padding: 12px 14px 8px; font-size: 13px; letter-spacing: .1em; color: var(--muted); }
.trade-side .tmeta { padding: 0 14px 8px; font-size: 12px; color: var(--dim); }
.trade-list { overflow: auto; flex: 1; }
.trade-list button {
  display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #1a1f29;
  background: transparent; color: var(--text); padding: 9px 14px; cursor: pointer; font-size: 13px;
}
.trade-list button:hover { background: #1a2130; }
.trade-list button.on { background: #1e2a1c; outline: 1px solid rgba(224,177,90,.35); }
.trade-list .r { font-family: var(--mono); float: right; }
.trade-list .when { color: var(--muted); font-size: 11px; margin-top: 2px; }

.eq-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px 10px; margin-bottom: 22px;
}
.eq-box .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.eq-box canvas { width: 100%; height: 280px; display: block; }

.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px;
}
.stat-card .lab { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.stat-card .num { font-family: var(--mono); font-size: 32px; font-weight: 700; margin: 6px 0 2px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-card .sub { color: var(--muted); font-size: 13px; }
.stat-card .num.pos { color: var(--green); }
.stat-card .num.neg { color: var(--red); }
.stat-card .num.gold { color: var(--gold2); }

.stage .hint-lg { color: var(--muted); padding: 40px 16px; font-size: 16px; text-align: center; }

@media (max-width: 900px) {
  .stage-body { padding: 12px 12px 24px; }
  .stage-bar { padding: 10px 12px; }
  .stage-bar h1 { font-size: 16px; }
  .rule-grid { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
  .trade-side { min-height: 0; max-height: 340px; }
  #price-chart { height: 300px; }
  #osc-chart { height: 120px; }
  .eq-box canvas { height: 200px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card .num { font-size: 26px; }
}
