diff --git a/cards/templates/cards/_card_hero_styles.html b/cards/templates/cards/_card_hero_styles.html
new file mode 100644
index 0000000..1322c49
--- /dev/null
+++ b/cards/templates/cards/_card_hero_styles.html
@@ -0,0 +1,38 @@
+
diff --git a/cards/templates/cards/_card_inner_design1.html b/cards/templates/cards/_card_inner_design1.html
index eefa05b..0ac6760 100644
--- a/cards/templates/cards/_card_inner_design1.html
+++ b/cards/templates/cards/_card_inner_design1.html
@@ -7,7 +7,7 @@
{% endif %}
{% if card.image %}
-
+
{% endif %}
{{ card.name }}
diff --git a/cards/templates/cards/_card_inner_design2.html b/cards/templates/cards/_card_inner_design2.html
index 033838b..e131868 100644
--- a/cards/templates/cards/_card_inner_design2.html
+++ b/cards/templates/cards/_card_inner_design2.html
@@ -5,7 +5,7 @@
{% endif %}
{% if card.image %}
-
+
{% endif %}
{{ card.name }}
diff --git a/cards/templates/cards/_card_inner_design3.html b/cards/templates/cards/_card_inner_design3.html
index ac23622..122e0bf 100644
--- a/cards/templates/cards/_card_inner_design3.html
+++ b/cards/templates/cards/_card_inner_design3.html
@@ -5,7 +5,7 @@
{% endif %}
{% if card.image %}
-
+
{% endif %}
{{ card.name }}
diff --git a/cards/templates/cards/base.html b/cards/templates/cards/base.html
index c8c43b3..e17e3a2 100644
--- a/cards/templates/cards/base.html
+++ b/cards/templates/cards/base.html
@@ -124,6 +124,7 @@
.modal .card-form .button.is-primary{min-width:110px}
.modal .card-form .background-picker .bg-option{width:56px;height:40px}
+ {% include 'cards/_card_hero_styles.html' %}
diff --git a/cards/templates/cards/printable.html b/cards/templates/cards/printable.html
index 9a33ef8..e6b00c5 100644
--- a/cards/templates/cards/printable.html
+++ b/cards/templates/cards/printable.html
@@ -27,10 +27,43 @@
because some browsers do not print CSS background-images by default. */
.print-card .print-hero-bg{display:none}
@media print{
+ /* Hide CSS background-images and show the
fallback for reliability */
.print-card .hero-image{background-image:none !important}
.print-card .print-hero-bg{display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0}
- .print-card .toptrump-card{position:relative; z-index:1}
- .print-card img.card-hero-img{position:relative; z-index:2}
+ /* Ensure card content layers above the fallback background */
+ .print-card .toptrump-card{position:relative; z-index:2}
+
+ /* For non-design-4 cards keep the same absolute centering used in preview
+ so the dinosaur image sits in the same place (the inline transform
+ for scale is preserved). We avoid setting `transform` here so an
+ inline `transform` (translate+scale) in the fragment will still apply. */
+ .print-card .toptrump-card:not(.design-4) .hero-image img.card-hero-img {
+ position:absolute;
+ left:50%;
+ top:50%;
+ transform-origin:center;
+ min-width:110%;
+ min-height:110%;
+ width:auto;
+ height:auto;
+ object-fit:cover;
+ z-index:3;
+ }
+
+ /* Design-4 uses a different layout (object-fit:contain) in preview; preserve that */
+ .print-card .toptrump-card.design-4 .card-hero-img{
+ position:static !important;
+ left:auto!important;
+ top:auto!important;
+ transform:none!important;
+ display:block;
+ margin:0 auto;
+ width:120% !important;
+ max-width:none !important;
+ max-height:120% !important;
+ object-fit:contain;
+ z-index:3;
+ }
}
/* Small caption */
.caption{font-size:12px; color:#333; margin-top:6px}
@@ -40,6 +73,7 @@
.no-print{display:none}
}
+ {% include 'cards/_card_hero_styles.html' %}