#clay-loading {
  position: fixed;
  z-index: 10000;
  color: #6d6457;
  font-family: inherit;
  text-align: center;
  box-sizing: border-box;
}
#clay-loading[hidden], #clay-loading [hidden] { display: none !important; }
/* The loop is a 12 x 10 sprite sheet stepped by two compositor-driven transforms (columns every 62.5 ms,
   rows every 0.75 s), so the clay keeps moving while the main thread builds the place or compiles shaders.
   An animated image would advance only on the main thread and freeze with it. */
#clay-loading .clay-loading-figure { position: relative; display: block; flex: none; aspect-ratio: 5 / 6; overflow: hidden; }
#clay-loading .clay-loading-rows { will-change: transform; animation: clay-loading-rows 7.5s steps(10, end) infinite; }
#clay-loading .clay-loading-sheet { display: block; width: 1200%; height: auto; will-change: transform; animation: clay-loading-frames .75s steps(12, end) infinite; }
#clay-loading[data-paused] .clay-loading-rows, #clay-loading[data-paused] .clay-loading-sheet { animation-play-state: paused; }
@keyframes clay-loading-rows { to { transform: translateY(-100%); } }
@keyframes clay-loading-frames { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
 /* Cottage pose (frame 80: column 8, row 6), the approved still. */
 #clay-loading .clay-loading-rows { animation: none; transform: translateY(-60%); }
 #clay-loading .clay-loading-sheet { animation: none; transform: translateX(-66.6667%); }
}
#clay-loading [data-loading-label] { display: block; line-height: 1.5; }
#clay-loading[data-mode="scene"] {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px;
  background: #f7f4eced;
  pointer-events: auto;
  cursor: progress;
}
#clay-loading[data-mode="scene"] .clay-loading-figure { width: clamp(140px, 19vw, 210px); }
#clay-loading[data-mode="scene"] [data-loading-label] { font-size: 14px; letter-spacing: .01em; }
#clay-loading[data-mode="background"], #clay-loading[data-mode="error"] {
  right: max(18px, env(safe-area-inset-right));
  bottom: max(104px, calc(env(safe-area-inset-bottom) + 92px));
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 144px;
  padding: 0 8px 9px;
  pointer-events: none;
}
#clay-loading[data-mode="background"] .clay-loading-figure { width: 72px; margin: -6px 0 -8px; }
#clay-loading[data-mode="background"] [data-loading-label] { font-size: 11px; }
#clay-loading[data-exiting] { pointer-events: none; }
#clay-loading[data-mode="error"] { border: 1px solid #e7dfd3b3; border-radius: 18px; background: #fffaf1e8; box-shadow: 0 5px 22px #4938240d; width: min(280px, calc(100vw - 24px)); padding: 15px; gap: 10px; pointer-events: auto; }
#clay-loading[data-mode="error"] .clay-loading-figure { display: none; }
#clay-loading[data-mode="error"] [data-loading-label] { font-size: 13px; }
/* The editor could not start its picture at all (main.js): the message is the whole page, not a card over a dead editor. */
body.clay-unsupported { background: #f7f4ec; }
body.clay-unsupported > :not(#clay-loading) { display: none !important; }
body.clay-unsupported #clay-loading[data-mode="error"] { inset: 0; margin: auto; height: fit-content; }
/* Dismiss (the last action, loading-indicator.js) would only leave an empty page here. */
body.clay-unsupported #clay-loading .clay-loading-actions > button:last-child { display: none !important; }
#clay-loading .clay-loading-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
#clay-loading .clay-loading-actions button { padding: 7px 12px; border: 1px solid #ddd4c5; border-radius: 10px; background: #fffdf6; color: #635a4d; font: inherit; font-size: 12px; cursor: pointer; }
#clay-loading .clay-loading-actions button:focus-visible { outline: 2px solid #8b6b4f; outline-offset: 3px; }
@media (max-width: 650px) {
  #clay-loading[data-mode="background"], #clay-loading[data-mode="error"] {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(94px, calc(env(safe-area-inset-bottom) + 82px));
  }
  #clay-loading[data-mode="background"] { width: 126px; }
  #clay-loading[data-mode="background"] .clay-loading-figure { width: 60px; }
}
