/* Shared first-paint and React loading geometry. Loaded before the app stylesheet. */
html { scrollbar-gutter: stable; }
/* A non-auto scrollbar color selects the same native gutter width as base.css. */
html { scrollbar-color: color-mix(in srgb, var(--site-accent, var(--startup-accent, #2a9d8f)) 62%, transparent) transparent; }
html::-webkit-scrollbar { width: 8px; height: 8px; }
/* The immersive route removes the page gutter, so reserve none from first paint. */
html[data-cheebly-startup-route='cheeblyverse'] { scrollbar-gutter: auto; }
@media (max-width: 840px) {
  html { scrollbar-width: none !important; }
  html::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
}

.loading-panel {
  --loading-mark-size: 52px;
  --loading-mark-gap: 23px;
  --loading-spinner-size: 14px;
  --loading-spinner-gap: 20px;
  --loading-copy-width: 550px;
  --loading-copy-leading: 25.6px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  transform: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  color: var(--startup-ink, var(--ink, #26302d));
}
.loading-panel.loading-panel-screen-aligned {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 30px 30px max(30px, 10svh);
  background: var(--startup-background, var(--page-background, #fffffd));
}
.loading-panel > .loading-mark {
  display: block;
  flex: 0 0 var(--loading-mark-size);
  width: var(--loading-mark-size);
  height: var(--loading-mark-size);
  margin: 0 0 var(--loading-mark-gap);
}
.loading-panel > .loading-dot {
  display: block;
  box-sizing: border-box;
  flex: 0 0 var(--loading-spinner-size);
  width: var(--loading-spinner-size);
  height: var(--loading-spinner-size);
  margin: 0 0 var(--loading-spinner-gap);
  border: 2px solid var(--startup-spinner-track, #b7d2c8);
  border-top-color: var(--startup-spinner-head, var(--site-accent-dot, #22a88c));
  border-radius: 50%;
  animation: cheebly-startup-spin 800ms linear infinite;
}
.loading-panel > :is(.loading-title, .loading-description) {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 100%;
  max-width: var(--loading-copy-width);
  margin: 0;
  font-size: 16px;
  line-height: var(--loading-copy-leading);
  letter-spacing: normal;
}
.loading-panel > .loading-title {
  min-height: var(--loading-copy-leading);
  font-weight: 700;
  color: var(--startup-ink, var(--ink, #26302d));
}
.loading-panel > .loading-title strong { font-weight: inherit; }
.loading-panel > .loading-description {
  min-height: calc(2 * var(--loading-copy-leading));
  font-weight: 400;
  color: var(--startup-muted, var(--muted, #59635e));
}

/* The CV route shares the same content slots across parser, bootstrap and renderer. */
.cheeblyverse-loading-screen,
html[data-cheebly-startup-route='cheeblyverse'] #cheebly-startup-fallback {
  --cv-loading-background: var(--startup-background, var(--site-accent-surface-page, var(--page-background, #fffffd)));
  --cv-loading-ink: var(--ink, var(--startup-ink, #26302d));
  z-index: 2147483001;
  padding: 30px;
  color: var(--cv-loading-ink) !important;
  background: var(--cv-loading-background) !important;
}
.loading-panel.cheeblyverse-loading-screen { padding: 30px; }
.cheeblyverse-loading-screen .brand-logo-ink,
html[data-cheebly-startup-route='cheeblyverse'] #cheebly-startup-fallback path {
  fill: var(--logo-ink, var(--startup-logo-ink)) !important;
}
.cheeblyverse-loading-screen > .loading-title,
html[data-cheebly-startup-route='cheeblyverse'] #cheebly-startup-fallback > .loading-title {
  color: var(--cv-loading-ink) !important;
  font-weight: 500;
}
.cheeblyverse-loading-screen > .loading-description,
html[data-cheebly-startup-route='cheeblyverse'] #cheebly-startup-fallback > .loading-description { display: none; }
html[data-cheebly-startup-route='cheeblyverse'] #cheebly-startup-fallback[data-state='error'] > .loading-description {
  display: block;
  margin: 14px 0 0;
  color: var(--startup-muted, var(--muted)) !important;
}
@keyframes cheebly-startup-spin { to { transform: rotate(360deg); } }
html[data-cheebly-motion='reduced'] .loading-panel > .loading-dot,
html[data-cheebly-motion='off'] .loading-panel > .loading-dot { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-cheebly-motion='full']) .loading-panel > .loading-dot { animation: none; }
}
