#app-loading {
  align-items: center;
  background: #f4f7f5;
  color: #10231f;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  gap: 12px;
  inset: 0;
  justify-content: center;
  min-height: 100%;
  opacity: 1;
  position: fixed;
  text-align: center;
  transition: opacity 260ms ease;
  z-index: 9999;
}

#app-loading.is-leaving {
  opacity: 0;
}

#app-loading img {
  animation: aegis-loader-pulse 1800ms ease-in-out infinite;
  filter: drop-shadow(0 18px 28px rgba(6, 61, 49, 0.18));
  height: 84px;
  width: 84px;
}

#app-loading strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

#app-loading span {
  color: #5b6c67;
  font-size: 13px;
}

@keyframes aegis-loader-pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  #app-loading img { animation: none; }
  #app-loading { transition: none; }
}

#app-loading-retry {
  align-items: center;
  background: #0f7b63;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 123, 99, 0.2);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  justify-content: center;
  margin-top: 8px;
  min-height: 42px;
  min-width: 132px;
  padding: 0 22px;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#app-loading-retry:hover {
  background: #0a6652;
  box-shadow: 0 12px 28px rgba(15, 123, 99, 0.28);
  transform: translateY(-1px);
}

#app-loading-retry:active {
  transform: translateY(0);
}

#app-loading-retry:focus-visible {
  outline: 3px solid rgba(15, 123, 99, 0.28);
  outline-offset: 3px;
}

#app-loading-retry[hidden] {
  display: none;
}

#app-loading[data-state="error"] img {
  animation: none;
}

#app-loading[data-state="error"] span {
  color: #8a3b2c;
  max-width: 320px;
}
