/* Token fallbacks cover the first webview paint, before the application stylesheet loads. */
#native-startup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: max(32px, env(safe-area-inset-top)) 32px max(32px, env(safe-area-inset-bottom));
  background: var(--color-bg-base, #0c0e14);
  color: var(--color-text-primary, #f0f2f5);
  font: 14px/1.5 var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  text-align: center;
}
html[data-theme='light'] #native-startup {
  background: var(--color-bg-base, #f8fafb);
  color: var(--color-text-primary, #111827);
}
#native-startup[hidden] {
  display: none;
}
.native-startup-progress {
  width: 160px;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--color-border-secondary, #374151);
}
.native-startup-progress::after {
  content: '';
  display: block;
  width: 50%;
  height: 100%;
  background: var(--color-brand, #10b981);
  animation: native-startup-progress 1.6s ease-in-out infinite alternate;
}
.native-startup-label {
  min-height: 21px;
}
.native-startup-error {
  display: none;
  max-width: 32ch;
}
.native-startup-error p {
  margin: 0 0 16px;
}
.native-startup-error button {
  min-height: 44px;
  padding: 8px 16px;
  margin: 4px;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.native-startup-error button:hover {
  background: var(--color-bg-elevated, #ffffff0a);
}
.native-startup-error button:focus-visible {
  outline: 2px solid var(--color-brand, #10b981);
  outline-offset: 4px;
}
#native-startup[data-error] .native-startup-error {
  display: block;
}
#native-startup[data-error] .native-startup-progress,
#native-startup[data-error] .native-startup-label {
  display: none;
}
@keyframes native-startup-progress {
  from {
    transform: translateX(-75%);
  }
  to {
    transform: translateX(175%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .native-startup-progress::after {
    animation: none;
    transform: translateX(50%);
  }
}
