/* Card dimensions are a presentation rule, independent of a scan's dimensions.
   Contain preserves every printed edge; cover would silently cut off card text. */
img.r2f-card-scan638{
 display:block!important;
 width:100%!important;
 height:auto!important;
 aspect-ratio:var(--r2f-scan-ratio641,5/7)!important;
 object-fit:var(--r2f-scan-fit641,contain)!important;
 object-position:center!important;
 box-sizing:border-box;
}
img.r2f-card-scan638.r2f-landscape638{aspect-ratio:var(--r2f-scan-ratio641,7/5)!important}
/* Equal catalogue/deck slots, including Superstar, regardless of scan size. */
.image-tile .image-add,.zone-cards .image-add{aspect-ratio:5/7!important}
.image-add>img.r2f-card-scan638,.superstar-slot img.r2f-card-scan638{
 width:100%!important;height:100%!important;aspect-ratio:auto!important;
}
#visualCardImage.r2f-card-scan638{
 width:100%!important;max-width:314px!important;max-height:none!important;
 justify-self:center;align-self:start;
}
#visualCardImage.r2f-landscape638{max-width:440px!important}
@media(max-width:650px){#visualCardImage.r2f-card-scan638{max-width:243px!important}#visualCardImage.r2f-landscape638{max-width:340px!important}}
/* Keep intentional stacked peeks; only their complete artwork gets a frame. */
html.full-table490 .ring-type-layer493>img.r2f-card-scan638{height:auto!important}
/* Supersedes the older per-scan natural-size overrides. */
.card.real:has(>img.r2f-card-scan638){min-height:0;align-self:start}
/* Horizontal Pre-match/Mid-match must not inherit a portrait catalogue slot. */
.image-tile .image-add.r2f-landscape-frame638,.zone-cards .image-add.r2f-landscape-frame638{
 aspect-ratio:var(--r2f-scan-ratio641,7/5)!important;
}
.image-add.r2f-landscape-frame638>img.r2f-card-scan638{
 height:auto!important;aspect-ratio:var(--r2f-scan-ratio641,7/5)!important;
}

/* Fit the artwork into the horizontal frame after trimming its padding. */
@supports (object-view-box: inset(0)) {
 img.r2f-card-scan638.r2f-cropped-scan766 {
  object-view-box:var(--r2f-scan-crop766);
  object-fit:contain!important;
 }
}
