/* Painted before the application bundles load; colors mirror the app shell. */
html {
  --startup-canvas: #e6ebf3;
  --startup-bg: #f8fafc;
  --startup-text: #0f172a;
  --startup-muted: #64748b;
  --startup-accent: #2563eb;
  color-scheme: light;
  background: var(--startup-canvas);
}

html.dark {
  --startup-canvas: #05070b;
  --startup-bg: #0b0d13;
  --startup-text: #f8fafc;
  --startup-muted: #94a3b8;
  --startup-accent: #60a5fa;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not(.light):not(.dark) {
    --startup-canvas: #05070b;
    --startup-bg: #0b0d13;
    --startup-text: #f8fafc;
    --startup-muted: #94a3b8;
    --startup-accent: #60a5fa;
    color-scheme: dark;
  }
}

body:has(.startup-loading) { margin: 0; }

.startup-loading {
  box-sizing: border-box;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 8px;
  place-items: center;
  background: var(--startup-canvas);
  color: var(--startup-text);
  font: 14px/1.5 system-ui, sans-serif;
}

.startup-panel {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: calc(100vh - 16px);
  min-height: calc(100svh - 16px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--startup-text) 9%, transparent);
  border-radius: 12px;
  background: var(--startup-bg);
  box-shadow: 0 8px 20px -10px rgb(15 23 42 / 12%);
}

.startup-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  place-items: center;
}

.startup-mark img { width: 34px; height: 34px; object-fit: contain; }
.startup-title { font-size: 14px; font-weight: 650; }
.startup-caption { margin-top: 5px; color: var(--startup-muted); font-size: 12px; }
.startup-dots { display: flex; gap: 5px; margin-top: 18px; }
.startup-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--startup-accent); animation: startup-pulse 1.2s ease-in-out infinite; }
.startup-dots i:nth-child(2) { animation-delay: .15s; }
.startup-dots i:nth-child(3) { animation-delay: .3s; }
.startup-en, html:not(:lang(zh)) .startup-zh { display: none; }
html:not(:lang(zh)) .startup-en { display: block; }

@keyframes startup-pulse {
  0%, 80%, 100% { opacity: .28; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .startup-dots i { animation: none; opacity: .7; }
}
