/* ============================================================
   かぜXONE — loader.css
   Glass loader (design from loader.html). Self-contained: fixed colors,
   no theme variables, so it looks the same before the theme loads.
   Every class is prefixed "kxl-" to avoid clashing with the app.
   ============================================================ */

.kxl-wrap{
  position:fixed;inset:0;z-index:99999;overflow:hidden;
  background:radial-gradient(circle at 50% 45%,#181818 0%,#090909 38%,#020202 100%);
  color:#fff;font-family:'Inter',Arial,Helvetica,sans-serif;
  transition:opacity .6s ease,visibility .6s ease;
}
.kxl-wrap.kxl-hide{opacity:0;visibility:hidden;pointer-events:none}
.kxl-wrap *{box-sizing:border-box;margin:0;padding:0}

/* ----- background ----- */
.kxl-bg{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.kxl-glow{
  position:absolute;width:420px;height:420px;left:50%;top:50%;
  transform:translate(-50%,-50%);background:rgba(255,255,255,.045);
  filter:blur(100px);border-radius:50%;animation:kxlGlow 4s ease-in-out infinite;
}
@keyframes kxlGlow{
  0%,100%{transform:translate(-50%,-50%) scale(.8);opacity:.35}
  50%{transform:translate(-50%,-50%) scale(1.15);opacity:.7}
}
.kxl-particles{position:absolute;inset:0}
.kxl-particles span{
  position:absolute;width:2px;height:2px;background:#fff;border-radius:50%;
  opacity:.25;animation:kxlFloat linear infinite;
}
.kxl-particles span:nth-child(1){left:12%;top:80%;animation-duration:7s}
.kxl-particles span:nth-child(2){left:23%;top:60%;animation-duration:9s}
.kxl-particles span:nth-child(3){left:38%;top:90%;animation-duration:6s}
.kxl-particles span:nth-child(4){left:51%;top:70%;animation-duration:10s}
.kxl-particles span:nth-child(5){left:67%;top:85%;animation-duration:8s}
.kxl-particles span:nth-child(6){left:79%;top:65%;animation-duration:11s}
.kxl-particles span:nth-child(7){left:91%;top:82%;animation-duration:7s}
.kxl-particles span:nth-child(8){left:46%;top:55%;animation-duration:12s}
@keyframes kxlFloat{
  0%{transform:translateY(80px) scale(.5);opacity:0}
  30%{opacity:.4}
  70%{opacity:.15}
  100%{transform:translateY(-300px) scale(1);opacity:0}
}

/* ----- glass card ----- */
.kxl-center{position:absolute;inset:0;display:flex;justify-content:center;align-items:center}
.kxl-card{
  position:relative;width:340px;min-height:390px;
  display:flex;flex-direction:column;justify-content:center;align-items:center;
  background:linear-gradient(135deg,rgba(255,255,255,.09),rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.13);border-radius:28px;
  backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);
  box-shadow:0 30px 80px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.12),inset 0 -1px 0 rgba(255,255,255,.025);
  overflow:hidden;
}
.kxl-card::before{
  content:"";position:absolute;width:180%;height:100px;left:-40%;top:-70px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.12),transparent);
  transform:rotate(-12deg);animation:kxlReflect 5s ease-in-out infinite;
}
@keyframes kxlReflect{
  0%,45%{transform:translateX(-40%) rotate(-12deg)}
  65%,100%{transform:translateX(40%) rotate(-12deg)}
}

/* ----- orbital loader ----- */
.kxl-core-wrap{position:relative;width:150px;height:150px;display:flex;justify-content:center;align-items:center;margin-bottom:35px}
.kxl-core{
  width:64px;height:64px;border-radius:50%;
  background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.35),rgba(255,255,255,.08) 40%,rgba(0,0,0,.5) 100%);
  border:1px solid rgba(255,255,255,.25);
  box-shadow:inset 8px 8px 20px rgba(255,255,255,.08),inset -10px -10px 20px rgba(0,0,0,.5),0 0 40px rgba(255,255,255,.08);
  animation:kxlCore 2.2s ease-in-out infinite;
}
@keyframes kxlCore{0%,100%{transform:scale(.85)}50%{transform:scale(1.08)}}

.kxl-orbit{
  position:absolute;width:135px;height:55px;border:1px solid rgba(255,255,255,.22);
  border-radius:50%;transform:rotate(25deg);animation:kxlOrbit1 3s linear infinite;
}
.kxl-orbit::after{
  content:"";position:absolute;width:7px;height:7px;background:#fff;border-radius:50%;
  top:-4px;left:50%;box-shadow:0 0 12px #fff,0 0 25px rgba(255,255,255,.5);
}
@keyframes kxlOrbit1{
  from{transform:rotate(25deg) rotateX(65deg)}
  to{transform:rotate(385deg) rotateX(65deg)}
}
.kxl-orbit.two{
  width:105px;height:105px;transform:rotate(65deg);border-color:rgba(255,255,255,.1);
  animation:kxlOrbit2 4.5s linear infinite reverse;
}
.kxl-orbit.two::after{width:5px;height:5px;top:50%;left:-3px}
@keyframes kxlOrbit2{from{transform:rotate(65deg)}to{transform:rotate(425deg)}}
.kxl-orbit.three{
  width:145px;height:145px;border-style:dashed;border-color:rgba(255,255,255,.07);
  animation:kxlOrbit3 12s linear infinite;
}
.kxl-orbit.three::after{display:none}
@keyframes kxlOrbit3{from{transform:rotate(0)}to{transform:rotate(360deg)}}

/* ----- text ----- */
.kxl-title{font-size:14px;font-weight:700;letter-spacing:5px;text-transform:uppercase;margin-bottom:10px}
.kxl-status{height:18px;color:#888;font-size:11px;letter-spacing:2px;text-transform:uppercase;white-space:nowrap}
.kxl-dots span{display:inline-block;animation:kxlDots 1.5s infinite}
.kxl-dots span:nth-child(2){animation-delay:.2s}
.kxl-dots span:nth-child(3){animation-delay:.4s}
@keyframes kxlDots{0%,60%,100%{opacity:.2}30%{opacity:1}}

/* ----- progress ----- */
.kxl-progress{width:230px;margin-top:28px}
.kxl-track{width:100%;height:2px;background:rgba(255,255,255,.08);border-radius:20px;overflow:hidden}
.kxl-bar{width:0;height:100%;background:#fff;box-shadow:0 0 10px rgba(255,255,255,.6)}
.kxl-info{display:flex;justify-content:space-between;margin-top:9px;font-size:9px;letter-spacing:1px;color:#666}
.kxl-brand{font-family:'Noto Sans JP','Hiragino Sans','Yu Gothic','Inter',sans-serif;font-weight:700;letter-spacing:2px;color:#8a8a8a}

/* ----- scan line + corners ----- */
.kxl-scan{
  position:absolute;left:0;width:100%;height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);
  animation:kxlScan 3.5s ease-in-out infinite;
}
@keyframes kxlScan{
  0%{top:-5%;opacity:0}15%{opacity:1}50%{opacity:.5}85%{opacity:1}100%{top:105%;opacity:0}
}
.kxl-corner{position:absolute;width:18px;height:18px}
.kxl-corner::before,.kxl-corner::after{content:"";position:absolute;background:rgba(255,255,255,.3)}
.kxl-corner::before{width:18px;height:1px}
.kxl-corner::after{width:1px;height:18px}
.kxl-corner.tl{top:18px;left:18px}
.kxl-corner.tr{top:18px;right:18px;transform:rotate(90deg)}
.kxl-corner.bl{bottom:18px;left:18px;transform:rotate(270deg)}
.kxl-corner.br{bottom:18px;right:18px;transform:rotate(180deg)}

@media (max-width:480px){
  .kxl-card{width:calc(100% - 32px);min-height:370px}
  .kxl-core-wrap{transform:scale(.9)}
  .kxl-progress{width:210px}
}
@media (prefers-reduced-motion:reduce){
  .kxl-wrap *{animation-duration:0s !important;animation-iteration-count:1 !important}
}
