.masthead-reference .masthead-frame {
    background-image: none;
}

.masthead-reference .masthead-frame::before,
.masthead-reference .masthead-frame::after {
    display: none;
}

.rr-masthead-bands {
    --rr-masthead-gold: #f0bf49;
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: .64;
    pointer-events: none;
}

.rr-masthead-bands svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: none;
}

.rr-masthead-photos {
    --rr-masthead-blue-ink: #6083ae;
    --rr-masthead-castle-opacity: .8;
    --rr-masthead-photo-opacity: .72;
    position: absolute;
    inset: 0 0 0 auto;
    width: min(34vw, calc(var(--rr-masthead-height) * 610 / 151));
    isolation: isolate;
    pointer-events: none;
    mask-image: linear-gradient(90deg, transparent, #000 21%);
}

.rr-masthead-slide {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.rr-masthead-slide[hidden] {
    display: none;
}

.rr-masthead-castle {
    opacity: var(--rr-masthead-castle-opacity);
}

.rr-masthead-photo {
    opacity: var(--rr-masthead-photo-opacity);
    object-fit: cover;
    object-position: 55% 50%;
    filter: url(#rr-masthead-photo-ink);
    mask-image: linear-gradient(180deg, transparent, #000 23%, #000 88%, #000c),
        linear-gradient(90deg, transparent, #000 12%, #000 95%, #000b);
    mask-composite: intersect;
}

.rr-masthead-photo-filter {
    position: absolute;
    pointer-events: none;
}

@media screen {
    html[data-rr-theme="dark"] {
        --rr-masthead-photo-ink: #b2c8e5;
    }

    html[data-rr-theme="dark"] .rr-masthead-bands {
        --rr-masthead-gold: #dfbd68;
        opacity: .36;
    }

    html[data-rr-theme="dark"] .rr-masthead-photos {
        --rr-masthead-blue-ink: #b2c8e5;
        --rr-masthead-castle-opacity: .55;
        --rr-masthead-photo-opacity: .64;
    }
}

.masthead-motion-toggle {
    position: absolute;
    inset: auto var(--rr-page-gutter) 3px auto;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--navy);
    background: color-mix(in srgb, var(--paper) 80%, transparent);
    border: 0;
    border-radius: var(--rr-radius-control);
    cursor: pointer;
}

.masthead-motion-toggle:hover { background: var(--paper); }
.masthead-motion-toggle:focus-visible { outline: 2px solid #a37b25; outline-offset: -2px; }
.masthead-motion-toggle .rr-icon { width: 15px; height: 15px; }
.masthead-motion-toggle[hidden],
.masthead-motion-toggle .masthead-motion-play,
.masthead-motion-toggle[aria-pressed="true"] .masthead-motion-pause { display: none; }
.masthead-motion-toggle[aria-pressed="true"] .masthead-motion-play { display: block; }

@media screen and (prefers-reduced-motion: no-preference) {
    .masthead-reference[data-masthead-motion] .jubilee-scene {
        animation: rr-jubilee-fade 18s cubic-bezier(.4, 0, .2, 1) infinite;
        animation-play-state: paused;
    }

    .masthead-reference[data-masthead-motion="running"] .jubilee-scene {
        animation-play-state: running;
    }

    @keyframes rr-jubilee-fade {
        0%, 44.444444%, 100% { opacity: 1; }
        50%, 94.444444% { opacity: 0; }
    }
}

@media screen and (max-width: 1024px) {
    .rr-masthead-bands {
        width: calc(var(--rr-masthead-height) * 180 / 151);
        mask-image: linear-gradient(90deg, #000, transparent 96%);
    }

    .rr-masthead-bands svg {
        width: calc(var(--rr-masthead-height) * 1536 / 151);
    }

    .rr-masthead-photos {
        width: min(47%, calc(var(--rr-masthead-height) * 274 / 151));
        mask-image: linear-gradient(90deg, transparent, #000 45%);
    }

    .masthead-reference .masthead-content:has(.masthead-motion-toggle:not([hidden])) {
        grid-template-columns: minmax(0, 1fr) auto 32px;
    }

    .masthead-motion-toggle {
        position: static;
        grid-column: 3;
    }
}

@media print {
    .rr-masthead-bands, .rr-masthead-photos, .masthead-motion-toggle { display: none; }
}

.rr-masthead-photo-previews:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-block-end: 8px;
}

.rr-masthead-photo-previews figure {
    width: min(100%, 180px);
    margin: 0;
}

.rr-masthead-photo-preview {
    position: relative;
    aspect-ratio: 2.4 / 1;
    overflow: hidden;
    border: 1px solid #c3c4c7;
    background: #fff;
    --rr-masthead-photo-opacity: .72;
}

.rr-masthead-photo-preview--dark {
    background: #333;
    --rr-masthead-photo-opacity: .64;
}

.rr-masthead-photo-preview--dark .rr-masthead-photo {
    filter: url(#rr-masthead-photo-ink) brightness(1.48);
}

[data-rr-masthead-photo-slot] .description {
    margin-block: 0 8px;
}

[data-rr-masthead-photo-slot] button[hidden] {
    display: none;
}
