.torca-loading {
  display: grid;
  place-items: center;
  place-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: max(240px, calc(100svh - 136px));
  padding: 24px;
  justify-self: stretch;
  align-self: stretch;
  grid-column: 1 / -1;
}
.torca-loading-compact { min-height: 225px; }
.torca-loading-start { min-height: 100svh; background: var(--bg, #f1f5f9); }
.torca-loading-scene { width: clamp(172px, 16vw, 208px); aspect-ratio: 1; color: var(--primary, #0799ac); pointer-events: none; }
.torca-loading-global { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 101; }
.torca-loading-compact .torca-loading-scene { width: 136px; }
.torca-loading-emblem { display: block; width: 100%; height: 100%; overflow: visible; }
.torca-logo-trace { stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 0; stroke-linecap: round; }
.torca-logo-turn { transform-box: view-box; transform-origin: 90px 90px; opacity: 1; }
html[data-theme="dark"] .torca-loading-start { background: var(--bg, #0b1120); }
.torca-loading-fullscreen { position: fixed; inset: 0; min-height: 100dvh; z-index: 100; background: var(--bg, #f1f5f9); }
.app-shell > .torca-loading { grid-column: 2 / -1; }
@media (max-width: 900px) { .app-shell > .torca-loading { grid-column: 1 / -1; } }

/* One continuous turn, then hold. Handoffs share an epoch and never reset the mark. */
@media (prefers-reduced-motion: no-preference) {
  .torca-logo-turn { animation: torca-logo-turn 1.8s cubic-bezier(.4,0,.2,1) 1 forwards; }
  .torca-logo-trace { animation: torca-logo-draw 1.8s ease-out 1 forwards; }
  .torca-loading-scene :is(.torca-logo-turn, .torca-logo-trace) {
    animation-delay: var(--torca-loading-delay, 0ms);
    animation-play-state: var(--torca-loading-play, running);
  }
}
@keyframes torca-logo-turn {
  from { transform: rotate(-360deg); }
  to { transform: rotate(0); }
}
@keyframes torca-logo-draw {
  0% { stroke-dashoffset: 1; opacity: .45; }
  75% { stroke-dashoffset: 0; opacity: .45; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
