/* CheSlot Neon — Home di Natale "Pacchi sotto l'albero" (calendario dell'Avvento, dicembre 2026). Caricato solo in home quando è attiva. */

/* ---------- Hero ---------- */
.cs-av-hero { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--cs-border); padding: 40px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: center;
  background: radial-gradient(700px 380px at 85% 0%, #5A1E6E 0%, transparent 65%), radial-gradient(600px 400px at 0% 100%, #2A1A5E 0%, transparent 60%), var(--cs-surface); }
.cs-av-hero-copy { position: relative; display: flex; flex-direction: column; gap: 16px; }
.cs-av-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.cs-av-hero h1 .cs-h1-sub { font-size: .44em; font-weight: 500; line-height: 1.35; margin-top: 10px; }
.cs-av-hero p { margin: 0; color: var(--cs-muted); font-size: 16px; line-height: 1.6; max-width: 620px; }
.cs-av-hero .cs-h-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-av-hero .cs-h-actions .cs-button { display: inline-flex; align-items: center; gap: 8px; }
.cs-av-count { display: flex; flex-wrap: wrap; gap: 22px; margin: 4px 0 0; }
.cs-av-count div { display: flex; flex-direction: column-reverse; }
.cs-av-count dt { font-size: 13px; color: var(--cs-muted); }
.cs-av-count dd { margin: 0; font-family: var(--cs-font-display); font-size: 24px; font-weight: 700; }
.cs-av-count div:first-child dd { color: #FFC93C; }
.cs-av-snow { position: absolute; inset: 0; pointer-events: none; }
.cs-av-snow i { position: absolute; top: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .5; animation: cs-av-fall var(--d) linear var(--del) infinite; }
@keyframes cs-av-fall { from { transform: translateY(-20px); } to { transform: translateY(900px); } }

.cs-av-today-card { position: relative; display: flex; flex-direction: column; background: rgba(18, 11, 31, .85); border: 1px solid var(--cs-border); border-radius: 18px; overflow: hidden; color: var(--cs-text); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.cs-av-today-card:hover { transform: translateY(-3px); border-color: var(--cs-accent); color: var(--cs-text); }
.cs-av-today-media { position: relative; display: block; aspect-ratio: 16 / 8.5; background: var(--bg) center / cover no-repeat, var(--tone); }
.cs-av-badge { position: absolute; top: 12px; left: 12px; background: #FFC93C; color: #2A1A00; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px; }
.cs-av-badge:empty { display: none; }
.cs-av-play { position: absolute; right: 14px; bottom: 14px; width: 48px; height: 48px; border-radius: 50%; background: var(--cs-text); color: var(--cs-bg); display: grid; place-items: center; font-size: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.cs-av-today-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.cs-av-today-body small { font-size: 12px; color: var(--cs-muted); text-transform: uppercase; letter-spacing: .1em; }
.cs-av-today-body strong { font-family: var(--cs-font-display); font-size: 24px; line-height: 1.15; }
.cs-av-facts { font-size: 13px; color: var(--cs-muted); }
.cs-av-today-body em { font-style: normal; color: var(--cs-accent); font-weight: 700; font-size: 14px; margin-top: 4px; }

/* ---------- Ghirlanda con i pulsanti-decorazione ---------- */
.cs-av-orns { position: relative; padding-top: 4px; }
.cs-av-garland { position: absolute; top: 0; left: 0; width: 100%; height: 40px; }
.cs-av-garland path { fill: none; stroke: #2E8B57; stroke-width: 6; stroke-linecap: round; }
.cs-av-garland .cs-av-garland-lights { stroke: #FFC93C; stroke-width: 1.5; stroke-dasharray: 2 14; animation: cs-av-lights 1.6s linear infinite; }
@keyframes cs-av-lights { to { stroke-dashoffset: -32; } }
.cs-av-orns ul { position: relative; list-style: none; margin: 0; padding: 14px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.cs-av-orns li { display: flex; justify-content: center; }
.cs-av-orn { display: flex; flex-direction: column; align-items: center; color: var(--cs-text); text-decoration: none; text-align: center; transform-origin: 50% 0; animation: cs-av-sway 3.2s ease-in-out var(--del) infinite; }
.cs-av-orn::before { content: ""; width: 2px; height: var(--thread); background: rgba(255, 201, 60, .6); }
.cs-av-orn:hover, .cs-av-orn:focus-visible { animation-duration: .9s; color: var(--cs-text); }
.cs-av-orn-ball { position: relative; width: 92px; height: 92px; border-radius: 50%; border: 2px solid #FFC93C; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.4), inset -10px -12px 0 rgba(0,0,0,.2); }
.cs-av-orn-ball::before { content: ""; position: absolute; top: -9px; left: calc(50% - 11px); width: 22px; height: 12px; border-radius: 4px; background: #C9A227; }
.cs-av-orn-ball svg { width: 50px; height: 50px; fill: none; stroke: var(--cs-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cs-av-orn strong { margin-top: 10px; font-family: var(--cs-font-display); font-size: 16px; }
.cs-av-orn small { color: var(--cs-muted); font-size: 12px; }
@keyframes cs-av-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* ---------- Calendario ---------- */
.cs-av-cal { display: flex; flex-direction: column; gap: 18px; }
.cs-av-sub { margin: 6px 0 0; color: var(--cs-muted); }
.cs-av-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(9, 132px); gap: 12px; }
.cs-av-door { grid-column: var(--c) / span var(--w); grid-row: var(--r) / span var(--h); position: relative; min-width: 0; }
.cs-av-door > * { position: absolute; inset: 0; display: none; border-radius: 14px; box-sizing: border-box; }
.cs-av-door.is-past > .cs-av-open, .cs-av-door.is-today > .cs-av-today-box, .cs-av-door.is-locked > .cs-av-closed, .cs-av-door.is-missing > .cs-av-closed { display: block; }
.cs-av-door.is-missing > .cs-av-open, .cs-av-door.is-missing > .cs-av-today-box { display: none; }
.cs-av-n { position: absolute; left: 10px; top: 10px; z-index: 2; background: var(--cs-bg); color: var(--cs-text); font-family: var(--cs-font-display); font-weight: 700; font-size: 17px; line-height: 1; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--cs-border); }

/* pacchi chiusi */
.cs-av-wrapped { border: 1px solid var(--cs-border); background:
  linear-gradient(90deg, transparent calc(50% - 8px), var(--rib) calc(50% - 8px) calc(50% + 8px), transparent calc(50% + 8px)),
  linear-gradient(0deg, transparent calc(50% - 8px), var(--rib) calc(50% - 8px) calc(50% + 8px), transparent calc(50% + 8px)), var(--paper); }
.cs-av-bow { position: absolute; left: calc(50% - 25px); top: calc(50% - 27px); width: 50px; height: 30px; fill: var(--rib); stroke: rgba(18,11,31,.55); stroke-width: 1.5; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.cs-av-when { position: absolute; right: 10px; bottom: 10px; font-size: 11px; font-weight: 600; color: var(--cs-text); background: rgba(18,11,31,.7); padding: 3px 8px; border-radius: 999px; }
.cs-av-when:empty { display: none; }

/* pacchi scartati → recensione */
.cs-av-open { overflow: hidden; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(18,11,31,.05) 30%, rgba(18,11,31,.88)), var(--img, none) center / cover no-repeat, var(--tone); transition: transform .2s ease, box-shadow .2s ease; }
.cs-av-open:hover, .cs-av-open:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.45); color: #fff; }
.cs-av-tag { position: absolute; right: 10px; top: 10px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(0,0,0,.45); padding: 4px 8px; border-radius: 999px; }
.cs-av-name { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; gap: 2px; }
.cs-av-name strong { font-family: var(--cs-font-display); font-size: 15px; line-height: 1.12; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.cs-av-name small { font-size: 12px; color: rgba(255,255,255,.85); }
.cs-av-door.is-wide .cs-av-name strong, .cs-av-door.is-tall .cs-av-name strong { font-size: 18px; }
.cs-av-door.is-lg .cs-av-name strong { font-size: 24px; }
.cs-av-door.is-xl .cs-av-name strong { font-size: 34px; }
.cs-av-door.is-sm .cs-av-tag { display: none; }

/* pacco di oggi: animato per invogliare il clic */
.cs-av-today-box { width: 100%; height: 100%; padding: 0; cursor: pointer; font: inherit; color: var(--cs-text); border: 0;
  background: linear-gradient(90deg, transparent calc(50% - 10px), #FFC93C calc(50% - 10px) calc(50% + 10px), transparent calc(50% + 10px)),
  linear-gradient(0deg, transparent calc(50% - 10px), #FFC93C calc(50% - 10px) calc(50% + 10px), transparent calc(50% + 10px)), linear-gradient(160deg, #C2185B, #FF4F9A);
  animation: cs-av-jiggle 3s ease-in-out infinite, cs-av-halo 2s ease-in-out infinite; }
.cs-av-today-box:focus-visible { outline: 3px solid #FFC93C; outline-offset: 3px; }
.cs-av-today-box .cs-av-bow { width: 64px; height: 38px; left: calc(50% - 32px); top: calc(50% - 34px); fill: #FFC93C; stroke: #8A5A00; animation: cs-av-bob 1.4s ease-in-out infinite; }
.cs-av-call { position: absolute; right: 10px; bottom: 10px; background: #FFC93C; color: #2A1A00; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; animation: cs-av-bob 1.4s ease-in-out infinite; }
.cs-av-spk { position: absolute; width: 16px; height: 16px; animation: cs-av-twinkle 1.8s ease-in-out infinite; }
.cs-av-spk svg { width: 100%; height: 100%; fill: #FFF3C4; }
.cs-av-spk.s1 { top: 10px; right: 14px; }
.cs-av-spk.s2 { bottom: 18px; left: 16px; width: 11px; height: 11px; animation-delay: .6s; }
.cs-av-spk.s3 { top: 42%; left: 10px; width: 13px; height: 13px; animation-delay: 1.1s; }
@keyframes cs-av-jiggle { 0%, 72%, 100% { transform: rotate(0) scale(1); } 76% { transform: rotate(-5deg) scale(1.04); } 80% { transform: rotate(5deg) scale(1.04); } 84% { transform: rotate(-4deg); } 88% { transform: rotate(3deg); } 92% { transform: rotate(0); } }
@keyframes cs-av-halo { 0%, 100% { box-shadow: 0 0 0 2px #FFC93C, 0 0 22px rgba(255,79,154,.55); } 50% { box-shadow: 0 0 0 3px #FFC93C, 0 0 52px rgba(255,201,60,.8); } }
@keyframes cs-av-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes cs-av-twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }

.cs-av-remind { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--cs-surface); border: 1px solid var(--cs-border); border-radius: 14px; padding: 14px 18px; }
.cs-av-remind span { flex: 1 1 300px; color: var(--cs-muted); font-size: 14px; }

/* ---------- Sotto il calendario: titoli H2 nel rosa del sito ---------- */
.cs-av-below { display: flex; flex-direction: column; gap: 36px; }
.cs-av-below h2 { color: var(--cs-accent); }
.cs-av-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cs-av-quiz, .cs-av-recent { background: var(--cs-surface); border: 1px solid var(--cs-border); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.cs-av-quiz h2, .cs-av-recent h2 { margin: 0; font-size: 24px; }
.cs-av-quiz p { margin: 0; color: var(--cs-muted); }
.cs-av-quiz .cs-chip.is-active { background: var(--cs-accent); border-color: var(--cs-accent); color: var(--cs-accent-text); }
.cs-av-quiz-out { background: var(--cs-surface-2); border-radius: 14px; padding: 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.cs-av-quiz-out span { display: flex; flex-direction: column; }
.cs-av-quiz-out small { color: var(--cs-muted); }
.cs-av-quiz-out strong { font-family: var(--cs-font-display); font-size: 20px; }
.cs-av-quiz-out a { font-weight: 700; color: var(--cs-accent); text-decoration: none; }
.cs-av-recent ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cs-av-recent li a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--cs-surface-2); color: var(--cs-text); text-decoration: none; }
.cs-av-recent li a:hover { background: var(--cs-chip); color: var(--cs-text); }
.cs-av-recent li span:last-child { display: flex; flex-direction: column; }
.cs-av-recent small { color: var(--cs-muted); }
.cs-av-thumb { flex: none; width: 84px; height: 54px; border-radius: 8px; overflow: hidden; background: var(--tone); }
.cs-av-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Animazione "scarta il pacco" ---------- */
.cs-av-unwrap { position: fixed; inset: 0; z-index: 1000; background: rgba(11, 6, 20, .9); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; overflow-y: auto; }
.cs-av-unwrap[hidden] { display: none; }
.cs-av-unwrap-stage { position: relative; width: min(420px, 100%); min-height: 560px; display: flex; align-items: center; justify-content: center; }
.cs-av-ux-burst { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, #FFC93C 0%, rgba(255,79,154,.55) 40%, transparent 70%); opacity: 0; }
.cs-av-ux-confetti i { position: absolute; left: 50%; top: 50%; width: 9px; height: 14px; border-radius: 2px; background: var(--c); opacity: 0; }
.cs-av-ux-box { position: absolute; bottom: 90px; left: calc(50% - 100px); width: 200px; height: 170px; }
.cs-av-ux-base { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; border-radius: 10px; background: linear-gradient(90deg, transparent 88px, #FFC93C 88px 112px, transparent 112px), linear-gradient(160deg, #C2185B, #FF4F9A); }
.cs-av-ux-lid { position: absolute; top: 0; left: -10px; right: -10px; height: 46px; border-radius: 8px; background: linear-gradient(90deg, transparent 98px, #FFC93C 98px 122px, transparent 122px), #A3134C; }
.cs-av-ux-lid .cs-av-bow { width: 80px; height: 48px; left: calc(50% - 40px); top: -40px; fill: #FFC93C; stroke: #8A5A00; }
.cs-av-ux-card { position: relative; width: min(360px, 100%); box-sizing: border-box; background: var(--cs-surface); border: 1px solid #FFC93C; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 0 60px rgba(255,79,154,.35); opacity: 0; }
.cs-av-ux-media { position: relative; aspect-ratio: 16 / 8.5; background: var(--bg, none) center / cover no-repeat, var(--tone, var(--cs-surface-2)); }
.cs-av-ux-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.cs-av-ux-body > small:first-child { font-size: 12px; color: var(--cs-muted); text-transform: uppercase; letter-spacing: .12em; }
.cs-av-ux-body strong { font-family: var(--cs-font-display); font-size: 26px; line-height: 1.12; }
.cs-av-ux-body > span { font-size: 13px; color: var(--cs-muted); }
.cs-av-ux-body .cs-button { justify-content: center; }
.cs-av-ux-body .cs-link { background: none; border: 0; color: var(--cs-muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 6px; }
.cs-av-ux-legal { color: #8E80B0; font-size: 12px; }
.cs-av-unwrap.is-playing .cs-av-ux-box { animation: cs-av-shake .9s ease-in-out 1, cs-av-boxout .5s ease-in 1.5s forwards; }
.cs-av-unwrap.is-playing .cs-av-ux-lid { animation: cs-av-lid .55s cubic-bezier(.3,1.4,.6,1) .9s forwards; }
.cs-av-unwrap.is-playing .cs-av-ux-burst { animation: cs-av-burst .9s ease-out 1s both; }
.cs-av-unwrap.is-playing .cs-av-ux-confetti i { animation: cs-av-conf 1.4s ease-out 1.05s both; }
.cs-av-unwrap.is-playing .cs-av-ux-card { animation: cs-av-rise .7s cubic-bezier(.2,1.3,.4,1) 1.35s both; }
@keyframes cs-av-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 40% { transform: rotate(7deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(5deg); } }
@keyframes cs-av-lid { to { transform: translate(90px, -230px) rotate(38deg); opacity: 0; } }
@keyframes cs-av-burst { 0% { transform: scale(.2); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes cs-av-rise { 0% { transform: translateY(120px) scale(.25); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes cs-av-boxout { to { transform: translateY(80px) scale(.8); opacity: 0; } }
@keyframes cs-av-conf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(540deg); opacity: 0; } }
body.cs-av-lock { overflow: hidden; }

/* ---------- Tablet e telefono ---------- */
@media (max-width: 1100px) {
  .cs-av-hero { grid-template-columns: minmax(0, 1fr); padding: 28px; }
  .cs-av-duo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cs-av-hero { padding: 22px; gap: 22px; }
  .cs-av-orns ul { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .cs-av-orn-ball { width: 76px; height: 76px; }
  .cs-av-orn-ball svg { width: 40px; height: 40px; }
  .cs-av-garland { display: none; }
  .cs-av-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(16, 104px); gap: 10px; }
  .cs-av-door { grid-column: var(--mc) / span var(--mw); grid-row: var(--mr) / span var(--mh); }
  .cs-av-door.is-xl .cs-av-name strong { font-size: 26px; }
  .cs-av-door.is-lg .cs-av-name strong { font-size: 20px; }
  .cs-av-door .cs-av-tag { display: none; }
  .cs-av-name small { display: none; }
  .cs-av-call { font-size: 10px; padding: 4px 7px; }
  .cs-av-ux-box { transform: scale(.85); }
  .cs-av-ux-body strong { font-size: 22px; }
  .cs-av-unwrap-stage { min-height: 0; padding: 40px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-av-snow i, .cs-av-orn, .cs-av-garland .cs-av-garland-lights, .cs-av-today-box, .cs-av-today-box .cs-av-bow, .cs-av-call, .cs-av-spk { animation: none !important; }
  .cs-av-unwrap.is-playing .cs-av-ux-box, .cs-av-unwrap.is-playing .cs-av-ux-confetti i, .cs-av-unwrap.is-playing .cs-av-ux-burst { animation: none !important; display: none; }
  .cs-av-unwrap.is-playing .cs-av-ux-card { animation: none !important; opacity: 1; }
}
