/* spec_lr_scene_1124 — the loading scene: opening or switching a study (guide: Loading a study;
   board Loading.dc.html). Colors outside the token set are the board's, held as custom properties. */

.mf-load-cover.lr-scene {
    --lr-scene-sky: linear-gradient(180deg, #0B161B 0%, #0F1C22 22%, #162B35 40%, #24434F 52%, #4C6466 58.5%, #9C8452 62.5%, #3B4339 62.6%, #26302A 74%, #141C19 100%);
    --lr-scene-glow: radial-gradient(ellipse 55% 60% at 50% 62%, rgba(233, 184, 90, 0.42), rgba(233, 184, 90, 0) 70%);
    --lr-scene-haze: linear-gradient(180deg, rgba(120, 130, 120, 0) 0%, rgba(110, 118, 108, 0.28) 22%, rgba(60, 70, 66, 0.18) 45%, rgba(14, 24, 29, 0) 100%);
    --lr-scene-hill-far: #1E3138;
    --lr-scene-hill-near: #17262C;
    --lr-scene-road-0: #8A7652;
    --lr-scene-road-1: #5E5040;
    --lr-scene-road-2: #3D342A;
    --lr-scene-road-3: #2B251F;
    --lr-scene-rut: #1E1A16;
    --lr-scene-edge: #7E8F7C;
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 272px;
    z-index: 95;
    padding: 0;
    opacity: 1;
    overflow: hidden;
    background: none;
    animation: lr-scene-in 300ms ease-out 500ms both;
}
.mf-load-cover.lr-scene.is-shown { animation: none; }
.mf-load-cover.lr-scene.is-leaving { animation: lr-scene-out 300ms ease-in both; }
/* spec_switch_1130 §3 — the scene covers the window beside the sidebar (272px; 220px at 900px and
   under), below the agency bar (56px), over the study bar (z-index 90), under the sidebar (100) */
.app-layout.has-agency-bar .mf-load-cover.lr-scene { top: 56px; }
@media (max-width: 900px) { .mf-load-cover.lr-scene { left: 220px; } }
/* spec_lookfix_1128 — the page behind the scene does not scroll while it is up */
html.lr-scene-on { overflow: hidden; }

.lr-scene__view {
    position: relative;
    height: 100%;
    min-height: 480px;
    overflow: hidden;
    background: var(--lr-scene-sky);
    font-family: var(--font);
}
.lr-scene .mf-load-cover__label,
.lr-scene .mf-load-cover__slow {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.lr-scene__stars, .lr-scene__flies { position: absolute; inset: 0; pointer-events: none; }
.lr-scene__star {
    position: absolute;
    border-radius: var(--radius-round);
    background: var(--on-dark);
    opacity: 0;
    animation: lr-scene-twinkle ease-in-out infinite;
}
.lr-scene__world {
    position: absolute;
    inset: 0;
    transform-origin: 50% 62.5%;
    animation: lr-scene-stroll 14s ease-in-out infinite alternate;
}
.lr-scene__glow { position: absolute; left: 0; right: 0; top: 44%; height: 30%; background: var(--lr-scene-glow); }
.lr-scene__hills { position: absolute; left: 0; top: 50%; width: 100%; height: 13%; filter: blur(1.6px); }
.lr-scene__hill-far { fill: var(--lr-scene-hill-far); opacity: 0.75; }
.lr-scene__hill-near { fill: var(--lr-scene-hill-near); }
.lr-scene__road { position: absolute; left: 0; top: 62.5%; width: 100%; height: 37.5%; filter: blur(1.4px); }
.lr-scene__rd0 { stop-color: var(--lr-scene-road-0); }
.lr-scene__rd1 { stop-color: var(--lr-scene-road-1); }
.lr-scene__rd2 { stop-color: var(--lr-scene-road-2); }
.lr-scene__rd3 { stop-color: var(--lr-scene-road-3); }
.lr-scene__rut0 { stop-color: var(--lr-scene-rut); stop-opacity: 0; }
.lr-scene__rut1 { stop-color: var(--lr-scene-rut); stop-opacity: 0.55; }
.lr-scene__rut { fill: none; stroke-width: 9; stroke-linecap: round; }
.lr-scene__edge { fill: none; stroke: var(--lr-scene-edge); stroke-opacity: 0.35; stroke-width: 10; }
.lr-scene__haze { position: absolute; left: 0; right: 0; top: 50%; bottom: 0; background: var(--lr-scene-haze); }
.lr-scene__fly {
    --shadow-scene-fly: 0 0 var(--g, 8px) calc(var(--g, 8px) / 3) rgba(233, 184, 90, 0.55);
    position: absolute;
    border-radius: var(--radius-round);
    background: var(--glow);
    opacity: 0;
    box-shadow: var(--shadow-scene-fly);
    animation-name: lr-scene-blink, lr-scene-drift;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: normal, alternate;
}

.lr-scene__msg {
    position: absolute;
    left: 0;
    right: 0;
    top: 22%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    color: var(--on-dark);
}
.lr-scene__mark .lr-firefly { width: 44px; height: 33px; animation: lr-scene-hover 2.8s ease-in-out infinite; }
.lr-scene__mark .lr-wing, .lr-scene__brand .lr-wing { fill: var(--mist); }
.lr-scene__head { font-family: var(--font-display); font-size: 34px; font-weight: 500; letter-spacing: -0.02em; }
.lr-scene__sub { font-size: 16px; color: var(--on-dark-soft); }
.lr-scene__head--slow, .lr-scene__sub--slow { display: none; }
.lr-scene.is-slow .lr-scene__head--now { display: none; }
.lr-scene.is-slow .lr-scene__head--slow, .lr-scene.is-slow .lr-scene__sub--slow { display: block; }
.lr-scene__brand {
    position: absolute;
    left: 32px;
    top: 26px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.9;
}
.lr-scene__brand .lr-firefly { width: 30px; height: 23px; }

@keyframes lr-scene-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lr-scene-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes lr-scene-twinkle { 0%, 100% { opacity: 0.08; } 50% { opacity: 0.75; } }
@keyframes lr-scene-stroll { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes lr-scene-blink {
    0%, 100% { opacity: 0; }
    12% { opacity: 0; }
    20% { opacity: 1; }
    28% { opacity: 0.2; }
    36% { opacity: 0.95; }
    46% { opacity: 0; }
}
@keyframes lr-scene-drift { 0% { transform: translate(0, 0); } 100% { transform: translate(14px, -18px); } }
@keyframes lr-scene-hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* reduced motion: nothing moves; the scene still waits half a second and appears without a fade;
   the fireflies and stars hold a faint glow */
@media (prefers-reduced-motion: reduce) {
    .mf-load-cover.lr-scene, .mf-load-cover.lr-scene.is-leaving { animation-duration: 1ms; }
    .lr-scene__world, .lr-scene__star, .lr-scene__fly, .lr-scene__mark .lr-firefly { animation: none; }
    .lr-scene__fly { opacity: 0.55; }
    .lr-scene__star { opacity: 0.4; }
}
