/* Celebraciones · segunda colección (100–119): las aperturas propias y las estructuras nuevas.
   Aperturas (.ap-escena .ap-<tipo>): usan el mismo tiempo que el sobre — html.so-abre al tocar, html.so-expande a los 1,75 s,
   y la entrada se desvanece a los 2 s. Estructuras: clases es-* en <body>; las secciones reciben .llego al entrar (vivo.js). */

/* ================================================================ APERTURAS · base común */
.ap-escena .so-contenido { gap: 18px; }
.ap-obj { position: relative; display: block; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transform-style: preserve-3d; }
.ap-obj:focus-visible { outline: 2px solid var(--so-acento, var(--acento)); outline-offset: 12px; border-radius: 10px; }
.ap-obj img { display: block; width: 100%; height: auto; pointer-events: none; }
.ap-titulo { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--so-texto, #fff); transition: opacity .5s ease, transform .6s ease; }
.ap-titulo small { font: 700 .62rem/1.2 var(--sans), sans-serif; letter-spacing: .42em; text-transform: uppercase; color: var(--so-acento, var(--acento)); }
.ap-titulo strong { font-family: var(--display), var(--script), serif; font-weight: var(--display-peso, 400); font-style: var(--display-estilo, normal); font-size: clamp(1.9rem, 8vw, 3.2rem); line-height: 1; color: inherit; text-wrap: balance; }
.ap-titulo em { font: 600 .66rem/1 var(--sans), sans-serif; font-style: normal; letter-spacing: .3em; color: var(--so-texto-2, currentColor); }
html.so-abre .so-contenido > .ap-titulo { opacity: 0; transform: translateY(-14px); }
@keyframes ap-flota { from { transform: translateY(-6px) rotate(-.8deg); } to { transform: translateY(6px) rotate(.8deg); } }

/* ---------------------------------------------------------------- bola de espejos (100) */
.ap-bola .ap-obj { width: min(52vw, 270px); transform-origin: 50% -60vh; animation: ap-pendulo 3.8s ease-in-out infinite alternate; }
@keyframes ap-pendulo { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
.ap-hilo { position: absolute; left: 50%; bottom: 96%; width: 2px; height: 60vh; translate: -50% 0; background: linear-gradient(transparent, #C9CCD6); }
.ap-bola-luz, .ap-bola .ap-bola { filter: brightness(.42) saturate(.35) drop-shadow(0 20px 30px rgb(0 0 0 / .5)); transition: filter .8s ease; }
.ap-flash { position: absolute; inset: -40%; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 255 255 / .9), rgb(229 57 143 / .35) 45%, transparent 70%); opacity: 0; pointer-events: none; }
.ap-luces, .ap-luces::after { position: absolute; inset: -60%; z-index: 0; pointer-events: none; }
.ap-luces { opacity: 0; transition: opacity .6s ease .2s; background: radial-gradient(circle at 44% 22%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 12% 71%, var(--l1, #E5398F) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 77% 10%, var(--l2, #8E7CF0) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 14% 58%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 33% 14%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 75% 18%, var(--l2, #8E7CF0) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 76% 77%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 31% 8%, var(--l2, #8E7CF0) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 56% 21%, var(--l1, #E5398F) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 74% 90%, var(--l2, #8E7CF0) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 77% 76%, var(--l2, #8E7CF0) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 15% 73%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 82% 29%, var(--l1, #E5398F) 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 43% 62%, var(--l1, #E5398F) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 41% 34%, var(--l2, #8E7CF0) 0 0.7vmax, transparent 1.5vmax), radial-gradient(circle at 13% 76%, #FFF6E0 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 46% 96%, var(--l1, #E5398F) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 80% 12%, var(--l1, #E5398F) 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 24% 46%, var(--l2, #8E7CF0) 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 56% 8%, var(--l1, #E5398F) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 46% 91%, #FFF6E0 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 77% 61%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 37% 63%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 96% 92%, #FFF6E0 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 39% 94%, var(--l1, #E5398F) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 5% 62%, #FFF6E0 0 0.7vmax, transparent 1.5vmax); filter: blur(1.5px); }
.ap-luces::after { content: ""; inset: 0; background: radial-gradient(circle at 81% 17%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 30% 39%, var(--l2, #8E7CF0) 0 0.7vmax, transparent 1.5vmax), radial-gradient(circle at 53% 53%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 24% 60%, var(--l1, #E5398F) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 20% 58%, #FFF6E0 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 48% 90%, var(--l1, #E5398F) 0 0.7vmax, transparent 1.5vmax), radial-gradient(circle at 22% 13%, var(--l2, #8E7CF0) 0 0.7vmax, transparent 1.5vmax), radial-gradient(circle at 32% 87%, var(--l2, #8E7CF0) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 65% 78%, var(--l2, #8E7CF0) 0 0.9vmax, transparent 2.0vmax), radial-gradient(circle at 39% 3%, var(--l2, #8E7CF0) 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 71% 50%, #FFF6E0 0 0.7vmax, transparent 1.5vmax), radial-gradient(circle at 91% 68%, var(--l1, #E5398F) 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 90% 74%, var(--l1, #E5398F) 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 54% 53%, var(--l1, #E5398F) 0 1.1vmax, transparent 2.4vmax), radial-gradient(circle at 84% 54%, var(--l1, #E5398F) 0 0.7vmax, transparent 1.5vmax), radial-gradient(circle at 11% 29%, var(--l1, #E5398F) 0 0.7vmax, transparent 1.5vmax), radial-gradient(circle at 17% 46%, var(--l1, #E5398F) 0 0.5vmax, transparent 1.1vmax), radial-gradient(circle at 3% 75%, var(--l2, #8E7CF0) 0 0.5vmax, transparent 1.1vmax); animation: ap-rota 13s linear infinite reverse; }
html.so-abre .ap-bola .ap-bola { filter: brightness(1.15) saturate(1.2) drop-shadow(0 0 40px rgb(229 57 143 / .55)); }
html.so-abre .ap-bola .ap-obj { animation: ap-gira .9s ease-in-out 2; }
@keyframes ap-gira { 50% { transform: scale(1.06) rotate(1.5deg); } }
html.so-abre .ap-flash { animation: ap-flash 1.2s ease-out .15s; }
@keyframes ap-flash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: .9; } 100% { opacity: 0; transform: scale(1.4); } }
html.so-abre .ap-luces { opacity: 1; animation: ap-rota 9s linear infinite; }
@keyframes ap-rota { to { transform: rotate(360deg); } }
html.so-expande .ap-bola .ap-obj { transform: translateY(-30vh) scale(.6); opacity: 0; transition: transform 1s cubic-bezier(.6,0,.4,1), opacity .8s ease .2s; animation: none; }

/* ---------------------------------------------------------------- pantalla de juego (102) */
.ap-start .ap-obj { width: min(90vw, 460px); }
.ap-pantalla { position: relative; display: grid; justify-items: center; gap: 14px; padding: 34px 20px 26px; overflow: hidden; background: #0B0B1A; color: #fff; text-align: center;
	box-shadow: 0 0 0 4px #0B0B1A, 0 0 0 8px var(--so-acento, #2DE2E6), 0 0 0 12px #0B0B1A, 0 0 50px rgb(45 226 230 / .35); image-rendering: pixelated; }
.ap-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 3px); }
.ap-pantalla small { font: 400 .55rem/1.6 "Press Start 2P", monospace; letter-spacing: .1em; color: #FFD23F; }
.ap-pantalla strong { font: 400 clamp(1.3rem, 7vw, 2.3rem)/1.25 "Press Start 2P", monospace; color: #fff; text-shadow: 3px 3px 0 #FF3EA5, -3px -3px 0 #2DE2E6; overflow-wrap: anywhere; }
.ap-nivel { font: 400 .62rem/1.5 "Press Start 2P", monospace; color: #3DDC84; }
.ap-start { font: 400 .72rem/1.4 "Press Start 2P", monospace; color: #FFD23F; animation: ap-parpadeo 1s steps(1) infinite; }
@keyframes ap-parpadeo { 50% { opacity: 0; } }
.ap-moneda { width: 44px !important; animation: ap-moneda 1.2s steps(6) infinite; }
@keyframes ap-moneda { 50% { transform: scaleX(.15); } }
html.so-abre .ap-start { animation: ap-parpadeo .14s steps(1) 8; }
html.so-abre .ap-pantalla { animation: ap-pixel 1.6s steps(8) forwards .4s; }
@keyframes ap-pixel { 0% { filter: none; } 60% { filter: blur(2px) contrast(1.6); transform: scale(1.04); } 100% { filter: blur(6px) brightness(3); transform: scale(1.25); opacity: 0; } }
html.so-expande .ap-start .so-escena::before { opacity: 0; }

/* ---------------------------------------------------------------- telón de circo (103) */
.ap-cortina { position: absolute; top: 0; bottom: 0; z-index: 1; width: 51%; background: #8E1F1C center top / auto 100% repeat-x;
	box-shadow: inset 0 0 80px rgb(0 0 0 / .45); transition: transform 1.5s cubic-bezier(.6,0,.25,1) .35s; }
.ap-ti { left: 0; background-position: right top; transform-origin: 0 0; }
.ap-td { right: 0; background-position: left top; transform-origin: 100% 0; }
.ap-bambalina { position: absolute; z-index: 2; inset: 0 0 auto; height: 13vh; background: linear-gradient(180deg, #6E1512, #A8261F 70%, #8E1F1C);
	-webkit-mask: radial-gradient(28px 22px at 50% 100%, transparent 98%, #000) 0 0 / 56px 100%; mask: radial-gradient(28px 22px at 50% 100%, transparent 98%, #000) 0 0 / 56px 100%;
	box-shadow: 0 6px 0 #D9A53B; transition: transform 1s cubic-bezier(.6,0,.3,1); }
.ap-bambalina::after { content: ""; position: absolute; inset: auto 0 0; height: 8px; background: repeating-linear-gradient(90deg, #D9A53B 0 6px, #B8862A 6px 9px); }
.ap-escena.ap-telon .so-contenido { z-index: 3; }
.ap-telon .ap-obj { width: min(84vw, 380px); animation: ap-cuelga 3.4s ease-in-out infinite alternate; transform-origin: 50% -20%; }
@keyframes ap-cuelga { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
.ap-cartel { position: relative; display: grid; justify-items: center; padding: 34px 26px; background: #F6EBD2; color: #1F3557; border-radius: 12px; box-shadow: 0 30px 50px -20px rgb(0 0 0 / .6), inset 0 0 0 4px #F6EBD2, inset 0 0 0 7px #C8332E; }
.ap-cartel .ap-titulo { color: #1F3557; } .ap-cartel .ap-titulo small { color: #C8332E; } .ap-cartel .ap-titulo em { color: #1F3557; }
.ap-focos { position: absolute; inset: -10px; border-radius: 18px; padding: 9px; pointer-events: none;
	background: radial-gradient(circle, #FFF3C4 0 3px, #E7B24A 3.6px 5px, transparent 5.5px) 0 0 / 24px 24px;
	-webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	animation: ap-focos 1.4s steps(2) infinite; }
@keyframes ap-focos { 50% { filter: brightness(.55); background-position: 12px 0; } }
html.so-abre .ap-telon .ap-obj { animation: none; transform: translateY(-70vh) rotate(-6deg); transition: transform .9s cubic-bezier(.6,0,.4,1); }
html.so-abre .ap-ti { transform: translateX(-102%) skewX(4deg); }
html.so-abre .ap-td { transform: translateX(102%) skewX(-4deg); }
html.so-expande .ap-bambalina { transform: translateY(-110%); }
.ap-escena.ap-telon::before { background: radial-gradient(70% 60% at 50% 40%, #3A1210, #120606 85%); }

/* ---------------------------------------------------------------- plano que se desenrolla (107) */
.ap-rollo .ap-obj { width: min(88vw, 470px); aspect-ratio: 1.05; }
.ap-tubo { position: absolute; z-index: 2; left: 50%; top: 50%; width: 46% !important; translate: -50% -50%; filter: drop-shadow(0 20px 26px rgb(0 0 0 / .45)); transition: transform .8s cubic-bezier(.6,0,.4,1), opacity .5s ease .3s; animation: ap-flota 4s ease-in-out infinite alternate; }
.ap-plano { position: absolute; inset: 0; display: grid; place-items: center; background: #1B4F8A center / cover; border-radius: 4px;
	box-shadow: 0 30px 50px -24px rgb(0 0 0 / .6), inset 0 0 0 1px rgb(255 255 255 / .3); clip-path: inset(0 0 100% 0); transition: clip-path 1.25s cubic-bezier(.65,0,.3,1) .45s; }
.ap-plano::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(14 42 74 / .1), rgb(14 42 74 / .55)); }
.ap-plano-in { position: relative; z-index: 1; padding: 18px 22px; background: rgb(14 42 74 / .72); border: 1px solid rgb(234 242 251 / .6); }
.ap-plano-in .ap-titulo { color: #EAF2FB; } .ap-plano-in .ap-titulo small { color: #F2C14E; }
html.so-abre .ap-tubo { transform: translate(60vw, -20vh) rotate(40deg); opacity: 0; animation: none; }
html.so-abre .ap-plano { clip-path: inset(0); }

/* ---------------------------------------------------------------- mapa que se despliega (119) */
.ap-mapa .ap-obj { width: min(94vw, 540px); aspect-ratio: 1.25; perspective: 1400px; }
.ap-hoja { position: absolute; inset: 0; transform-style: preserve-3d; }
.ap-p { position: absolute; top: 0; bottom: 0; width: 33.4%; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.6,0,.3,1); }
.ap-p::before, .ap-p::after { content: ""; position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ap-p::before { background: #F6F1E4 0 0 / 300% 100%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.ap-p::after { transform: rotateY(180deg); background: #EDE6D4; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.ap-p1 { left: 0; transform-origin: 100% 50%; transform: rotateY(179.5deg) translateZ(-1px); }
.ap-p2 { left: 33.3%; }
.ap-p3 { left: 66.6%; transform-origin: 0 50%; transform: rotateY(-179.5deg) translateZ(-2px); }
.ap-p1::before { background-position: 0 0; } .ap-p2::before { background-position: 50% 0; } .ap-p3::before { background-position: 100% 0; }
.ap-dorso { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 14px 8px; transform: rotateY(180deg) translateZ(1px); backface-visibility: hidden; -webkit-backface-visibility: hidden;
	background: linear-gradient(160deg, #F6F1E4, #E6DCC5); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08), 0 20px 40px -20px rgb(0 0 0 / .5); }
.ap-icono { width: 70% !important; }
.ap-titulo-dorso strong { font-size: clamp(1.1rem, 4.6vw, 1.6rem); }
.ap-titulo-dorso small { letter-spacing: .26em; font-size: .52rem; } .ap-titulo-dorso em { letter-spacing: .14em; font-size: .56rem; }
.ap-mapa .ap-titulo-dorso { color: #2E4A3A; }
.ap-mapa .ap-obj:not(:focus) .ap-hoja { animation: ap-flota 4.4s ease-in-out infinite alternate; }
html.so-abre .ap-p3 { transform: rotateY(0) translateZ(0); transition-delay: .15s; }
html.so-abre .ap-p1 { transform: rotateY(0) translateZ(0); transition-delay: .7s; }
html.so-abre .ap-hoja { animation: none; }

/* ---------------------------------------------------------------- pasaporte que se abre (109) */
.ap-libro-escena, .ap-libro .ap-obj { perspective: 1500px; }
.ap-libro .ap-obj { width: min(60vw, 290px); aspect-ratio: .75; }
.ap-libro .ap-libro { position: absolute; inset: 0; transform-style: preserve-3d; animation: ap-flota 4.6s ease-in-out infinite alternate; transition: transform 1.1s cubic-bezier(.6,0,.3,1) .1s; }
.ap-pagina { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 20px; border-radius: 6px;
	background: radial-gradient(circle at 50% 50%, transparent 0 30%, rgb(30 58 95 / .06) 31% 32%, transparent 33%) 0 0 / 34px 34px, repeating-radial-gradient(circle at 30% 120%, rgb(111 154 122 / .12) 0 1px, transparent 1px 9px), #F4EEDF;
	box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.ap-pagina .ap-titulo { color: #1E3A5F; } .ap-pagina .ap-titulo small { color: #B83A3A; } .ap-pagina .ap-titulo strong { font-size: clamp(1.4rem, 6vw, 2.2rem); }
.ap-sello { position: absolute; right: 8%; bottom: 8%; width: 40% !important; opacity: 0; transform: scale(2.2) rotate(-14deg); }
.ap-tapa { position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d; transition: transform 1.3s cubic-bezier(.6,0,.3,1) .15s; }
.ap-tapa-img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; border-radius: 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden; filter: drop-shadow(0 20px 26px rgb(0 0 0 / .4)); }
.ap-tapa-dorso { position: absolute; inset: 0; border-radius: 6px; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #24466F; }
html.so-abre .ap-libro .ap-libro { animation: none; transform: translateX(16%); }
html.so-abre .ap-tapa { transform: rotateY(-168deg); }
html.so-abre .ap-sello { animation: ap-sella .5s cubic-bezier(.5,0,.6,1.4) 1.2s forwards; }
@keyframes ap-sella { to { opacity: .85; transform: scale(1) rotate(-14deg); } }

/* ---------------------------------------------------------------- caja de pastelería (113) */
.ap-caja .ap-obj { width: min(78vw, 360px); aspect-ratio: 1; perspective: 1200px; }
.ap-caja .ap-caja { position: absolute; inset: 0; transform-style: preserve-3d; animation: ap-flota 4.4s ease-in-out infinite alternate; }
.ap-fondo-caja { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px; background: #F4B8C5; box-shadow: inset 0 0 0 10px #EFA6B6, inset 0 0 40px rgb(0 0 0 / .18), 0 30px 50px -24px rgb(90 58 46 / .55); overflow: hidden; }
.ap-papel { position: absolute; inset: 12px; background: repeating-linear-gradient(115deg, rgb(255 255 255 / .55) 0 14px, rgb(255 248 238 / .9) 14px 30px), #FFF8EE; filter: blur(.3px); }
.ap-fondo-caja .ap-titulo { position: relative; padding: 18px 20px; background: #FFF8EE; border-radius: 6px; box-shadow: 0 10px 22px -10px rgb(90 58 46 / .5); color: #5A3A2E; }
.ap-fondo-caja .ap-titulo strong { font-size: clamp(1.8rem, 8vw, 2.8rem); }
.ap-tapa-caja { position: absolute; inset: -2%; border-radius: 10px; background: #F4B8C5 center / cover; transform-origin: 50% 0; box-shadow: 0 30px 50px -24px rgb(90 58 46 / .6);
	transition: transform 1.2s cubic-bezier(.6,0,.3,1) .25s, opacity .6s ease .8s; }
html.so-abre .ap-caja .ap-caja { animation: none; }
html.so-abre .ap-tapa-caja { transform: translateY(-80%) rotateX(62deg) scale(1.05); opacity: 0; }

/* ---------------------------------------------------------------- terminal (115) */
.ap-terminal .ap-obj { width: min(92vw, 580px); text-align: left; }
.ap-term { display: block; border-radius: 12px; overflow: hidden; background: #0D1117; border: 1px solid rgb(88 166 255 / .25); box-shadow: 0 30px 70px -20px rgb(0 0 0 / .8), 0 0 60px rgb(63 185 80 / .12); }
.ap-barra { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #161B22; border-bottom: 1px solid rgb(255 255 255 / .06); }
.ap-barra i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; } .ap-barra i:nth-child(2) { background: #FEBC2E; } .ap-barra i:nth-child(3) { background: #28C840; }
.ap-barra b { margin-left: 10px; font: 500 .7rem/1 "IBM Plex Mono", monospace; color: #8B949E; }
.ap-lineas { display: grid; gap: 8px; padding: 22px 20px 26px; font: 400 .82rem/1.5 "IBM Plex Mono", monospace; color: #E6EDF3; min-height: 230px; }
.ap-l { opacity: 0; animation: ap-linea .01s linear forwards; }
.ap-l1 { color: #3FB950; width: 0; overflow: hidden; white-space: nowrap; animation: ap-teclea 1.6s steps(34) .3s forwards; opacity: 1; max-width: 100%; text-overflow: clip; }
@keyframes ap-teclea { to { width: 100%; } }
.ap-l2 { color: #58A6FF; text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; animation-delay: 2s; }
.ap-l3 { font: 700 clamp(1.5rem, 6.6vw, 2.4rem)/1.1 "Space Grotesk", sans-serif; color: #fff; animation-delay: 2.3s; }
.ap-l4 { color: #F0B429; animation-delay: 2.6s; }
.ap-l5 { color: #8B949E; animation-delay: 2.9s; }
.ap-l6 { display: none; color: #3FB950; }
@keyframes ap-linea { to { opacity: 1; } }
.ap-cursor { display: inline-block; width: .6em; height: 1.1em; margin-left: 4px; vertical-align: -.2em; background: #3FB950; animation: ap-parpadeo 1s steps(1) infinite; }
.ap-barra-p { display: inline-block; width: 9em; height: .8em; vertical-align: -.05em; background: linear-gradient(#3FB950 0 0) 0 0 / 0 100% no-repeat, rgb(255 255 255 / .1); animation: ap-progreso 1.1s steps(12) .1s forwards; }
@keyframes ap-progreso { to { background-size: 100% 100%; } }
html.so-abre .ap-l5 { display: none; }
html.so-abre .ap-l6 { display: block; opacity: 1; animation: none; }
html.so-abre .ap-l6 .ap-barra-p { animation: ap-progreso 1.1s steps(12) .1s forwards; }
html.so-expande .ap-term { transform: scale(1.4); opacity: 0; transition: transform 1s cubic-bezier(.6,0,.3,1), opacity .7s ease .2s; }

/* ---------------------------------------------------------------- gafete (116) */
.ap-gafete .ap-obj { width: min(58vw, 300px); perspective: 1200px; }
.ap-gafete .ap-gafete { position: relative; display: block; transform-origin: 50% 0; animation: ap-columpio 3.6s ease-in-out infinite alternate; transform-style: preserve-3d; }
@keyframes ap-columpio { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.ap-gafete-img { filter: drop-shadow(0 26px 30px rgb(0 0 0 / .35)); }
.ap-gafete-txt { position: absolute; left: 26.5%; width: 42%; top: 55%; bottom: 3%; display: grid; align-content: start; gap: 6px; padding: 6% 6% 0; text-align: left; color: #1E2230; }
.ap-gafete-txt small { font: 700 .5rem/1.2 var(--sans), sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #FF7A3D; }
.ap-gafete-txt strong { font-family: var(--display), sans-serif; font-weight: 800; font-size: clamp(.9rem, 4vw, 1.3rem); line-height: 1.05; }
.ap-gafete-txt em { font: 600 .56rem/1.3 var(--sans), sans-serif; font-style: normal; color: #2F5BFF; }
.ap-qr { height: 22px; margin-top: 4px; background: repeating-linear-gradient(90deg, #1E2230 0 2px, transparent 2px 4px, #1E2230 4px 5px, transparent 5px 8px, #1E2230 8px 11px, transparent 11px 13px); opacity: .85; }
html.so-abre .ap-gafete .ap-gafete { animation: none; transform: rotateY(360deg) scale(1.08); transition: transform 1.3s cubic-bezier(.6,0,.3,1) .1s; }
html.so-expande .ap-gafete .ap-obj { transform: translateY(-10vh) scale(1.6); opacity: 0; transition: transform 1s cubic-bezier(.6,0,.3,1), opacity .7s ease .2s; }

/* ---------------------------------------------------------------- corte de cinta (118) */
.ap-cinta .so-contenido { padding: 0; }
.ap-cinta .ap-obj { width: 100vw; height: clamp(120px, 26vw, 230px); }
.ap-cinta .ap-cinta { position: absolute; inset: 0; }
.ap-mitad { position: absolute; inset: 0; display: grid; place-items: center; transition: transform 1.1s cubic-bezier(.5,0,.75,.4) .55s, opacity .6s ease 1s; }
.ap-mitad::before { content: ""; position: absolute; left: 0; right: 0; top: 19%; height: 28%; background: linear-gradient(180deg, #F04B5A, #D62839 40%, #A5162A); box-shadow: 0 8px 14px -6px rgb(0 0 0 / .4); }
.ap-mitad img { position: relative; height: 100%; width: auto !important; }
.ap-m1 { clip-path: inset(0 50% 0 0); } .ap-m2 { clip-path: inset(0 0 0 50%); }
.ap-tijeras { position: absolute; z-index: 3; left: 4vw; top: 50%; width: clamp(80px, 20vw, 160px) !important; translate: 0 -50%; transform: rotate(-12deg); filter: drop-shadow(0 12px 14px rgb(0 0 0 / .4)); transition: transform .55s cubic-bezier(.6,0,.4,1), opacity .4s ease .9s; animation: ap-tijera 2.4s ease-in-out infinite; }
@keyframes ap-tijera { 50% { transform: rotate(-4deg) translateX(8px); } }
.ap-titulo-cinta strong { font-size: clamp(2.4rem, 11vw, 5rem); }
html.so-abre .ap-tijeras { animation: none; transform: translateX(calc(50vw - 100%)) rotate(0); opacity: 0; }
html.so-abre .ap-m1 { transform: translate(-12vw, 60vh) rotate(-28deg); opacity: 0; }
html.so-abre .ap-m2 { transform: translate(12vw, 60vh) rotate(26deg); opacity: 0; }

@media (prefers-reduced-motion: reduce) {
	.ap-escena *, .ap-escena *::before, .ap-escena *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
	.ap-l, .ap-l1 { opacity: 1; width: auto; }
}

/* ================================================================ ESTRUCTURAS */
main > .xv-sec { --rot: 0deg; }
html, body { overflow-x: clip; }
.cel .e-fecha { max-width: min(88vw, 36em); text-wrap: balance; }
.fi-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* pista de baile (100): un barrido de luz de color cruza cada sección al llegar */
.es-pista main > .xv-sec:not(#portada):not(#fecha) { overflow: clip; }
.es-pista main > .xv-sec:not(#portada):not(#fecha)::after { content: ""; position: absolute; inset: -10% 0; pointer-events: none; z-index: 0; opacity: 0; transform: translateX(-100%) skewX(-12deg);
	background: linear-gradient(100deg, transparent 25%, var(--barrido, rgb(229 57 143 / .45)) 50%, transparent 75%); mix-blend-mode: screen; }
.es-pista main > .xv-sec.llego:not(#portada):not(#fecha)::after { animation: fi-barre 1.6s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes fi-barre { 0% { opacity: 1; transform: translateX(-100%) skewX(-12deg); } 100% { opacity: 0; transform: translateX(100%) skewX(-12deg); } }
.es-pista main > .xv-sec:nth-of-type(3n) { --barrido: rgb(142 124 240 / .5); } .es-pista main > .xv-sec:nth-of-type(3n+1) { --barrido: rgb(45 226 230 / .35); }
.es-pista main > .xv-sec > .xv-ancho { position: relative; z-index: 1; }

/* mantel de picnic (101): tarjetas que caen sobre el mantel */
.es-mantel main > .xv-sec:not(#portada):not(#fecha) > .xv-ancho { transition: transform 1s cubic-bezier(.34,1.45,.64,1), opacity .5s ease; transform: rotate(var(--rot)); }
.es-mantel main > .xv-sec:not(#portada):not(#fecha):not(.llego) > .xv-ancho { opacity: 0; transform: translateY(-70px) rotate(calc(var(--rot) * -4)) scale(1.04); }
.es-mantel main > .xv-sec:nth-of-type(odd) { --rot: -1.4deg; } .es-mantel main > .xv-sec:nth-of-type(even) { --rot: 1.1deg; }

/* niveles (102) */
.ni-cab { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 26px; font: 400 .62rem/1.4 "Press Start 2P", monospace; color: #FFD23F; }
.ni-barra { height: 12px; border: 2px solid currentColor; padding: 2px; }
.ni-barra b { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #3DDC84 0 8px, transparent 8px 10px); transition: width 1.2s steps(10) .3s; }
.llego .ni-barra b { width: 100%; }
.ni-pts { color: #2DE2E6; }
.es-niveles main > .xv-sec:not(#portada):not(#fecha) > .xv-ancho { transition: clip-path .9s steps(9); }
.es-niveles main > .xv-sec:not(#portada):not(#fecha):not(.llego) > .xv-ancho { clip-path: inset(0 0 100% 0); }

/* carteles de circo (103) */
.es-carteles main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { transform-origin: 50% -40px; transition: transform 1.1s cubic-bezier(.3,1.6,.5,1), opacity .4s ease; }
.es-carteles main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho { opacity: 0; transform: translateY(-50vh) rotate(-8deg); }
.es-carteles main > .xv-sec.llego:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { animation: fi-balanceo 2.6s ease-out 1s; }
@keyframes fi-balanceo { 25% { transform: rotate(1.6deg); } 55% { transform: rotate(-.9deg); } 80% { transform: rotate(.4deg); } }
.fi-focos { position: absolute; inset: -12px; border-radius: inherit; padding: 9px; pointer-events: none; z-index: 2;
	background: radial-gradient(circle, #FFF3C4 0 3px, #E7B24A 3.6px 5px, transparent 5.5px) 0 0 / 26px 26px;
	-webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.llego .fi-focos { animation: ap-focos 1.6s steps(2) infinite; }
.fi-cuerda { position: absolute; left: 50%; top: -60px; width: 2px; height: 60px; background: #8A6A3A; }
.fi-cuerda::before { content: ""; position: absolute; left: -5px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; background: #D9A53B; }

/* menú de degustación (104) */
.es-menu main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { max-width: 620px; text-align: center; }
.es-menu .xv-cab { justify-items: center; text-align: center; }
.fi-linea { display: block; height: 1px; width: min(220px, 60%); margin: 0 auto 26px; background: linear-gradient(90deg, transparent, var(--acento), transparent); transform: scaleX(0); transition: transform 1.4s cubic-bezier(.2,.8,.2,1) .2s; }
.llego .fi-linea { transform: scaleX(1); }

/* placas de piedra (105) */
.es-placas .xv-titulo { transition: letter-spacing 1.6s cubic-bezier(.2,.8,.2,1), filter 1.2s ease, opacity 1s ease; }
.es-placas main > .xv-sec:not(.llego) .xv-titulo { letter-spacing: .32em; filter: blur(6px); opacity: 0; }

/* pulso (106) */
.fi-pulso { display: block; width: 100%; height: 46px; margin: 0 0 18px; overflow: visible; }
.fi-pulso path { fill: none; stroke: var(--pulso, var(--acento)); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.llego .fi-pulso path { animation: fi-traza 1.6s cubic-bezier(.5,0,.3,1) forwards; }
@keyframes fi-traza { to { stroke-dashoffset: 0; } }
.fi-pulso circle { fill: var(--pulso, var(--acento)); opacity: 0; }
.llego .fi-pulso circle { animation: fi-late 1.2s ease-in-out 1.6s infinite; }
@keyframes fi-late { 0%, 100% { opacity: .9; transform: scale(1); } 15% { transform: scale(1.8); } 30% { transform: scale(1); } }
.fi-pulso circle { transform-box: fill-box; transform-origin: center; }

/* láminas de plano (107) */
.fi-rotulo { position: absolute; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, auto); border-top: 1px solid currentColor; border-left: 1px solid currentColor; font: 400 .6rem/1 "Space Mono", monospace; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.fi-rotulo span { padding: 7px 10px; border-right: 1px solid currentColor; } .fi-rotulo span:last-child { border-right: 0; }
.fi-cota { position: absolute; left: 0; right: 0; top: -22px; height: 12px; border-left: 1px solid currentColor; border-right: 1px solid currentColor; opacity: .7; transform: scaleX(0); transition: transform 1.2s cubic-bezier(.2,.8,.2,1) .3s; }
.fi-cota::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed currentColor; }
.llego .fi-cota { transform: scaleX(1); }

/* anuario (108) */
.fi-cinta { position: absolute; width: 110px; height: 30px; background: rgb(244 196 48 / .55); box-shadow: 0 2px 4px rgb(0 0 0 / .08); z-index: 2; }
.fi-cinta.a { left: -18px; top: -12px; transform: rotate(-24deg); } .fi-cinta.b { right: -18px; top: -10px; transform: rotate(18deg); background: rgb(58 110 165 / .35); }
.fi-firma { position: absolute; z-index: 2; font: 400 clamp(1.1rem, 2.4vw, 1.5rem)/1 "Caveat Brush", cursive; color: var(--fi-firma, #D7443E); transform: rotate(-7deg); opacity: 0; transition: opacity .8s ease 1s; }
.llego .fi-firma { opacity: .9; }
.es-anuario main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { transition: transform 1s cubic-bezier(.3,1.3,.5,1), opacity .5s; transform: rotate(var(--rot)); }
.es-anuario main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho { opacity: 0; transform: translateY(40px) rotate(calc(var(--rot) * 4)); }
.es-anuario main > .xv-sec:nth-of-type(odd) { --rot: -1deg; } .es-anuario main > .xv-sec:nth-of-type(even) { --rot: .9deg; }

/* pasaporte (109): una página con sello por sección */
.fi-sello { position: absolute; z-index: 3; width: clamp(90px, 14vw, 140px); right: -10px; top: -26px; opacity: 0; transform: scale(2.4) rotate(var(--sr, -12deg)); filter: hue-rotate(var(--sh, 0deg)); pointer-events: none; }
.llego .fi-sello { animation: fi-sella .45s cubic-bezier(.5,0,.6,1.5) .7s forwards; }
@keyframes fi-sella { to { opacity: .8; transform: scale(1) rotate(var(--sr, -12deg)); } }
.fi-pagina { position: absolute; left: 50%; bottom: 10px; translate: -50% 0; font: 500 .62rem/1 var(--sans), sans-serif; letter-spacing: .3em; opacity: .55; }

/* parejas de animalitos (110) */
.fi-pareja { position: absolute; z-index: 3; width: clamp(110px, 17vw, 190px); bottom: -18px; pointer-events: none; transition: transform 1.6s cubic-bezier(.2,.8,.25,1), opacity .6s ease; }
.fi-pareja.izq { left: -12px; } .fi-pareja.der { right: -12px; }
.fi-pareja img { width: 100%; display: block; filter: drop-shadow(0 14px 14px rgb(0 0 0 / .14)); }
:not(.llego) > .xv-ancho > .fi-pareja.izq, :not(.llego) > .fi-pareja.izq { transform: translateX(-60vw); opacity: 0; }
:not(.llego) > .xv-ancho > .fi-pareja.der, :not(.llego) > .fi-pareja.der { transform: translateX(60vw); opacity: 0; }
.llego .fi-pareja img { animation: fi-camina .35s ease-in-out 4 alternate; }
@keyframes fi-camina { to { transform: translateY(-6px) rotate(-2deg); } }

/* la travesía (111): el barquito avanza por la ruta del costado */
.fi-ruta { position: fixed; z-index: 4; top: 12vh; bottom: 12vh; left: max(14px, env(safe-area-inset-left)); width: 40px; pointer-events: none; opacity: 0; transition: opacity .8s; }
.abierto .fi-ruta { opacity: 1; }
.fi-ruta::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dashed color-mix(in srgb, var(--tinta) 40%, transparent); }
.fi-ruta img { position: absolute; left: 50%; width: 40px; top: calc(var(--pg, 0) * 100%); translate: -50% -50%; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .2)); animation: e-flota 2.4s ease-in-out infinite alternate; }
@media (max-width: 760px) { .fi-ruta { left: auto; right: 6px; width: 30px; top: 16vh; bottom: 18vh; } .fi-ruta img { width: 30px; } }

/* contar ovejas (112) */
.fi-ovejas { position: relative; height: 90px; width: 190px; margin: 0 auto 22px; }
.fi-ovejas .cerca { position: absolute; left: 50%; bottom: 0; width: 70px; translate: -50% 0; }
.fi-ovejas .oveja { position: absolute; left: 0; bottom: 4px; width: 62px; }
.llego .fi-ovejas .oveja { animation: fi-salta 1.4s cubic-bezier(.45,0,.55,1) .4s forwards; }
@keyframes fi-salta { 0% { transform: translate(0, 0); } 50% { transform: translate(64px, -46px) rotate(-8deg); } 100% { transform: translate(128px, 0); } }
.fi-ovejas span { position: absolute; right: -30px; top: 0; font: 600 .78rem/1 var(--sans), sans-serif; color: var(--acento); opacity: 0; transition: opacity .6s ease 1.6s; }
.llego .fi-ovejas span { opacity: 1; }

/* vitrina de pastelería (113) */
.fi-etiqueta { position: absolute; top: -14px; left: 22px; z-index: 2; padding: 6px 14px 6px 18px; font: 600 .62rem/1 var(--sans), sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #5A3A2E; background: #FFF8EE;
	clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); box-shadow: 0 4px 10px rgb(0 0 0 / .08); }
.fi-bandeja { position: absolute; left: 6%; right: 6%; bottom: -16px; height: 28px; border-radius: 50%; background: radial-gradient(closest-side, rgb(90 58 46 / .22), transparent); z-index: -1; }

/* costura (114): las puntadas se cosen alrededor de cada parche */
.fi-puntadas { position: absolute; inset: 10px; border: 2px dashed var(--hilo, #D9B25F); border-radius: calc(var(--radio, 18px) - 6px); pointer-events: none; clip-path: inset(0 100% 100% 0); transition: clip-path 1.8s cubic-bezier(.5,0,.3,1) .2s; }
.llego .fi-puntadas { clip-path: inset(0 0 0 0); }
.es-costura main > .xv-sec:not(#portada):not(#fecha)::before { content: ""; position: absolute; left: 50%; top: 0; height: clamp(40px, 8vh, 80px); border-left: 2px dashed var(--hilo, #D9B25F); opacity: .7; }

/* terminal (115) */
.fi-term { display: flex; align-items: center; gap: 7px; margin: calc(var(--pad, 28px) * -1) calc(var(--pad, 28px) * -1) 22px; padding: 10px 14px; background: #161B22; border-bottom: 1px solid rgb(255 255 255 / .06); border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.fi-term i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; } .fi-term i:nth-child(2) { background: #FEBC2E; } .fi-term i:nth-child(3) { background: #28C840; }
.fi-term code { margin-left: 8px; font: 500 .74rem/1.2 "IBM Plex Mono", monospace; color: #3FB950; white-space: nowrap; overflow: hidden; width: 0; }
.llego .fi-term code { animation: ap-teclea .7s steps(24) .1s forwards; }
.es-terminal main > .xv-sec:not(#portada):not(#fecha):not(.llego) > .xv-ancho > :not(.fi-term) { opacity: 0; }
.es-terminal main > .xv-sec:not(#portada):not(#fecha) > .xv-ancho > :not(.fi-term) { transition: opacity .5s steps(4) .45s; }

/* stands de la feria (116) */
.fi-pin { position: absolute; z-index: 3; left: 18px; top: -30px; width: 46px; opacity: 0; transform: translateY(-60px); }
.llego .fi-pin { animation: fi-pin .7s cubic-bezier(.3,1.6,.5,1) .3s forwards; }
@keyframes fi-pin { to { opacity: 1; transform: translateY(0); } }
.fi-stand { position: absolute; top: 14px; right: 18px; font: 700 .64rem/1 var(--sans), sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #FF7A3D; }
.fi-mini { position: fixed; z-index: 4; left: 18px; bottom: 18px; display: grid; grid-template-columns: repeat(4, 12px); gap: 5px; padding: 9px; border-radius: 10px; background: rgb(255 255 255 / .85); box-shadow: 0 10px 30px -10px rgb(0 0 0 / .3); opacity: 0; transition: opacity .8s; }
.abierto .fi-mini { opacity: 1; }
.fi-mini i { width: 12px; height: 12px; border-radius: 3px; background: #DDE2EC; transition: background .4s; }
@media (max-width: 760px) { .fi-mini { display: none; } }

/* impacto (117): las cifras cuentan al llegar */
.fi-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 40px); margin-top: 30px; }
.fi-cifra { display: grid; justify-items: center; gap: 8px; text-align: center; }
.fi-cifra strong { font-family: var(--titulo-letra, var(--display)); font-weight: 400; font-size: clamp(2.8rem, 7vw, 4.8rem); line-height: 1; color: var(--acento); font-variant-numeric: tabular-nums; }
.fi-cifra span { font-size: .9rem; color: var(--tinta-2); max-width: 14em; }
@media (max-width: 760px) { .fi-cifras { grid-template-columns: 1fr; } }

/* gran apertura (118): cada sección entra con un corte diagonal */
.es-corte main > .xv-sec:not(#portada):not(#fecha) > .xv-ancho { transition: clip-path 1.1s cubic-bezier(.7,0,.2,1), transform 1.1s cubic-bezier(.7,0,.2,1); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.es-corte main > .xv-sec:not(#portada):not(#fecha):not(.llego) > .xv-ancho { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: translateX(-4vw); }
.fi-esquina { position: absolute; z-index: 2; left: -1px; top: -1px; width: 90px; height: 90px; overflow: hidden; pointer-events: none; border-top-left-radius: inherit; }
.fi-esquina::before { content: ""; position: absolute; left: -36px; top: 18px; width: 160px; height: 16px; background: linear-gradient(180deg, #F04B5A, #D62839 50%, #A5162A); transform: rotate(-45deg); box-shadow: 0 3px 6px rgb(0 0 0 / .25); }

/* la ruta (119) */
.fi-altitud { position: fixed; z-index: 4; right: max(16px, env(safe-area-inset-right)); top: 18vh; bottom: 18vh; width: 4px; border-radius: 4px; background: color-mix(in srgb, var(--tinta) 15%, transparent); pointer-events: none; opacity: 0; transition: opacity .8s; }
.abierto .fi-altitud { opacity: 1; }
.fi-altitud::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--pg, 0) * 100%); border-radius: inherit; background: var(--acento); }
.fi-altitud img { position: absolute; left: 50%; width: 30px; bottom: calc(var(--pg, 0) * 100%); translate: -30% 0; }
.fi-bandera { position: absolute; z-index: 3; right: 14px; top: -58px; width: 36px; transform: scaleY(0); transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.3,1.6,.5,1) .4s; }
.llego .fi-bandera { transform: scaleY(1); }
@media (max-width: 760px) { .fi-altitud { right: 6px; width: 3px; } .fi-altitud img { width: 22px; } }

@media (prefers-reduced-motion: reduce) {
	main .xv-sec > .xv-ancho, main .xv-sec > .xv-ancho * { transition-duration: .01s !important; transition-delay: 0s !important; animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* ================================================================================================
   Colección 120–160: aperturas nuevas (objeto, puerta, cortina, tarjeta) y estructuras nuevas.
   ================================================================================================ */

/* ---------------------------------------------------------------- objeto que se toca */
.ap-cosa { position: relative; display: block; width: var(--ap-w, min(62vw, 300px)); aspect-ratio: var(--ap-ar, 1); }
.ap-cosa img { position: absolute; left: 0; right: 0; margin: auto; width: 100% !important; height: 100% !important; object-fit: contain; filter: drop-shadow(0 22px 28px rgb(0 0 0 / .38)); }
.ap-cosa .ap-pieza { z-index: 2; animation: ap-flota 4s ease-in-out infinite alternate; transform-origin: var(--ap-origen, 50% 60%); }
.ap-cosa .ap-base { z-index: 1; top: 34%; height: 70% !important; }
.ap-cosa:has(.ap-base) .ap-pieza { height: 62% !important; top: 0; bottom: auto; }
.ap-destello { position: absolute; inset: -30%; z-index: 3; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(closest-side, rgb(255 255 255 / .95), var(--ap-destello, rgb(255 230 180 / .4)) 45%, transparent 70%); }
html.so-abre .ap-destello { animation: ap-flash 1.2s ease-out .35s; }
html.so-abre .ap-cosa .ap-pieza { animation: none; transition: transform 1.1s cubic-bezier(.6,0,.3,1), opacity .7s ease .5s, filter .6s; }
html.so-abre .ap-cosa[data-efecto="sube"] .ap-pieza { transform: translateY(-34vh) scale(.9); opacity: 0; }
html.so-abre .ap-cosa[data-efecto="gira"] .ap-pieza { transform: rotate(540deg) scale(1.25); opacity: 0; }
html.so-abre .ap-cosa[data-efecto="salta"] .ap-pieza { transform: translate(14vw, -46vh) rotate(-38deg); opacity: 0; transition-timing-function: cubic-bezier(.2,.7,.3,1); }
html.so-abre .ap-cosa[data-efecto="cae"] .ap-pieza { transform: translateY(70vh) rotate(24deg); opacity: 0; transition-timing-function: cubic-bezier(.55,0,.8,.3); }
html.so-abre .ap-cosa[data-efecto="revienta"] .ap-pieza { transform: scale(1.5); opacity: 0; filter: blur(6px) brightness(1.4); transition-duration: .7s, .5s, .5s; }
html.so-abre .ap-cosa[data-efecto="sacude"] .ap-pieza { animation: ap-sacude .8s ease-in-out; transform: scale(1.35); opacity: 0; transition-delay: .8s, 1s, 0s; }
html.so-abre .ap-cosa[data-efecto="voltea"] .ap-pieza { transform: perspective(900px) rotateY(540deg) scale(1.3); opacity: 0; transition-duration: 1.4s, .6s, .6s; transition-delay: 0s, .9s, 0s; }
html.so-abre .ap-cosa[data-efecto="golpe"] .ap-pieza { animation: ap-golpe .7s cubic-bezier(.5,0,.6,1) forwards; }
html.so-abre .ap-cosa[data-efecto="abre"] .ap-pieza { animation: ap-abre 1.3s cubic-bezier(.4,0,.3,1) forwards; }
@keyframes ap-sacude { 0%, 100% { translate: 0 0; rotate: 0deg; } 15% { translate: -10px 0; rotate: -6deg; } 30% { translate: 10px -4px; rotate: 6deg; } 45% { translate: -8px 0; rotate: -5deg; } 60% { translate: 8px -2px; rotate: 4deg; } 80% { translate: -3px 0; rotate: -2deg; } }
@keyframes ap-golpe { 0% { transform: rotate(0); } 40% { transform: rotate(-28deg) translateY(-6%); } 70% { transform: rotate(6deg) translateY(4%); } 100% { transform: rotate(0) translateY(0) scale(1.1); opacity: .0; } }
@keyframes ap-abre { 0% { transform: scale(1); } 30% { transform: scale(1.08, .92); } 60% { transform: scale(1.18); filter: brightness(1.3); } 100% { transform: scale(1.5); opacity: 0; filter: brightness(1.6) blur(3px); } }
html.so-abre .ap-cosa[data-efecto="golpe"] .ap-base { animation: ap-onda .6s ease-out .3s; }
@keyframes ap-onda { 50% { transform: scale(1.05, .95); } }
html.so-expande .ap-cosa { transform: scale(1.25); opacity: 0; transition: transform 1s cubic-bezier(.6,0,.3,1), opacity .7s ease .2s; }

/* ---------------------------------------------------------------- puerta de dos hojas y cortina */
.ap-escena.ap-puerta, .ap-escena.ap-velo { perspective: 1400px; }
.ap-hoja-p { position: absolute; top: 0; bottom: 0; z-index: 1; width: 50.2%; background-size: 200% 100%; background-repeat: no-repeat; transition: transform 1.5s cubic-bezier(.6,0,.25,1) .3s; box-shadow: inset 0 0 60px rgb(0 0 0 / .25); }
.ap-hi { left: 0; background-position: 0 50%; transform-origin: 0 50%; }
.ap-hd { right: 0; background-position: 100% 50%; transform-origin: 100% 50%; }
html.so-abre .ap-hi { transform: rotateY(-100deg); }
html.so-abre .ap-hd { transform: rotateY(100deg); }
.ap-lienzo { position: absolute; inset: 0; z-index: 1; background-size: cover; background-position: center; transition: transform 1.6s cubic-bezier(.6,0,.25,1) .25s, opacity .8s ease 1.2s; transform-origin: 100% 50%; }
html.so-abre .ap-lienzo { transform: translateX(96%) skewX(-6deg) scaleX(.35); opacity: .2; }
.ap-escena.ap-puerta .so-contenido, .ap-escena.ap-velo .so-contenido { z-index: 3; }
.ap-placa { display: grid; justify-items: center; padding: clamp(24px, 6vw, 40px) clamp(24px, 7vw, 54px); border-radius: var(--ap-radio, 14px); background: var(--ap-placa, rgb(255 255 255 / .9)); box-shadow: 0 30px 60px -24px rgb(0 0 0 / .55); backdrop-filter: blur(6px); animation: ap-flota 4s ease-in-out infinite alternate; }
.ap-placa .ap-titulo { color: var(--ap-placa-tinta, var(--so-tarjeta-tinta, #222)); }
.ap-placa .ap-titulo em { color: inherit; opacity: .7; }
html.so-abre .ap-placa { animation: none; transform: translateY(-8vh) scale(.94); opacity: 0; transition: transform .8s cubic-bezier(.6,0,.4,1), opacity .5s ease .2s; }
.ap-puerta .ap-placa { width: min(84vw, 380px); } .ap-velo .ap-placa { width: min(84vw, 380px); }

/* ---------------------------------------------------------------- tarjeta que se voltea (pantallas, cómic) */
.ap-tarj { display: block; width: var(--ap-w, min(86vw, 420px)); perspective: 1200px; }
.ap-t-cara { position: relative; display: grid; justify-items: center; gap: 14px; padding: clamp(26px, 6vw, 40px) 22px; border-radius: var(--ap-radio, 14px); overflow: hidden; transform-origin: 0 50%;
	transition: transform 1.1s cubic-bezier(.6,0,.3,1) .15s, opacity .6s ease .8s; animation: ap-flota 4s ease-in-out infinite alternate; }
html.so-abre .ap-t-cara { animation: none; transform: rotateY(-120deg); opacity: 0; }
.ap-t-boton { display: inline-grid; place-items: center; min-width: 58px; height: 58px; padding: 0 18px; border-radius: 999px; font: 700 .78rem/1 var(--sans), sans-serif; letter-spacing: .2em; text-transform: uppercase; }

/* ================================================================ ESTRUCTURAS NUEVAS */
main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { --rev: cubic-bezier(.2,.8,.2,1); }
/* papel vegetal que se levanta (120) */
.es-vegetal main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { position: relative; overflow: hidden; }
.es-vegetal main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: rgb(250 250 252 / .78); backdrop-filter: blur(5px); box-shadow: inset 0 -1px 0 rgb(0 0 0 / .08); transform-origin: 50% 0; transition: transform 1.1s var(--rev) .1s, opacity .7s ease .5s; }
.es-vegetal main > .xv-sec.llego > .xv-ancho::after { transform: perspective(1200px) rotateX(78deg) translateY(-30%); opacity: 0; }
/* vidrio empañado que se limpia (125) */
.es-vaho main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho > * { transition: filter 1s ease .05s, opacity .9s ease .05s; }
.es-vaho main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho > * { filter: blur(7px); opacity: .35; }
/* camafeo ovalado que se abre (127, 152) */
.es-camafeo main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { clip-path: ellipse(75% 85% at 50% 50%); transition: clip-path 1.1s var(--rev); }
.es-camafeo main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho { clip-path: ellipse(0% 0% at 50% 50%); }
/* arcos (130) */
.es-arcos main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { clip-path: inset(0 round var(--arco, 200px) var(--arco, 200px) 18px 18px); transition: clip-path 1.1s var(--rev); }
.es-arcos main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho { clip-path: inset(100% 0 0 0 round var(--arco, 200px) var(--arco, 200px) 18px 18px); }
/* flash de cámara (134) */
.es-flash main > .xv-sec:not(#portada):not(#fecha)::after { content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; background: #fff; opacity: 0; }
.es-flash main > .xv-sec.llego:not(#portada):not(#fecha)::after { animation: fi-flash .7s ease-out .1s; }
@keyframes fi-flash { 0% { opacity: 0; } 12% { opacity: .85; } 100% { opacity: 0; } }
/* caída en espiral (135) */
.es-caida main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { transition: transform 1.3s cubic-bezier(.2,.9,.3,1.1), opacity .8s ease; }
.es-caida main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho { transform: translateY(-40vh) rotate(-14deg) scale(.8); opacity: 0; }
.es-caida main > .xv-sec:nth-of-type(even):not(.llego) > .xv-ancho { transform: translateY(-40vh) rotate(14deg) scale(.8); }
/* burbuja que sube (132, 154) */
.es-burbuja main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { transition: transform 1.2s cubic-bezier(.3,1.4,.5,1), border-radius 1.2s ease, opacity .6s ease; }
.es-burbuja main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho { transform: translateY(24vh) scale(.5); border-radius: 50%; opacity: 0; }
/* viñetas de cómic (143) */
.es-comic main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { border: 4px solid #111; box-shadow: 10px 10px 0 #111; transition: transform .5s cubic-bezier(.3,1.8,.5,1), opacity .3s; }
.es-comic main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho { transform: scale(.6) rotate(-4deg); opacity: 0; }
.es-comic main > .xv-sec.llego:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { animation: fi-tiembla .4s ease .5s; }
@keyframes fi-tiembla { 25% { translate: -5px 2px; } 50% { translate: 4px -3px; } 75% { translate: -2px 1px; } }
/* letra de karaoke que se colorea (144) */
.es-karaoke .xv-titulo { background: linear-gradient(90deg, var(--k-on, #F2C14E) 50%, var(--k-off, #FFFFFF) 50%) 100% 0 / 200% 100% no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent !important; transition: background-position 2.2s linear .4s; }
.es-karaoke .xv-titulo .xv-script { color: transparent !important; }
.es-karaoke .llego .xv-titulo { background-position: 0 0; }
/* excavación de abajo hacia arriba (142) */
.es-excava main > .xv-sec:not(#portada):not(#fecha):not(#cierre) > .xv-ancho { clip-path: inset(0 0 0 0); transition: clip-path 1.3s cubic-bezier(.6,0,.2,1); }
.es-excava main > .xv-sec:not(#portada):not(#fecha):not(#cierre):not(.llego) > .xv-ancho { clip-path: inset(100% 0 0 0); }
/* hilo rojo entre pistas (145) */
.es-hilo main > .xv-sec:not(#portada):not(#fecha)::before { content: ""; position: absolute; left: 50%; top: 0; height: clamp(60px, 10vh, 100px); width: 2px; background: var(--hilo, #A4161A); transform-origin: 50% 0; transform: scaleY(0); transition: transform .9s ease .1s; }
.es-hilo main > .xv-sec.llego:not(#portada):not(#fecha)::before { transform: scaleY(1); }

/* ---------------------------------------------------------------- decoraciones por sección */
.fi-d { position: absolute; z-index: 4; pointer-events: none; }
.fi-d img { display: block; width: 100%; height: auto; filter: drop-shadow(0 12px 14px rgb(0 0 0 / .18)); }
/* esquina que llega volando desde un lado */
.fi-vuela { top: -34px; right: -10px; width: clamp(70px, 11vw, 120px); transition: transform 1.4s cubic-bezier(.2,.8,.25,1), opacity .5s; }
.fi-vuela.izq { right: auto; left: -10px; }
:not(.llego) > .xv-ancho > .fi-vuela { transform: translate(60vw, -20vh) rotate(-20deg); opacity: 0; }
:not(.llego) > .xv-ancho > .fi-vuela.izq { transform: translate(-60vw, -20vh) rotate(20deg); }
/* cae desde arriba a la esquina */
.fi-cae { top: -40px; right: 16px; width: clamp(54px, 8vw, 86px); transition: transform .9s cubic-bezier(.3,1.5,.5,1) .3s, opacity .3s .3s; }
:not(.llego) > .xv-ancho > .fi-cae { transform: translateY(-50vh) rotate(-60deg); opacity: 0; }
/* cuelga y se balancea */
.fi-cuelga { top: -70px; left: 50%; width: clamp(120px, 20vw, 200px); translate: -50% 0; transform-origin: 50% 0; }
.llego > .xv-ancho > .fi-cuelga { animation: fi-balanceo 2.6s ease-out .3s; }
/* pegado con cinta (flor prensada, póster) */
.fi-pegado { top: -22px; right: 18px; width: clamp(70px, 10vw, 110px); rotate: 8deg; transition: transform .7s cubic-bezier(.3,1.4,.5,1) .3s, opacity .4s .3s; }
.fi-pegado::after { content: ""; position: absolute; left: 50%; top: 30%; width: 70%; height: 16px; translate: -50% 0; rotate: -12deg; background: var(--cinta, rgb(240 232 210 / .75)); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
:not(.llego) > .xv-ancho > .fi-pegado { transform: scale(1.4); opacity: 0; }
/* crece desde abajo */
.fi-crece { bottom: -12px; right: 14px; width: clamp(60px, 9vw, 100px); transform-origin: 50% 100%; transition: transform 1.1s cubic-bezier(.3,1.4,.5,1) .3s; }
:not(.llego) > .xv-ancho > .fi-crece { transform: scale(0); }
/* marco que se traza (123, 155) */
.fi-marco { inset: 8px; }
.fi-marco svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fi-marco rect { fill: none; stroke: var(--marco, #B8733D); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.llego > .xv-ancho > .fi-marco rect { transition: stroke-dashoffset 2s cubic-bezier(.5,0,.3,1) .2s; stroke-dashoffset: 0; }
/* número, insignia o casilla */
.fi-num { top: -18px; left: 22px; display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; font: 800 .9rem/1 var(--sans), sans-serif; letter-spacing: .06em; background: var(--num-fondo, #111); color: var(--num-tinta, #fff); box-shadow: 0 8px 16px -6px rgb(0 0 0 / .35); transition: transform .6s cubic-bezier(.3,1.6,.5,1) .2s; }
:not(.llego) > .xv-ancho > .fi-num { transform: scale(0) rotate(-90deg); }
.fi-romano { top: 18px; right: 22px; font: 400 clamp(1.6rem, 4vw, 2.4rem)/1 var(--titulo-letra, serif); color: var(--acento); opacity: .35; }
.fi-casilla { top: -26px; right: 20px; display: grid; justify-items: center; align-content: center; width: 64px; height: 72px; border: 2px solid currentColor; border-radius: 6px; background: var(--casilla, #fff); font: 700 1.5rem/1 "Space Grotesk", sans-serif; color: var(--acento); }
.fi-casilla small { font: 500 .55rem/1 var(--sans), sans-serif; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.fi-casilla i { position: absolute; top: 5px; left: 7px; font: 600 .6rem/1 var(--sans), sans-serif; font-style: normal; opacity: .7; }
/* barra de progreso (158) */
.fi-progreso { left: 0; right: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / .12); border-radius: 0 0 var(--radio, 14px) var(--radio, 14px); overflow: hidden; }
.fi-progreso::before { content: ""; position: absolute; inset: 0; width: 0; background: var(--acento); transition: width 2.4s linear .3s; }
.llego > .xv-ancho > .fi-progreso::before { width: 100%; }
/* antifaz que se retira (131) */
.fi-retira { top: 50%; left: 50%; width: min(60%, 320px); translate: -50% -50%; transition: transform 1.2s cubic-bezier(.6,0,.3,1) .2s, opacity .8s ease .5s; }
.llego > .xv-ancho > .fi-retira { transform: translateY(-60vh) rotate(-16deg); opacity: 0; }
@media (max-width: 760px) { .fi-cuelga { top: -56px; } .fi-vuela { top: -28px; width: 72px; } }
@media (prefers-reduced-motion: reduce) { .fi-retira { display: none; } }
.e-cierre { isolation: isolate; }
/* puerta: cada hoja muestra su mitad de la imagen cubriendo la pantalla, sin deformarla */
.ap-hoja-p { background-size: max(100vw, 100vh) max(100vw, 100vh); }
.ap-hi { background-position: calc((100vw - max(100vw, 100vh)) / 2) 50%; }
.ap-hd { background-position: calc((100vw - max(100vw, 100vh)) / 2 - 49.8vw) 50%; }
/* más efectos del objeto que se toca */
html.so-abre .ap-cosa[data-efecto="tapa"] .ap-pieza { animation: ap-tapa 1.3s cubic-bezier(.5,0,.3,1) forwards; }
@keyframes ap-tapa { 0% { transform: none; } 25% { transform: translateY(4%) scale(1.03, .97); } 55% { transform: translateY(-8%) rotate(-4deg); } 100% { transform: translateY(-40vh) rotate(-16deg) scale(.9); opacity: 0; } }
html.so-abre .ap-cosa[data-efecto="suelta"] .ap-pieza { transform-origin: 8% 30%; animation: ap-suelta 1.3s cubic-bezier(.5,0,.4,1) forwards; }
@keyframes ap-suelta { 0% { transform: none; } 30% { transform: rotate(10deg); } 60% { transform: rotate(-4deg) translateY(4%); } 100% { transform: rotate(70deg) translateY(30%); opacity: 0; } }
html.so-abre .ap-cosa[data-efecto="agranda"] .ap-pieza { transform: scale(4.2); opacity: 0; transition: transform 1.4s cubic-bezier(.6,0,.3,1) .1s, opacity .6s ease 1s; }
html.so-abre .ap-cosa[data-efecto="abanico"] .ap-pieza { transform-origin: 30% 90%; animation: ap-abanico 1.3s cubic-bezier(.5,0,.3,1) forwards; }
@keyframes ap-abanico { 0% { transform: none; } 35% { transform: rotate(-14deg) scale(1.05); } 65% { transform: rotate(10deg) scale(1.15); } 100% { transform: rotate(0) scale(1.7); opacity: 0; filter: blur(2px); } }
/* el detalle de XV años */
.e-xv { display: flex; align-items: baseline; justify-content: center; gap: .35em; font-family: var(--titulo-letra, var(--sans)); font-size: clamp(.9rem, 2vw, 1.1rem); letter-spacing: .32em; text-transform: uppercase; color: var(--tinta-2); }
.e-xv span { font-size: 2.2em; letter-spacing: .06em; color: var(--acento); line-height: 1; }
/* la galería (solo con fotos) no usa las entradas que recortan o desplazan: sus fotos se pueden tocar en cuanto aparecen */
:is(.es-camafeo, .es-arcos, .es-excava, .es-caida, .es-burbuja, .es-comic) main > #galeria > .xv-ancho { clip-path: none !important; transform: none !important; opacity: 1 !important; border-radius: var(--radio, 18px); }
.cat-empresarial .e-nombre { white-space: normal; text-wrap: balance; }
