/* The same decorative layers render in the gallery and on a published feed. */
.profile-body[class*="feed-effect-"]:not(.feed-effect-none) {
    isolation: isolate;
}
:is(.profile-body, .gallery-art)[class*="feed-effect-"]:not(.feed-effect-none)::before,
:is(.profile-body, .gallery-art)[class*="feed-effect-"]:not(.feed-effect-none)::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    background-repeat: no-repeat;
}
/* Gallery effects stay inside each thumbnail, including a modal's top layer. */
.gallery-art[class*="feed-effect-"]:not(.feed-effect-none)::before,
.gallery-art[class*="feed-effect-"]:not(.feed-effect-none)::after {
    position: absolute;
}

/* Miniature layout is scoped to the editor stylesheet. */
.gallery-art.feed-avatar-rounded .gallery-avatar { border-radius: 24%; }
.gallery-art.feed-avatar-square .gallery-avatar { border-radius: 0; }

/* Aurora: broad light ribbons stay behind the high-contrast glass cards. */
:is(.profile-body, .gallery-art).feed-effect-aurora::before {
    background-image: radial-gradient(ellipse at 12% 12%, #5fffc445, transparent 48%), radial-gradient(ellipse at 86% 32%, #8297ff42, transparent 46%), radial-gradient(ellipse at 38% 95%, #36a5ac3d, transparent 52%);
    background-size: 135% 130%;
    background-position: 0% 15%;
}
:is(.profile-body, .gallery-art).feed-effect-aurora::after {
    background-image: linear-gradient(118deg, transparent 12%, #a5ffd710 27%, transparent 42%, #a9a4ff12 62%, transparent 80%);
}
.feed-effect-aurora .bio-link,
.feed-effect-aurora .social-card,
.feed-effect-prism .bio-link { backdrop-filter: blur(12px); }
.feed-effect-aurora .bio-avatar { box-shadow: 0 0 0 7px #6ee7c310, 0 0 45px #6ee7c32b; }
.feed-effect-aurora.feed-motion::before { animation: feed-aurora-drift 22s ease-in-out infinite alternate; }

/* Orbit: oversized rings frame the content without covering the controls. */
:is(.profile-body, .gallery-art).feed-effect-orbit::before {
    background-image: radial-gradient(ellipse at 50% 27%, transparent 32%, #a1b8ff33 32.15%, transparent 32.45%, transparent 44%, #a1b8ff22 44.15%, transparent 44.45%, transparent 58%, #a1b8ff16 58.15%, transparent 58.45%);
    background-size: 150% 105%;
    background-position: 50% 0%;
}
:is(.profile-body, .gallery-art).feed-effect-orbit::after {
    background-image: radial-gradient(circle at 20% 22%, #d7e3ff 0 2px, transparent 3px), radial-gradient(circle at 83% 62%, #a1b8ff 0 3px, transparent 4px), radial-gradient(ellipse at 50% 0%, #4d70ba22, transparent 55%);
}
.feed-effect-orbit .bio-avatar { outline: 1px solid #a1b8ff77; outline-offset: 7px; margin-top: 8px; margin-bottom: 21px; }
.feed-effect-orbit.feed-motion::before { animation: feed-orbit-drift 28s ease-in-out infinite alternate; }

/* Prism: opalescent panels and a gentle diagonal wash. */
:is(.profile-body, .gallery-art).feed-effect-prism::before {
    background-image: linear-gradient(125deg, #ffc9ec55 5%, transparent 30%, #c0eeff77 55%, transparent 73%, #d2c7ff88 96%);
    background-size: 180% 180%;
    background-position: 15% 35%;
}
:is(.profile-body, .gallery-art).feed-effect-prism::after {
    background-image: linear-gradient(32deg, transparent 38%, #ffffff55 38.1%, #ffffff08 59%, transparent 59.1%), linear-gradient(148deg, transparent 72%, #ffffff66 72.1%, transparent 91%);
}
.feed-effect-prism .bio-avatar { box-shadow: -6px 5px 0 #e6c7ef77, 6px -5px 0 #b8e8f477; }
.feed-effect-prism.feed-motion::before { animation: feed-prism-shift 25s ease-in-out infinite alternate; }

/* Mesh: softly moving peach, rose and honey forms. */
:is(.profile-body, .gallery-art).feed-effect-mesh::before {
    background-image: radial-gradient(ellipse at 15% 10%, #f4ad7366, transparent 43%), radial-gradient(ellipse at 90% 42%, #ed9ebe66, transparent 47%), radial-gradient(ellipse at 20% 85%, #ffe9a499, transparent 45%);
    background-size: 135% 140%;
    background-position: 30% 25%;
}
:is(.profile-body, .gallery-art).feed-effect-mesh::after {
    background-image: radial-gradient(circle at 84% 14%, transparent 0 9%, #fff5e833 9.1% 13%, transparent 13.1%);
}
.feed-effect-mesh .bio-avatar { box-shadow: 0 0 0 9px #fff8ed66; }
.feed-effect-mesh.feed-motion::before { animation: feed-mesh-float 24s ease-in-out infinite alternate; }

/* Stars: sparse steady points, moving slowly as one layer, never flashing. */
:is(.profile-body, .gallery-art).feed-effect-stars::before {
    background-image: radial-gradient(circle at 15% 20%, #f7e7ffb3 0 1px, transparent 1.8px), radial-gradient(circle at 75% 10%, #f7e7ff80 0 1px, transparent 1.8px), radial-gradient(circle at 85% 67%, #d4b3ffb3 0 1px, transparent 1.8px), radial-gradient(circle at 28% 78%, #f7e7ff80 0 1px, transparent 1.8px), radial-gradient(circle at 55% 47%, #d4b3ff66 0 .8px, transparent 1.6px);
    background-size: 260px 310px;
    background-repeat: repeat;
}
:is(.profile-body, .gallery-art).feed-effect-stars::after {
    background-image: radial-gradient(ellipse at 80% 6%, #b97aff26, transparent 42%), radial-gradient(ellipse at 10% 75%, #614a9d33, transparent 45%);
}
.feed-effect-stars .bio-avatar { box-shadow: 0 0 0 6px #d4b3ff12, 0 0 40px #d4b3ff24; }
.feed-effect-stars.feed-motion::before { animation: feed-stars-travel 48s linear infinite; }
.gallery-art.feed-effect-stars::before { background-size: 150px 180px; }
.gallery-art.feed-effect-stars.feed-motion::before { animation-name: feed-stars-travel-mini; }

/* Waves: broad curved contour lines with a very slow tide. */
:is(.profile-body, .gallery-art).feed-effect-waves::before {
    background-image: repeating-radial-gradient(ellipse at -10% 110%, transparent 0 34px, #28788614 35px 36px, transparent 37px 70px);
    background-size: 130% 130%;
    background-position: 0% 60%;
}
:is(.profile-body, .gallery-art).feed-effect-waves::after {
    background-image: radial-gradient(ellipse at 110% 105%, #4d9db92b 0 32%, transparent 32.2%), radial-gradient(ellipse at -30% 110%, #ffffff66 0 38%, transparent 38.2%);
}
.feed-effect-waves .bio-avatar { border-color: #f5fdff; box-shadow: 0 5px 0 #2878862b; }
.feed-effect-waves.feed-motion::before { animation: feed-waves-tide 28s ease-in-out infinite alternate; }
.gallery-art.feed-effect-waves::before { background-image: repeating-radial-gradient(ellipse at -10% 110%, transparent 0 13px, #2878861c 14px 15px, transparent 16px 30px); }

/* Paper: a ruled sheet with restrained stitched card edges. */
:is(.profile-body, .gallery-art).feed-effect-paper::before {
    background-image: repeating-linear-gradient(0deg, transparent 0 31px, #6d513b12 31px 32px);
}
:is(.profile-body, .gallery-art).feed-effect-paper::after {
    background-image: linear-gradient(90deg, transparent 8%, #b6654c26 8%, #b6654c26 calc(8% + 1px), transparent calc(8% + 1px));
}
.feed-effect-paper .bio-link { border-style: dashed; box-shadow: 3px 4px 0 #6d513b0d; }
.feed-effect-paper .bio-avatar { border-color: #fffcf4; box-shadow: 3px 4px 0 #6d513b1a; }
.feed-effect-paper .bio-header h1 { letter-spacing: -.8px; }
.gallery-art.feed-effect-paper::before { background-image: repeating-linear-gradient(0deg, transparent 0 17px, #6d513b16 17px 18px); }
.gallery-art.feed-effect-paper .gallery-links > i { border-style: dashed; box-shadow: 2px 2px 0 #6d513b14; }

/* Neo: graphic corners and black ink, with no movement. */
:is(.profile-body, .gallery-art).feed-effect-neo::before {
    background-image: radial-gradient(circle at 95% 3%, transparent 0 12%, #252b1b 12.1% 12.5%, transparent 12.6% 16%, #252b1b 16.1% 16.5%, transparent 16.6%), linear-gradient(135deg, transparent 93%, #252b1b 93.1% 94%, transparent 94.1% 96%, #252b1b 96.1% 97%, transparent 97.1%);
}
:is(.profile-body, .gallery-art).feed-effect-neo::after {
    background-image: radial-gradient(#252b1b22 .7px, transparent .9px);
    background-size: 12px 12px;
    background-repeat: repeat;
}
.feed-effect-neo .bio-avatar { border: 2px solid #252b1b; box-shadow: 6px 6px 0 #252b1b; margin-bottom: 20px; }
.feed-effect-neo .bio-header h1 { letter-spacing: -1.5px; font-weight: 700; }
.gallery-art.feed-effect-neo .gallery-links > i { border-width: 2px; border-radius: 0; box-shadow: 3px 3px 0 var(--bio-accent); }
.gallery-art.feed-effect-neo .gallery-avatar { box-shadow: 3px 3px 0 var(--bio-accent); }

/* Atelier: a quiet editorial frame and a terracotta signature. */
:is(.profile-body, .gallery-art).feed-effect-atelier::before {
    border-left: clamp(5px, 1.5vw, 22px) solid var(--bio-accent);
    border-right: clamp(5px, 1.5vw, 22px) solid var(--bio-accent);
    background-image: linear-gradient(180deg, #a94a3215, transparent 40%);
}
:is(.profile-body, .gallery-art).feed-effect-atelier::after {
    background-image: radial-gradient(ellipse at 95% 0%, transparent 0 22%, #a94a321c 22.1% 22.3%, transparent 22.4% 27%, #a94a3214 27.1% 27.3%, transparent 27.4%);
}
.feed-effect-atelier .bio-header { padding-bottom: 24px; border-bottom: 1px solid var(--feed-card-border); margin-bottom: 25px; }
.feed-effect-atelier .bio-header h1 { letter-spacing: -1.4px; line-height: 1.15; }
.feed-effect-atelier .bio-link { border-left: 3px solid var(--bio-accent); }
.feed-effect-atelier .bio-avatar { border-radius: 45% 45% 5px 5px; }
.feed-effect-atelier .bio-avatar img { border-radius: inherit; }
.gallery-art.feed-effect-atelier::before { border-width: 7px; }
.gallery-art.feed-effect-atelier .gallery-art-content { align-items: flex-start; }
.gallery-art.feed-effect-atelier .gallery-name { text-align: left; font-family: Georgia, serif; font-size: 18px; }
.gallery-art.feed-effect-atelier .gallery-avatar { border-radius: 45% 45% 2px 2px; }
.gallery-art.feed-effect-atelier .gallery-links > i { border-left: 3px solid var(--bio-accent); border-radius: 0; }

@keyframes feed-aurora-drift { to { background-position: 100% 80%; } }
@keyframes feed-orbit-drift { to { background-position: 60% 100%; } }
@keyframes feed-prism-shift { to { background-position: 85% 65%; } }
@keyframes feed-mesh-float { to { background-position: 85% 90%; } }
@keyframes feed-stars-travel { to { background-position: 0 -310px; } }
@keyframes feed-stars-travel-mini { to { background-position: 0 -180px; } }
@keyframes feed-waves-tide { to { background-position: 100% 0%; } }

@media (max-width: 520px) {
    .feed-effect-atelier .bio-header h1 { font-size: min(var(--feed-title-size), 32px); }
}
@media (prefers-reduced-motion: reduce) {
    :is(.profile-body, .gallery-art)[class*="feed-effect-"]::before,
    :is(.profile-body, .gallery-art)[class*="feed-effect-"]::after {
        animation: none !important;
    }
}
