/* Shared by the SPA and every original PHP branch page. */
html body .header,
html body .site-top-bar,
html.theme-dark body .header,
html.theme-dark body .site-top-bar {
    background: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: 0 !important;
}
html body .header::before,
html body .header::after,
html body .site-top-bar::before,
html body .site-top-bar::after { display: none !important; }

/* Legacy branch-page headers become ordinary page headings, not floating bars. */
html body #app > .header {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    padding-block: 20px 0 !important;
}
html body #app > .header + main.main-content {
    padding-top: var(--spacing-xl, 24px) !important;
}

/* Only remove hover displacement; retain color feedback, page/modal animation,
   focus outlines, and positioning transforms used by centered controls. */
html body :is(button, [role="button"], input[type="submit"], input[type="button"], a[class*="btn"], a[class*="button"], a[class*="back"], [onclick], summary, .menu-item, .admin-card, .admin-submodule, .photo-item, .photo-card, .my-card, .leaderboard-item):hover,
html body :is(#app, .site-account-menu) :is(
    button, [role="button"], input[type="submit"], input[type="button"],
    a[class*="btn"], a[class*="button"], a[class*="back"], [onclick],
    summary, .menu-item, .admin-card, .admin-submodule,
    .photo-item, .photo-card, .my-card, .leaderboard-item
):hover,
html body > :is(.modal, .reupload-modal, dialog) :is(button, [role="button"], a[class*="btn"]):hover {
    transform: var(--button-rest-transform, none) !important;
    translate: none !important;
    scale: none !important;
    rotate: none !important;
    box-shadow: none !important;
}
.carousel-btn,
.gallery-search-clear { --button-rest-transform: translateY(-50%); }
/* Homepage carousel arrows were intentionally placed at the top left. */
#homePage .featured-carousel .carousel-btn { --button-rest-transform: none; }
html body .site-top-bar-actions > .site-account-button { margin: 0 0 0 6px; }
