/* perf.css — smoothness rules (loaded last). */

/* 1. Background tabs: freeze every CSS animation. */
html.tab-hidden *, html.tab-hidden *::before, html.tab-hidden *::after { animation-play-state: paused !important; }

/* 2. Smoother touch scrolling with no layout thrash from momentum overscroll chaining. */
.thread-messages, .main-column, .project-fullscreen-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* 3. Lite mode (weak / slow / janky devices): no backdrop blur, no decorative glow. */
html.perf-lite *, html.perf-lite *::before, html.perf-lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.perf-lite .app-glow { display: none !important; }
html.perf-lite .creator-dock, html.perf-lite .topbar, html.perf-lite .chat-page .thread-head,
html.perf-lite .thread-compose, html.perf-lite .edit-project-save-bar { background-color: #fff !important; }
html.perf-lite body[data-theme="dark"] .creator-dock, html.perf-lite body[data-theme="dark"] .topbar,
html.perf-lite body[data-theme="dark"] .chat-page .thread-head, html.perf-lite body[data-theme="dark"] .thread-compose,
html.perf-lite body[data-theme="dark"] .edit-project-save-bar { background-color: #181818 !important; }
html.perf-lite .modal-layer, html.perf-lite #storyViewerLayer { background-color: rgba(10, 12, 20, .72) !important; }
html.perf-lite .app-brand .offline-indicator.is-online .offline-indicator-dot { animation: none !important; }
html.perf-lite .project-card, html.perf-lite .feed-card { box-shadow: 0 1px 3px rgba(20, 25, 45, .08) !important; }
