/* Reference assembly: one painted pedestal with blank gems, live game values.
   All layers share a flat coordinate system; ancestor 3D card effects must not
   project the numbers away from their sockets. Original PNGs stay untouched. */
body.game-mode .board-figure[data-miniature] {
  --base-art: url('/static/assets/socle-reference-blue-v3.png');
  width:176px!important;
  flex:0 0 176px!important;
  height:190px!important;
  perspective:none!important;
  transform-style:flat!important;
  isolation:isolate;
}
body.game-mode .board-figure[data-miniature].faction-parasite {
  --base-art: url('/static/assets/socle-reference-acid-v3.png');
}
body.game-mode .board-figure[data-miniature] .figure-body {
  inset:0!important;
  width:176px!important;
  height:154px!important;
  transform:none!important;
  transform-style:flat!important;
  z-index:2!important;
}
body.game-mode .board-figure[data-miniature] .figure-3d-render {
  left:50%!important;
  top:12px!important;
  width:142px!important;
  transform:translateX(-50%)!important;
  height:auto!important;
  /* Follow the two boots, removing the integrated pedestal below them. */
  clip-path:polygon(0 0,100% 0,100% 75%,79% 75%,79% 87%,63% 87%,63% 74%,41% 74%,41% 84%,19% 84%,19% 75%,0 75%)!important;
}
body.game-mode .board-figure[data-miniature="bulwark"] .figure-3d-render {
  left:calc(50% + 7px)!important;
  top:0!important;
  width:95px!important;
  transform:translateX(-50%)!important;
  clip-path:polygon(0 0,100% 0,100% 77%,82% 77%,82% 87%,67% 87%,66% 78%,43% 78%,42% 84%,18% 84%,18% 76%,0 76%)!important;
}
body.game-mode .board-figure[data-miniature="mech"] .figure-3d-render {
  left:calc(50% + 4px)!important;
  top:0!important;
  width:135px!important;
  transform:translateX(-50%)!important;
  clip-path:polygon(0 0,100% 0,100% 72%,87% 72%,87% 84%,58% 84%,58% 76%,41% 76%,41% 89%,13% 89%,13% 73%,0 73%)!important;
}
body.game-mode .board-figure[data-miniature="soldier"] .figure-3d-render {
  left:calc(50% - 4px)!important;
  transform:translateX(-50%)!important;
}
body.game-mode .board-figure[data-miniature="alien"] .figure-3d-render {
  left:50%!important;
  top:24px!important;
  transform:translateX(-50%)!important;
  clip-path:polygon(0 0,100% 0,100% 85%,94% 85%,94% 82%,86% 82%,85% 77%,39% 77%,34% 87%,30% 87%,30% 80%,14% 80%,10% 85%,6% 85%,6% 74%,0 74%)!important;
}
body.game-mode .board-figure[data-miniature="nurse"] .figure-3d-render {
  left:50%!important;
  top:0!important;
  width:126px!important;
  height:auto!important;
  transform:translateX(-50%)!important;
  clip-path:none!important;
  object-fit:contain!important;
}
body.game-mode .board-figure[data-miniature="nyx"] .figure-3d-render {
  left:50%!important;
  top:0!important;
  width:140px!important;
  height:auto!important;
  transform:translateX(-50%)!important;
  clip-path:none!important;
  object-fit:contain!important;
}
body.game-mode .board-figure[data-miniature="engineer"] .figure-3d-render {
  left:50%!important;
  top:0!important;
  width:142px!important;
  height:auto!important;
  transform:translateX(-50%)!important;
  clip-path:none!important;
  object-fit:contain!important;
}
body.game-mode .board-figure[data-miniature="hauler"] .figure-3d-render {
  left:50%!important;
  top:-14px!important;
  width:150px!important;
  height:auto!important;
  transform:translateX(-50%)!important;
  clip-path:none!important;
  object-fit:contain!important;
}
body.game-mode .board-figure[data-miniature] .figure-base {
  display:block!important;
  left:10px!important;
  right:auto!important;
  top:99px!important;
  bottom:auto!important;
  width:156px!important;
  height:76px!important;
  transform:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:var(--base-art) center/100% 100% no-repeat!important;
  filter:none!important;
  z-index:1!important;
  pointer-events:none!important;
}
body.game-mode .board-figure[data-miniature] .figure-base-core {display:none!important}
body.game-mode .board-figure[data-miniature] .figure-stat.atk,
body.game-mode .board-figure[data-miniature] .figure-stat.hp {
  top:136px!important;
  bottom:auto!important;
  width:24px!important;
  min-width:0!important;
  height:29px!important;
  padding:0 0 2px!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
  z-index:4!important;
  display:grid!important;
  place-items:center!important;
  color:#fff7e7!important;
  font:700 18px/1 Georgia,'Times New Roman',serif!important;
  font-variant-numeric:lining-nums tabular-nums;
  letter-spacing:-1px;
  text-shadow:0 1px 1px #100900,0 2px 3px #000!important;
}
body.game-mode .board-figure[data-miniature] .figure-stat.atk {left:37px!important;right:auto!important}
body.game-mode .board-figure[data-miniature] .figure-stat.hp {left:114px!important;right:auto!important}
body.game-mode .board-figure[data-miniature].faction-parasite .figure-stat {top:138px!important}
body.game-mode .board-figure[data-miniature] .figure-stat[data-digits="2"] {font-size:15px!important}
body.game-mode .board-figure[data-miniature] .figure-stat[data-digits="3"] {font-size:11px!important;letter-spacing:-.7px}
body.game-mode .board-figure[data-miniature] .figure-stat::before,
body.game-mode .board-figure[data-miniature] .figure-stat::after {display:none!important}

/* Card-specific generated renders: one shared scale and one clean contact
   point with the painted base. The generated previews contain their own
   small pedestal, so trim only that lower rim before the live counters. */
body.game-mode .board-figure[data-cardkey] .figure-3d-render {
  top:-8px!important;
  left:50%!important;
  width:auto!important;
  height:150px!important;
  max-width:150px!important;
  transform:translateX(-50%)!important;
  object-fit:contain!important;
  clip-path:none!important;
}
body.game-mode .board-figure[data-cardkey="salvage_engineer"] .figure-3d-render {
  left:calc(50% - 2px)!important;
}
body.game-mode .board-figure[data-cardkey="hauler"] .figure-3d-render {
  height:150px!important;
  max-width:132px!important;
  clip-path:none!important;
}
body.game-mode .board-figure[data-cardkey="field_medic"] .figure-3d-render,
body.game-mode .board-figure[data-cardkey="synth7"] .figure-3d-render {
  left:calc(50% - 6px)!important;
}
body.game-mode .board-figure[data-cardkey="bulwark"] .figure-3d-render,
body.game-mode .board-figure[data-cardkey="repair_drone"] .figure-3d-render,
body.game-mode .board-figure[data-cardkey="voidrunner"] .figure-3d-render {
  left:calc(50% - 3px)!important;
}
body.game-mode .board-figure[data-cardkey="bulwark"] .figure-3d-render {
  left:calc(50% + 2px)!important;
}
body.game-mode .board-figure[data-cardkey="hauler"] .figure-3d-render {
  left:calc(50% - 4px)!important;
}
body.game-mode .board-figure[data-cardkey="voidstalker"] .figure-3d-render {
  top:2px!important;
  height:135px!important;
  max-width:140px!important;
}
