/* Motor del calendario. Todo vive bajo .adv para no chocar con la página que lo aloja. */
.adv { --brand: #b5532a; --b2: #f1c27b; --ink: #2a1408; --fd: Georgia, serif; --fb: system-ui, sans-serif; --fn: var(--fd);
  container-type: inline-size; position: relative; font-family: var(--fb); color: #fff; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.adv *, .adv *::before, .adv *::after { box-sizing: border-box; }
.adv [hidden] { display: none !important; }
.adv button { font: inherit; color: inherit; cursor: pointer; }
.adv :focus-visible { outline: 2px solid var(--b2); outline-offset: 2px; }

.adv-cal { position: relative; border-radius: 22px; overflow: hidden; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(0,0,0,.55); }
.adv-escena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.adv-cab { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0)); }
.adv-marca { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.adv-marca b { font-family: var(--fd); font-weight: var(--fdw, 400); font-size: 30px; overflow-wrap: anywhere; }
.adv-marca img { max-height: 46px; max-width: 170px; object-fit: contain; display: block; }
.adv-marca span { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; opacity: .88; margin-top: 6px; }
.adv-lema { text-align: right; font-size: 12.5px; opacity: .94; max-width: 24ch; margin: 0; }
.adv-lema strong { display: block; font-family: var(--fd); font-weight: var(--fdw, 400); font-style: italic; font-size: 22px; line-height: 1.05; color: var(--b2); }
.adv-idioma { display: inline-flex; gap: 2px; background: rgba(0,0,0,.35); border-radius: 14px; padding: 2px; margin-bottom: 6px; }
.adv-idioma button { border: 0; background: none; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 12px; }
.adv-idioma button[aria-pressed="true"] { background: var(--b2); color: var(--ink); }

.adv-grilla { position: relative; z-index: 1; list-style: none; margin: 0; padding: 4px 14px 18px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@container (max-width: 640px) {
  .adv-grilla { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 2px 8px 12px; }
  .adv-cab { padding: 14px 14px 8px; } .adv-marca b { font-size: 24px; } .adv-lema { font-size: 11px; } .adv-lema strong { font-size: 18px; }
  .adv-puerta .adv-pil { font-size: 8.5px; padding: 1px 6px; letter-spacing: .03em; }
}
.adv-12 .adv-grilla { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@container (max-width: 640px) { .adv-12 .adv-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.adv-grilla li { aspect-ratio: 1 / 1.08; perspective: 700px; position: relative; }
.adv-dentro, .adv-puerta { position: absolute; inset: var(--ins, 6px); border-radius: 10px; }
.adv .adv-dentro { background: #fffaf2; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 6px; overflow: hidden; border: 0; }
.adv-dentro svg { width: 34%; max-width: 42px; height: auto; color: var(--brand); flex: none; }
.adv-dentro img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adv-dentro.con-foto span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 6px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.adv-dentro span { font-size: 11px; line-height: 1.15; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; position: relative; }
@container (max-width: 400px) { .adv-dentro span { font-size: 9.5px; } }
.adv-grilla li:not(.abierta) .adv-dentro { visibility: hidden; }

.adv-puerta { border: 0; padding: 0; background-color: transparent; background-repeat: no-repeat; display: grid; place-items: center; color: #fff; z-index: 2;
  transform-origin: left center; transition: transform .85s cubic-bezier(.3,.8,.25,1), opacity .6s, box-shadow .85s; }
.adv-num { position: relative; z-index: 2; line-height: 1; text-shadow: 0 2px 10px rgba(0,0,0,.45); font-family: var(--fn); font-weight: var(--fnw, 400); font-size: clamp(22px, 6cqi, 40px); }
.adv-pil { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); z-index: 2; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adv-puerta.hoy .adv-pil { background: var(--b2); color: var(--ink); }
.adv-puerta.cerrada { cursor: not-allowed; }
.adv-puerta.cerrada .adv-num { opacity: .8; }
.adv-puerta.hoy::after { content: ""; position: absolute; inset: -3px; border-radius: 12px; box-shadow: 0 0 0 2px var(--b2), 0 0 22px 2px var(--b2); animation: adv-late 1.8s ease-in-out infinite; pointer-events: none; }
@keyframes adv-late { 50% { opacity: .35; } }
.adv-puerta.tiembla { animation: adv-tiembla .45s; }
@keyframes adv-tiembla { 20%, 60% { transform: translateX(-4px) rotate(-1deg); } 40%, 80% { transform: translateX(4px) rotate(1deg); } }
.adv-grilla li.ultima .adv-puerta { box-shadow: 0 0 0 2px var(--b2), inset 0 0 0 999px rgba(0,0,0,.08); }

/* Ventanas */
.st-troquel .adv-puerta { outline: 2px dashed rgba(255,255,255,.75); outline-offset: -5px; box-shadow: inset 0 0 0 999px rgba(0,0,0,.14); }
.st-escarcha .adv-puerta { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6), inset 0 0 0 999px rgba(255,255,255,.16); backdrop-filter: blur(7px) saturate(1.2); -webkit-backdrop-filter: blur(7px) saturate(1.2); background-image: none !important; }
.st-regalo .adv-puerta { background-size: cover !important; background-position: center !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.st-regalo .adv-puerta::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; opacity: .92;
  background: linear-gradient(90deg, transparent calc(50% - 5px), var(--b2) calc(50% - 5px), var(--b2) calc(50% + 5px), transparent calc(50% + 5px)), linear-gradient(0deg, transparent calc(50% - 5px), var(--b2) calc(50% - 5px), var(--b2) calc(50% + 5px), transparent calc(50% + 5px)); }
.st-regalo .adv-num { background: rgba(255,250,242,.95); color: var(--ink); border-radius: 50%; width: 2.1em; height: 2.1em; display: grid; place-items: center; text-shadow: none; font-size: clamp(15px, 3.4cqi, 24px); }

/* Números */
.nm-script { --fn: "Pinyon Script", "Snell Roundhand", cursive; --fnw: 400; }
.nm-script .adv-num { font-size: clamp(30px, 8cqi, 54px); }
.nm-moderno { --fn: "Unbounded", "Arial Black", sans-serif; --fnw: 700; }
.nm-moderno .adv-num { font-size: clamp(18px, 4.6cqi, 30px); letter-spacing: -.02em; }
.nm-sello { --fn: "Unbounded", "Arial Black", sans-serif; --fnw: 500; }
.nm-sello .adv-num { font-size: clamp(13px, 3cqi, 19px); width: 2.5em; height: 2.5em; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid currentColor; background: rgba(0,0,0,.25); }
.st-regalo.nm-sello .adv-num { border: 0; }

/* Aperturas */
.ap-puerta .adv-grilla li.abierta .adv-puerta { transform: rotateY(-98deg); box-shadow: -10px 0 22px rgba(0,0,0,.35); pointer-events: none; }
.ap-giro .adv-puerta { transform-origin: center; }
.ap-giro .adv-grilla li.abierta .adv-puerta { transform: rotateY(90deg) scale(.9); opacity: 0; pointer-events: none; }
.ap-regalo .adv-grilla li.abierta .adv-puerta { animation: adv-tapa .9s cubic-bezier(.3,.7,.3,1) forwards; pointer-events: none; }
@keyframes adv-tapa { 0% { transform: none; } 25% { transform: translateY(4px) scale(.96); } 45% { transform: translateY(-14%) scale(1.06) rotate(-4deg); opacity: 1; } 100% { transform: translateY(-130%) rotate(-16deg) scale(.9); opacity: 0; } }
.ap-raspar .adv-grilla li.abierta .adv-puerta { opacity: 0; transform: scale(.85); pointer-events: none; }
.adv-grilla li.ya .adv-puerta { transition: none !important; animation: none !important; }
.ap-regalo .adv-grilla li.ya.abierta .adv-puerta, .ap-raspar .adv-grilla li.ya.abierta .adv-puerta { opacity: 0; }
.adv-grilla li.abierta .adv-dentro { animation: adv-sale .5s .25s both; }
.adv-grilla li.ya .adv-dentro { animation: none; }
@keyframes adv-sale { from { transform: scale(.9); opacity: 0; } }

/* Tarjeta */
.adv-velo { position: fixed; inset: 0; z-index: 40; background: rgba(15,10,6,.62); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.adv-tarjeta { position: relative; width: min(500px, 100%); margin: auto; background: #fffaf2; color: #241a12; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); animation: adv-sube .5s cubic-bezier(.2,.9,.25,1); }
.adv-tarjeta:focus { outline: none; }
@keyframes adv-sube { from { transform: translateY(30px) scale(.94); opacity: 0; } }
.adv-cerrar { position: sticky; top: 12px; float: right; margin: 12px 12px -52px 0; z-index: 4; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: #241a12 !important; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.adv-cerrar svg { width: 18px; height: 18px; display: block; }
.adv-portada { position: relative; height: 200px; background: var(--ink); overflow: hidden; display: grid; place-items: center; }
.adv-portada canvas, .adv-portada > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adv-portada > img + .adv-gran { display: none; }
.adv-gran { position: relative; font-family: var(--fd); font-weight: var(--fdw, 400); font-size: 92px; line-height: 1; color: var(--b2); text-shadow: 0 6px 30px rgba(0,0,0,.4); text-align: center; }
.adv-gran small { display: block; font-family: var(--fb); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #fff; margin-top: 4px; font-weight: 600; }
.adv-cuerpo { padding: 18px 20px 20px; display: grid; gap: 12px; }
.adv-cuerpo > * { animation: adv-aparece .5s both; }
.adv-cuerpo > *:nth-child(2) { animation-delay: .08s; } .adv-cuerpo > *:nth-child(3) { animation-delay: .16s; } .adv-cuerpo > *:nth-child(4) { animation-delay: .24s; } .adv-cuerpo > *:nth-child(5) { animation-delay: .32s; }
@keyframes adv-aparece { from { opacity: 0; transform: translateY(10px); } }
.adv-tipo { justify-self: start; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; background: var(--brand); color: #fff; padding: 3px 10px; border-radius: 10px; }
.adv-cuerpo h3 { font-family: var(--fd); font-weight: var(--fdw, 400); font-size: 27px; line-height: 1.12; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.adv-cuerpo p { margin: 0; color: #5b4f44; font-size: 15.5px; white-space: pre-line; overflow-wrap: anywhere; }
.adv-codigo { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 2px dashed var(--brand); border-radius: 14px; padding: 10px 12px 10px 16px; background: #fff; }
.adv-codigo code { font-family: "Unbounded", "Arial Black", sans-serif; font-size: 18px; font-weight: 700; letter-spacing: .06em; color: var(--ink); overflow-wrap: anywhere; }
.adv-codigo button { border: 0; background: var(--ink); color: #fff !important; border-radius: 10px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; flex: none; }
.adv-cta { display: flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 16px; background: var(--brand); color: #fff !important; font-weight: 600; font-size: 15.5px; width: 100%; text-decoration: none; }
.adv-cta svg { width: 19px; height: 19px; }
.adv-pie { font-size: 11.5px; color: #8a7d70; text-align: center; margin: 0; }
.adv-pie a { color: inherit; }
.adv-raspa { position: absolute; inset: 0; z-index: 3; touch-action: none; cursor: grab; }
.adv-raspa-txt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--ink); text-align: center; }
.adv-revelar { position: absolute; right: 12px; bottom: 12px; z-index: 5; border: 0; border-radius: 16px; background: rgba(0,0,0,.55); color: #fff !important; font-size: 12px; font-weight: 600; padding: 6px 12px; }

.adv-aviso { position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 60; background: #1d1a16; color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 14px; max-width: calc(100% - 32px); text-align: center; }
.adv-lluvia { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
.adv-marcaagua { position: relative; z-index: 2; text-align: center; padding: 0 0 12px; }
.adv-marcaagua a { display: inline-block; color: #fff; font-size: 11px; text-decoration: none; background: rgba(0,0,0,.42); padding: 3px 10px; border-radius: 10px; }
.adv-previa { position: relative; z-index: 3; background: var(--b2); color: var(--ink); text-align: center; font-size: 12px; font-weight: 700; padding: 6px 10px; letter-spacing: .04em; }
@media (prefers-reduced-motion: reduce) { .adv *, .adv *::before, .adv *::after { animation: none !important; transition: none !important; } }
