/* Only the 85 directly authored native sprites opt in. Keep the established
   raw produce, herbs, fish, recovery bottles, Cloth, Scrap, Essences and rods
   on their existing renderers. Dense responsive cells retain uniform fitting;
   ordinary icons use 1× pixels, vendor/detail illustrations use 2× pixels. */
img.nativeItemArt{
 display:block;
 width:var(--native-item-size,32px)!important;
 height:var(--native-item-size,32px)!important;
 min-width:0!important;
 min-height:0!important;
 max-width:100%!important;
 max-height:100%!important;
 flex:none;
 aspect-ratio:1;
 object-fit:contain!important;
 image-rendering:pixelated;
 transform:none!important;
 filter:none!important;
}

/* The bordered Alchemist image box needs 64 inner pixels, not a 62px fit.
   Fishing supply boxes already have no border and remain exactly 64×64. */
#shopList .vendorListing:has(.nativeItemArt):not(.fishingSupplyOffer){
 --vendor-art-width:66px;
 --vendor-art-height:66px;
}
#shopList .vendorItemImage>.nativeItemArt,
#shopList .fishingSupplyOffer .nativeItemArt,
.professionMaterialDetailArt>.nativeItemArt,
.gearArtStage>.nativeItemArt{--native-item-size:64px}

/* A 1× icon is centered inside each existing saved storage cell. max-* keeps
   the established 12-column phone inventory without stretching square art. */
:is(.packItem,.stashItem):has(>.nativeItemArt){display:grid;place-items:center}
:is(.packItem,.stashItem,.cubePlaced)>.nativeItemArt{margin:auto}

/* Buff bottles fill the existing apertures, like recovery potions. Their
   square native grid stays proportional inside rectangular belt slots. */
#huntView .battleStoneCanvas .beltArt>.nativeItemArt{
 width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
}
:is(.packItem,.stashItem)>.consumableGridArt.nativeItemArt:not(.foodGridArt){
 position:absolute;inset:2px;width:calc(100% - 4px)!important;height:calc(100% - 4px)!important;
 max-width:none!important;max-height:none!important;margin:0!important;object-fit:contain!important;
}

/* Material stacks fill the slot's inner frame at every responsive grid size.
   Contain preserves each source silhouette; labels and quantities stay above. */
:is(.packItem,.stashItem,.cubePlaced)>.professionMaterialArt,
.cubeMaterial>.materialArtwork{
 position:absolute;
 inset:2px;
 width:calc(100% - 4px)!important;
 height:calc(100% - 4px)!important;
 max-width:none!important;
 max-height:none!important;
 margin:0!important;
 object-fit:contain!important;
 object-position:center;
 image-rendering:pixelated;
 transform:none!important;
}

/* Ingredient grid art previously filled every fractional cell edge. Center
   the native icon, keeping its reserved label/quantity space and drag target. */
.cookingIngredient>.nativeItemArt{
 position:absolute;
 inset:0!important;
 margin:auto;
 max-width:calc(100% - 6px)!important;
 max-height:calc(100% - 6px)!important;
}
.cookingDropSlot>.nativeItemArt{
 position:absolute;
 inset:4px 4px 18px!important;
 margin:auto;
 max-width:calc(100% - 8px)!important;
 max-height:calc(100% - 22px)!important;
}
.recipePreviewSlot>.nativeItemArt{margin:auto}
.beltFoodArt:has(>.nativeItemArt){min-width:32px;min-height:32px}

/* The real consumable popup uses beltFoodArt rather than gearArtStage. Give
   its authored sprite a full 2× illustration; the actual belt stays at 1×. */
#detail .beltFoodArt:has(>.nativeItemArt){
 flex:0 0 64px;
 width:64px;
 height:64px;
 min-width:64px;
 min-height:64px;
}
#detail .beltFoodArt>.nativeItemArt{--native-item-size:64px}
#detail .beltFoodRow:has(>.beltFoodArt>.nativeItemArt)>:not(.beltFoodArt){
 min-width:0;
 overflow-wrap:anywhere;
}

/* Food and ingredients fill their grid frames, including older cooking
   supplies in Shared Stash. Keep the complete image, its aspect ratio and
   original source pixel grid; vendor/detail/hotbar sizes remain independent. */
:is(.packItem,.stashItem)>.foodGridArt{
 display:block;
 position:absolute;
 inset:2px;
 width:calc(100% - 4px)!important;
 height:calc(100% - 4px)!important;
 max-width:none!important;
 max-height:none!important;
 margin:0!important;
 object-fit:contain!important;
 object-position:center;
 image-rendering:pixelated;
 transform:none!important;
}
.cookingIngredient>.nativeItemArt,
.cookingDropSlot>.nativeItemArt,
.recipePreviewSlot>.nativeItemArt{--native-item-size:100%}
#cookingInventory .cookingIngredient>:is(img,svg),
#cookingSlots .cookingDropSlot>:is(img,svg),
.recipePreviewSlot>:is(img,svg){object-fit:contain;object-position:center;transform:none!important}
