/* LBPS FIS Package A v0.2.0: exact confirmed fossil/specimen tile owners.
 * Overrides active Code Snippets #102, #201 and #207 using scoped selectors.
 * NO Kadence/site photography, Locality photos, generic article images,
 * arbitrary WP attachment images, scientific viewer geometries or data writes. */

/* Shared 2:1 presentation for actual specimen-image WELLS. */
html body :is(
 .lbps-db-species-image, .lbps-gua-species-image, .lbps-gaa-species-image,
 .lbps-species-image, .lbps-representative-image,
 .lbps-collection-specimen-image, .lbps-mc-image,
 .lbps-collection-specimen-card .lbps-collection-specimen-image
) {
 box-sizing:border-box !important;
 aspect-ratio:2 / 1 !important;
 min-width:0;
 overflow:hidden !important;
 background-color:var(--lbps-stp-card-bg,#151515) !important;
}
html body :is(
 .lbps-db-species-image, .lbps-gua-species-image, .lbps-gaa-species-image,
 .lbps-species-image, .lbps-representative-image,
 .lbps-collection-specimen-image, .lbps-mc-image
) img {
 box-sizing:border-box !important;
 display:block !important;
 width:100% !important;
 height:100% !important;
 max-width:100% !important;
 max-height:100% !important;
 object-fit:contain !important;
 object-position:center center !important;
 background-color:transparent !important;
}
/* Image-as-well templates: aspect ratio belongs to the img, not caption/card. */
html body .lbps-specimen-gallery .lbps-specimen-thumbnail,
html body .lbps-lfe-image,
html body .lbps-lfe-highlight-image,
html body .lbps-lfe-example-image {
 box-sizing:border-box !important;
 width:100% !important;
 height:auto !important;
 aspect-ratio:2 / 1 !important;
 display:block !important;
 object-fit:contain !important;
 object-position:center center !important;
 background-color:var(--lbps-stp-card-bg,#151515) !important;
}
/* The locality gallery contains site photography; it is deliberately EXCLUDED. */
html body .lbps-lfe-image-wrap:has(> img[data-lbps-stp-theme]),
html body .lbps-representative-image:has(img[data-lbps-stp-theme]),
html body .lbps-collection-specimen-image:has(img[data-lbps-stp-theme]),
html body .lbps-mc-image:has(img[data-lbps-stp-theme]),
html body .lbps-db-species-image:has(img[data-lbps-stp-theme]),
html body .lbps-gua-species-image:has(img[data-lbps-stp-theme]),
html body .lbps-gaa-species-image:has(img[data-lbps-stp-theme]),
html body .lbps-species-image:has(img[data-lbps-stp-theme]) {
 --lbps-stp-card-bg:#151515;
}
html body :is(
 .lbps-lfe-image-wrap, .lbps-representative-image, .lbps-collection-specimen-image,
 .lbps-mc-image, .lbps-db-species-image, .lbps-gua-species-image,
 .lbps-gaa-species-image, .lbps-species-image
):has(img[data-lbps-stp-theme="mid-grey"]) { --lbps-stp-card-bg:#777777; }
html body :is(
 .lbps-lfe-image-wrap, .lbps-representative-image, .lbps-collection-specimen-image,
 .lbps-mc-image, .lbps-db-species-image, .lbps-gua-species-image,
 .lbps-gaa-species-image, .lbps-species-image
):has(img[data-lbps-stp-theme="light-grey"]) { --lbps-stp-card-bg:#D4D4D4; }
html body img[data-lbps-stp-theme="mid-grey"] { --lbps-stp-card-bg:#777777; }
html body img[data-lbps-stp-theme="light-grey"] { --lbps-stp-card-bg:#D4D4D4; }
/* The default #207 selector targets image background with !important; use
 * the exact trusted theme attribute to win, never recolour image pixels. */
html body :is(
 .lbps-db-species-image,.lbps-gua-species-image,.lbps-gaa-species-image,
 .lbps-representative-image,.lbps-collection-specimen-image,.lbps-mc-image,
 .lbps-species-image,.lbps-lfe-image,.lbps-lfe-highlight-image,.lbps-lfe-example-image,
 .lbps-specimen-gallery .lbps-specimen-thumbnail
) img[data-lbps-stp-theme="light-grey"],
html body :is(.lbps-lfe-image,.lbps-lfe-highlight-image,.lbps-lfe-example-image,.lbps-specimen-gallery .lbps-specimen-thumbnail)[data-lbps-stp-theme="light-grey"] {
 background-color:#D4D4D4 !important;
}
html body :is(
 .lbps-db-species-image,.lbps-gua-species-image,.lbps-gaa-species-image,
 .lbps-representative-image,.lbps-collection-specimen-image,.lbps-mc-image,
 .lbps-species-image,.lbps-lfe-image,.lbps-lfe-highlight-image,.lbps-lfe-example-image,
 .lbps-specimen-gallery .lbps-specimen-thumbnail
) img[data-lbps-stp-theme="mid-grey"],
html body :is(.lbps-lfe-image,.lbps-lfe-highlight-image,.lbps-lfe-example-image,.lbps-specimen-gallery .lbps-specimen-thumbnail)[data-lbps-stp-theme="mid-grey"] {
 background-color:#777777 !important;
}
/* Specific My Collection shared/secondary preview wells; do not apply to
 * canvas editors, free-layout plates, thumbnails of ordinary Locality photos. */
html body :is(.lbps-fsib-preview,.lbps-sis-review-image) {
 aspect-ratio:2 / 1 !important;
 background:#151515;
 overflow:hidden;
}
html body :is(.lbps-fsib-preview,.lbps-sis-review-image) img {
 display:block; width:100%; height:100%; object-fit:contain; object-position:center;
}
/* Focus remains visible on cards. Historical taxonomic/accessibility markup
 * and label positions are intentionally left to their original owners. */
html body :is(.lbps-db-species-card,.lbps-gua-species-card,.lbps-gaa-species-card,.lbps-species-result,.lbps-representative-card a,.lbps-collection-specimen-card a):focus-visible {
 outline:3px solid #20564D !important; outline-offset:2px;
}
/* Never use these tile selectors on .lbps-csv-stage[data-mode="true"]. */
