/* FM1 Manager — flash confirm / progress / success modal
   Tokens match store.css. Keep page #bar / #log / connect panel as-is. */

.fm1-modal-root {
  position: fixed; inset: 0; z-index: 9000;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(2px);
}
.fm1-modal-root[hidden] { display: none !important; }

.fm1-modal {
  width: min(420px, 100%);
  background: var(--card, #121212);
  border: 1px solid var(--line, #242424);
  border-radius: 2px;
  padding: 28px 26px 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
  position: relative;
  z-index: 1;
}

.fm1-modal h3 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: -.03em;
  font-weight: 700;
}

.fm1-modal .fm1-modal-body {
  margin: 0 0 22px;
  color: var(--muted, #8a8a8a);
  font-size: 14.5px;
  line-height: 1.65;
}

.fm1-modal-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end;
}

.fm1-modal .btn { min-width: 6.5em; }
.fm1-modal .btn.ghost:hover { border-color: var(--ac, #f05020); color: var(--text, #f2f2f2); }

/* Progress pane */
.fm1-modal-pct {
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--text, #f2f2f2);
  margin: 0 0 14px;
}
.fm1-modal-pct span { color: var(--ac, #f05020); }

.fm1-modal-bar {
  height: 4px;
  background: #242424;
  margin: 0 0 12px;
}
.fm1-modal-bar > span {
  display: block; height: 100%; width: 0;
  background: var(--ac, #f05020);
  transition: width .18s linear;
}

.fm1-modal-step {
  margin: 0;
  color: var(--faint, #5a5a5a);
  font: 12px/1.55 ui-monospace, Menlo, monospace;
  min-height: 1.55em;
}

/* Success */
.fm1-modal.success h3 {
  color: #8dcea8;
  text-align: center;
  margin: 8px 0 4px;
}
.fm1-modal.success .fm1-modal-body {
  white-space: normal;
  line-height: 1.45;
  text-align: center;
  color: var(--muted, #8a8a8a);
  margin-bottom: 8px;
}

/* Fireworks canvas under modal card */
.fm1-fw-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  width: 100%; height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .fm1-modal-bar > span { transition: none; }
  .fm1-fw-canvas { display: none; }
}

/* HMPC V16 tip (confirm) */
.fm1-modal .fm1-modal-tip {
  margin: -12px 0 22px;
  color: #ff4d4d;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  white-space: pre-wrap;
}
