/* Agenda Enigma v2 — stage 2.5D nel Banco Prima Lettura */



.ae-enigma-root {

  display: none;

  flex: 1 1 auto;

  min-height: 0;

  align-items: center;

  justify-content: center;

  padding: 0.35rem 0.5rem 0.75rem;

  touch-action: none;

}

.ae-enigma-root.is-open {

  display: flex;

}



.banco-scene--agenda-enigma .pl-reperto-area {

  display: none !important;

}



.ae-enigma-viewport {

  position: relative;

  width: 100%;

  max-width: 420px;

  aspect-ratio: 9 / 16;

  min-height: 240px;

  max-height: 100%;

  margin: 0 auto;

  overflow: hidden;

  touch-action: none;

  user-select: none;

  border-radius: 2px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);

}



.ae-enigma-frame {

  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  object-fit: cover;

  object-position: center;

  pointer-events: none;

  opacity: 0;

  transition: opacity 280ms ease, transform 280ms ease;

  transform: scale(0.98);

}

.ae-enigma-frame.is-visible {

  opacity: 1;

  transform: scale(1);

}



.ae-enigma-rub-stack {

  position: absolute;

  inset: 0;

  opacity: 0;

  pointer-events: none;

}

.ae-enigma-rub-stack.is-active {

  opacity: 1;

  pointer-events: auto;

}

.ae-enigma-rub-stack img {

  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  object-fit: cover;

  pointer-events: none;

}

.ae-enigma-rub-source {

  position: absolute;

  width: 0;

  height: 0;

  opacity: 0;

  pointer-events: none;

}

.ae-enigma-rub-display {

  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  pointer-events: none;

  opacity: 0;

}

.ae-enigma-rub-stack.is-mask-ready .ae-enigma-rub-display {

  opacity: 1;

}

.ae-enigma-rub-canvas {

  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  opacity: 0;

  pointer-events: none;

}



.ae-enigma-lens {

  position: absolute;

  width: 150px;

  height: 150px;

  margin-left: -75px;

  margin-top: -75px;

  border-radius: 50%;

  pointer-events: none;

  overflow: hidden;

  opacity: 0;

  z-index: 20;

  border: 3px solid rgba(170, 135, 75, 0.92);

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 0 14px rgba(255, 255, 255, 0.2);

}

.ae-enigma-lens.is-visible { opacity: 1; }

.ae-enigma-lens-inner {

  position: absolute;

  width: 100%;

  height: 100%;

  background-repeat: no-repeat;

  filter: contrast(1.12) brightness(1.08);

}

.ae-enigma-lens-canvas {

  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  display: none;

  pointer-events: none;

}

.ae-enigma-lens-inner.is-composite-lens .ae-enigma-lens-canvas {

  display: block;

}



.ae-enigma-hint {

  position: absolute;

  bottom: 0.65rem;

  left: 50%;

  transform: translateX(-50%);

  z-index: 15;

  font-family: var(--font-mono);

  font-size: 8px;

  letter-spacing: 0.14em;

  text-transform: uppercase;

  color: rgba(245, 230, 200, 0.75);

  background: rgba(12, 8, 4, 0.72);

  border: 1px solid rgba(183, 131, 59, 0.4);

  padding: 0.45rem 0.75rem;

  max-width: 92%;

  text-align: center;

  pointer-events: none;

  margin: 0;

}

.ae-enigma-hint[hidden] { display: none !important; }



@media (prefers-reduced-motion: reduce) {

  .ae-enigma-frame { transition: none !important; }

}



@media (max-width: 700px), (max-width: 960px) and (max-height: 560px) {
  .ae-enigma-root {
    padding: 0.15rem 0.25rem 0.35rem;
  }
  .ae-enigma-viewport {
    max-width: 100%;
    width: 100%;
  }
}

/* ── Stage Atto 1 nello shell: contenitore enigma (la posta è la lettera d'angolo dello shell) ── */
.ae-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ae-stage .ae-enigma-root {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ae-stage .ae-enigma-root[hidden] { display: none; }

