/* BackgammonX v0.2.21 — 13-board-dice-presentation.css
   Owns: the new BOARD-LOCAL dice-landing layer's own box/stacking rules.
   Does not own: the travelling cube's own box model, size, faces, pips
   or motion-phase transitions — all still css/10-dice-animation.css,
   completely unchanged this pass. This file only answers "where does
   that cube's containing box sit, and in what stacking order" — never
   "what does the cube look like while it travels".

   BOARD-LOCAL, NOT VIEWPORT-LOCAL (the one architectural requirement
   this whole file exists to satisfy): every rule below is plain CSS box
   geometry (percentage/inset against an ancestor's own content box).
   Nothing here or in js/26-board-dice-presentation.js ever calls
   getBoundingClientRect(), reads window.innerWidth/innerHeight, or sets
   position:fixed — the exact pattern the rejected v0.2.19 Patch 4
   design used and that this pass must not revive. See
   IMPLEMENTATION-NOTE.md for the full before/after and the negative-
   control test that fails against a reintroduced Patch-4 helper.

   .bgx-board-dice-anchor WRAPS the pre-existing, UNTOUCHED
   .bgx-board-rotation-stage (css/07 + css/11, owns the 180° rotation —
   still the ONLY element that ever receives that transform) as its one
   child. Because the anchor is width:100% with auto height, and its one
   child's own box is driven by .board-frame's aspect-ratio:1/1 (css/02),
   the anchor's rendered box is ALWAYS exactly .board-frame's own square
   — with zero JS measurement, and zero coupling to any breakpoint's own
   padding value. .bgx-dice-board-layer is a SIBLING of the rotation
   stage inside that anchor (never a descendant of it), so the landing
   layer and every die placed inside it stay visually upright at every
   rotation state — the existing, established pattern already used by
   .bgx-rail and the HUD (both already siblings of the rotation stage,
   for the exact same reason), reused here rather than re-invented. */

:root { --bgx-css-13: 1; }

.bgx-board-dice-anchor {
  position: relative;
  width: 100%;
}

/* inset:1% matches .board-art's own width:98% centered inside
   .board-frame (css/02 line 39) — the landing layer's box therefore
   tracks the SAME square the real board image, checker layer and human-
   interaction layer already use, via pure CSS inheritance, not a
   separately-maintained copy of that 98% figure. */
.bgx-dice-board-layer {
  position: absolute;
  inset: 1%;
  /* Above .checker-layer (css/06, default stacking order) and
     .geometry-calibration-layer (css/06, z-index:2) — a landed die must
     never render behind the board art or the calibration overlay.
     Below .bgx-rail (css/07, z-index:40) and the Layout Designer chrome
     (css/12, z-index:3/6/45) — a die must never cover a rail's own
     stats or a layout handle. Landed dice are kept out of the safe
     central region's rail-adjacent margins anyway (js/26's own
     SAFE_MARGIN_RATIO), so this ordering is a backstop, never relied on
     to visually resolve an actual overlap. */
  z-index: 3;
  /* Every child this layer ever holds (.dtf-die-traveller while
     travelling, .dtf-die-board-static once reduced-motion-landed) is
     already pointer-events:none at its own box-model rule (css/10) —
     this restates it at the layer level too, so the layer itself can
     never intercept a checker/point/control click even for the one
     frame before a child exists. */
  pointer-events: none;
  overflow: visible;
}
