/* ============================================================
   Monarch Hoard - PAGINA DI LANCIO DI UNA BLIND BOX
   DOVE VA:  static/css/lancio-box.css   (file nuovo)
   Caricato DOPO lancio.css (da cui prende testata, bottoni,
   zoom). Colori: blu e viola come le figure fluorescenti.
   ------------------------------------------------------------
   1. Colori e testata
   2. La scatola misteriosa
   3. La figura che esce, lampo, Mystery
   4. Luce UV
   5. Galleria
   6. Espositore, invito, credito
   7. Figura in grande
   8. Telefono e "meno animazioni"
   10. Frecce della figura in grande dentro lo schermo (01/12/2026)
   Niente sfocature dal vivo su elementi grandi (vedi mappa,
   sezione 26): gli aloni sono sfumature radiali.
   ============================================================ */

/* ============================================================
   1. COLORI E TESTATA
   ============================================================ */
.box-hero,
#box-uv, #box-galleria, .box-espo, .box-cta, .box-zoom {
  --bx: #7fd8ff;
  --bx-rgb: 90, 200, 255;
  --bx-viola: #b57bff;
  --bx-viola-rgb: 168, 92, 255;
}
.box-hero .mh-accento,
.box-hero .lancio-numeri b { color: var(--bx); text-shadow: 0 0 14px rgba(var(--bx-rgb), 0.5); }

.box-badge {
  color: #fff;
  background: linear-gradient(90deg, #2e7dff, #a85cff, #2e7dff);
  background-size: 200% 100%;
  box-shadow: 0 0 18px rgba(120, 140, 255, 0.6);
}
.box-btn {
  color: #031018;
  border-color: var(--bx);
  background: linear-gradient(135deg, #a6e6ff, #4fb8ff);
  box-shadow: 0 0 18px rgba(var(--bx-rgb), 0.45);
}
.box-btn:hover { color: #031018; border-color: #fff; box-shadow: 0 0 26px rgba(var(--bx-rgb), 0.75); }
.box-hero .lancio-btn:not(.box-btn):hover { border-color: var(--bx); }
.box-hero .lancio-hero__sfondo { object-position: center 35%; }

/* ============================================================
   2. LA SCATOLA MISTERIOSA (fatta in CSS)
   ============================================================ */
.box-palco {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 500px;
}
.box-scatola,
.box-uscita { grid-area: 1 / 1; }

.box-scatola {
  position: relative;
  width: 250px;
  height: 300px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  animation: box-fluttua 4.5s ease-in-out infinite;
  transition: transform .3s ease;
}
.box-scatola:hover { transform: scale(1.04) rotate(-2deg); }
.box-scatola:focus-visible { outline: 2px solid var(--bx); outline-offset: 10px; border-radius: 12px; }
@keyframes box-fluttua {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

.box-scatola__alone {
  position: absolute;
  inset: -22% -30%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--bx-viola-rgb), 0.45), rgba(var(--bx-rgb), 0.18) 40%, transparent 68%);
  animation: box-alone 3s ease-in-out infinite;
}
@keyframes box-alone {
  0%, 100% { opacity: .55; transform: scale(.95); }
  50%      { opacity: 1;   transform: scale(1.05); }
}

.box-scatola__corpo {
  position: absolute;
  inset: 52px 0 0 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--bx-rgb), 0.35), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 10px, transparent 10px 20px),
    linear-gradient(160deg, #24145a 0%, #0d1d4a 55%, #070d22 100%);
  border: 2px solid rgba(var(--bx-rgb), 0.7);
  box-shadow: 0 26px 40px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(var(--bx-viola-rgb), 0.45);
}
.box-scatola__punto {
  font-family: var(--font-title);
  font-size: 6.5rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 18px rgba(var(--bx-rgb), 1), 0 0 40px rgba(var(--bx-viola-rgb), 0.9);
  animation: box-pulsa-punto 2.2s ease-in-out infinite;
}
@keyframes box-pulsa-punto { 50% { transform: scale(1.08); } }
.box-scatola__marchio {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--font-title);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--bx);
}
.box-scatola__scritta {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-title);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.8);
}

/* Il coperchio: piu' largo del corpo, come una scatola vera */
.box-scatola__coperchio {
  position: absolute;
  left: -10px;
  right: -10px;
  top: 0;
  height: 60px;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #3a2390, #1b2a6e);
  border: 2px solid rgba(var(--bx-rgb), 0.8);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.45);
  transform-origin: 10% 100%;
  transition: transform .55s cubic-bezier(.3, .7, .3, 1.2), opacity .5s ease;
}
.box-scatola__coperchio span {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--bx);
}

/* Il fascio di luce che esce quando si apre */
.box-scatola__raggio {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 70%;
  height: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(var(--bx-rgb), 0.85), rgba(var(--bx-viola-rgb), 0.35) 60%, transparent);
  clip-path: polygon(15% 100%, 85% 100%, 100% 0, 0 0);
  opacity: 0;
  transition: height .6s ease .25s, opacity .4s ease .25s;
}

/* --- Aperta: trema, il coperchio vola, il fascio sale --- */
.box-palco.is-aperta .box-scatola {
  animation: box-trema .12s linear 5;
  pointer-events: none;
}
@keyframes box-trema {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  25% { translate: -5px 1px; rotate: -2deg; }
  75% { translate: 5px -1px; rotate: 2deg; }
}
.box-palco.is-aperta .box-scatola__coperchio {
  transform: translate(-40px, -120px) rotate(-35deg);
  opacity: 0;
  transition-delay: .55s;
}
.box-palco.is-aperta .box-scatola__raggio { height: 260px; opacity: 1; transition-delay: .7s; }
.box-palco.is-mystery .box-scatola__raggio {
  background: linear-gradient(0deg, rgba(var(--bx-viola-rgb), 0.95), rgba(255, 120, 230, 0.4) 60%, transparent);
}
/* Quando la figura e' fuori, la scatola scende e si spegne */
.box-palco.is-fuori .box-scatola {
  opacity: 0;
  transform: translateY(60px) scale(.85);
  transition: opacity .4s ease, transform .5s ease;
  animation: none;
}

.box-palco__invito {
  grid-area: 2 / 1;
  margin: 18px 0 0;
  font-family: var(--font-title);
  font-size: .7rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--bx);
  animation: box-lampeggia 1.8s ease-in-out infinite;
}
@keyframes box-lampeggia { 50% { opacity: .45; } }
.box-palco__azioni {
  grid-area: 3 / 1;
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.box-palco__conta {
  grid-area: 4 / 1;
  margin: 12px 0 0;
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
}
.box-palco .lancio-palco__nota { grid-area: 5 / 1; }
.box-palco__azioni[hidden], .box-palco__invito[hidden], .box-palco__conta[hidden] { display: none; }

/* ============================================================
   3. LA FIGURA CHE ESCE
   ============================================================ */
.box-uscita {
  position: relative;
  z-index: 3;
  margin: 0;
  width: 260px;
  display: grid;
  gap: 10px;
  justify-items: center;
  cursor: zoom-in;
  animation: box-esce .7s cubic-bezier(.2, .9, .25, 1.2) both;
}
.box-uscita[hidden] { display: none; }
@keyframes box-esce {
  from { opacity: 0; transform: translateY(90px) scale(.4); }
}
.box-uscita__foto {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  border: 2px solid rgba(var(--bx-rgb), 0.85);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--bx-rgb), 0.55);
}
.box-uscita__foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.box-uscita figcaption { display: grid; gap: 2px; justify-items: center; text-align: center; }
.box-uscita figcaption b { font-family: var(--font-title); font-size: 1rem; color: #fff; letter-spacing: 1px; }
.box-uscita figcaption span { font-size: .78rem; color: var(--text-muted); }
.box-uscita figcaption span[hidden] { display: none; }
.box-uscita__prob {
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-size: .62rem !important;
  letter-spacing: 1px;
  color: #031018 !important;
  background: var(--bx);
}

/* Il timbro "MYSTERY COSBI": compare solo con la segreta */
.box-uscita__timbro {
  position: absolute;
  top: 18px;
  right: -18px;
  z-index: 2;
  display: none;
  padding: 7px 14px;
  border: 2px solid #fff;
  border-radius: 999px;
  font-family: var(--font-title);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  background: linear-gradient(135deg, #a85cff, #ff5fd2);
  box-shadow: 0 0 20px rgba(var(--bx-viola-rgb), 0.9);
  rotate: 12deg;
}
.box-uscita.is-mystery .box-uscita__timbro {
  display: block;
  animation: box-timbro .5s cubic-bezier(.2, 1.4, .4, 1) .35s both;
}
@keyframes box-timbro { from { opacity: 0; transform: scale(2.4); } }
.box-uscita.is-mystery .box-uscita__foto {
  border-color: var(--bx-viola);
  animation: box-mystery 1.6s ease-in-out infinite;
}
.box-uscita.is-mystery .box-uscita__prob { background: var(--bx-viola); color: #fff !important; }
@keyframes box-mystery {
  0%, 100% { box-shadow: 0 22px 40px rgba(0, 0, 0, 0.6), 0 0 26px rgba(var(--bx-viola-rgb), 0.7); }
  50%      { box-shadow: 0 22px 40px rgba(0, 0, 0, 0.6), 0 0 54px rgba(255, 120, 230, 1); }
}

/* Lampo (azzurro; viola per la Mystery) */
.box-lampo {
  position: absolute;
  inset: -10%;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(var(--bx-rgb), 0.4) 35%, transparent 65%);
}
.box-lampo.is-viola {
  background: radial-gradient(circle, rgba(255, 230, 255, 0.95), rgba(var(--bx-viola-rgb), 0.6) 35%, transparent 68%);
}
.box-lampo.is-acceso { animation: box-lampo .8s ease-out; }
@keyframes box-lampo {
  0%   { opacity: 0; transform: scale(.6); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.3); }
}

/* ============================================================
   4. LUCE UV
   ============================================================ */
.box-uv {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}
.box-uv__testo { display: grid; gap: 18px; justify-items: start; }
.box-uv__testo .mh-testa { margin: 0; text-align: left; }

.box-interruttore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(var(--bx-viola-rgb), 0.55);
  background: rgba(5, 9, 18, 0.6);
  color: #fff;
  font-family: var(--font-title);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
}
.box-interruttore__pista {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  transition: background .3s ease;
}
.box-interruttore__pomello {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform .3s cubic-bezier(.3, .7, .3, 1.3);
}
.box-interruttore[aria-checked="true"] .box-interruttore__pista {
  background: linear-gradient(90deg, #6a3cff, #a85cff);
  box-shadow: 0 0 16px rgba(var(--bx-viola-rgb), 0.8);
}
.box-interruttore[aria-checked="true"] .box-interruttore__pomello { transform: translateX(24px); }

.box-uv__foto {
  position: relative;
  display: grid;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(var(--bx-rgb), 0.4);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  transition: box-shadow .5s ease, border-color .5s ease;
}
.box-uv__img {
  grid-area: 1 / 1;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 640px;
  object-fit: cover;
  display: block;
  transition: opacity .6s ease;
}
.box-uv__img--uv { opacity: 0; }
.box-uv__foto.is-uv .box-uv__img--uv { opacity: 1; }
.box-uv__foto.is-uv {
  border-color: rgba(var(--bx-viola-rgb), 0.8);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 40px rgba(var(--bx-viola-rgb), 0.55);
}

/* ============================================================
   5. GALLERIA
   ============================================================ */
.box-griglia {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}
.box-g {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .25s ease;
}
.box-g:hover { transform: translateY(-6px); }
.box-g__img {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(var(--bx-rgb), 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.box-g__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;   /* la figura in primo piano sta in basso */
  display: block;
  transition: transform .4s ease;
}
.box-g:hover .box-g__img { border-color: var(--bx); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(var(--bx-rgb), 0.45); }
.box-g:hover .box-g__img img { transform: scale(1.06); }
.box-g__info { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.box-g__nome { display: grid; font-size: .86rem; color: #fff; font-weight: 600; }
.box-g__nome small { font-size: .72rem; color: var(--text-dim); font-weight: 400; }
.box-g__prob {
  flex: none;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-size: .58rem;
  letter-spacing: .8px;
  color: var(--bx);
  border: 1px solid rgba(var(--bx-rgb), 0.5);
}
/* La Mystery: cornice viola che pulsa */
.box-g.is-mystery .box-g__img {
  border-color: var(--bx-viola);
  box-shadow: 0 0 0 1px var(--bx-viola), 0 0 22px rgba(var(--bx-viola-rgb), 0.55);
}
.box-g.is-mystery .box-g__prob { color: #fff; background: var(--bx-viola); border-color: var(--bx-viola); }

/* ============================================================
   6. ESPOSITORE, INVITO, CREDITO
   ============================================================ */
.box-espo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.box-espo__img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--bx-rgb), 0.35);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}
.box-espo .mh-testa { margin-bottom: 14px; text-align: left; }
.box-espo__punti li::before { background: var(--bx); }

.box-cta {
  border-color: rgba(var(--bx-viola-rgb), 0.4);
  background:
    radial-gradient(circle at 0% 50%, rgba(var(--bx-viola-rgb), 0.2), transparent 55%),
    linear-gradient(160deg, rgba(10, 18, 34, 0.94), rgba(5, 9, 18, 0.94));
}
.box-cta__img {
  width: 140px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 55%;
  border-radius: 12px;
  border: 2px solid var(--bx-viola);
  transform: rotate(-6deg);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.55), 0 0 20px rgba(var(--bx-viola-rgb), 0.5);
}
.box-credito {
  margin: 18px 0 0;
  font-size: .72rem;
  color: var(--text-dim);
  text-align: center;
}

/* ============================================================
   7. FIGURA IN GRANDE
   ============================================================ */
.lancio-zoom__freccia[hidden] { display: none; }
.box-zoom__fig { margin: 0; display: grid; gap: 12px; justify-items: center; }
.box-zoom__fig img {
  height: min(80vh, 760px);
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: lancio-zoom-entra .3s ease-out;
}
.box-zoom.is-mystery .box-zoom__fig img { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(168, 92, 255, 0.7); }
.box-zoom__fig figcaption { color: var(--text-muted); font-size: .9rem; text-align: center; }

/* ============================================================
   8. TELEFONO E "MENO ANIMAZIONI"
   ============================================================ */
@media (max-width: 900px) {
  .box-palco { min-height: 420px; }
  .box-uv, .box-espo { grid-template-columns: 1fr; gap: 24px; }
  .box-uv__img { max-height: 520px; }
}
@media (max-width: 520px) {
  .box-scatola { width: 200px; height: 240px; }
  .box-scatola__corpo { inset: 44px 0 0 0; }
  .box-scatola__coperchio { height: 50px; }
  .box-scatola__punto { font-size: 5rem; }
  .box-uscita { width: min(70vw, 240px); }
  .box-uscita__timbro { right: -6px; }
  .box-griglia { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .box-cta__img { width: 110px; }
  .box-zoom__fig img { height: auto; width: min(80vw, 420px); }
  .box-hero .lancio-numeri { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .box-palco:not(.is-aperta) .box-scatola, .box-scatola__alone, .box-palco:not(.is-mystery-seq) .box-scatola__punto,
  .box-palco__invito { animation: none !important; }
    .box-uv__img { transition: none !important; }
}
/* v5 (25/11/2026): con "meno animazioni" (Windows: Effetti di animazione
   spenti) si fermano SOLO i movimenti continui (fluttua, alone, "?",
   invito, Mystery che pulsa). L'APERTURA resta sempre: coperchio,
   raggio, uscita della figura, lampo, sequenza Mystery. Prima su PC
   la scatola spariva di colpo e non si vedeva niente. */


/* ============================================================
   9. v5 (25/11/2026) - APERTURA NUOVA + SEQUENZA MYSTERY
   ------------------------------------------------------------
   Le classi le mette lancio-box.js su #box-palco:
     is-aperta        clic (sempre)
     is-mystery-seq   solo se esce la Mystery: finta apertura
     is-mystery-buio  luce spenta, raggi dalle fessure
     is-mystery-boom  coperchio che esplode, onda, scintille
     is-fuori         la figura e' uscita
   .box-buio, .box-onda, .box-scintille li crea lo script.
   Valgono sia per la scatola in CSS (.box-scatola__coperchio)
   sia per la foto vera (.box-foto__coperchio, lancio-box-scatola.css).
   Niente sfocature: solo trasformazioni, opacita' e sfumature.
   ============================================================ */

/* --- 9.1 Il coperchio: si alza e vola via BEN VISIBILE --- */
.box-palco.is-aperta .box-scatola .box-scatola__coperchio,
.box-palco.is-aperta .box-scatola .box-foto__coperchio {
  transform: none;
  opacity: 1;
  transition: none;
  animation: box-coperchio-vola 1s cubic-bezier(.3, .6, .35, 1) .4s forwards;
}
@keyframes box-coperchio-vola {
  0%   { transform: none; opacity: 1; }
  22%  { transform: translateY(-26px) rotate(-5deg); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(-80px, -250px) rotate(-40deg); opacity: 0; }
}
/* Il raggio parte quando il coperchio si stacca */
.box-palco.is-aperta .box-scatola__raggio { transition-delay: .55s; }

/* --- 9.2 Arrivo dalla home (?apri=1): la scatola "chiama" --- */
.box-scatola.is-in-arrivo { animation: box-chiama .6s ease-in-out 2; }
@keyframes box-chiama {
  0%, 100% { scale: 1; rotate: 0deg; }
  30%      { scale: 1.07; rotate: -3deg; }
  60%      { scale: 1.07; rotate: 3deg; }
}

/* --- 9.3 MYSTERY - fase 1: finta apertura (0 - 1,25 s) --- */
.box-palco.is-mystery-seq .box-scatola {
  animation: box-trema .12s linear 5, box-sobbalzo .3s ease-out 1.02s 1;
}
@keyframes box-sobbalzo {
  0%   { translate: 0 0; scale: 1; }
  35%  { translate: 0 6px; scale: 1.04 .95; }
  100% { translate: 0 0; scale: 1; }
}
.box-palco.is-mystery-seq .box-scatola .box-scatola__coperchio,
.box-palco.is-mystery-seq .box-scatola .box-foto__coperchio {
  animation: box-coperchio-finta .75s ease-in-out .4s both;
}
@keyframes box-coperchio-finta {
  0%       { transform: none; }
  40%      { transform: translateY(-38px) rotate(-6deg); }
  62%      { transform: translateY(0) rotate(0deg); }     /* BAM: ricade */
  72%      { transform: translateY(-7px) rotate(1deg); }
  82%,100% { transform: none; }
}
/* Il raggio normale non parte: si vedra' solo dopo */
.box-palco.is-mystery-seq .box-scatola__raggio {
  height: 0;
  opacity: 0;
  transition: none;
}

/* --- 9.4 MYSTERY - fase 2: buio, fessure, tremore (1,25 - 2,25 s) --- */
.box-buio {
  position: absolute;
  inset: -150vmax;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(40, 0, 70, 0.45), rgba(2, 0, 8, 0.93) 38%);
  transition: opacity .45s ease;
}
.box-palco.is-mystery-buio .box-buio { opacity: 1; }
.box-palco.is-fuori .box-buio { opacity: 0; transition: opacity 1.6s ease 1.6s; }
/* Scatola, figura, bottoni e contatore restano SOPRA il buio */
.box-palco.is-mystery-seq .box-scatola { z-index: 2; }
.box-palco.is-mystery-seq .box-palco__azioni,
.box-palco.is-mystery-seq .box-palco__conta,
.box-palco.is-mystery-seq .lancio-palco__nota { position: relative; z-index: 2; }

.box-palco.is-mystery-seq.is-mystery-buio .box-scatola {
  animation: box-trema-cresce 1s linear forwards;
}
@keyframes box-trema-cresce {
  0%   { translate: 0 0; rotate: 0deg; }
  10%  { translate: -2px 0; rotate: -.5deg; }
  20%  { translate: 2px 0; rotate: .5deg; }
  30%  { translate: -4px 1px; rotate: -1deg; }
  40%  { translate: 4px -1px; rotate: 1deg; }
  50%  { translate: -6px 1px; rotate: -1.5deg; }
  60%  { translate: 7px -1px; rotate: 2deg; }
  70%  { translate: -9px 2px; rotate: -2.5deg; }
  80%  { translate: 10px -2px; rotate: 3deg; }
  90%  { translate: -12px 2px; rotate: -3.5deg; }
  100% { translate: 0 0; rotate: 0deg; }
}
/* Luce viola che esce dalla fessura del coperchio */
.box-palco.is-mystery-seq.is-mystery-buio .box-scatola__raggio {
  height: 46px;
  opacity: 1;
  background: linear-gradient(0deg, rgba(255, 120, 235, 1), rgba(168, 92, 255, 0.5) 60%, transparent);
  animation: box-fessura .16s steps(2) infinite;
}
@keyframes box-fessura { 50% { opacity: .55; } }
/* Alone e "?" impazziscono */
.box-palco.is-mystery-buio .box-scatola__alone {
  background: radial-gradient(circle, rgba(255, 92, 226, 0.75), rgba(168, 92, 255, 0.55) 32%, transparent 68%);
  animation: box-alone-mystery .25s ease-in-out infinite;
}
@keyframes box-alone-mystery {
  0%, 100% { opacity: .6; transform: scale(.92); }
  50%      { opacity: 1;  transform: scale(1.18); }
}
.box-palco.is-mystery-buio .box-scatola__punto {
  color: #fff;
  text-shadow: 0 0 12px #fff, 0 0 26px #ff5fde, 0 0 52px #a85cff;
  animation: box-mystery-punto .2s ease-in-out infinite;
}
@keyframes box-mystery-punto { 50% { transform: scale(1.2); } }

/* --- 9.5 MYSTERY - fase 3: BOOM (2,25 - 3,25 s) --- */
.box-palco.is-mystery-seq.is-mystery-boom .box-scatola {
  animation: box-boom .45s cubic-bezier(.2, .9, .3, 1.4) forwards;
}
@keyframes box-boom {
  0%   { scale: 1; translate: 0 0; }
  25%  { scale: 1.12 .88; translate: 0 10px; }
  60%  { scale: .96 1.06; translate: 0 -6px; }
  100% { scale: 1; translate: 0 0; }
}
.box-palco.is-mystery-seq.is-mystery-boom .box-scatola .box-scatola__coperchio,
.box-palco.is-mystery-seq.is-mystery-boom .box-scatola .box-foto__coperchio {
  animation: box-coperchio-esplode 1.1s cubic-bezier(.15, .75, .3, 1) forwards;
}
@keyframes box-coperchio-esplode {
  0%   { transform: none; opacity: 1; }
  15%  { transform: translateY(-70px) rotate(-14deg) scale(1.06); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translate(-130px, -330px) rotate(-340deg) scale(.75); opacity: 0; }
}
/* Colonna di luce */
.box-palco.is-mystery-seq.is-mystery-boom .box-scatola__raggio {
  height: 520px;
  opacity: 1;
  background: linear-gradient(0deg, rgba(255, 255, 255, 1), rgba(255, 120, 235, 0.85) 18%, rgba(168, 92, 255, 0.5) 55%, transparent);
  transition: height .35s cubic-bezier(.2, .9, .3, 1);
  animation: box-colonna .5s ease-in-out infinite alternate;
}
@keyframes box-colonna { to { opacity: .75; } }

/* Onda d'urto */
.box-onda {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 3;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  border: 3px solid rgba(255, 170, 240, 0.95);
  box-shadow: 0 0 24px rgba(168, 92, 255, 0.9), inset 0 0 24px rgba(255, 120, 235, 0.6);
}
.box-palco.is-mystery-boom .box-onda { animation: box-onda .9s ease-out forwards; }
@keyframes box-onda {
  0%   { opacity: 1; transform: scale(.3); }
  100% { opacity: 0; transform: scale(6); }
}

/* Scintille */
.box-scintille {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 3;
  width: 0;
  height: 0;
  pointer-events: none;
}
.box-scintille i {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 8px #ff8bea, 0 0 16px #a85cff;
}
.box-scintille i:nth-child(3n) { background: #ffe08a; box-shadow: 0 0 8px #ffd25a, 0 0 16px #ff9d2e; }
.box-palco.is-mystery-boom .box-scintille i {
  animation: box-scintilla 1.1s cubic-bezier(.1, .8, .3, 1) var(--r, 0s) forwards;
}
@keyframes box-scintilla {
  0%   { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(1.4); }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(.3); }
}

/* Lampo oro (uscita della Mystery) */
.box-lampo.is-oro {
  background: radial-gradient(circle, rgba(255, 255, 255, 1), rgba(255, 215, 120, 0.75) 25%, rgba(168, 92, 255, 0.45) 45%, transparent 70%);
}
.box-lampo.is-oro.is-acceso { animation-duration: 1.2s; }

/* --- 9.6 MYSTERY - fase 4: la figura sale (da 3,25 s) --- */
.box-uscita.is-mystery {
  animation: box-esce-mystery 1.4s cubic-bezier(.2, .8, .25, 1) both;
}
@keyframes box-esce-mystery {
  0%   { opacity: 0; transform: translateY(150px) scale(.3); }
  25%  { opacity: 1; }
  65%  { transform: translateY(-14px) scale(1.06); }
  100% { opacity: 1; transform: none; }
}
/* Raggi viola/oro che girano dietro la figura */
.box-uscita.is-mystery::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: -1;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg,
    rgba(255, 210, 110, 0.38) 0deg 7deg,
    transparent 7deg 20deg,
    rgba(200, 110, 255, 0.35) 20deg 27deg,
    transparent 27deg 40deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 68%);
          mask-image: radial-gradient(circle, #000 18%, transparent 68%);
  animation: box-raggi-entra 1s ease-out .3s both, box-raggi-gira 14s linear infinite;
}
@keyframes box-raggi-entra { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@keyframes box-raggi-gira { to { rotate: 360deg; } }
/* Pozza di luce viola/oro sotto i piedi */
.box-uscita.is-mystery::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: -1;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 230, 160, 0.55), rgba(200, 110, 255, 0.4) 35%, transparent 68%);
  animation: box-aura 2s ease-in-out infinite;
}
@keyframes box-aura {
  0%, 100% { opacity: .75; transform: scale(.94); }
  50%      { opacity: 1;   transform: scale(1.08); }
}
/* Timbro: arriva sbattendo DOPO che la figura e' salita */
.box-uscita.is-mystery .box-uscita__timbro {
  top: 6px;
  padding: 9px 18px;
  font-size: .82rem;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #a85cff, #ff5fd2 55%, #ffcf5a);
  box-shadow: 0 0 22px rgba(168, 92, 255, 1), 0 0 40px rgba(255, 200, 90, 0.6);
  animation: box-timbro-mystery .6s cubic-bezier(.2, 1.6, .4, 1) 1.1s both;
}
@keyframes box-timbro-mystery {
  0%   { opacity: 0; transform: scale(3.2) rotate(-18deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.box-uscita.is-mystery figcaption b {
  color: #ffe6a8;
  text-shadow: 0 0 14px rgba(255, 200, 90, 0.8);
}

@media (max-width: 520px) {
  .box-uscita.is-mystery::before { width: 380px; height: 380px; margin: -190px 0 0 -190px; }
  .box-uscita.is-mystery::after  { width: 250px; height: 250px; margin: -125px 0 0 -125px; }
  .box-uscita.is-mystery .box-uscita__timbro { font-size: .7rem; padding: 7px 14px; }
}

/* "Meno animazioni": la sequenza resta, si fermano solo i giri infiniti */
@media (prefers-reduced-motion: reduce) {
  .box-uscita.is-mystery::before { animation: box-raggi-entra 1s ease-out .3s both; }
  .box-uscita.is-mystery::after { animation: none; }
}

/* ============================================================
   10. FRECCE DELLA FIGURA IN GRANDE DENTRO LO SCHERMO
   (01/12/2026)
   ------------------------------------------------------------
   Stesso problema della carta in grande (lancio.css, sezione 9):
   su telefono figura (80vw) + due frecce erano piu' larghe
   dello schermo e le frecce uscivano. Ora la figura lascia
   sempre posto alle frecce.
   ============================================================ */
@media (max-width: 520px) {
  .box-zoom__fig img {
    width: min(calc(100vw - 112px), 420px);
  }
  .box-zoom__fig figcaption { font-size: .82rem; }
}
