/* Browser boot intro. The native Loading scene owns the Ramos artwork and
 * its single radial progress indicator after the first Cocos frame. */
#splash {
    --sun-intro-size: clamp(64px, 6.6vmax, 110px);
    position: fixed;
    inset: 0;
    z-index: 2147483500;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: #250900;
    color: #ffe0a0;
    font-family: Arial, Helvetica, sans-serif;
}
#splash[data-sun-startup-pending="true"] { display: block !important; }
#splash .loading-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #250900;
}
#splash #spinner {
    position: absolute;
    top: 48%;
    left: 50%;
    width: var(--sun-intro-size);
    height: var(--sun-intro-size);
    margin: 0;
    transform: translate(-50%, -50%);
}
#splash #spinner::before {
    content: "";
    position: absolute;
    inset: -50%;
    border-radius: 50%;
    background: radial-gradient(circle, #fff7ba 0%, #fff4b2d9 27%, #fff1b470 44%, #fff0b000 70%);
    filter: blur(10px);
}
#splash #spinner .logo { position: relative; width: 100%; height: 100%; }
#splash #spinner .logo svg {
    display: block;
    width: 100%;
    height: 100%;
    animation: sun-intro-turn 5s linear infinite;
}
#splash #spinner .bar,
#splash #spinner .logo2,
#splash #spinner .bgColor { display: none; }
@keyframes sun-intro-turn { to { transform: rotate(360deg); } }
#splash .loading-footer {
    position: absolute;
    top: calc(48% + var(--sun-intro-size) / 2 + 24px);
    left: 5%;
    width: 90%;
    box-sizing: border-box;
    color: #ffe0a0;
    font-size: clamp(10px, 1.1vmax, 16px);
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: break-word;
}
#splash .loading-footer p { margin: 0; }
#splash .loading-footer a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    pointer-events: auto;
}
/* Rotate only the intro contents to the same landscape direction as Cocos. */
#GameDiv[data-sunwin-portrait="true"] + #splash .loading-stage {
    inset: auto;
    left: 50%;
    top: 50%;
    width: 100vh;
    height: 100vw;
    width: 100dvh;
    height: 100dvw;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
}
@media (prefers-reduced-motion: reduce) {
    #splash #spinner .logo svg { animation: none; }
}
