/* ---------- loading ---------- */
/* boot splash: boot.js sets --p (0 to 1) and removes it */
#boot { position: fixed; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 14px; overflow: hidden;
  background: linear-gradient(var(--sky-top), #5aa8ff 55%, var(--sky-bottom)); transition: opacity .45s; }
#boot.done { opacity: 0; pointer-events: none; }
#boot .cloud { position: absolute; width: 96px; height: 24px; background: #fff; border-radius: 12px; opacity: .85; box-shadow: 24px -14px 0 4px #fff, 56px -6px 0 0 #fff; }
#boot .cloud:nth-child(1) { top: 14%; left: -20%; }
#boot .cloud:nth-child(2) { top: 30%; left: 60%; transform: scale(.7); opacity: .7; }
#boot .cloud:nth-child(3) { top: 78%; left: 20%; transform: scale(1.2); opacity: .6; }
@media (prefers-reduced-motion: no-preference) { #boot .cloud { animation: drift 26s linear infinite; } #boot .cloud:nth-child(2) { animation-duration: 38s; } #boot .cloud:nth-child(3) { animation-duration: 32s; } }
@keyframes drift { to { translate: 140vw 0; } }
#boot .logo { position: relative; margin-bottom: 18px; }
.hop { position: relative; display: grid; justify-items: center; width: 48px; height: 72px; }
.egg { display: block; width: 48px; height: 56px; image-rendering: pixelated; }
.hop .shadow { position: absolute; bottom: 0; width: 36px; height: 8px; background: rgba(12, 22, 56, .3); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .hop .egg { animation: hop .7s cubic-bezier(.3, 0, .4, 1) infinite; }
  .hop .shadow { animation: hop-shadow .7s cubic-bezier(.3, 0, .4, 1) infinite; }
}
@keyframes hop { 0%, 100% { transform: translateY(12px) scale(1.12, .88); } 15% { transform: translateY(12px) scale(1); } 50% { transform: translateY(-10px) scale(.95, 1.06); } 85% { transform: translateY(12px) scale(1); } }
@keyframes hop-shadow { 0%, 100% { transform: scale(1.1); } 50% { transform: scale(.6); opacity: .5; } }
#boot .word { display: flex; gap: 2px; font: 18px/1 var(--pixel); color: #fff; text-shadow: var(--ol); }
#boot .word span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) { #boot .word span { animation: wave 1.2s ease-in-out infinite; } }
#boot .word span:nth-child(2) { animation-delay: .08s; } #boot .word span:nth-child(3) { animation-delay: .16s; } #boot .word span:nth-child(4) { animation-delay: .24s; }
#boot .word span:nth-child(5) { animation-delay: .32s; } #boot .word span:nth-child(6) { animation-delay: .4s; } #boot .word span:nth-child(7) { animation-delay: .48s; }
@keyframes wave { 0%, 40%, 100% { transform: none; } 20% { transform: translateY(-6px); } }
#boot .bar { position: relative; width: 240px; height: 22px; padding: 3px; background: #fff; border: 3px solid var(--navy); border-radius: 999px; box-shadow: 0 4px 0 var(--navy); }
#boot .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); min-width: 10px; background: linear-gradient(var(--yellow-hi), var(--yellow) 55%, var(--yellow-lo)); border-radius: 999px; transition: width .25s var(--bounce); }
#boot.retry .bar i { background: repeating-linear-gradient(-45deg, #ff8a5c 0 8px, #ff5d5d 8px 16px); }
@media (forced-colors: active) { #boot .bar i { forced-color-adjust: none; background: CanvasText; } }

/* the loading mark while a slow scene change keeps the screen dark */
#busy { position: fixed; right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); z-index: 4; display: flex; align-items: flex-end; gap: 5px; }
#busy .egg { width: 30px; height: 35px; margin-right: 4px; }
#busy i { width: 8px; height: 8px; background: var(--yellow); border: 2px solid #fff; border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  #busy .egg { animation: hop .7s cubic-bezier(.3, 0, .4, 1) infinite; }
  #busy i { animation: wave 1s ease-in-out infinite; }
  #busy i:nth-of-type(2) { animation-delay: .15s; } #busy i:nth-of-type(3) { animation-delay: .3s; }
}
[aria-busy="true"]::after { content: ""; flex: none; width: 14px; height: 14px; margin-left: auto; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite; @media (prefers-reduced-motion: reduce) { animation-duration: 2.8s; } }
@keyframes spin { to { transform: rotate(1turn); } }
