/* PokeMath Party sign-in, from the approved Claude Design canvas (Main.dc.html, 15 Nov 2026).
   The background is still. The ball bounces, and the card has the Wizzrd sign-in treatment
   (foil frame, tilt and sheen, sparkles, a light sweep on GO). pokemath.js sizes every layer
   to the window: --s is the ball and card's scale, --c the background's. */
#wait { position: fixed; inset: 0; overflow: hidden; overflow: clip; display: block; padding: 0; text-align: center; font-family: Rubik, system-ui, sans-serif;
  --s: .72; --c: .72; --cx: 50vw; --cy: 35vh;
  background: radial-gradient(circle calc(1057px * var(--c)) at var(--cx) var(--cy), #1c1e52 0%, #0d0e28 38%, #030309 80%) #030309; }
#wait .pm-layer { position: absolute; left: 0; top: 0; width: 1667px; height: 1000px; transform-origin: 0 0; pointer-events: none; }
#wait .pm-bg, #wait .pm-bolts, #wait .pm-lines, #wait .pm-glow { mix-blend-mode: screen; }
#wait .pm-bolts.fade { -webkit-mask: radial-gradient(closest-side at 833px 350px, #000 70%, transparent 100%); mask: radial-gradient(closest-side at 833px 350px, #000 70%, transparent 100%); }

/* stars, bokeh and glints (cover the window) */
#wait .pm-stars div { position: absolute; }
#wait .pm-stars i { position: absolute; inset: 0; border-radius: 50%; }
#wait .pm-glint { position: absolute; mix-blend-mode: screen; filter: blur(.4px); }

/* blurred radial speed lines, centred on the ball; the box is set to cover the window */
#wait .pm-lbox { position: absolute; }
#wait .pm-lines i { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .6; }
#wait .pm-lines i:nth-child(1) { filter: blur(2.52px); background: repeating-conic-gradient(from 0deg at var(--ox) var(--oy), rgba(255,255,255,0) 0deg, rgba(255,255,255,.55) .25deg, rgba(255,255,255,0) .5deg, rgba(255,255,255,0) 2.3deg);
  -webkit-mask: radial-gradient(circle at var(--ox) var(--oy), transparent 295px, #000 620px); mask: radial-gradient(circle at var(--ox) var(--oy), transparent 295px, #000 620px); }
#wait .pm-lines i:nth-child(2) { filter: blur(2.5px); background: repeating-conic-gradient(from 1.1deg at var(--ox) var(--oy), rgba(140,210,255,0) 0deg, rgba(140,210,255,.6) .35deg, rgba(140,210,255,0) .7deg, rgba(140,210,255,0) 3.7deg);
  -webkit-mask: radial-gradient(circle at var(--ox) var(--oy), transparent 310px, #000 560px); mask: radial-gradient(circle at var(--ox) var(--oy), transparent 310px, #000 560px); }
#wait .pm-lines i:nth-child(3) { filter: blur(3.48px); background: repeating-conic-gradient(from 2.4deg at var(--ox) var(--oy), rgba(255,140,230,0) 0deg, rgba(255,140,230,.55) .45deg, rgba(255,140,230,0) .9deg, rgba(255,140,230,0) 5.9deg);
  -webkit-mask: radial-gradient(circle at var(--ox) var(--oy), transparent 330px, #000 640px); mask: radial-gradient(circle at var(--ox) var(--oy), transparent 330px, #000 640px); }
#wait .pm-lines i:nth-child(4) { filter: blur(2.7px); background: repeating-conic-gradient(from 4deg at var(--ox) var(--oy), rgba(255,225,140,0) 0deg, rgba(255,225,140,.55) .55deg, rgba(255,225,140,0) 1.1deg, rgba(255,225,140,0) 8.3deg);
  -webkit-mask: radial-gradient(circle at var(--ox) var(--oy), transparent 300px, #000 520px); mask: radial-gradient(circle at var(--ox) var(--oy), transparent 300px, #000 520px); }
#wait .pm-lines i:nth-child(5) { filter: blur(1.7px); background: repeating-conic-gradient(from 6.2deg at var(--ox) var(--oy), rgba(255,255,255,0) 0deg, rgba(255,255,255,.9) .2deg, rgba(255,255,255,0) .4deg, rgba(255,255,255,0) 11.9deg);
  -webkit-mask: radial-gradient(circle at var(--ox) var(--oy), transparent 290px, #000 380px); mask: radial-gradient(circle at var(--ox) var(--oy), transparent 290px, #000 380px); }

/* glow and shadow under the ball */
#wait .pm-halo, #wait .pm-ring { position: absolute; left: 533px; top: 50px; width: 600px; height: 600px; border-radius: 50%; }
#wait .pm-halo { mix-blend-mode: screen; box-shadow: 0 0 160px 50px rgba(60,160,255,.5), 0 0 260px 80px rgba(150,80,255,.3); }
#wait .pm-ring { box-shadow: 0 0 30px 10px rgba(0,0,0,.75), 0 0 90px 30px rgba(0,0,0,.4); }

/* the bevelled ball */
#wait .pm-ball { position: absolute; left: 543px; top: 60px; width: 580px; height: 580px; border-radius: 50%; box-shadow: 0 26px 44px rgba(0,0,0,.55); animation: pm-bounce 2.6s ease-in-out infinite; will-change: transform; }
#wait .pm-ball .face { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: flex; flex-direction: column; }
#wait .pm-ball .face > i { flex: 1 1 0; }
#wait .pm-ball .top { background: radial-gradient(circle at 34% 40%, #ff5a5a 0%, #e3262e 38%, #a3121a 100%); }
#wait .pm-ball .bot { background: radial-gradient(circle at 34% -30%, #ffffff 35%, #d4d4de 70%, #9c9cab 100%); }
#wait .pm-ball .shine { position: absolute; inset: 0; background: radial-gradient(circle at 30% 24%, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 22%, rgba(0,0,0,0) 55%, rgba(0,0,0,.3) 100%); }
#wait .pm-ball .btn { position: absolute; left: 238px; top: 238px; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #ffffff 30%, #c9c9d4 100%); }
#wait .pm-ball .bevel { position: absolute; inset: 0; filter: drop-shadow(-9px 11px 0 rgba(0,0,0,.26)); }
#wait .pm-ball .bevel > i { position: absolute; background: linear-gradient(150deg, #626288 0%, #31314b 38%, #1a1a25 100%); }
#wait .pm-ball .rim { inset: 0; border-radius: 50%; -webkit-mask: radial-gradient(circle, transparent 271px, #000 272px); mask: radial-gradient(circle, transparent 271px, #000 272px); }
#wait .pm-ball .band { left: 0; top: 272px; width: 580px; height: 36px; background-size: 580px 580px !important; background-position: 0 -272px !important; -webkit-mask: radial-gradient(circle at 290px 18px, transparent 51px, #000 52px); mask: radial-gradient(circle at 290px 18px, transparent 51px, #000 52px); }
#wait .pm-ball .hub { left: 210px; top: 210px; width: 160px; height: 160px; border-radius: 50%; background-size: 580px 580px !important; background-position: -210px -210px !important; -webkit-mask: radial-gradient(circle, transparent 51px, #000 52px); mask: radial-gradient(circle, transparent 51px, #000 52px); }

/* the logo over the ball */
#wait h1.pm-logo { position: absolute; left: 321px; top: 57.5px; width: 1024px; margin: 0; display: flex; flex-direction: column; align-items: center; font-size: 0; line-height: 0; }
#wait .pm-logo img { display: block; filter: drop-shadow(0 14px 26px rgba(0,0,0,.3)); }
#wait .pm-logo .word { width: 1024px; height: 380px; }
#wait .pm-logo .party { width: 500px; height: 155px; margin-top: -68px; }

/* the sign-in card */
#wait .pm-card { position: absolute; left: 0; top: 0; width: 520px; transform-origin: 0 0; }
#wait .pm-frame { position: relative; padding: 4px; border-radius: 30px; box-shadow: 0 0 24px rgba(76,194,255,.45), 0 0 60px rgba(168,76,255,.35), 0 18px 40px rgba(0,0,0,.5); transition: transform .35s cubic-bezier(.2,.7,.3,1); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
#wait .pm-foil { position: absolute; inset: 0; border-radius: 30px; overflow: hidden; }
#wait .pm-foil::before { content: ""; position: absolute; left: 0; top: -100%; width: 300%; height: 300%; background: linear-gradient(115deg, #3b68b2 0%, #4cc2ff 18%, #ff5ad8 34%, #ffcc00 50%, #4cffd2 66%, #a84cff 82%, #3b68b2 100%); animation: pm-shift 6s ease-in-out infinite alternate; }
#wait .pm-sheen { position: absolute; inset: 0; border-radius: 30px; pointer-events: none; mix-blend-mode: overlay; opacity: 0; transition: opacity .3s ease; z-index: 3; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.9) 0%, rgba(255,255,255,.3) 32%, rgba(255,255,255,0) 62%); }
#wait .pm-frame:hover .pm-sheen { opacity: 1; }
#wait .pm-form { position: relative; z-index: 2; padding: 28px 32px 26px; display: flex; flex-direction: column; gap: 16px; border-radius: 26px; background: rgba(10,12,40,.88); overflow: hidden; }
#wait .pm-spark { position: absolute; pointer-events: none; animation: pm-twinkle ease-in-out infinite; filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 8px #4cc2ff); }
#wait .pm-card:has(#signin[hidden]):has(#msg:empty) { visibility: hidden; }
#wait .pm-card:has(#signin[hidden]) .pm-spark { display: none; }

#wait #signin { width: auto; margin: 0; display: flex; flex-direction: column; gap: 16px; }
#wait #signin label { font-family: Bungee, sans-serif; font-size: 15px; letter-spacing: 3px; color: #bfe3ff; text-align: center; text-shadow: 0 0 10px rgba(76,194,255,.8); }
#wait #num, #wait .nabox input { display: block; width: 100%; height: 64px; box-sizing: border-box; padding: 0 20px; border-radius: 16px; border: 3px solid #3b68b2; background: rgba(6,8,28,.85); color: #ffcc00; font-family: Bungee, sans-serif; font-size: 28px; letter-spacing: 6px; text-align: center; outline: none; box-shadow: 0 0 16px rgba(76,194,255,.55) inset, 0 0 14px rgba(76,194,255,.35); }
#wait #num:focus, #wait .nabox input:focus { border-color: #4cc2ff; }
#wait .nabox input { height: 56px; font-family: Rubik, system-ui, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: 1px; }
#wait .nabox input::placeholder { color: #5a78b8; }
#wait #enter, #wait .nago { position: relative; overflow: hidden; height: 66px; padding: 0; border-radius: 18px; border: 4px solid #3b68b2; background: linear-gradient(180deg, #ffe066 0%, #ffcc00 55%, #d4a800 100%); color: #1f2f6b; font-family: Bungee, sans-serif; font-weight: 400; font-size: 30px; letter-spacing: 4px; cursor: pointer; box-shadow: -5px 6px 0 #1f2f6b, 0 0 26px rgba(255,203,5,.55); }
#wait .nago { height: 58px; font-size: 22px; letter-spacing: 2px; background: linear-gradient(180deg, #a6f3ff 0%, #4cc2ff 55%, #2a8fd6 100%); box-shadow: -5px 6px 0 #1f2f6b, 0 0 26px rgba(76,194,255,.55); }
#wait #enter::after, #wait .nago::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.7) 50%, transparent 62%); transform: translateX(-100%); }
#wait #enter:hover::after, #wait .nago:hover::after { animation: pm-wipe .85s ease; }
#wait #enter:active, #wait .nago:active { transform: translate(-3px, 4px); box-shadow: -2px 2px 0 #1f2f6b, 0 0 26px rgba(255,203,5,.55); }
#wait .nanew { align-self: center; padding: 10px 18px; font-family: Bungee, sans-serif; font-weight: 400; font-size: 15px; letter-spacing: 2px; color: #ffffff; background: transparent; border-radius: 12px; border: 2px solid rgba(255,90,216,.7); box-shadow: 0 0 14px rgba(255,90,216,.5); text-shadow: 0 0 8px rgba(255,90,216,.9); cursor: pointer; }
#wait .nanew:hover { border-color: #ff5ad8; }
#wait .nabox { display: grid; gap: 12px; width: 100%; }
#wait .nabox[hidden] { display: none; }
#wait #msg, #wait .nabox .msg { font-family: Rubik, system-ui, sans-serif; font-weight: 700; font-size: 18px; color: #ffe066; text-shadow: 0 0 10px rgba(255,203,5,.6); }
#wait #msg { position: relative; z-index: 2; margin-top: -8px; }
#wait #msg:empty, #wait .nabox .msg:empty { display: none; }

@keyframes pm-shift { 0% { transform: translateX(0); } 100% { transform: translateX(-66.667%); } }
@keyframes pm-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes pm-twinkle { 0%, 100% { opacity: .2; transform: scale(.8) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(15deg); } }
@keyframes pm-wipe { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  #wait .pm-ball, #wait .pm-foil::before, #wait .pm-spark, #wait #enter:hover::after, #wait .nago:hover::after { animation: none; }
  #wait .pm-frame { transition: none; transform: none; }
}
