*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #e8e4de;
}

#app-root {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#studio-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: auto;
  background: transparent;
}

#studio-loading-screen.ready {
  opacity: 0;
  pointer-events: none;
}

.studio-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: min(78vw, 420px);
  padding: 20px 24px;
  border-radius: 18px;
  background: rgba(248, 244, 238, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 35px rgba(50, 45, 60, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#studio-loading-screen.slow-load .studio-loading-overlay {
  opacity: 1;
  transform: translateY(0);
}

.studio-loading-orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(70, 80, 95, 0.18);
  border-top-color: rgba(70, 80, 95, 0.7);
  animation: studio-loading-spin 0.9s linear infinite;
}

.studio-loading-text {
  font-family: Georgia, serif;
  font-size: 16px;
  color: #4f4a43;
}

.studio-loading-subtext {
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(79, 74, 67, 0.8);
}

@keyframes studio-loading-spin {
  to { transform: rotate(360deg); }
}
