/* Loaded before the application: keep incomplete and previous screens out of paint. */
html[data-study-state] { background: var(--bg-primary, #15171b); }
html[data-study-state]:not([data-study-state="ready"]) { overflow: hidden; }
html[data-study-state]:not([data-study-state="ready"]) body > :not(#study-loading) { visibility: hidden !important; }
html body [hidden]:not([hidden="until-found"]) { display: none !important; }
#study-loading { position: fixed; inset: 0; z-index: 2147483647; display: grid; place-items: center; background: var(--bg-primary, #15171b); color: var(--text-primary, #f5f5f6); padding: 24px; }
.study-loading-card { width: min(100%, 360px); text-align: center; font-family: system-ui, sans-serif; }
.study-loading-card img { object-fit: contain; margin-bottom: 18px; }
.study-loading-card h1 { font-size: 21px; line-height: 1.35; margin: 0 0 10px; }
.study-loading-card p { font-size: 14px; line-height: 1.6; color: var(--text-secondary, #aab0b9); }
.study-loading-card button { width: auto; min-height: 44px; margin-top: 20px; padding: 10px 18px; border: 0; border-radius: 10px; background: #ff891f; color: #16191e; font: 600 14px system-ui; cursor: pointer; }
.study-loading-progress { display: block; margin: 24px auto 0; width: 120px; height: 3px; background: linear-gradient(90deg, transparent, #ff891f, transparent); background-size: 200% 100%; animation: study-progress 1.2s ease-in-out infinite; border-radius: 4px; }
@keyframes study-progress { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .study-loading-progress { animation: none; background: #ff891f; } }
