/* Calm, functional motion for the studios (150–250 ms). Never animates the cut paths' geometry. */
html.pls-local { --pls-ease: cubic-bezier(.2, .7, .2, 1); }

/* Recalculating: a soft sheen over the last design instead of only dimming it. */
html.pls-local :is(#items, #stage, .label-canvas, .preview-stage) { position: relative; }
html.pls-local :is(#items, #stage, .label-canvas, .preview-stage)[aria-busy="true"]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 45%, transparent 70%);
  background-size: 250% 100%; animation: pls-sheen 1.1s var(--pls-ease) infinite;
}
@keyframes pls-sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* Loading: a skeleton instead of an empty area. */
html.pls-local #items:empty { min-height: 160px; border-radius: 9px; background: linear-gradient(100deg, #efefeb 30%, #f7f7f4 50%, #efefeb 70%); background-size: 250% 100%; animation: pls-sheen 1.3s linear infinite; }

/* A fresh server preview fades in. */
html.pls-local .pls-enter { animation: pls-enter .22s var(--pls-ease) both; }
@keyframes pls-enter { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

/* Steps slide in gently. */
html.pls-local .pls-step-in { animation: pls-step .24s var(--pls-ease) both; }
@keyframes pls-step { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* Press feedback */
html.pls-local :is(.swatches button, .fonts button, .scene-picks button) { transition: transform .12s var(--pls-ease), outline-color .15s; }
html.pls-local :is(.swatches button, .fonts button, .scene-picks button):active { transform: scale(.92); }
html.pls-local :is(.primary, button.primary) { transition: transform .12s var(--pls-ease), background-color .15s; }
html.pls-local :is(.primary, button.primary):active:not(:disabled) { transform: scale(.98); }

/* Colour changes flow into the preview. */
html.pls-local :is(#items, #layout) svg :is(path, g) { transition: fill .2s ease; }

/* A blocked field nudges once; the honest message sits below it. */
html.pls-local .pls-shake { animation: pls-shake .32s var(--pls-ease); }
@keyframes pls-shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
html.pls-local #error:not(:empty) { animation: pls-enter .2s var(--pls-ease) both; }

/* Scene: the sticker is "applied" while the transfer tape pulls away. */
html.pls-local .scene-sticker { animation: pls-apply .5s var(--pls-ease) both; }
@keyframes pls-apply { from { clip-path: inset(0 100% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

/* Hover lift on overview cards */
html.pls-local .design-card { transition: transform .15s var(--pls-ease), border-color .15s; }
html.pls-local .design-card:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  html.pls-local *, html.pls-local *::before, html.pls-local *::after { animation: none !important; transition: none !important; }
}
