/* Controls: the first-paint reveal, content-panel smooth scroll, button feedback and toggle face swaps. */
.container {
    animation: appReveal 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Content panels only: never the canvas viewport. */
.settings-body,
#fs-points-panel,
.coordinates-panel,
.app-modal {
    scroll-behavior: smooth;
}

button {
    transition: background 0.25s ease, color 0.2s ease,
                transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
/* The chat "…" trigger's hover is an ACCENT glow (components/projects/projects.css): this would bury it. */
button:not(:disabled):not(.active):not(.chat-row-menu-btn):hover {
    box-shadow: 0 3px 10px var(--shadow);
    transform: translateY(-1px);
}
button:not(:disabled):active {
    transform: translateY(1px) scale(0.99);
    box-shadow: none;
}
/* The sheen is for accent buttons only; icon/ghost buttons and #blank-color-btn stay flat. */
.controls button:not(#toggle-controls):not(#incognito-toggle):not(#fullscreen-toggle):not(#blank-color-btn):not(:disabled) {
    background-image: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
    background-size: 220% 100%;
    background-repeat: no-repeat;
    background-position: 200% 0;
}
.controls button:not(#toggle-controls):not(#incognito-toggle):not(#fullscreen-toggle):not(:disabled):hover {
    animation: shimmerSweep 0.7s ease;
}

/* Toggle face swap (js/ui/motion.js swapContent): the outgoing face is an ABSOLUTE ghost, so the pinned
   button width holds and nothing in the row moves. */
@keyframes swapGlyphIn { from { opacity: 0; transform: rotate(-115deg) scale(0.55); } to { opacity: 1; transform: none; } }
@keyframes swapLabelIn { from { opacity: 0; transform: translateY(0.55em) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes swapFaceOut { from { opacity: 0.9; transform: none; } to { opacity: 0; transform: translateY(-0.5em) scale(0.86); } }
.swapping { position: relative; }
.swapping > svg { animation: swapGlyphIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) both; }
.swapping > span:not(.swap-ghost) { animation: swapLabelIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) both; }
.swap-ghost {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
    animation: swapFaceOut 0.22s ease-in both;
}
/* Reduced motion skips the ghost; this covers a preference flipped mid-swap. */
@media (prefers-reduced-motion: reduce) {
    .swapping > svg, .swapping > span:not(.swap-ghost) { animation: none; }
    .swap-ghost { display: none; animation: none; }
}
