/* ==========================================================================
   EMO PREP — visual language shared with FTIS Trade Logger: dark, tactical,
   quiet, mono accents. No casino aesthetics, no confetti, no flashing.
   ========================================================================== */

:root {
  --bg: #0a0c0e;
  --panel: #14181c;
  --panel-2: #1a1f24;
  --border: #2a323b;
  --border-2: #384250;
  --text: #e9ecef;
  --muted: #8d97a3;
  --muted-2: #6b7480;
  --gold: #c9a227;
  --olive: #7d8c52;
  --green: #3fb950;
  --red: #e5534b;
  --amber: #d99413;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 15px; line-height: 1.45;
  overscroll-behavior-y: none;
}
:focus-visible { outline: 2px solid #6cb6ff; outline-offset: 2px; border-radius: 6px; }
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; }

.screen { padding: 24px 18px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.screen.center { align-items: center; justify-content: center; text-align: center; gap: 6px; }

.brand {
  font-family: var(--mono); font-weight: 800; font-size: 28px;
  letter-spacing: .12em; color: var(--text);
}
.subtitle { font-family: var(--mono); color: var(--muted); letter-spacing: .1em; font-size: 13px; }
.tagline { color: var(--muted-2); font-size: 14px; margin: 18px 0 30px; max-width: 320px; }

.h1 {
  font-family: var(--mono); font-weight: 800; font-size: 15px;
  letter-spacing: .18em; color: var(--gold); margin-bottom: 18px; text-align: center;
}
.h2 {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 14px;
}

.btn {
  display: block; width: 100%; padding: 16px; border-radius: 14px;
  border: 1px solid var(--border); font-size: 14px; font-weight: 800;
  font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase;
  margin-top: 16px; color: #fff; background: var(--panel-2); text-align: center;
  text-decoration: none;
}
.btn.primary { background: var(--olive); border-color: var(--olive); color: #0c1005; }
.btn.action {
  background: var(--panel); border: 1px solid var(--border-2);
  margin-top: 10px; font-size: 13px;
}
.btn.action:hover { border-color: var(--gold); }

/* Wolf Check */
.wolf-row { margin-bottom: 20px; }
.wolf-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; font-family: var(--mono); letter-spacing: .04em; }
.scale { display: flex; gap: 8px; }
.scale-btn {
  flex: 1; padding: 14px 0; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--muted); font-weight: 700; font-family: var(--mono);
}
.scale-btn.on { background: var(--gold); border-color: var(--gold); color: #1a1400; }

/* Scenario screens */
.context-card {
  background: rgba(217,148,19,.08); border: 1px solid rgba(217,148,19,.32);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.context-line { font-family: var(--mono); font-size: 13px; color: var(--amber); }
.context-line + .context-line { margin-top: 4px; }

.info-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; margin-bottom: 14px;
}
.info-dir { font-family: var(--mono); font-weight: 800; font-size: 18px; color: var(--text); margin-bottom: 10px; }
.info-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 4px 0; font-family: var(--mono); }
.info-row span:last-child { color: var(--text); }
.info-rule { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

.step-note { font-size: 16px; color: var(--text); margin: 8px 0 6px; line-height: 1.5; }
.pnl { font-family: var(--mono); font-size: 26px; font-weight: 800; margin: 8px 0; }
.pnl.pos { color: var(--green); }
.pnl.neg { color: var(--red); }

.prompt {
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  letter-spacing: .05em; color: var(--gold); margin: 18px 0 4px; text-transform: uppercase;
}
.actions { margin-top: 4px; }

/* Results */
.score {
  font-family: var(--mono); font-size: 42px; font-weight: 800;
  text-align: center; color: var(--gold); margin: 6px 0 24px;
}
.metrics { margin-bottom: 8px; }
.metrics.flags .metric-value { color: var(--amber); }
.metric-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.metric-label { color: var(--muted); }
.metric-value { font-family: var(--mono); font-weight: 700; }
.takeaway {
  margin-top: 20px; padding: 14px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; color: var(--text); line-height: 1.5;
}
.streak { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted-2); text-align: center; }
.final-phrase {
  margin-top: 28px; text-align: center; font-family: var(--mono);
  font-size: 12px; letter-spacing: .1em; color: var(--muted-2); white-space: pre-line; line-height: 1.8;
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* ==========================================================================
   CANDLE RUN — arcade drill. Tension comes from the numbers and the timing,
   never from flashing graphics.
   ========================================================================== */

.progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.pip { width: 26px; height: 3px; border-radius: 2px; background: var(--border); }
.pip.on { background: var(--gold); }
.pip.done { background: var(--olive); }

.hint { font-size: 12px; color: var(--muted-2); text-align: center; margin-bottom: 14px; }

.back-btn {
  display: block; margin: 14px auto 0; background: none; border: none;
  color: var(--muted-2); font-family: var(--mono); font-size: 12px;
  letter-spacing: .06em; padding: 8px 12px;
}
.back-btn:hover { color: var(--text); }

.info-card.compact { padding: 12px 14px; margin-bottom: 12px; }
.t-green { color: var(--green) !important; }
.t-red { color: var(--red) !important; }

canvas.chart {
  width: 100%; height: auto; display: block;
  background: #0c0f12; border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 12px;
}

.hud { display: flex; gap: 10px; margin-bottom: 12px; }
.hud-cell {
  flex: 1; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; text-align: center;
}
.hud-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  color: var(--muted-2); text-transform: uppercase;
}
.hud-val { font-family: var(--mono); font-size: 22px; font-weight: 800; margin-top: 2px; }
.hud-val.pos { color: var(--green); }
.hud-val.neg { color: var(--red); }
.hud-val.streak { color: var(--gold); }

.resolve-banner {
  border-radius: 10px; padding: 10px; text-align: center;
  font-family: var(--mono); font-size: 12px; font-weight: 800;
  letter-spacing: .1em; border: 1px solid;
}
.resolve-banner.idle { color: var(--muted-2); border-color: var(--border); background: var(--panel-2); }
.resolve-banner.target { color: var(--green); border-color: rgba(63,185,80,.5); background: rgba(63,185,80,.10); }
.resolve-banner.invalidation { color: var(--red); border-color: rgba(229,83,75,.5); background: rgba(229,83,75,.10); }

.exit-btn {
  background: var(--panel-3, #212830); border: 1px solid var(--border-2);
  color: var(--text); font-size: 18px; padding: 20px; margin-top: 10px;
}
.exit-btn:active { background: var(--red); border-color: var(--red); }

/* In-the-moment feedback — one short line, named, no lecture. */
.fb-wrap { margin-top: 4px; }
.feedback {
  padding: 12px 14px; border-radius: 12px; border: 1px solid;
  font-size: 14px; line-height: 1.45;
}
.feedback.good { color: var(--green); border-color: rgba(63,185,80,.4); background: rgba(63,185,80,.08); }
.feedback.bad  { color: var(--amber); border-color: rgba(217,148,19,.4); background: rgba(217,148,19,.08); }

.sr-live {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
