.art-frame[data-colour="pink"]{--rim:#f06397}
.art-frame[data-colour="light-blue"]{--rim:#a2d3e4}
.art-frame[data-colour="blue"]{--rim:#2f8bbb}
.art-frame{--hi:color-mix(in srgb,var(--rim),white 50%);--lo:color-mix(in srgb,var(--rim),black 48%);--depth:clamp(6px,.9vw,14px);position:relative;display:block;isolation:isolate;background:var(--rim);padding:var(--depth);border:3px ridge var(--hi);box-shadow:inset 0 0 0 2px var(--lo),inset 0 0 0 4px var(--hi),2px 5px 0 #644c3126,3px 10px 14px #65564224;transform-origin:50% 0}
.art-frame img{display:block;width:100%;height:auto;outline:2px solid var(--lo)}
.art-frame.ornate{--depth:clamp(13px,1.8vw,25px);background:repeating-linear-gradient(45deg,var(--lo) 0 3px,var(--rim) 3px 5px,var(--hi) 5px 6px)}
.art-frame i{position:absolute;width:calc(var(--depth)*1.85);aspect-ratio:1;--motif:url(art/ornament.svg);image-rendering:pixelated;pointer-events:none}
.art-frame i:nth-of-type(1){top:0;left:0}.art-frame i:nth-of-type(2){top:0;right:0;transform:scaleX(-1)}.art-frame i:nth-of-type(3){bottom:0;left:0;transform:scaleY(-1)}.art-frame i:nth-of-type(4){bottom:0;right:0;transform:scale(-1)}
.art-frame.slim{--depth:5px}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
html:not(.motion-off) :is(#gallery-wall button, .gallery-preview a):hover .art-frame{animation:sway .6s ease-out}
}
@keyframes sway{25%{transform:rotate(1.8deg);box-shadow:3px 7px 10px #58412735}60%{transform:rotate(-1deg)}}
.art-frame:is(.rococo,.baroque){--depth:clamp(10px,1.4vw,20px);--out:calc(-.32 * var(--depth))}
.art-frame.rococo{border-radius:clamp(14px,2vw,30px);background:repeating-linear-gradient(40deg,var(--lo) 0 3px,var(--hi) 3px 5px,var(--rim) 5px 8px)}
.art-frame.baroque{background:repeating-linear-gradient(90deg,var(--lo) 0 3px,var(--rim) 3px 6px)}
.art-frame:is(.rococo,.baroque) i{width:calc(var(--depth)*1.9);--motif:url(art/rococo-corner.svg)}
.art-frame.baroque i{--motif:url(art/baroque-corner.svg)}
.art-frame:is(.rococo,.baroque) i:nth-of-type(-n+2){top:var(--out)}
.art-frame:is(.rococo,.baroque) i:nth-of-type(n+3){bottom:var(--out)}
.art-frame:is(.rococo,.baroque) i:nth-of-type(odd){left:var(--out)}
.art-frame:is(.rococo,.baroque) i:nth-of-type(even){right:var(--out)}
.art-frame.baroque:before{content:"";position:absolute;left:50%;bottom:calc(100% - 5px);transform:translateX(-50%);width:clamp(48px,19%,100px);aspect-ratio:88/32;--motif:url(art/baroque-crest.svg);image-rendering:pixelated;pointer-events:none}
/* Preserve each ornament’s original shading and transparent silhouette. */
.art-frame i,.art-frame.baroque::before{
  background:var(--rim) var(--motif) center/contain no-repeat;
  background-blend-mode:luminosity;
  mask:var(--motif) center/contain no-repeat;
}
