/* Critical CSS — FOUC 防护；色值与 yx-tokens 默认深色对齐（无 var：CSP 外链阶段） */
html, body { margin: 0; padding: 0; background: #030712; color: #e8eefc; overflow: hidden; height: 100%; height: 100dvh; max-height: 100dvh; }
html[data-color-scheme='light'], html[data-color-scheme='light'] body { background: #f4f7ff; color: #0b1220; }
#app { height: 100%; height: 100dvh; max-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: inherit; color: inherit; }
.app-loading {
  position: fixed; inset: 0; background: #030712;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px; color: #e8eefc;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  z-index: 9999;
}
html[data-color-scheme='light'] .app-loading {
  background: #f4f7ff; color: #0b1220;
}
html[data-color-scheme='light'] .app-loading-bar { background: #e2e8f0; }
.app-loading__mark { width: 72px; height: 72px; }
.app-loading__mark svg { display: block; }
.app-loading__orbit {
  transform-box: fill-box; transform-origin: center;
  animation: boot-orbit 1.8s linear infinite;
}
.app-loading__orbit--dash { animation-direction: reverse; animation-duration: 2.4s; }
.app-loading__star {
  transform-box: fill-box; transform-origin: center;
  animation: boot-breathe 1.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.app-loading__trail {
  stroke-dasharray: 80; stroke-dashoffset: 80;
  animation: boot-draw 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.app-loading__brand {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.app-loading__brand-cn {
  font-size: 22px; font-weight: 700; letter-spacing: 0.28em; padding-left: 0.28em;
}
.app-loading-bar {
  width: 200px; height: 2px; background: rgba(148, 180, 255, 0.14); border-radius: 1px; overflow: hidden;
}
.app-loading-bar-inner {
  height: 100%; background: #54a0ff; border-radius: 1px;
  box-shadow: 0 0 12px rgba(84, 160, 255, 0.45);
  animation: load-progress 1.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.app-loading__hint {
  margin: 0; font-size: 13px; font-weight: 400; letter-spacing: 0; color: #8494b8;
}
html[data-color-scheme='light'] .app-loading__hint { color: #64748b; }
.app-loading__hint[hidden] { display: none !important; }
.app-loading__skip {
  min-height: 44px; min-width: 96px; margin-top: 4px;
  padding: 8px 18px; border-radius: 8px;
  border: 1px solid rgba(148, 180, 255, 0.28);
  background: transparent; color: inherit;
  font-size: 14px; font-weight: 600; letter-spacing: 0.06em;
  cursor: pointer; font-family: inherit;
}
.app-loading__skip:hover { border-color: #54a0ff; color: #54a0ff; }
.app-loading--skipped { opacity: 0.72; }
.app-loading--settled .app-loading__trail { animation-duration: 2.2s; }
@keyframes load-progress {
  0%   { width: 0%;   transform: translateX(0); }
  50%  { width: 70%;  transform: translateX(0); }
  100% { width: 100%; transform: translateX(100%); }
}
@keyframes boot-orbit { to { transform: rotate(360deg); } }
@keyframes boot-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.22); }
}
@keyframes boot-draw {
  0% { stroke-dashoffset: 80; opacity: 0.4; }
  45% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -20; opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .app-loading__orbit,
  .app-loading__star,
  .app-loading__trail,
  .app-loading-bar-inner {
    animation: none !important;
  }
  .app-loading__trail { stroke-dashoffset: 0; opacity: 1; }
  .app-loading-bar-inner { width: 70%; }
}
.boot-fallback {
  text-align: center;
  padding: 24px;
  max-width: 360px;
}
.boot-fallback-title { margin-bottom: 12px; }
.boot-fallback-hint {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 20px;
  line-height: 1.5;
}
.boot-fallback-hint--dark { color: #8494b8; }
.boot-fallback-hint--light { color: #64748b; }
.boot-reload-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #54a0ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  font-family: inherit;
}
html[data-color-scheme='light'] .boot-reload-btn {
  background: #2668e8;
}
