/* The boot screen fills the iframe, without reserving a native scrollbar gutter. */
html.game-booting,
html.game-booting body {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    scrollbar-gutter: auto;
    background: #06131d;
}
html.game-booting #app { width: 100%; height: 100%; }
.career-loading-screen {
    --boot-lime: #d2ff42;
    position: fixed;
    inset: 0;
    z-index: 20;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: max(28px, env(safe-area-inset-top)) max(6vw, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(6vw, env(safe-area-inset-left));
    color: #f0f6fa;
    background: #06131d;
    font-family: 'Barlow', sans-serif;
}
.career-loading-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('assets/hero.webp') center 58% / cover no-repeat;
    filter: saturate(.75) brightness(.85);
}
.career-loading-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #06131df5 0%, #06131dd9 25%, #06131d66 58%, #06131d0d 100%),
        linear-gradient(0deg, #041018f5 0%, transparent 36%, #06131d40 85%),
        radial-gradient(ellipse at 30% 45%, #a5cf1612, transparent 55%);
}
.boot-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: none; }
.boot-brand { display: flex; align-items: center; gap: 11px; }
.boot-brand img { width: 34px; height: 34px; border-radius: 9px; }
.boot-brand span {
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 2px;
    font-weight: 700;
    color: #a4bac8;
}
.boot-brand span { color: #e3edf1; }

.boot-content { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(560px, 62%); padding: 26px 0 36px; min-height: 0; }
.boot-kicker { display: flex; align-items: center; gap: 11px; margin: 0 0 19px; color: var(--boot-lime); font-size: 10px; font-weight: 800; letter-spacing: 2.7px; line-height: 1.4; }
.boot-kicker::before { content: ''; width: 28px; height: 2px; background: currentColor; flex: none; }
.boot-title { margin: 0; width: max-content; max-width: 100%; font: italic 900 clamp(80px, 10.8vw, 158px)/.82 'Rising Star Display', 'Barlow Condensed', sans-serif; letter-spacing: -.025em; padding: 0 .09em .08em 0; text-shadow: 0 5px 35px #0004; }
.boot-title span { display: block; color: var(--boot-lime); }

.boot-progress { width: min(390px, 100%); margin-top: clamp(28px, 5vh, 54px); }
.boot-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 24px; margin-bottom: 12px; }
.boot-status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.boot-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--boot-lime); box-shadow: 0 0 12px #ceff4270; animation: boot-pulse 1.8s ease-in-out infinite; }
#loading-phrase { font-size: 14px; font-weight: 600; line-height: 1.4; color: #e1ebf1; }
#loading-percent { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--boot-lime); }
.boot-progress-track { position: relative; height: 5px; border-radius: 3px; overflow: hidden; background: #90afbf26; }
#loading-fill { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; border-radius: inherit; background: linear-gradient(90deg, #7eae25, var(--boot-lime)); }
.boot-progress-track::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 2px), #06131d 25%); pointer-events: none; }
.boot-progress-caption { display: flex; align-items: center; gap: 7px; margin: 11px 0 0; color: #849dab; font-size: 9px; letter-spacing: 1.8px; line-height: 1.4; font-weight: 700; }
.boot-progress-caption svg { width: 11px; height: 11px; stroke: currentColor; }

@keyframes boot-pulse { 50% { opacity: .35; } }
@media (min-aspect-ratio: 2/1) {
    .boot-title { font-size: clamp(62px, 20vh, 138px); }
    .boot-content { padding: 18px 0; }
    .boot-kicker { margin-bottom: 12px; }

    .boot-progress { margin-top: 24px; }
}
@media (max-width: 600px) and (min-height: 481px) {
    .career-loading-screen { padding: max(22px, env(safe-area-inset-top)) max(25px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(25px, env(safe-area-inset-left)); }
    .career-loading-screen::before { background-position: right center; }
    .career-loading-screen::after { background: linear-gradient(0deg, #041018 0%, #041018f0 15%, #06131d9e 65%, #06131d50 100%), linear-gradient(90deg, #06131da6, #06131d0d); }
    .boot-content { width: 100%; justify-content: flex-end; padding: 30px 0 40px; }
    .boot-title { font-size: clamp(88px, 25vw, 138px); }

    .boot-kicker { max-width: 260px; font-size: 9px; letter-spacing: 2px; }

    .boot-progress { width: 100%; margin-top: 35px; }

}
@media (max-height: 480px) {
    .career-loading-screen { padding: max(16px, env(safe-area-inset-top)) max(5vw, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(5vw, env(safe-area-inset-left)); }
    .boot-brand img { width: 26px; height: 26px; border-radius: 7px; }
    .boot-brand span { font-size: 8px; letter-spacing: 1.5px; }
    .boot-content { width: min(440px, 64%); padding: 16px 0; }
    .boot-title { font-size: clamp(55px, 19vh, 86px); }
    .boot-kicker { margin-bottom: 10px; font-size: 8px; letter-spacing: 1.5px; }

    .boot-progress { margin-top: 18px; }
    .boot-progress-meta { margin-bottom: 7px; min-height: 18px; }
    #loading-phrase { font-size: 12px; }
    #loading-percent { font-size: 11px; }
    .boot-progress-caption { margin-top: 7px; font-size: 8px; }

}
@media (max-width: 400px) and (max-height: 600px) {
    .boot-content { padding-bottom: 28px; }
    .boot-progress { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .boot-status::before { animation: none; }
    #loading-fill { transition: none; }
}
