/* ==========================================================================
   Scenografia invernale a tutto schermo (anteprima, finestra delle caselle, condivisione)
   ========================================================================== */
.door-modal-backdrop { background: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; isolation: isolate; }
.door-modal-backdrop > :not(.scene-bg) { position: relative; z-index: 3; }

.scene-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #14283f 0%, #1d4262 34%, #2d6277 66%, #4b919b 100%);
  animation: sceneIn .9s ease both;
}
@keyframes sceneIn { from { opacity: 0; } }
.sc-moon { position: absolute; top: 7%; right: 12%; width: clamp(54px, 7vw, 96px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 36% 34%, #fffbe9 0 55%, #f3e7bf 100%); box-shadow: 0 0 0 10px rgba(255, 244, 205, .08), 0 0 60px 18px rgba(255, 238, 190, .35); animation: moonIn 1.6s var(--settle) both; }
.sc-moon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 62% 60%, rgba(214, 196, 150, .45) 0 12%, transparent 13%), radial-gradient(circle at 30% 66%, rgba(214, 196, 150, .35) 0 8%, transparent 9%), radial-gradient(circle at 54% 26%, rgba(214, 196, 150, .3) 0 6%, transparent 7%); }
@keyframes moonIn { from { transform: translateY(30px); opacity: 0; } }
.sc-halo { position: absolute; top: -10%; right: -4%; width: 62vmax; height: 62vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 240, 200, .16), transparent 62%); animation: halo 9s ease-in-out infinite alternate; }
@keyframes halo { to { transform: scale(1.1); opacity: .75; } }
.sc-stars i { position: absolute; border-radius: 50%; background: #fff; opacity: .2; animation: twinkle2 3.6s ease-in-out infinite; }
@keyframes twinkle2 { 0%, 100% { opacity: .15; transform: scale(.8); } 50% { opacity: .95; transform: scale(1.25); } }
.sc-snow { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-layer { position: absolute; left: -3%; width: 106%; bottom: 0; animation: forestIn 1.3s var(--settle) both; }
.sc-layer.l1 { height: 36vh; opacity: .9; animation-delay: .1s; }
.sc-layer.l2 { height: 30vh; animation-delay: .22s; }
.sc-layer.l3 { height: 25vh; animation-delay: .34s; }
.sc-layer.l1 { animation-name: forestIn, sway1; animation-duration: 1.3s, 22s; animation-iteration-count: 1, infinite; animation-direction: normal, alternate; animation-timing-function: var(--settle), ease-in-out; animation-delay: .1s, 1.4s; }
.sc-layer.l2 { animation-name: forestIn, sway2; animation-duration: 1.3s, 17s; animation-iteration-count: 1, infinite; animation-direction: normal, alternate; animation-timing-function: var(--settle), ease-in-out; animation-delay: .22s, 1.5s; }
@keyframes forestIn { from { transform: translateY(60px); opacity: 0; } }
@keyframes sway1 { to { transform: translateX(-1.6%); } }
@keyframes sway2 { to { transform: translateX(1.2%); } }
@media (prefers-reduced-motion: reduce) {html:not(.force-motion) .sc-layer, html:not(.force-motion) .sc-halo, html:not(.force-motion) .sc-stars i, html:not(.force-motion) .sc-moon { animation: none; } }

/* il foglio della casella sulla scena: più luminoso, con ombra morbida */
.door-modal .paper { box-shadow: 0 10px 0 rgba(10, 30, 45, .25), 0 40px 70px -26px rgba(5, 20, 32, .8); }
.door-nav button { box-shadow: 0 4px 0 rgba(10, 30, 45, .3); }
.preview-note { box-shadow: 0 8px 20px -8px rgba(5, 20, 32, .6); }

/* ---- Pagina di chi riceve il calendario: la scena notturna resta dietro a tutto ---- */
body.night-scene { background: #14283f !important; }
body.night-scene .recipient-page { position: relative; z-index: 2; background: none !important; color: #fff; }
body.night-scene #snow { display: none; }
body.night-scene .recipient-top .eyebrow { color: #aaf3ff; }
body.night-scene .recipient-top .dedication { color: #fff; text-shadow: 0 1px 2px rgba(5, 20, 32, .85), 0 2px 18px rgba(5, 20, 32, .75); position: relative; z-index: 2; }   /* resta leggibile anche quando la luna le passa dietro */
body.night-scene .recipient-top p { color: rgba(255, 255, 255, .9); }
body.night-scene .recipient-foot, body.night-scene .recipient-foot a { color: #fff; opacity: .92; }
body.night-scene .pin-box { color: #fff; }
body.night-scene .center-page { color: #fff; }
body.night-scene .recipient-foot { text-shadow: 0 1px 10px rgba(5, 20, 32, .9), 0 0 3px rgba(5, 20, 32, .8); }
