:root { --motion-arrival: cubic-bezier(.16, 1, .3, 1); }
.motion-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 3;
    min-width: 66px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #9b9ef1;
    border-radius: 10px;
    background: #272940;
    color: var(--cream);
    font: 700 14px/1.2 "FFAWorld Rounded", Arial, sans-serif;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 220ms var(--motion-arrival), visibility 180ms;
}
.motion-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.motion-top:hover { background: #44476a; }
.motion-top:focus-visible { outline: 3px solid var(--cream); outline-offset: 5px; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .artwork-open img { transition: transform 450ms var(--motion-arrival); }
    .artwork-open:hover img, .artwork-open:focus-visible img { transform: scale(1.045); }
    .home-button, .nav-button, .social-link { transition: transform 180ms var(--motion-arrival), background-color 160ms, box-shadow 180ms; }
    .home-button:hover, .nav-button:hover, .social-link:hover { transform: translateY(-4px); box-shadow: 0 10px 24px #13142540; }
    .home-button:active, .nav-button:active, .social-link:active { transform: translateY(0); }
    .artwork-dialog[open] { animation: ffaworld-viewer-arrival 260ms var(--motion-arrival); }
    .artwork-dialog[open]::backdrop { animation: ffaworld-backdrop-arrival 220ms ease-out; }
}
@keyframes ffaworld-viewer-arrival {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: none; }
}
@keyframes ffaworld-backdrop-arrival { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .motion-top { transform: none; transition: opacity 80ms, visibility 80ms; }
}
