/* Loading screen for the league page. The cover is in the page HTML itself (sleeper-page.js), so it's the first thing
   drawn: no blank screen or account-check screen before it. One background colour throughout (the site's purple). */
/* Russo One (SIL Open Font License, Jakob Fischer; self-hosted so the loading screen has it on the first frame). */
@font-face{font-family:'Russo One';font-style:normal;font-weight:400;font-display:block;src:url(/assets/fonts/russo-one-latin.woff2) format('woff2')}
html:has(body.rb-initializing),body.rb-initializing{background:#22103d}
body.rb-initializing{overflow:hidden}
/* Nov 21 (owner: the status line, bug button and test badge showed on the loading background): nothing but the loading screen until it is gone. */
body.rb-initializing #rbTestBadge,body.rb-initializing #rbDiagBtn,body.rb-initializing #status,body:has(#rbReadyCover:not(.rb-ready)) #rbTestBadge,body:has(#rbReadyCover:not(.rb-ready)) #rbDiagBtn{visibility:hidden!important}
body.rb-initializing>.app{visibility:hidden;pointer-events:none}
#rbReadyCover{position:fixed;inset:0;z-index:9998;background:#22103d;display:grid;place-items:center;opacity:1;transition:opacity .25s ease}
#rbReadyCover.rb-ready{opacity:0;pointer-events:none}
.rb-ready-card{width:min(360px,calc(100vw - 40px));padding:24px;border-radius:16px;border:1px solid #4a2a72;background:#30164f;box-shadow:0 28px 80px rgba(0,0,0,.42);text-align:center;font-family:'Archivo Narrow',Inter,system-ui,sans-serif}
.rb-ready-mark{width:72px;height:81px;margin:0 auto 15px;border-radius:16px;overflow:hidden;background:#3a1d63 url('/assets/rb-loading.webp') center/cover no-repeat;border:1px solid #4a2a72}
.rb-ready-title{color:#f4f7fb;font-size:14px;font-weight:900}
.rb-ready-sub{margin-top:8px;color:#B4A6CF;font-size:10px;font-weight:700}
.rb-ready-track{height:5px;margin-top:18px;overflow:hidden;border-radius:999px;background:#1a0b30}
.rb-ready-track span{display:block;width:12%;height:100%;border-radius:inherit;background:#30d8a0;transition:width .18s ease}

/* 3D court (computers): the frame saved on My Leagues first, the live court fading in on top at the same spot. */
#rbReadyCover .rb-court3d-still{position:absolute;inset:-60px;background:center/cover no-repeat;transform-origin:42% 58%}
#rbReadyCover .rb-court3d-still.glide{animation:rbGlide 9s cubic-bezier(.25,.6,.3,1) forwards}@keyframes rbGlide{from{transform:scale(1)}to{transform:scale(1.35)}}
@media (prefers-reduced-motion:reduce){#rbReadyCover .rb-court3d-still.glide{animation:none}}
#rbReadyCover:not(.rb-court) .rb-court3d-still,#rbReadyCover:not(.rb-court) .rb-court3d-shade{display:none}
#rbReadyCover .rb-court3d{position:absolute;inset:-60px;width:calc(100% + 120px);height:calc(100% + 120px);border:0;pointer-events:none;opacity:0;transition:opacity 1.6s ease}
#rbReadyCover .rb-court3d.on{opacity:1;pointer-events:auto;cursor:grab}
#rbReadyCover .rb-court3d.on:active{cursor:grabbing}
#rbReadyCover .rb-court3d-shade{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 55% 45%,rgba(34,16,61,.15),rgba(34,16,61,.75) 80%)}
#rbReadyCover .rb-court3d-credit{position:absolute;left:0;right:0;bottom:14px;z-index:2;text-align:center;font:700 11px/1.4 'Archivo Narrow',system-ui,sans-serif;color:rgba(230,221,247,.7)}
#rbReadyCover .rb-court3d-credit a{color:#ffe28a;text-decoration:none}
/* With the court, the card sits bottom left so the court stays in view (from the very first frame). */
#rbReadyCover.rb-court .rb-ready-card{position:absolute;z-index:2;left:28px;bottom:40px;width:min(320px,calc(100vw - 56px));backdrop-filter:blur(6px);background:rgba(48,22,79,.82)}
/* Into the dashboard: the Matchup is fully drawn underneath; only this screen fades away (card first, then court). */
#rbReadyCover.rb-court{transition:opacity 1s ease .3s}
#rbReadyCover.rb-ready .rb-ready-card{opacity:0;transform:translateY(10px);transition:opacity .3s ease,transform .3s ease}
@media(prefers-reduced-motion:reduce){#rbReadyCover,#rbReadyCover.rb-court,.rb-ready-track span{transition:none}}
/* Coming from My Leagues: draw nothing until the saved frame has decoded, so the court never pops in over a blank
   screen (the browser keeps showing the previous page, the same court view, until then). */
#rbReadyCover.rb-wait{background:transparent}
#rbReadyCover.rb-wait>*{visibility:hidden}

/* Nov 10: the loading screen is the animated RosterBate logo (letters pop up one at a time, the fist pumps) over a thin
   orange progress line. No photo, no clip, no 3D court. */
.rb-ready-card{background:transparent;border:0;box-shadow:none;width:min(520px,calc(100vw - 32px))}
.rb-ready-mark.rb-logo{width:auto;height:auto;margin:0 auto 18px;border:0;border-radius:0;background:none;overflow:visible;display:flex;align-items:center;justify-content:center;gap:0}
.rb-logo span{display:inline-block;font:400 clamp(36px,8vw,56px)/1 'Russo One','Archivo Narrow',system-ui,sans-serif;color:#fff;text-shadow:3px 3px 0 #120822,0 0 18px rgba(255,255,255,.15);animation:rbLtr .5s cubic-bezier(.2,1.6,.4,1) both;animation-delay:calc(var(--i)*.06s)}
.rb-logo span.o{color:#ff8a1a;text-shadow:3px 3px 0 #120822,0 0 22px rgba(255,138,26,.45)}
.rb-logo img{width:clamp(58px,13vw,88px);height:auto;margin-left:6px;transform-origin:20% 90%;animation:rbIn .45s .6s cubic-bezier(.2,1.6,.4,1) both,rbPump .8s 1.05s ease-in-out infinite;filter:drop-shadow(0 0 14px rgba(255,170,40,.55))}
@keyframes rbLtr{from{transform:translateY(40px) scale(.4);opacity:0}to{transform:none;opacity:1}}
@keyframes rbIn{from{transform:translateX(60px) scale(.6);opacity:0}to{transform:none;opacity:1}}
@keyframes rbPump{0%,100%{transform:rotate(0) translateY(0)}50%{transform:rotate(-14deg) translateY(-10px)}}
.rb-ready-title{font-size:15px}
.rb-ready-track{height:8px;width:min(420px,100%);margin:16px auto 0;background:#120822;box-shadow:inset 0 0 0 1.5px #3a2a5a}
.rb-ready-track span{background:linear-gradient(90deg,#ffcf4a,#ff8a1a,#ff3d1a);box-shadow:0 0 12px #ff8a1a}
#rbReadyCover{background:radial-gradient(ellipse at 50% 35%,#3a1766 0%,#22103d 60%,#160a2b 100%)}
@media(prefers-reduced-motion:reduce){.rb-logo span,.rb-logo img{animation:none}}

/* Nov 10: when the page is ready (sleeper-ready-gate.js adds .rb-roll), the fist lets go and a pair of dice tumble out
   beside him; then the loading screen fades. */
.rb-ready-mark.rb-logo{position:relative;width:max-content;max-width:100%;margin-left:auto;margin-right:auto}
.rb-ready-mark.rb-logo.rb-roll img{animation:rbThrow .38s cubic-bezier(.3,0,.3,1) both}
.rb-ready-mark.rb-logo::before,.rb-ready-mark.rb-logo::after{content:"";position:absolute;bottom:2px;width:clamp(15px,3.2vw,21px);height:clamp(15px,3.2vw,21px);background:center/contain no-repeat;filter:drop-shadow(2px 2px 0 rgba(18,8,34,.9)) drop-shadow(0 0 8px rgba(255,170,40,.35));opacity:0}
.rb-ready-mark.rb-logo.rb-roll::before,.rb-ready-mark.rb-logo.rb-roll::after{animation:rbDiceA .8s cubic-bezier(.25,.8,.35,1) both}
.rb-ready-mark.rb-logo::before{right:clamp(-12px,-2vw,-8px);background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='1.2' y='1.2' width='21.6' height='21.6' rx='5' fill='%23ffffff' stroke='%23120822' stroke-width='2'/><circle cx='6.5' cy='6.5' r='2.1' fill='%23120822'/><circle cx='17.5' cy='6.5' r='2.1' fill='%23120822'/><circle cx='12' cy='12' r='2.1' fill='%23120822'/><circle cx='6.5' cy='17.5' r='2.1' fill='%23120822'/><circle cx='17.5' cy='17.5' r='2.1' fill='%23120822'/></svg>");--r:-12deg}
.rb-ready-mark.rb-logo::after{right:clamp(-32px,-5.6vw,-24px);bottom:-1px;background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='1.2' y='1.2' width='21.6' height='21.6' rx='5' fill='%23ff8a1a' stroke='%23120822' stroke-width='2'/><circle cx='6.5' cy='6.5' r='2.1' fill='%23120822'/><circle cx='12' cy='12' r='2.1' fill='%23120822'/><circle cx='17.5' cy='17.5' r='2.1' fill='%23120822'/></svg>");--r:21deg}
.rb-ready-mark.rb-logo.rb-roll::after{animation-name:rbDiceB;animation-delay:.06s}
@keyframes rbThrow{0%{transform:none}45%{transform:rotate(18deg) translate(5px,6px)}100%{transform:none}}
@keyframes rbDiceA{0%{opacity:0;transform:translate(-34px,-26px) rotate(0) scale(.3)}15%{opacity:1}55%{transform:translate(2px,0) rotate(400deg) scale(1)}72%{transform:translate(4px,-7px) rotate(440deg)}88%{transform:translate(5px,0) rotate(calc(360deg + 348deg))}100%{opacity:1;transform:translate(5px,0) rotate(calc(720deg + var(--r)))}}
@keyframes rbDiceB{0%{opacity:0;transform:translate(-56px,-30px) rotate(0) scale(.3)}15%{opacity:1}55%{transform:translate(0,0) rotate(-380deg) scale(1)}72%{transform:translate(3px,-9px) rotate(-420deg)}88%{transform:translate(4px,0) rotate(-700deg)}100%{opacity:1;transform:translate(4px,0) rotate(calc(-720deg + var(--r)))}}
@media(prefers-reduced-motion:reduce){.rb-ready-mark.rb-logo.rb-roll::before,.rb-ready-mark.rb-logo.rb-roll::after{animation:none;opacity:1}.rb-ready-mark.rb-logo.rb-roll img{animation:none}}

/* Nov 10: the finish (rb-ready-finish.js). The meter glides to full, the fist lets go and the dice roll out, then the
   loading text gives way to a yellow "LOCKED AND LOADED" badge that springs in with a flash (a burst of light, a ring and
   a few sparkles), holds, and the cover fades. */
#rbReadyCover.rb-ready{transition:opacity .45s ease}
#rbReadyCover .rb-ready-title.rb-out,#rbReadyCover .rb-ready-sub.rb-out{animation:rbOldOut .18s ease-in both}
@keyframes rbOldOut{to{opacity:0;transform:translateY(-6px)}}
.rb-lal{position:relative;height:0;z-index:2}
.rb-lal .pop{position:absolute;left:0;right:0;top:-6px;text-align:center;white-space:nowrap;pointer-events:none}
.rb-lal .b{position:relative;z-index:2;display:inline-block;font:400 clamp(19px,4.8vw,24px)/1 'Russo One','Archivo Narrow',system-ui,sans-serif;letter-spacing:.06em;color:#120822;background:#FFD21F;border:3px solid #120822;border-radius:999px;padding:8px 22px 6px;box-shadow:5px 5px 0 #E3087A,0 0 18px 2px rgba(255,138,26,.45);animation:rbBadge .5s cubic-bezier(.2,1.8,.4,1) both;will-change:transform}
.rb-lal .b::after{content:"";position:absolute;inset:-6px;border-radius:999px;box-shadow:0 0 40px 14px rgba(255,207,74,.85);opacity:0;animation:rbBGlow2 .7s .03s ease-out both;pointer-events:none}
@keyframes rbBGlow2{0%{opacity:0}30%{opacity:1}100%{opacity:0}}
@keyframes rbBadge{0%{opacity:0;transform:scale(.2) rotate(8deg)}100%{opacity:1;transform:rotate(-2deg)}}
@keyframes rbBGlow{0%{box-shadow:5px 5px 0 #E3087A,0 0 0 0 rgba(255,207,74,0)}30%{box-shadow:5px 5px 0 #E3087A,0 0 40px 14px rgba(255,207,74,.85)}100%{box-shadow:5px 5px 0 #E3087A,0 0 18px 2px rgba(255,138,26,.45)}}
.rb-lal .flash{position:absolute;z-index:1;left:50%;top:20px;width:10px;height:10px;margin:-5px;border-radius:50%;border:3px solid #FFD21F;opacity:0;animation:rbRing .6s ease-out both}
@keyframes rbRing{0%{opacity:.9;transform:scale(1)}100%{opacity:0;transform:scale(42,9)}}
.rb-lal .burst{position:absolute;z-index:0;left:50%;top:20px;width:260px;height:70px;margin:-35px -130px;border-radius:50%;background:radial-gradient(ellipse,rgba(255,240,180,.9),rgba(255,170,40,.35) 45%,transparent 70%);opacity:0;animation:rbBurst .55s ease-out both}
@keyframes rbBurst{0%{opacity:0;transform:scale(.3)}25%{opacity:1;transform:scale(1.15)}100%{opacity:0;transform:scale(1.5)}}
.rb-lal .sp{position:absolute;z-index:3;top:18px;width:8px;height:8px;background:#FFD21F;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);opacity:0;animation:rbSpk .6s ease-out both}
@keyframes rbSpk{0%{opacity:0;transform:translate(0,0) scale(.3)}40%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) scale(1.4)}}
@media(prefers-reduced-motion:reduce){.rb-lal *{animation:none!important;opacity:1}.rb-lal .flash,.rb-lal .burst,.rb-lal .sp{display:none}}

/* Nov 10: a little more room between the text and the meter, so the LOCKED AND LOADED badge doesn't touch it. */
#rbReadyCover .rb-ready-track{margin-top:30px}

/* Nov 11: the loading card's text in Russo One from the first frame (the font is linked in the page head). */
#rbReadyCover .rb-ready-title,#rbReadyLabel{font-family:'Russo One','Archivo Narrow',system-ui,sans-serif!important;font-weight:400!important;letter-spacing:.02em}
#rbReadyCover .rb-ready-sub{font-family:'Russo One','Archivo Narrow',system-ui,sans-serif!important;font-weight:400!important}
/* The cards theme sets font-family:inherit on every element, which beat the logo's font: keep Russo One. */
#rbReadyCover .rb-logo span,#rbReadyCover .rb-ready-title,#rbReadyCover .rb-ready-sub,.rb-lal .b{font-family:'Russo One','Archivo Narrow',system-ui,sans-serif!important;font-style:normal!important}

/* Nov 20 (owner: "i want it on the background of this screen with highlights fit in to the tv screen"): the retro
   bedroom behind the loading screen on computers. The room picture has the TV screen cut out; a short muted clip plays
   underneath it, so the clip takes the exact shape of the screen. .rb-room-on is added by the cover's own script on
   wide screens only; without it nothing here is shown or downloaded. */
#rbReadyCover .rb-room{display:none}
#rbReadyCover.rb-room-on .rb-room{display:block;position:absolute;inset:0;overflow:hidden;background:#160a2b}
/* Nov 25 (owner: "sometimes the screen with the gif loads before everything else"): the room (picture and TV clip) stays
   hidden until both are in, then fades in as one (the cover's start-up script adds .rb-room-shown; 3s at most). */
#rbReadyCover.rb-room-on .rb-room-in{opacity:0;transition:opacity .35s ease}#rbReadyCover.rb-room-on.rb-room-shown .rb-room-in{opacity:1}
#rbReadyCover.rb-room-on .rb-room-in{position:absolute;left:50%;top:50%;width:max(122vw,calc(122vh * 1376 / 768));aspect-ratio:1376/768;transform:translate(-50%,-50%)}
#rbReadyCover.rb-room-on .rb-room-in>video{position:absolute;left:18.1%;top:24.8%;width:17%;height:28.6%;object-fit:cover;background:#0b0616;border:0}
/* Nov 20 (owner: "really crisp ... make it look aged a bit like its from the 90s"). The clip is softened and washed
   out, and the room picture's own background carries, under the picture and so only inside the cut-out screen:
   scanlines, a slow tracking band, dark corners and a warm tint. */
#rbReadyCover.rb-room-on .rb-room-in>video{filter:saturate(.68) contrast(.9) brightness(1.06) sepia(.2) blur(.7px)}
@property --crt-y{syntax:'<percentage>';inherits:false;initial-value:10%}
@keyframes rbCrtBand{from{--crt-y:22%}to{--crt-y:58%}}
#rbReadyCover.rb-room-on .rb-room-art{position:absolute;inset:0;background:url(/assets/loading-room/room-8.webp) center/100% 100% no-repeat,repeating-linear-gradient(to bottom,rgba(0,0,0,.26) 0 1px,rgba(0,0,0,0) 1px 3px) 21.81% 34.73%/17% 28.6% no-repeat,linear-gradient(to bottom,rgba(255,255,255,0),rgba(255,255,255,.10),rgba(255,255,255,0)) 21.81% var(--crt-y,10%)/17% 5% no-repeat,radial-gradient(ellipse at center,rgba(0,0,0,0) 52%,rgba(0,0,0,.5) 100%) 21.81% 34.73%/17% 28.6% no-repeat,linear-gradient(rgba(255,176,96,.12),rgba(70,255,170,.07)) 21.81% 34.73%/17% 28.6% no-repeat,linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0)) 21.81% 25.83%/17% 4% no-repeat,linear-gradient(to top,rgba(0,0,0,.38),rgba(0,0,0,0)) 21.81% 51.71%/17% 3.5% no-repeat;animation:rbCrtBand 5.5s linear infinite}
@media (prefers-reduced-motion:reduce){#rbReadyCover.rb-room-on .rb-room-art{animation:none}}
#rbReadyCover.rb-room-on .rb-room::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse 34% 30% at 50% 50%,rgba(18,8,34,.86) 0 45%,rgba(18,8,34,0) 100%),radial-gradient(ellipse at 27% 40%,rgba(18,8,34,0) 0 22%,rgba(18,8,34,.45) 70%)}
/* The loading card stays exactly where it always was (owner, 12:48 PM: "keep it middle aligned where it was"); only a soft
   dark patch is painted behind it so the text reads over the room. */
#rbReadyCover.rb-room-on .rb-ready-card{position:relative;z-index:2}
