/* Glass, captured electricity, and the original Crystal Pikachu. */
body.prestarting{overflow:hidden!important;background:#000!important}
#prestart{position:fixed;inset:0;z-index:20000;display:grid;place-items:center;overflow:hidden;background:#000;color:#f5f7f7;min-height:100svh;isolation:isolate;transition:opacity .65s ease;touch-action:manipulation}
.electric-atmosphere{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 46%,#484b121f,transparent 44%);opacity:.85}
.prestart-center{position:relative;display:flex;flex-direction:column;align-items:center;width:100%;padding:32px 24px calc(32px + env(safe-area-inset-bottom));transform:translateY(-1.5vh);z-index:2}
#pokeball-start{position:relative;display:block;width:clamp(220px,76vw,350px);height:clamp(220px,76vw,350px);aspect-ratio:1/1;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;box-shadow:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;isolation:isolate;outline-offset:9px;transition:transform .2s ease}
#pokeball-start:focus-visible{outline:2px solid #e8ef89}
#pokeball-start:active:not(:disabled){transform:scale(.97)}
#pokeball-start:disabled{opacity:1}
#pokeball-art{display:block;position:relative;width:100%;height:100%;overflow:visible;z-index:2;filter:drop-shadow(0 0 10px #e7df3c30)}
.electric-halo{position:absolute;inset:-16%;border-radius:50%;pointer-events:none;background:radial-gradient(circle,#dbe74616 15%,#e8dc3420 40%,transparent 66%);animation:electric-breathe 4.8s ease-in-out infinite}
.ball-core{transform-origin:160px 160px;transition:opacity .55s ease,transform 1.3s ease}
.electric-pikachu{image-rendering:pixelated;filter:drop-shadow(0 0 3px #fff189);animation:pikachu-float 4.8s ease-in-out infinite}
.ball-lid,.ball-base{transform-box:view-box;transform-origin:50% 50%;transition:transform .85s cubic-bezier(.2,.65,.2,1),opacity .6s ease}
.ball-interior{opacity:0;transition:opacity .35s ease}
.ball-switch{transform-box:fill-box;transform-origin:center;transition:filter .4s ease}
.ambient-arcs,.core-current{opacity:.65;animation:current-breathe 4.8s ease-in-out infinite;filter:drop-shadow(0 0 4px #e4f44d)}
#prestart-caption{font-family:Arial,Helvetica,sans-serif;font-size:clamp(12px,3.4vw,15px);font-weight:400;letter-spacing:.045em;line-height:1.7;text-align:center;margin:24px 0 0;color:#eeeccf;max-width:310px;transition:opacity .3s ease}
#prestart-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#prestart.error #prestart-status{position:static;width:auto;height:auto;clip-path:none;white-space:normal;text-align:center;color:#c5cfb5;font:12px/1.6 Arial,sans-serif;max-width:280px;margin:14px 0 0}
#electric-fx{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}
#electric-lightning{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.electric-strike{opacity:0;fill:none;stroke-linejoin:round;stroke-linecap:round}
.bolt-glow{stroke:#e2ef37;stroke-width:9;opacity:.38;filter:blur(3px)}
.bolt-core{stroke:#fff5ab;stroke-width:2;vector-effect:non-scaling-stroke}
.electric-pulse{position:absolute;inset:0;opacity:0;background:radial-gradient(ellipse at 50% 47%,#fff19255,transparent 72%)}
#electric-ripple{position:absolute;left:50%;top:47%;width:12vmax;height:12vmax;border-radius:50%;border:2px solid #f3f79d;box-shadow:0 0 12px #eff851aa,inset 0 0 20px #5be1cf88;opacity:0;transform:translate(-50%,-50%) scale(.1)}
#electric-veil{position:absolute;inset:0;opacity:0;background:radial-gradient(ellipse at 50% 47%,#96ddc1,#68b4d2 64%,#528ea8);transform:scale(.1);border-radius:50%}
#prestart.opening .ball-lid{transform:translate(0,-72px) rotate(-16deg)}
#prestart.opening .ball-base{transform:translate(6px,32px) rotate(9deg)}
#prestart.opening .ball-interior{opacity:1}
#prestart.opening .ball-switch{filter:drop-shadow(0 0 13px #fff497)}
#prestart.opening .ball-core{transform:translateY(-12px) scale(1.08)}
#prestart.opening .electric-halo{animation:charge-halo 2.2s ease-in forwards}
#prestart.opening .ambient-arcs{animation:charge-arcs 2.1s ease-out forwards}
#prestart.opening .electric-strike,#prestart.opening .electric-pulse{animation:electric-strike .34s ease-out var(--strike-delay) 1 both}
#prestart.opening #electric-ripple{animation:electric-ripple 1.05s cubic-bezier(.15,.7,.2,1) 2.1s 1 both}
#prestart.opening #electric-veil{animation:electric-veil 1s ease-in-out 2.2s 1 both}
#prestart.opening #prestart-caption{opacity:0}
#prestart.leaving{opacity:0;pointer-events:none}
@keyframes electric-breathe{50%{opacity:.55;transform:scale(.95)}}
@keyframes pikachu-float{50%{transform:translateY(-3px)}}
@keyframes current-breathe{50%{opacity:.28}}
@keyframes charge-halo{to{transform:scale(1.65);opacity:.95}}
@keyframes charge-arcs{to{opacity:0;transform:scale(1.12);transform-origin:center}}
@keyframes electric-strike{0%{opacity:0}12%{opacity:1}45%{opacity:.65}100%{opacity:0}}
@keyframes electric-ripple{0%{opacity:0;transform:translate(-50%,-50%) scale(.1)}12%{opacity:.9}100%{opacity:0;transform:translate(-50%,-50%) scale(17)}}
@keyframes electric-veil{0%{opacity:0;transform:scale(.1);border-radius:50%}55%{opacity:.6}100%{opacity:1;transform:scale(1.5);border-radius:0}}
@media(prefers-reduced-motion:reduce){
 #prestart,#pokeball-start,.ball-lid,.ball-base,.ball-core,.ball-interior,.ball-switch,#prestart-caption{transition-duration:.18s!important}
 .electric-pikachu,.electric-halo,.ambient-arcs,.core-current{animation:none!important}
 #electric-lightning,.electric-pulse,#electric-ripple{display:none!important;animation:none!important}
 #prestart.opening .ball-lid{transform:translateY(-28px)}
 #prestart.opening .ball-base{transform:translateY(12px)}
 #prestart.opening .ball-core{transform:none}
 #prestart.opening #electric-veil{animation:none;opacity:.18;transform:none;border-radius:0}
}
#prestart,#prestart *,#boot-splash,#boot-splash *,#start-overlay,#start-overlay *{cursor:none!important}

/* A four-second photographic dissolve, then an indefinite charged hold. */
#pokeball-open{position:absolute;inset:-14%;width:128%;height:128%;object-fit:contain;z-index:4;opacity:0;pointer-events:none;mask-image:radial-gradient(ellipse,#000 42%,#000b 59%,transparent 72%);-webkit-mask-image:radial-gradient(ellipse,#000 42%,#000b 59%,transparent 72%);transition:opacity 4s linear}
#pokeball-art{transition:opacity 4s linear}
#prestart.dissolving #pokeball-open{opacity:1}
#prestart.dissolving:not(.art-failed) #pokeball-art{opacity:0}
#prestart.charged #prestart-caption{animation:charged-caption 2.4s ease-in-out infinite;font-weight:600}
#prestart.charged .electric-halo{animation:charged-halo 3.4s ease-in-out infinite}
#prestart.charged .electric-atmosphere{background:radial-gradient(ellipse at 50% 46%,#b68b142b,transparent 60%);animation:charged-halo 4.6s ease-in-out infinite}
#prestart.charged #prestart-caption::before,#prestart.charged #prestart-caption::after{content:'ϟ';display:inline-block;margin:0 8px;color:#ffd743;text-shadow:0 0 10px #ff8a00;animation:charged-spark 3s ease-in-out infinite}
#prestart.charged #prestart-caption::after{animation-delay:1.5s}
#prestart.opening #pokeball-open{transform:scale(1.08);transition:transform .65s ease}
#prestart.opening #electric-veil{animation:electric-veil .65s ease-in-out 0s both}
#prestart.opening .electric-strike,#prestart.opening .electric-pulse{animation:none}
@keyframes charged-caption{0%,100%{color:#ffe15a;text-shadow:0 0 7px #ffe65766,0 0 18px #ffb00044}50%{color:#ffad39;text-shadow:0 0 9px #ffd958,0 0 24px #ff8a00aa,0 0 40px #ed730044}}
@keyframes charged-halo{50%{opacity:.45;transform:scale(1.07)}}
@keyframes charged-spark{0%,100%{opacity:.3;transform:translateY(2px)}50%{opacity:1;transform:translateY(-2px)}}
@media(prefers-reduced-motion:reduce){#prestart.charged #prestart-caption,#prestart.charged #prestart-caption::before,#prestart.charged #prestart-caption::after,#prestart.charged .electric-atmosphere{animation:none!important;color:#ffda55;text-shadow:0 0 8px #c89437}#pokeball-art,#pokeball-open{transition:opacity 4s linear!important}}

.boot-ready{display:none}.boot-loading{color:#fff}#prestart.charged .boot-loading{display:none}#prestart.charged .boot-ready{display:inline}.boot-spinner{position:relative;width:28px;height:28px;margin:12px 0 0;display:block}.boot-spinner i{position:absolute;left:12px;top:1px;width:3px;height:7px;border-radius:2px;background:#fff;transform-origin:1.5px 13px;transform:rotate(calc(var(--spoke)*30deg));animation:boot-spin 1.2s linear infinite;animation-delay:calc(var(--spoke)*.1s - 1.2s)}#prestart.charged .boot-spinner{visibility:hidden}#prestart:not(.charged) #prestart-caption{color:#fff}@keyframes boot-spin{0%{opacity:1}100%{opacity:.15}}@media(prefers-reduced-motion:reduce){.boot-spinner i{animation:none;opacity:.5}}
