/* Each page has its own original composition. Motion stays outside reading and controls. */
body.community-gallery .community-page-art {
    position: relative; isolation: isolate; max-width: 1320px; width: calc(100% - 40px);
    min-width: 0; height: 230px; margin: 22px auto 28px; overflow: hidden;
    background: #fffdf8; border: 1px solid var(--gallery-line); border-radius: 5px;
}
body.community-gallery .community-page-art__picture { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
body.community-gallery .page-art-svg { display: block; width: 100%; height: 100%; }
body.community-gallery .community-page-art__caption { width: 37%; height: 100%; padding: 32px; display: flex; flex-direction: column; justify-content: center; }
body.community-gallery .community-page-art__title { margin: 0 0 12px; font-family: 'Noto Serif TC','PMingLiU',serif; font-size: clamp(23px,2.3vw,31px); color: var(--gallery-ink) !important; line-height: 1.55; letter-spacing: .06em; }
body.community-gallery .community-page-art__copy { margin: 0; font-size: 14px; color: var(--gallery-ink) !important; line-height: 1.7; }
body.community-gallery .community-page-art__toggle { position: absolute; right: 12px; bottom: 10px; z-index: 3; min-width: 112px; min-height: 44px; padding: 8px 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--gallery-ink) !important; background: #fffdf8f2 !important; border: 1px solid #9ba895 !important; border-radius: 4px; cursor: pointer; line-height: 1.2; box-shadow: none; }
body.community-gallery .community-page-art__toggle span { font-size: 13px !important; color: inherit !important; }
body.community-gallery .community-page-art__toggle:disabled { opacity: .85; cursor: default; }
body.community-gallery .community-page-art.art-layout--diptych { border-radius: 4px 32px 4px 4px; }
body.community-gallery .community-page-art.art-layout--oval { border-radius: 60px 5px 60px 5px; }
body.community-gallery .community-page-art.art-layout--atelier { border-radius: 6px 6px 30px 6px; }
/* Integrate the art into the real page heading rather than add a second heading. */
body.community-gallery .community-art-host { position: relative !important; isolation: isolate; overflow: hidden; background-image: none !important; background-color: #fffdf8 !important; padding-bottom: 66px !important; }
body.community-gallery .community-art-host > :not(.community-page-art) { position: relative; z-index: 1; }
body.community-gallery .community-art-host > .community-page-art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none; margin: 0; border: 0; border-radius: inherit; }
body.community-gallery .community-art-host > .community-page-art .community-page-art__caption { display: none; }
body.community-gallery .community-art-host > .community-page-art .community-page-art__picture { z-index: 0; opacity: .68; }
body.community-gallery .community-art-host > .community-page-art .community-page-art__picture::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,#fffdf8 2%,#fffdf8ed 28%,#fffdf8b0 49%,transparent 77%); }
body.community-gallery .community-art-host > .community-page-art .community-page-art__toggle { bottom: 12px; }
body.community-gallery.community-admin-shell .community-page-art { width: 100%; margin-top: 0; height: 170px; }
body.community-gallery.community-admin-shell .community-page-art__caption { padding: 22px; }
body.community-gallery.community-admin-login-page .community-page-art { width: 100%; margin: 0 0 22px; height: 180px; }
body.community-gallery.community-admin-login-page .community-page-art__caption { width: 42%; padding: 16px; }
body.community-gallery.community-admin-login-page .community-page-art__title { font-size: 21px; }
body.community-gallery.community-admin-login-page .community-page-art__copy { display: none; }
body.community-gallery .community-auth-promo.community-art-host { min-height: 450px; padding-bottom: 70px !important; }
body.community-gallery .community-auth-promo.community-art-host > .community-page-art .community-page-art__picture { opacity: .85; }
body.community-gallery .community-auth-promo.community-art-host .community-auth-promo-copy { background: #fffdf8eb; }
body.community-gallery .ir-featured-card__image > span { background: var(--gallery-ink) !important; color: #fffdf8 !important; }
/* Slow transform-only motion avoids repaint-heavy blur/video assets. */
.page-art-svg :is(.art-sway,.art-float,.art-breathe,.art-orbit,.art-drift,.art-glimmer,.art-petal,.art-rise,.art-flow) { transform-box: fill-box; transform-origin: center; animation-delay: var(--art-delay,0s); animation-play-state: var(--community-art-play,running); }
.page-art-svg .art-sway { animation-name: page-art-sway; animation-duration: 19s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.page-art-svg .art-float { animation-name: page-art-float; animation-duration: 24s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.page-art-svg .art-breathe { animation-name: page-art-breathe; animation-duration: 21s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.page-art-svg .art-orbit { animation-name: page-art-orbit; animation-duration: var(--art-duration,65s); animation-timing-function: linear; animation-iteration-count: infinite; }
.page-art-svg :is(.art-drift,.art-rise) { animation-name: page-art-drift; animation-duration: 30s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.page-art-svg .art-glimmer { animation-name: page-art-glimmer; animation-duration: 18s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.page-art-svg .art-petal { animation-name: page-art-petal; animation-duration: 27s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.page-art-svg .art-flow { animation-name: page-art-flow; animation-duration: 32s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
body.art-document-hidden .page-art-svg g, .community-page-art.is-offscreen .page-art-svg g { animation-play-state: paused !important; }
@keyframes page-art-sway { 0%,100% { transform: rotate(-1.3deg); } 50% { transform: rotate(1.3deg); } }
@keyframes page-art-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes page-art-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.028); } }
@keyframes page-art-orbit { to { transform: rotate(360deg); } }
@keyframes page-art-drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(6px,-5px); } }
@keyframes page-art-glimmer { 0%,100% { opacity: .76; } 50% { opacity: 1; } }
@keyframes page-art-petal { 0%,100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes page-art-flow { 0%,100% { transform: translate(0,0); } 50% { transform: translate(4px,3px); } }
@media (max-width:700px) {
    body.community-gallery .community-page-art { width: calc(100% - 28px); height: 210px; margin: 14px auto 20px; border-radius: 5px; }
    body.community-gallery .community-page-art__picture { top: -16px; bottom: 55px; width: 155%; left: -46%; }
    body.community-gallery .community-page-art__caption { position: absolute; bottom: 0; width: 100%; height: 72px; padding: 12px 14px; background: #fffdf8f2; }
    body.community-gallery .community-page-art__title { font-size: 21px; margin: 0; padding-right: 0; }
    body.community-gallery .community-page-art__copy { display: none; }
    body.community-gallery .community-page-art__toggle { bottom: auto; top: 9px; right: 9px; min-width: 104px; }
    body.community-gallery .community-art-host > .community-page-art { width: 100%; margin: 0; }
    body.community-gallery .community-art-host > .community-page-art .community-page-art__picture { width: 145%; left: -35%; inset-block: 0; opacity: .5; }
    body.community-gallery .community-art-host > .community-page-art .community-page-art__toggle { top: auto; bottom: 10px; }
    body.community-gallery .community-art-host > .community-page-art .community-page-art__picture::after { background: linear-gradient(90deg,#fffdf8ec,#fffdf8c2 46%,transparent); }
    body.community-gallery.community-admin-shell .community-page-art { height: 180px; width: 100%; }
    body.community-gallery.community-admin-login-page .community-page-art { height: 180px; width: 100%; margin-top: 0; }
    body.community-gallery.community-admin-login-page .community-page-art__caption { width: 100%; padding: 12px; }
    body.community-gallery .community-auth-promo.community-art-host { min-height: 285px; }
}
@media (prefers-reduced-motion:reduce) { .page-art-svg g { animation: none !important; } }
