/* Template rendering. Shared by the live display, the control-room preview, thumbnails and the editor canvas. */
.tpl-host { position: relative; overflow: hidden; --k: 1; }
.tpl-fill { position: absolute; inset: 0; }
.tpl-canvas {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; margin: -540px 0 0 -960px;
  transform: scale(var(--k)); transform-origin: 50% 50%; overflow: hidden; isolation: isolate;
}
.tpl-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tpl-el { position: absolute; pointer-events: none; will-change: transform; }
.tpl-spin, .tpl-tilt, .tpl-front, .tpl-band, .tpl-band-box, .tpl-zrot, .tpl-body { position: absolute; inset: 0; }
.tpl-shadow-layer { pointer-events: none; }
.tpl-text { position: absolute; inset: 0; display: flex; flex-direction: column; font-kerning: normal; text-rendering: geometricPrecision; }
.tpl-text-inner { width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.tpl-text-inner strong { font-weight: var(--bold, 700); }
.tpl-body img, .tpl-body video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.tpl-shape { position: absolute; inset: 0; box-sizing: border-box; }
.tpl-placeholder { position: absolute; inset: 0; display: grid; place-items: center; border: 4px dashed #ffffff55; background: #ffffff12; color: #ffffffaa; font: 700 64px/1 system-ui, sans-serif; box-sizing: border-box; }
@keyframes tpl-spin { to { transform: rotate(360deg); } }
.tpl-thumb .tpl-spin { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .tpl-live .tpl-spin { animation-play-state: paused !important; } }

.slide-tpl { background: var(--slide-bg, #000); }
.slide-tpl .tpl-fill { z-index: 0; }

/* Auto name alignment: two nowrap lines inside a shrink-wrapped block. */
.tpl-name-block { width: max-content; max-width: none; }
.tpl-name-line { width: max-content; white-space: pre; }
.tpl-name-line[hidden] { display: none; }

/* Name Only transitions: the outgoing copy of a changing element, removed once its animation ends. */
.tpl-ghost { pointer-events: none; }

/* Particle emitter */
.tpl-emitter { position: absolute; pointer-events: none; display: block; }
.tpl-emitter-gizmo { position: absolute; inset: 0; border: 2px dashed #efb64f99; pointer-events: none; box-sizing: border-box; }
.tpl-emitter-gizmo[data-area="point"] { border: 0; }
.tpl-emitter-gizmo[data-area="point"]::before, .tpl-emitter-gizmo[data-area="point"]::after { content: ""; position: absolute; background: #efb64fcc; }
.tpl-emitter-gizmo[data-area="point"]::before { left: calc(50% - 14px); right: calc(50% - 14px); top: calc(50% - 1px); height: 2px; }
.tpl-emitter-gizmo[data-area="point"]::after { top: calc(50% - 14px); bottom: calc(50% - 14px); left: calc(50% - 1px); width: 2px; }
