/* measure/live-stage.css — THE LIVE STAGE (docs/measure-live-stage-spec.md R4/R6).
 *
 * Everything here is scoped under `.ms-overlay.ms-live`, a class measure/live-stage.js adds
 * only once its bodies stand in the scene and removes on every fallback path — so without
 * the stage this file is inert and the board is byte-for-byte the DOM diorama.
 *
 * R6 THE WORLD ZONE IS THE FRAME: the overlay itself goes transparent and `.ms-live-mask`
 * (inserted as the overlay's first child) repaints the void everywhere EXCEPT a hole cut to
 * THE WORLD's rect (an evenodd clip-path the stage rewrites when the rect moves). The zone's
 * own ground + painted backdrop go away; the 3D scene shows through the hole and nowhere
 * else. THE STRIP / THE DECK / THE LOG / the party window keep their chrome untouched.
 *
 * R4 THE PLATES STAY DOM: the figure card's 2D body is made invisible but KEEPS a box —
 * sized per frame off the projected body (`--ms-live-h/-w`) so the plate rides just above
 * the 3D head and pace.js's rect math still has a body to measure. The walk wrapper's own
 * translate is neutralised: the body walks in the world and the card follows by projection,
 * so a DOM offset on top would double the ink's origin. */

.ms-overlay.ms-live { background: transparent; }
.ms-overlay.ms-live > .ms-live-mask {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--void, #0a0e2a);
}
.ms-overlay.ms-live .ms-world { background: transparent; border-color: rgba(255,215,106,0.22); }
.ms-overlay.ms-live .ms-backdrop { display: none; }

.ms-overlay.ms-live .ms-world-figure { transition: none; }
.ms-overlay.ms-live .ms-figure-body {
  width: var(--ms-live-w, 48px); height: var(--ms-live-h, 80px); min-height: 0;
  pointer-events: none;
}
.ms-overlay.ms-live .ms-figure-body .ms-face { visibility: hidden; min-height: 0; height: 100%; }
.ms-overlay.ms-live .ms-figure-body .ms-face::before { display: none; }
.ms-overlay.ms-live .ms-figure-body img,
.ms-overlay.ms-live .ms-figure-body .ms-hero-badge { visibility: hidden; }
.ms-overlay.ms-live .ms-figure-shadow { display: none; }
/* THE PLATES STACK (r9 §10): a plate the per-frame solver lifted off its own head draws a
   hairline LEADER back down to it (`--ms-plate-lead`, px, 0 = at rest), in the body's accent,
   so a stacked bar still names one body. Below the plate (top:100%), centred, no layout. */
/* 2px and near-solid (2026-09-26): the 1px hairline at 35-85% read as nothing on the plates,
   so a lifted plate looked like a plate floating over the wrong body. */
.ms-overlay.ms-live .ms-plate::after {
  content: ''; position: absolute; left: 50%; top: 100%; width: 2px;
  height: var(--ms-plate-lead, 0px); margin-left: -1px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--ms-accent, #e89020) 95%, transparent), color-mix(in srgb, var(--ms-accent, #e89020) 60%, transparent));
  box-shadow: 0 0 2px rgba(0,0,0,0.6);
  pointer-events: none;
}
/* a plate never tweens between the solver's per-frame positions — the body it rides is
   already projected per frame, and a tween here would trail it */
.ms-overlay.ms-live .ms-plate { transition: none; }
.ms-overlay.ms-live .ms-figure-walk { translate: 0 0 !important; scale: 1 !important; transition: none !important; }
/* the figure-state ambients (idle bob / critical pulse) animate the invisible box — harmless,
   but the critical HP flicker on the PLATE is the read that matters, so keep it and drop the
   body's own filter, which would otherwise glow an empty box */
.ms-overlay.ms-live .ms-figure-body { filter: none !important; }

.ms-live-debug {
  position: absolute; left: 8px; top: 8px; z-index: 4; pointer-events: none;
  font: 10px/1.3 'Courier New', monospace; letter-spacing: 1px;
  color: rgba(255,215,106,0.85); background: rgba(0,0,0,0.45); padding: 2px 6px;
}

@media (prefers-reduced-motion: reduce) {
  /* the stage never goes live under reduced motion (live-stage.js open() refuses), so this
     is belt-and-braces only */
  .ms-overlay.ms-live .ms-world-figure { transition: none; }
}
