.pvcvr-frame {
    background-color: #111;
}
.pvcvr-frame > .pvcvr-image {
    box-sizing: border-box;
}

/* Re-colour the exact top-left stamp already baked into the photograph. This
   decorative layer never moves or changes the bottom-right golden mark. */
.pvcvr-frame > span.pvcvr-top-watermark[data-pvcvr-top-watermark="1"] {
    position: absolute !important;
    display: block !important;
    z-index: 3;
    opacity: 0;
    pointer-events: none !important;
    user-select: none;
    background-color: transparent !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    transition: opacity 200ms ease;
}
@media (hover: hover) {
    .pvcvr-frame:not(.pvcvr-touch-input):hover > span.pvcvr-top-watermark[data-pvcvr-top-watermark="1"] {
        opacity: .95;
    }
}
/* Keyboard focus works on the photo link and on any descendant control;
   focus-visible prevents a touch tap from leaving a sticky golden state. */
.pvcvr-frame:focus-within:is(:focus-visible, :has(:focus-visible)) > span.pvcvr-top-watermark[data-pvcvr-top-watermark="1"] {
    opacity: .95;
}
.pvcvr-frame.pvcvr-touch-active > span.pvcvr-top-watermark[data-pvcvr-top-watermark="1"] {
    opacity: .95;
}

/* This decorative sibling restores the existing logo only when framing clips
   the stamp embedded in the protected photograph. It never changes that file. */
.pvcvr-frame > img.pvcvr-watermark-overlay[data-pvcvr-watermark="1"] {
    position: absolute !important;
    display: block !important;
    z-index: 2;
    pointer-events: none !important;
    user-select: none;
    object-fit: contain !important;
    object-position: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
}

/* Full photographs determine their own height. The card follows its content
   instead of stretching a landscape photograph into a portrait-sized panel. */
.pvn-site .pvn-profile-card.pvcvr-natural-card {
    align-self: start;
    height: auto !important;
    min-height: 0;
}

/* Keep native grid ordering and filtering. Four columns leave more room for
   each photograph; carousel tracks are deliberately outside this selector. */
.pvn-site .pvp-results-grid.pvcvr-natural-grid {
    grid-template-columns: repeat(var(--pvcvr-catalogue-columns, 4), minmax(0, 1fr));
    align-items: start;
}
.pvn-site .pvp-results-grid.pvcvr-natural-grid.pvcvr-catalogue-configured {
    gap: var(--pvcvr-catalogue-gap, 24px);
}
.pvn-site .pvp-results-grid.pvcvr-natural-grid[data-visible="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 840px;
}
.pvn-site .pvp-results-grid.pvcvr-natural-grid[data-visible="1"] {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1120px;
}
.pvn-site .pvp-results-grid[data-visible="1"] > .pvn-profile-card.pvcvr-natural-card {
    align-items: start;
}
@media (min-width: 701px) and (max-width: 1100px) {
    .pvn-site .pvp-results-grid.pvcvr-natural-grid:not([data-visible="1"]):not([data-visible="2"]) {
        grid-template-columns: repeat(var(--pvcvr-catalogue-tablet-columns, 3), minmax(0, 1fr));
    }
}
@media (max-width: 700px) {
    .pvn-site .pvp-results-grid.pvcvr-natural-grid:not([data-visible="1"]) {
        grid-template-columns: repeat(var(--pvcvr-catalogue-mobile-columns, 2), minmax(0, 1fr));
    }
}
@media (max-width: 540px) {
    .pvn-site .pvp-results-grid.pvcvr-natural-grid,
    .pvn-site .pvp-results-grid.pvcvr-natural-grid:not([data-visible="1"]),
    .pvn-site .pvp-results-grid.pvcvr-natural-grid:not([data-visible="1"]):not([data-visible="2"]) {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* Fixed-size implicit rows allow cards to share vertical space without dense
   backfilling or any change to the DOM, keyboard order or link targets. */
.pvn-site .pvp-results-grid.pvcvr-natural-grid.pvcvr-compact-grid {
    grid-auto-rows: 8px;
    grid-auto-flow: row;
    row-gap: 0;
}
.pvn-site .pvp-results-grid.pvcvr-compact-grid > .pvn-profile-card {
    align-self: start;
    height: auto !important;
    min-height: 0;
}
@media (prefers-reduced-motion: reduce) {
    .pvcvr-frame > .pvcvr-image,
    .pvcvr-frame > span.pvcvr-top-watermark[data-pvcvr-top-watermark="1"] {
        transition: none !important;
    }
}
