/* Renderer condiviso: monitor + anteprime dashboard. Tutte le misure sono relative al contenitore (cq units). */
.pl-stage { position: relative; overflow: hidden; container-type: size; background: #000; color: #fff; }
.pl-layer { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.pl-layer > img.pl-fill, .pl-layer > video.pl-fill { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.pl-fill.cover { object-fit: cover; }

/* Transizioni */
.pl-layer { will-change: opacity, transform; }
.tr-fade.enter { animation: tr-fade-in .8s ease both; }
.tr-fade.leave { animation: tr-fade-out .8s ease both; }
.tr-slide.enter { animation: tr-slide-in .9s cubic-bezier(.2,.8,.2,1) both; }
.tr-slide.leave { animation: tr-slide-out .9s cubic-bezier(.2,.8,.2,1) both; }
.tr-slide-up.enter { animation: tr-up-in .9s cubic-bezier(.2,.8,.2,1) both; }
.tr-slide-up.leave { animation: tr-up-out .9s cubic-bezier(.2,.8,.2,1) both; }
.tr-zoom.enter { animation: tr-zoom-in .9s cubic-bezier(.2,.8,.2,1) both; }
.tr-zoom.leave { animation: tr-fade-out .6s ease both; }
.tr-blur.enter { animation: tr-blur-in 1s ease both; }
.tr-blur.leave { animation: tr-blur-out 1s ease both; }
@keyframes tr-fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes tr-fade-out { from { opacity: 1 } to { opacity: 0 } }
@keyframes tr-slide-in { from { transform: translateX(100%) } to { transform: none } }
@keyframes tr-slide-out { from { transform: none } to { transform: translateX(-100%) } }
@keyframes tr-up-in { from { transform: translateY(100%) } to { transform: none } }
@keyframes tr-up-out { from { transform: none } to { transform: translateY(-100%) } }
@keyframes tr-zoom-in { from { opacity: 0; transform: scale(1.08) } to { opacity: 1; transform: none } }
@keyframes tr-blur-in { from { opacity: 0; filter: blur(30px) } to { opacity: 1; filter: none } }
@keyframes tr-blur-out { from { opacity: 1; filter: none } to { opacity: 0; filter: blur(30px) } }

/* Slide messaggio */
.pl-msg { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 8cqmin 9cqmin; gap: 3cqmin; isolation: isolate; }
.pl-msg .bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.pl-msg .shade { position: absolute; inset: 0; z-index: -1; background: #000; }
.pl-msg .eyebrow { font: 600 3cqmin/1.2 Inter, system-ui, sans-serif; letter-spacing: .22em; text-transform: uppercase; opacity: .8; }
.pl-msg .txt { flex: 0 0 auto; width: 100%; max-height: 68cqh; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.15; letter-spacing: -0.01em; }
.pl-msg .logo { max-height: 11cqmin; max-width: 40cqw; object-fit: contain; }
.pl-msg .brand { position: absolute; bottom: 4.5cqmin; left: 0; right: 0; text-align: center; font: 700 2.4cqmin/1 Inter, system-ui, sans-serif; letter-spacing: .25em; opacity: .7; }
.pl-msg.al-left { align-items: flex-start; text-align: left; } .pl-msg.al-left .brand { text-align: left; padding-left: 9cqmin; }
.pl-msg.al-center { align-items: center; text-align: center; }
.pl-msg.al-right { align-items: flex-end; text-align: right; } .pl-msg.al-right .brand { text-align: right; padding-right: 9cqmin; }

/* Animazioni del testo */
.an-fade-up .anim { animation: an-fade-up 1.1s cubic-bezier(.2,.8,.2,1) both; }
.an-fade .anim { animation: tr-fade-in 1.2s ease both; }
.an-zoom .anim { animation: tr-zoom-in 1.1s cubic-bezier(.2,.8,.2,1) both; }
.an-pop .anim { animation: an-pop .8s cubic-bezier(.3,1.6,.5,1) both; }
.an-float .anim { animation: an-fade-up 1.1s ease both, an-float 6s ease-in-out 1.1s infinite; }
.an-slide .anim { animation: an-slide 1s cubic-bezier(.2,.8,.2,1) both; }
.an-blur .anim { animation: tr-blur-in 1.3s ease both; }
.anim:nth-child(2) { animation-delay: .15s; } .anim:nth-child(3) { animation-delay: .3s; } .anim:nth-child(4) { animation-delay: .45s; }
@keyframes an-fade-up { from { opacity: 0; transform: translateY(4cqmin) } to { opacity: 1; transform: none } }
@keyframes an-pop { from { opacity: 0; transform: scale(.7) } to { opacity: 1; transform: none } }
@keyframes an-float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-1.2cqmin) } }
@keyframes an-slide { from { opacity: 0; transform: translateX(-6cqmin) } to { opacity: 1; transform: none } }
.tw-caret::after { content: '▍'; animation: blink 1s steps(1) infinite; opacity: .6; }
@keyframes blink { 50% { opacity: 0 } }

/* Decorazioni */
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco i { position: absolute; top: -5%; border-radius: 50%; background: currentColor; opacity: .7; animation: fall linear infinite; }
.deco.hearts i, .deco.sparkles i { background: none; font-style: normal; }
@keyframes fall { to { transform: translateY(115cqh) rotate(200deg); } }

/* Media generati */
.pl-qr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqmin; padding: 6cqmin; }
.pl-qr img { width: 55cqmin; height: 55cqmin; background: #fff; padding: 2cqmin; border-radius: 3cqmin; box-shadow: 0 2cqmin 6cqmin rgba(0,0,0,.15); }
.pl-qr .cap { font: 700 5cqmin/1.15 Inter, system-ui, sans-serif; text-align: center; max-width: 85cqw; }

/* THE LITTLE MESSAGE WALL */
.pl-wall { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: 5cqmin 6cqmin 4.5cqmin; gap: 3cqmin; isolation: isolate; }
.pl-wall .bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.pl-wall .glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(8cqmin); opacity: .45; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(8cqw, -6cqh) scale(1.15); } }
.pl-wall header { display: flex; flex-direction: column; align-items: center; gap: 1.3cqmin; text-align: center; }
.pl-wall .w-brand { font: 800 3.2cqmin/1 Inter, system-ui, sans-serif; letter-spacing: .08em; }
.pl-wall .w-logo { max-height: 8cqmin; max-width: 40cqw; object-fit: contain; }
.pl-wall .w-title { font: 600 2.3cqmin/1 Inter, system-ui, sans-serif; letter-spacing: .42em; padding-left: .42em; }
.pl-wall .w-tag { font-style: italic; font-size: 2.6cqmin; opacity: .75; margin-top: .6cqmin; }
.pl-wall main { position: relative; display: grid; place-items: center; min-height: 0; }
.pl-wall .cards { width: 100%; height: 100%; display: grid; gap: 3cqmin; align-content: center; justify-items: center; }
.pl-wall .card { position: relative; width: 100%; max-width: 86cqw; max-height: 100%; display: grid; place-items: center; text-align: center; padding: 4cqmin 5cqmin; border-radius: 4cqmin; background: rgba(255,255,255,.62); backdrop-filter: blur(12px); box-shadow: 0 1.5cqmin 6cqmin rgba(43,27,47,.10); overflow: hidden; }
.pl-wall .card .q { position: absolute; top: .8cqmin; left: 2.4cqmin; font: 400 12cqmin/1 Fraunces, Georgia, serif; opacity: .14; }
.pl-wall .card .t { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.2; width: 100%; max-height: 100%; overflow: hidden; }
.pl-wall .cards.single { grid-template-rows: minmax(0, 1fr); align-items: center; }
.pl-wall .cards.single .card { height: 82%; }
.pl-wall .cards.n2 { grid-template-columns: 1fr 1fr; }
.pl-wall .cards.n3, .pl-wall .cards.n4 { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
.pl-wall .cards.n5, .pl-wall .cards.n6 { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.pl-wall .cards:not(.single) .card { height: 100%; padding: 3cqmin; }
.pl-wall .empty { font-size: 6cqmin; text-align: center; max-width: 80cqw; line-height: 1.2; }
.pl-wall footer { display: flex; align-items: center; justify-content: space-between; gap: 4cqmin; min-height: 15cqmin; }
.pl-wall footer:not(:has(.qr)) { justify-content: center; text-align: center; }
.pl-wall .cta { font: 600 3cqmin/1.3 Inter, system-ui, sans-serif; }
.pl-wall .cta b { display: block; font-weight: 800; }
.pl-wall .cta span { opacity: .75; }
.pl-wall .qr { flex: none; width: 15cqmin; height: 15cqmin; background: #fff; padding: 1cqmin; border-radius: 2cqmin; box-shadow: 0 1cqmin 4cqmin rgba(0,0,0,.12); }
.pl-wall .qr img { width: 100%; height: 100%; display: block; }
@container (orientation: portrait) {
  .pl-wall { padding: 6cqmin 5cqmin; }
  .pl-wall .cards.n2 { grid-template-columns: 1fr; }
  .pl-wall .cards.n3, .pl-wall .cards.n4 { grid-template-columns: 1fr; }
  .pl-wall .cards.n5, .pl-wall .cards.n6 { grid-template-columns: 1fr 1fr; }
  .pl-wall footer { flex-direction: column; text-align: center; }
  .pl-wall .qr { width: 22cqmin; height: 22cqmin; }
  .pl-wall .cta { font-size: 3.6cqmin; }
}
.pl-wall.an-fade-up .card, .pl-wall.an-zoom .card, .pl-wall.an-pop .card, .pl-wall.an-float .card, .pl-wall.an-slide .card, .pl-wall.an-blur .card, .pl-wall.an-fade .card { animation-fill-mode: both; }
.pl-wall.an-fade-up .card { animation: an-fade-up 1.1s cubic-bezier(.2,.8,.2,1) both; }
.pl-wall.an-zoom .card { animation: tr-zoom-in 1.1s cubic-bezier(.2,.8,.2,1) both; }
.pl-wall.an-pop .card { animation: an-pop .8s cubic-bezier(.3,1.6,.5,1) both; }
.pl-wall.an-float .card { animation: an-fade-up 1.1s ease both, an-float 7s ease-in-out 1.1s infinite; }
.pl-wall.an-slide .card { animation: an-slide 1s cubic-bezier(.2,.8,.2,1) both; }
.pl-wall.an-blur .card { animation: tr-blur-in 1.3s ease both; }
.pl-wall.an-fade .card { animation: tr-fade-in 1.2s ease both; }
.pl-wall .card.out { animation: tr-fade-out .6s ease both !important; }
.pl-wall .promo { position: absolute; inset: 0; z-index: 5; overflow: hidden; background: #000; animation: tr-fade-in .8s ease both; }
.pl-wall .promo > * { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Fallback / stato */
.pl-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: linear-gradient(135deg, #FFE3EC, #FFF4E0); color: #2B1B2F; }
.pl-fallback b { display: block; font: 800 6cqmin/1 Inter, system-ui, sans-serif; letter-spacing: .04em; }
.pl-fallback span { display: block; margin-top: 2cqmin; font: 400 2.6cqmin/1.3 Inter, system-ui, sans-serif; opacity: .7; }

/* Wall compatta (porzione di schermo / zona di layout) */
.pl-wall.compact { padding: 3.5cqmin; gap: 2cqmin; }
.pl-wall.compact .w-tag { display: none; }
.pl-wall.compact .w-brand { font-size: 4cqmin; }
.pl-wall.compact .w-title { font-size: 3cqmin; letter-spacing: .25em; }
.pl-wall.compact .cta { font-size: 3.6cqmin; }
.pl-wall.compact .qr { width: 20cqmin; height: 20cqmin; }
.pl-wall.compact .cards.single .card { height: 92%; }

/* Layout multi-zona */
.pl-layout { position: absolute; inset: 0; overflow: hidden; }
.pl-zone { position: absolute; overflow: hidden; container-type: size; }
.pl-zone.schema { display: grid; place-items: center; border: 1px dashed rgba(255,255,255,.45); background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); font: 600 4cqmin/1.2 Inter, system-ui, sans-serif; text-align: center; }

/* Pagine web */
.pl-webwrap { position: absolute; inset: 0; background: #fff; overflow: hidden; }
.pl-web { border: 0; width: 100%; height: 100%; display: block; background: #fff; }

/* Slideshow */
.pl-slides { position: absolute; inset: 0; background: #000; }

.pl-layout.fit-portrait, .pl-layout.fit-landscape { inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.pl-layout.fit-portrait { width: min(100cqw, 56.25cqh); height: min(100cqh, 177.78cqw); }
.pl-layout.fit-landscape { width: min(100cqw, 177.78cqh); height: min(100cqh, 56.25cqw); }
