/* Mago Pix · Un solo mundo: noche morada, humo violeta y oro de escenario.
   El primer acto es el truco; todo lo demás se compone como naipes. */

@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  color-scheme: dark;
  --noche: #07030c;        /* negro con alma morada, fondo */
  --terciopelo: #12061f;   /* superficie */
  --butaca: #1c0a2e;       /* superficie elevada */
  --morado-hondo: #2a0b45;
  --morado: #5b1a8c;
  --violeta: #9b4dff;      /* resplandor */
  --lila: #cfa8ff;
  --oro: #e9b949;
  --oro-claro: #ffe08a;
  --oro-hondo: #a8761f;
  --marfil: #f7eedb;       /* cartulina de naipe */
  --tinta: #170a22;        /* negro de naipe */
  --rojo-naipe: #b3123f;
  --rojo-luz: #ff6f97;
  --texto: #f1e9f8;
  --humo: #bba8cf;
  --sombra: rgba(4, 1, 8, .66);

  --oro-grad: linear-gradient(100deg, #fff4cf 0%, #e9b949 22%, #fff7dc 38%, #b8862b 55%, #ffe08a 72%, #e9b949 100%);

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --cuerpo: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --t-xs: .75rem;
  --t-s: .875rem;
  --t-m: 1.0625rem;
  --t-l: 1.375rem;
  --t-xl: clamp(2rem, 6.4vw, 3.4rem);
  --t-acto: clamp(2.6rem, 11vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
body {
  margin: 0;
  background: var(--noche);
  color: var(--texto);
  font: 400 var(--t-m)/1.6 var(--cuerpo);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, fieldset, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
svg { fill: currentColor; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }
::selection { background: var(--oro); color: var(--tinta); }

.ancho { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 6vw, 56px); }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.voltear { transform: scaleX(-1); }

/* ---------- Fondo vivo ---------- */
/* Fondo fijo en su propia capa (un background-attachment: fixed obliga a repintar todo en cada scroll) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, var(--morado-hondo), var(--noche) 70%);
}
#nebula { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Las secciones fuera de pantalla no se dibujan ni animan hasta que llegas a ellas */
.bloque { content-visibility: auto; contain-intrinsic-size: auto 900px; }
#chispas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; }
.avance {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 95; pointer-events: none;
  background: var(--oro-grad); transform-origin: left; transform: scaleX(0);
  box-shadow: 0 0 12px var(--oro);
}
@supports (animation-timeline: scroll()) {
  .avance { animation: avanzar linear both; animation-timeline: scroll(root); }
  @keyframes avanzar { to { transform: scaleX(1); } }
}

/* ---------- Tipografía ---------- */
.ceja {
  display: inline-flex; align-items: center; gap: .7em;
  font: 600 var(--t-xs)/1.3 var(--cuerpo);
  letter-spacing: .24em; text-transform: uppercase; color: var(--oro);
}
.ceja::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--oro)); }
.cabeza-centro .ceja::after { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, var(--oro), transparent); }
h2 {
  font: 600 var(--t-xl)/1.08 var(--display);
  letter-spacing: .01em; text-wrap: balance;
}
h2 em {
  font: italic 600 1.12em/1 var(--serif); letter-spacing: 0;
  background: var(--oro-grad); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brillo 7s linear infinite;
  filter: drop-shadow(0 0 18px rgba(233, 185, 73, .25));
}
h2 em .letra { background: inherit; background-size: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; animation: inherit; }
h3 { font: 600 var(--t-l)/1.15 var(--display); letter-spacing: .02em; }
@keyframes brillo { to { background-position: -220% 0; } }

/* Letras que se materializan */
[data-magia] .palabra { display: inline-block; white-space: nowrap; }
.js [data-magia] .letra {
  display: inline-block; opacity: 0;
  filter: blur(10px); transform: translateY(.45em) scale(1.3);
  transition: opacity .8s, filter .9s, transform .9s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i) * 26ms);
}
.js .visto [data-magia] .letra, .js [data-magia].visto .letra { opacity: 1; filter: none; transform: none; }

.js [data-aparece] { opacity: 0; translate: 0 34px; transition: opacity 1s, translate 1.1s cubic-bezier(.2, .8, .2, 1); }
.js [data-aparece].visto { opacity: 1; translate: none; }

/* ---------- Botones: boleto dorado ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 50px; padding: .85em 1.6em;
  border: 1px solid var(--oro); border-radius: 999px;
  background: var(--oro-grad); background-size: 200% 100%; color: var(--tinta);
  font: 700 var(--t-s)/1.1 var(--cuerpo); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(233, 185, 73, 0), 0 10px 28px -12px rgba(233, 185, 73, .6);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), translate .3s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, background-position .8s, color .25s;
  translate: var(--mx, 0px) var(--my, 0px);
}
.btn::after {
  content: ""; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .85) 48%, transparent 62%);
  transform: translateX(-120%); transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}
.btn:active { transform: scale(.97); }
.btn-linea { background: rgba(18, 6, 31, .55); color: var(--oro-claro); backdrop-filter: blur(6px); }
.btn-linea::after { background: linear-gradient(110deg, transparent 30%, rgba(233, 185, 73, .35) 48%, transparent 62%); }
.btn-chico { min-height: 42px; padding: .6em 1.15em; font-size: var(--t-xs); }
@media (hover: hover) {
  .btn:hover {
    background-position: 100% 0;
    box-shadow: 0 0 0 4px rgba(233, 185, 73, .14), 0 0 34px 2px rgba(233, 185, 73, .45), 0 14px 34px -10px rgba(155, 77, 255, .7);
  }
  .btn:hover::after { transform: translateX(120%); }
  .btn-linea:hover { color: var(--marfil); border-color: var(--oro-claro); }
}

.redondo {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none;
  border: 1px solid rgba(233, 185, 73, .55); border-radius: 50%;
  background: rgba(18, 6, 31, .6); color: var(--oro-claro); cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform .25s, box-shadow .3s, background-color .3s;
}
.redondo svg { width: 20px; height: 20px; }
@media (hover: hover) {
  .redondo:hover { transform: scale(1.1); background: rgba(91, 26, 140, .7); box-shadow: 0 0 24px rgba(233, 185, 73, .45); }
}

/* ---------- Telón de entrada ---------- */
.intro { display: none; }
.con-intro .intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at center, #1d0833, var(--noche) 70%);
  cursor: pointer;
  animation: intro-fuera .5s 4.5s forwards; /* seguro por si el script no carga */
}
@keyframes intro-fuera { to { opacity: 0; visibility: hidden; } }
.cortina {
  position: absolute; top: 0; bottom: 0; width: 51%; z-index: 2;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 18%, transparent 75%, rgba(0, 0, 0, .55)),
    repeating-linear-gradient(90deg, #22063a 0, #4d1478 22px, #6a24a3 34px, #3a0e5d 50px, #22063a 64px);
  box-shadow: inset 0 -26px 0 -18px var(--oro), inset 0 -34px 30px -20px rgba(233, 185, 73, .5);
  transition: transform 1.5s cubic-bezier(.7, 0, .2, 1);
}
.cortina-i { left: 0; transform-origin: left center; border-right: 3px solid var(--oro); }
.cortina-d { right: 0; transform-origin: right center; border-left: 3px solid var(--oro); }
.intro-centro {
  position: relative; z-index: 3; display: grid; justify-items: center; gap: 14px;
  transition: opacity .6s, transform 1.2s cubic-bezier(.2, .8, .2, 1), filter .8s;
}
.intro-centro::before {
  content: ""; position: absolute; inset: -30% -40%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(7, 3, 12, .92), rgba(18, 6, 31, .6) 55%, transparent);
}
.intro-centro img {
  width: min(300px, 62vw); height: auto;
  filter: drop-shadow(0 0 22px rgba(233, 185, 73, .55));
  animation: intro-logo 1.4s cubic-bezier(.2, .8, .2, 1) both;
}
.intro-centro p {
  font: italic 600 clamp(1.3rem, 4vw, 1.9rem)/1 var(--serif); color: var(--oro-claro);
  letter-spacing: .04em; animation: intro-txt 1.2s .45s both;
}
@keyframes intro-logo {
  from { opacity: 0; transform: scale(.6) rotate(-8deg); filter: blur(14px) brightness(3); }
  60% { opacity: 1; filter: blur(0) brightness(1.8) drop-shadow(0 0 40px var(--oro)); }
  to { opacity: 1; transform: none; filter: drop-shadow(0 0 22px rgba(233, 185, 73, .55)); }
}
@keyframes intro-txt { from { opacity: 0; letter-spacing: .5em; filter: blur(6px); } to { opacity: 1; } }
.intro.abrir .cortina-i { transform: translateX(-100%) scaleX(.5); }
.intro.abrir .cortina-d { transform: translateX(100%) scaleX(.5); }
.intro.abrir .intro-centro { opacity: 0; transform: scale(1.6); filter: blur(8px); }
.intro.abrir { background: transparent; transition: background-color .8s .4s; pointer-events: none; }
.intro-breve .intro-centro img { animation-duration: .6s; }
.intro-breve .intro-centro p { animation-delay: .1s; animation-duration: .5s; }

/* ---------- Primer acto ---------- */
.acto {
  position: relative; overflow: clip; isolation: isolate;
  min-height: 100svh; display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse 60% 55% at var(--lx, 50%) var(--ly, 0%), rgba(255, 236, 190, .17), transparent 70%),
    radial-gradient(ellipse 70% 30% at 50% 92%, rgba(233, 185, 73, .12), transparent 72%),
    linear-gradient(rgba(28, 10, 46, .55), rgba(7, 3, 12, .25));
}
.acto::before, .acto::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 0;
  width: clamp(14px, 5vw, 90px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .2), transparent 30%, rgba(0, 0, 0, .5)),
    repeating-linear-gradient(90deg, #1c0530 0, #4d1478 8px, #6a24a3 12px, #3a0e5d 17px, #1c0530 22px);
  animation: mecer 7s ease-in-out infinite;
}
.acto::before { left: 0; box-shadow: 10px 0 30px -6px var(--sombra); border-right: 2px solid rgba(233, 185, 73, .55); transform-origin: top left; }
.acto::after { right: 0; box-shadow: -10px 0 30px -6px var(--sombra); border-left: 2px solid rgba(233, 185, 73, .55); transform-origin: top right; animation-delay: -3.5s; }
@keyframes mecer { 50% { transform: skewY(.6deg) scaleX(1.06); } }
.cenefa {
  position: absolute; inset: 0 0 auto 0; height: 26px; z-index: 3; pointer-events: none;
  background:
    radial-gradient(circle at 50% 0, #4d1478 0 17px, var(--oro) 18px 19px, transparent 20px) 0 -4px / 40px 26px repeat-x;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55));
}
.acto .ancho { position: relative; z-index: 2; padding-inline: clamp(26px, 8.5vw, 120px); }

.marquesina {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-block: 34px 0;
}
.firma { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.firma img { width: 46px; height: auto; filter: drop-shadow(0 0 10px rgba(233, 185, 73, .45)); transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .4s; }
.firma-txt { display: grid; gap: 4px; }
.firma-n { font: 700 1.25rem/1 var(--display); letter-spacing: .08em; background: var(--oro-grad); background-size: 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: brillo 8s linear infinite; }
.firma-o { font: italic 600 .95rem/1 var(--serif); color: var(--humo); }
@media (hover: hover) {
  .firma:hover img { transform: rotate(-12deg) scale(1.15); filter: drop-shadow(0 0 18px var(--oro)); }
}
@media (max-width: 520px) { .firma-txt { display: none; } }

.menu { display: none; gap: 6px; }
.menu a {
  position: relative; padding: .5em .9em; text-decoration: none;
  font: 600 var(--t-xs)/1 var(--cuerpo); letter-spacing: .18em; text-transform: uppercase; color: var(--humo);
  transition: color .3s, text-shadow .3s;
}
.menu a::after {
  content: "✦"; position: absolute; left: 50%; bottom: -10px; translate: -50% 0; font-size: 10px; color: var(--oro);
  opacity: 0; transform: scale(0) rotate(-180deg); transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
@media (hover: hover) {
  .menu a:hover { color: var(--oro-claro); text-shadow: 0 0 14px rgba(233, 185, 73, .8); }
  .menu a:hover::after { opacity: 1; transform: none; }
}
@media (min-width: 960px) { .menu { display: flex; } }

.escena {
  flex: 1;
  display: grid; justify-items: center; text-align: center; align-content: center;
  grid-template-areas: "texto" "mesa" "acciones";
  gap: clamp(18px, 4.5vw, 30px);
  padding-block: clamp(22px, 5vw, 48px) clamp(64px, 9vw, 96px);
}
.e-texto { grid-area: texto; display: grid; gap: 12px; justify-items: center; min-width: 0; }
@media (max-width: 899px) { .e-texto .ceja::before { display: none; } }
.e-mesa { grid-area: mesa; }
.e-acciones { grid-area: acciones; min-height: 56px; display: grid; align-items: start; justify-items: center; }
#titulo {
  font: 700 var(--t-acto)/1 var(--display);
  letter-spacing: -.01em; text-wrap: balance;
  background: var(--oro-grad); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brillo 6s linear infinite;
  filter: drop-shadow(0 0 28px rgba(233, 185, 73, .35)) drop-shadow(0 4px 2px rgba(0, 0, 0, .5));
}
#titulo.conjuro { display: flex; justify-content: center; font-size: calc(var(--t-acto) * 1.15); letter-spacing: .03em; }
@media (min-width: 900px) { #titulo.conjuro { justify-content: flex-start; } }
#titulo.conjuro span, #vTitulo.conjuro span, .acto-titulo.conjuro span {
  display: inline-block;
  background: var(--oro-grad); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation:
    conjuro .9s cubic-bezier(.2, 1.4, .3, 1) calc(var(--i) * 90ms) both,
    brillo 6s linear infinite,
    ola 3.4s ease-in-out calc(var(--i) * .16s + 1.4s) infinite;
}
@keyframes conjuro {
  from { opacity: 0; transform: translateY(.6em) scale(.3) rotate(-25deg); filter: blur(14px) brightness(3); }
  60% { opacity: 1; filter: blur(0) brightness(1.8); }
  to { opacity: 1; transform: none; filter: blur(0) brightness(1); }
}
/* La @ de "¿Segur@?": la de Cinzel parece una A en un círculo */
.arroba { font-family: var(--serif); font-weight: 700; font-style: normal; }

/* Cierre del Mago Pix al final de cada acto: "Magia… le dicen." */
.firma-pix {
  margin: 0 0 .3em;
  font: italic 600 clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem)/1.1 var(--serif);
  color: var(--oro-claro); letter-spacing: .01em;
  text-shadow: 0 0 22px rgba(233, 185, 73, .55), 0 2px 2px rgba(0, 0, 0, .5);
}
.firma-pix span { display: inline-block; white-space: pre; opacity: 0; animation: firma .9s cubic-bezier(.2, .9, .3, 1.2) forwards; }
.fp-magia { animation-delay: 1.4s !important; }
.fp-puntos { animation-delay: 2.1s !important; animation-duration: 1.1s !important; }
.fp-dicen { animation-delay: 3s !important; }
@keyframes firma {
  from { opacity: 0; transform: translateY(.45em) scale(.85); }
  to { opacity: 1; transform: none; }
}
#instr { max-width: 32ch; min-height: 3.2em; color: var(--humo); font-size: 1.08rem; }
#instr strong { color: var(--oro-claro); font-weight: 700; }

@media (min-width: 900px) {
  .escena {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "texto mesa" "acciones mesa";
    justify-items: start; text-align: left; column-gap: clamp(48px, 7vw, 104px);
  }
  .e-texto { align-self: end; justify-items: start; }
  .e-acciones { align-self: start; justify-items: start; }
  .e-mesa { align-self: center; }
  #instr { min-height: 0; }
}

/* La mesa: 21 cartas en tres columnas */
.mesa {
  --cw: clamp(62px, 20vw, 108px);
  --ch: calc(var(--cw) * 1.4);
  --dy: calc(var(--cw) * .36);
  --gap: clamp(10px, 3vw, 18px);
  position: relative;
  width: calc(var(--cw) * 3 + var(--gap) * 2);
  height: calc(var(--ch) + var(--dy) * 6);
}
.carta {
  position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch);
  z-index: var(--row); perspective: 700px;
  transform: translate(calc(var(--col) * (var(--cw) + var(--gap))), calc(var(--row) * var(--dy)));
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .45s;
  transition-delay: calc(var(--i) * 26ms);
}
.giro {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.3, .7, .2, 1);
  transition-delay: calc(var(--i) * 26ms + 90ms);
}
.cara {
  position: absolute; inset: 0; border-radius: calc(var(--cw) * .085);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.frente {
  background: linear-gradient(160deg, #fffaf0, var(--marfil) 60%, #eadcbd); color: var(--tinta);
  box-shadow: inset 0 0 0 1px rgba(23, 10, 34, .16), 0 -1px 0 var(--sombra), 0 9px 14px -9px var(--sombra);
  transition: box-shadow .3s;
}
.es-rojo .frente { color: var(--rojo-naipe); }
.carta .reverso { transform: rotateY(180deg); }
.reverso {
  background:
    url(../img/marca/logo-chico.webp) center / 56% no-repeat,
    radial-gradient(circle at 50% 50%, rgba(233, 185, 73, .22), transparent 58%),
    repeating-linear-gradient(45deg, rgba(233, 185, 73, .28) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-45deg, rgba(233, 185, 73, .28) 0 1px, transparent 1px 7px),
    linear-gradient(160deg, #47127a, #1c0630);
  box-shadow: inset 0 0 0 calc(var(--cw, 100px) * .05) #1c0630, inset 0 0 0 calc(var(--cw, 100px) * .065) var(--oro), 0 9px 14px -9px var(--sombra);
}
.idx {
  position: absolute; top: calc(var(--cw) * .05); left: calc(var(--cw) * .09);
  display: flex; align-items: center; gap: calc(var(--cw) * .06);
  font: 700 calc(var(--cw) * .25)/1 var(--display); letter-spacing: -.05em;
}
.idx svg { width: calc(var(--cw) * .19); height: calc(var(--cw) * .19); flex: none; }
.idx-b { top: auto; left: auto; bottom: calc(var(--cw) * .05); right: calc(var(--cw) * .09); transform: rotate(180deg); }
.pinta {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--cw) * .42); height: calc(var(--cw) * .42);
  transform: translate(-50%, -50%);
}

.mesa.recogida .carta {
  transform: translate(calc(var(--cw) + var(--gap)), calc(var(--dy) * 3)) rotate(var(--rot, 0deg));
  transition-delay: calc(var(--i) * 9ms);
}
.mesa.recogida .giro { transform: rotateY(180deg); transition-delay: calc(var(--i) * 9ms); }
.mesa.final .carta {
  opacity: 0; transition-delay: 0s; pointer-events: none;
  transform: translate(calc(var(--cw) + var(--gap) + var(--fx, 0px)), calc(var(--dy) * 3 + var(--fy, 0px))) rotate(var(--rot, 0deg));
}
.mesa.final .carta.elegida {
  opacity: 1; z-index: 30;
  transform: translate(calc(var(--cw) + var(--gap)), calc(var(--dy) * 3)) scale(1.75);
}
.mesa.final .carta.elegida .giro { transition-delay: 0s; }
.mesa.final .carta.elegida.bocarriba .giro { transform: rotateY(0deg); }
.mesa.final .carta.elegida .frente { box-shadow: 0 0 0 1px var(--oro), 0 0 30px rgba(233, 185, 73, .65), 0 0 80px rgba(155, 77, 255, .5); animation: aura 2.4s ease-in-out infinite; }
@keyframes aura { 50% { box-shadow: 0 0 0 1px var(--oro-claro), 0 0 44px rgba(255, 224, 138, .8), 0 0 110px rgba(155, 77, 255, .65); } }

.col {
  position: absolute; top: -8px; bottom: -8px; z-index: 40;
  left: calc(var(--n) * (var(--cw) + var(--gap)) - 5px);
  width: calc(var(--cw) + 10px);
  padding: 0; background: transparent; border: 1px dashed transparent; border-radius: 10px;
  transition: background-color .25s, transform .25s;
}
.col:disabled { pointer-events: none; }
.mesa.pregunta .col {
  cursor: pointer;
  border-color: rgba(233, 185, 73, .7);
  animation: latir 1.9s ease-in-out infinite;
  animation-delay: calc(var(--n) * .18s);
}
.mesa.pregunta .col:active { background: rgba(233, 185, 73, .18); }
@media (hover: hover) {
  .mesa.pregunta .col:hover { background: linear-gradient(rgba(233, 185, 73, .2), rgba(155, 77, 255, .14)); border-style: solid; box-shadow: 0 0 36px rgba(233, 185, 73, .5); }
  .mesa:not(.pregunta):not(.final):not(.recogida) .carta:hover .frente { box-shadow: 0 0 0 1px var(--oro), 0 0 22px rgba(233, 185, 73, .55); }
}
@keyframes latir {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 185, 73, 0); }
  50% { box-shadow: 0 0 24px 0 rgba(233, 185, 73, .38); }
}

.grupo { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (min-width: 900px) { .e-acciones .grupo { justify-content: flex-start; } }
.ronda { display: flex; align-items: center; gap: 14px; min-height: 50px;
  font: 600 var(--t-xs)/1 var(--cuerpo); letter-spacing: .2em; text-transform: uppercase; color: var(--humo); }
.rombos { display: flex; gap: 8px; }
.rombos i { width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid var(--oro); transition: background-color .3s, box-shadow .3s; }
.rombos i.hecha { background: var(--oro); box-shadow: 0 0 10px var(--oro); }

.bajar {
  position: absolute; left: 50%; bottom: 30px; z-index: 3; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid rgba(233, 185, 73, .6); border-radius: 14px;
}
.bajar span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--oro); animation: bajar 1.8s ease-in-out infinite; }
@keyframes bajar { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.candilejas {
  position: relative; z-index: 2; height: 14px;
  background: radial-gradient(circle, var(--oro-claro) 0 2px, rgba(233, 185, 73, .3) 3px, transparent 6px) center / 30px 14px repeat-x;
  border-top: 1px solid rgba(233, 185, 73, .45);
  animation: candil 3s ease-in-out infinite;
}
@keyframes candil { 50% { filter: brightness(1.6) drop-shadow(0 0 6px var(--oro)); } }

/* ---------- Cinta ---------- */
.cinta {
  overflow: hidden; padding-block: 18px;
  border-block: 1px solid rgba(233, 185, 73, .25);
  background: linear-gradient(90deg, rgba(42, 11, 69, .8), rgba(18, 6, 31, .6), rgba(42, 11, 69, .8));
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.cinta-pista { display: flex; width: max-content; animation: cinta 34s linear infinite; }
.cinta:hover .cinta-pista { animation-play-state: paused; }
.cinta span {
  white-space: nowrap; padding-right: .6em;
  font: 600 clamp(1.4rem, 4vw, 2.4rem)/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px rgba(233, 185, 73, .75);
}
.cinta b { font-weight: inherit; color: var(--oro); -webkit-text-stroke: 0; text-shadow: 0 0 18px rgba(233, 185, 73, .45); }
.cinta i { font-style: normal; color: var(--violeta); -webkit-text-stroke: 0; padding-inline: .3em; display: inline-block; animation: girito 4s linear infinite; }
@keyframes cinta { to { transform: translateX(-50%); } }
@keyframes girito { to { transform: rotate(360deg); } }

/* ---------- Bloques ---------- */
.bloque { position: relative; padding-block: clamp(72px, 12vw, 140px); }
.cabeza { display: grid; gap: 16px; max-width: 46rem; margin-bottom: clamp(32px, 6vw, 56px); justify-items: start; }
.cabeza-centro { margin-inline: auto; text-align: center; justify-items: center; }
.entrada { color: var(--humo); max-width: 58ch; }

/* Cartelera: próxima función */
.funciones { display: grid; gap: 30px; perspective: 1400px; }
.funcion {
  position: relative; isolation: isolate;
  display: grid; gap: clamp(24px, 5vw, 56px); align-items: center;
  padding: clamp(18px, 4vw, 38px); border-radius: 24px;
  background:
    radial-gradient(ellipse 60% 80% at 20% 30%, rgba(155, 77, 255, .22), transparent 70%),
    linear-gradient(160deg, rgba(42, 11, 69, .85), rgba(10, 4, 18, .92));
  box-shadow: 0 0 0 1px rgba(233, 185, 73, .3), 0 40px 80px -40px #000, 0 0 70px -20px rgba(155, 77, 255, .5);
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s;
}
.funcion::before {
  content: ""; position: absolute; inset: 0; z-index: -1; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 50%, var(--oro-claro) 68%, var(--violeta) 80%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: rodar 6s linear infinite;
}
@media (min-width: 760px) { .funcion { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); } }
.funcion-poster {
  position: relative; display: block; border-radius: 16px; overflow: hidden; justify-self: center; width: min(340px, 100%);
  box-shadow: 0 0 0 1px rgba(233, 185, 73, .6), 0 0 0 6px rgba(18, 6, 31, .9), 0 0 0 7px rgba(233, 185, 73, .35), 0 30px 60px -20px #000;
  animation: vela 3.2s ease-in-out infinite;
}
.funcion-poster img { width: 100%; height: auto; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1), filter .6s; }
.funcion-poster::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .22), transparent 35%, transparent 70%, rgba(155, 77, 255, .25));
}
@keyframes vela {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(255, 170, 70, .35)); }
  35% { filter: drop-shadow(0 0 26px rgba(255, 190, 90, .55)); }
  60% { filter: drop-shadow(0 0 14px rgba(255, 150, 60, .3)); }
}
.funcion-info { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.funcion-lugar { font: 600 var(--t-xs)/1.4 var(--cuerpo); letter-spacing: .2em; text-transform: uppercase; color: var(--lila); }
.funcion h3 {
  font: 700 clamp(1.9rem, 5.5vw, 3.2rem)/1.05 var(--display);
  background: var(--oro-grad); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brillo 7s linear infinite;
  filter: drop-shadow(0 0 20px rgba(233, 185, 73, .3));
}
.funcion-fecha { font: italic 600 clamp(1.3rem, 3.4vw, 1.7rem)/1.2 var(--serif); color: var(--marfil); }
.cuenta { display: grid; grid-template-columns: repeat(4, minmax(0, 76px)); gap: 8px; width: 100%; }
.cuenta span {
  display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 12px 4px 10px;
  border-radius: 14px; border: 1px solid rgba(233, 185, 73, .35); background: rgba(7, 3, 12, .6);
  font: 600 .68rem/1 var(--cuerpo); letter-spacing: .16em; text-transform: uppercase; color: var(--humo);
}
.cuenta b {
  font: 700 clamp(1.5rem, 6vw, 2rem)/1 var(--display); font-variant-numeric: tabular-nums;
  background: var(--oro-grad); background-size: 200%; -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cuenta:has(.cuenta-ya) { display: block; }
.cuenta-ya { font: 700 1.1rem/1.3 var(--display); letter-spacing: .08em; color: var(--oro-claro); text-shadow: 0 0 18px rgba(233, 185, 73, .7); animation: candil 1.6s ease-in-out infinite; }
.fechas { display: flex; flex-wrap: wrap; gap: 8px; }
.fechas li {
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(207, 168, 255, .35);
  font: 600 .82rem/1 var(--cuerpo); color: var(--lila); background: rgba(91, 26, 140, .25);
}
.agotado { font: 700 var(--t-xs)/1 var(--cuerpo); letter-spacing: .18em; text-transform: uppercase; color: var(--rojo-luz); }
@media (hover: hover) {
  .funcion:hover { box-shadow: 0 0 0 1px rgba(233, 185, 73, .5), 0 40px 80px -40px #000, 0 0 100px -10px rgba(155, 77, 255, .7); }
  .funcion:hover .funcion-poster img { transform: scale(1.06); filter: brightness(1.1) saturate(1.15); }
}

/* El sello */
.sello-grid { display: grid; gap: clamp(36px, 7vw, 90px); align-items: center; justify-items: center; }
@media (min-width: 880px) { .sello-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.sello-texto { display: grid; gap: 18px; justify-items: start; }
.lema { font: italic 600 1.5rem/1.2 var(--serif); color: var(--oro-claro); }
.levita {
  position: relative; width: min(420px, 78vw); perspective: 900px;
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.levita img {
  position: relative; z-index: 2; width: 100%; height: auto;
  animation: flotar 6s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(233, 185, 73, .5)) drop-shadow(0 0 60px rgba(155, 77, 255, .45));
  transition: filter .5s;
}
.levita:hover img { filter: drop-shadow(0 0 26px rgba(255, 224, 138, .85)) drop-shadow(0 0 90px rgba(155, 77, 255, .75)) brightness(1.15); }
.levita-aura {
  position: absolute; inset: 8%; z-index: 1; border-radius: 50%;
  background: conic-gradient(from var(--ang), rgba(155, 77, 255, .0), rgba(155, 77, 255, .55), rgba(233, 185, 73, .45), rgba(155, 77, 255, .0) 70%);
  filter: blur(46px); animation: girar 9s linear infinite;
}
.levita-sombra {
  position: absolute; left: 22%; right: 22%; bottom: -6%; height: 22px; border-radius: 50%;
  background: radial-gradient(rgba(0, 0, 0, .7), transparent 70%);
  animation: sombra 6s ease-in-out infinite;
}
@keyframes flotar { 50% { transform: translateY(-22px) rotate(-1.5deg); } }
@keyframes sombra { 50% { transform: scaleX(.72); opacity: .5; } }
@keyframes rodar { to { --ang: 360deg; } }
/* Girar el elemento entero se resuelve en la tarjeta de video, sin volver a pintar: preferirlo cuando la figura es redonda */
@keyframes girar { to { transform: rotate(360deg); } }

/* Shows: naipes */
.naipes { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); perspective: 1200px; }
@media (min-width: 640px) { .naipes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
@media (min-width: 1060px) { .naipes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.naipe {
  --pinta: var(--marfil);
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 430px; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 70px 24px 66px;
  border-radius: 18px;
  background: var(--terciopelo);
  box-shadow: 0 0 0 1px rgba(233, 185, 73, .3), 0 24px 50px -24px rgba(0, 0, 0, .8);
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s, opacity 1s;
  transform-style: preserve-3d;
}
.naipe.rojo { --pinta: var(--rojo-luz); }
.naipe::before {
  content: ""; position: absolute; inset: 0; z-index: 3; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--oro-claro) 70%, var(--violeta) 80%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .4s;
  animation: rodar 3.2s linear infinite;
}
.naipe::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7, 3, 12, .15) 0%, rgba(18, 6, 31, .72) 46%, rgba(7, 3, 12, .97) 78%);
}
.naipe-foto {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
  opacity: .42; filter: saturate(.55) contrast(1.05); transform: scale(1.02);
  transition: opacity .6s, filter .6s, transform 1.2s cubic-bezier(.2, .8, .2, 1);
}
.naipe-cuerpo { display: grid; gap: 10px; transform: translateZ(40px); }
.naipe h3 { color: var(--marfil); font-size: 1.45rem; }
.naipe p { color: var(--humo); font-size: .98rem; }
.naipe .dato { margin-top: 4px; color: var(--pinta); font: 700 var(--t-xs)/1.4 var(--cuerpo); letter-spacing: .14em; text-transform: uppercase; }
.esq {
  position: absolute; top: 18px; left: 20px; z-index: 2; display: grid; justify-items: center; gap: 2px;
  color: var(--pinta); font: 700 1.5rem/1 var(--display);
  transform: translateZ(30px);
}
.esq svg { width: 22px; height: 22px; }
.esq-b { top: auto; left: auto; bottom: 18px; right: 20px; transform: rotate(180deg); }
.brillo {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 240, 200, .32), transparent 42%),
              linear-gradient(115deg, transparent 30%, rgba(207, 168, 255, .16) 45%, rgba(255, 224, 138, .16) 55%, transparent 70%);
  background-size: 100% 100%, 250% 250%; background-position: 0 0, var(--gx, 50%) var(--gy, 50%);
  mix-blend-mode: screen; opacity: 0; transition: opacity .4s;
}
@media (hover: hover) {
  .naipe:hover { box-shadow: 0 0 0 1px rgba(233, 185, 73, .0), 0 30px 70px -20px rgba(155, 77, 255, .65), 0 0 60px -10px rgba(233, 185, 73, .45); }
  .naipe:hover::before, .naipe:hover .brillo { opacity: 1; }
  .naipe:hover .naipe-foto { opacity: .9; filter: saturate(1.15) contrast(1.05); transform: scale(1.1); }
  .naipe:hover .esq svg { animation: latido .9s ease-in-out infinite; }
}
@keyframes latido { 50% { transform: scale(1.3); filter: drop-shadow(0 0 8px currentColor); } }
.naipes .naipe {
  transition-property: transform, box-shadow, opacity, translate;
  transition-duration: .5s, .5s, 1s, 1.1s;
  transition-timing-function: cubic-bezier(.2, .8, .2, 1);
  transition-delay: 0s, 0s, var(--dl, 0s), var(--dl, 0s);
}
.naipes .naipe:nth-child(2) { --dl: .08s; }
.naipes .naipe:nth-child(3) { --dl: .16s; }
.naipes .naipe:nth-child(4) { --dl: .24s; }

/* ---------- Segundo acto: el viaje ---------- */
.viaje, .acto-sec { overflow: clip; }
.viaje-grid { display: grid; gap: clamp(28px, 6vw, 72px); justify-items: center; text-align: center; }
@media (min-width: 900px) {
  .viaje-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: start; text-align: left; }
  .v-texto .grupo { justify-content: flex-start; }
}
.v-texto { display: grid; gap: 16px; justify-items: inherit; max-width: 34rem; }
#vTitulo, .acto-titulo { min-height: 2.2em; }
#vInstr, .acto-instr { color: var(--humo); font-size: 1.08rem; min-height: 4.8em; max-width: 36ch; }
@media (max-width: 899px) {
  .viaje-grid { gap: 18px; }
  .v-texto { gap: 10px; }
  #vTitulo, .acto-titulo { min-height: 0; font-size: clamp(1.6rem, 7vw, 2.2rem); }
  #vInstr, .acto-instr { font-size: 1rem; }
  .tablero { width: min(460px, 86vw, 50svh); }
}
#vInstr strong, .acto-instr strong { color: var(--oro-claro); }

/* Segundo acto: tarjeta de la mente */
.mente-escena { display: grid; justify-items: center; gap: 22px; perspective: 1300px; }
.tarjeta-mente {
  position: relative; width: min(340px, 80vw); aspect-ratio: 3 / 4.1;
  transform-style: preserve-3d; transition: transform .7s cubic-bezier(.5, 0, .3, 1);
}
.tarjeta-mente.volteada { transform: rotateY(180deg); }
.tm-cara, .tm-dorso { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tm-cara {
  display: grid; grid-template-columns: repeat(4, 1fr); align-content: center; gap: 2px 6px; padding: 8% 7%;
  background: linear-gradient(160deg, #fffaf0, var(--marfil) 60%, #eadcbd); color: #3a0e5d;
  box-shadow: 0 0 0 1px var(--oro), 0 0 0 7px rgba(18, 6, 31, .92), 0 0 0 8px rgba(233, 185, 73, .5), 0 30px 60px -20px #000, 0 0 70px rgba(155, 77, 255, .45);
}
.tm-cara span { text-align: center; font: 700 clamp(1rem, 4.6vw, 1.4rem)/1.75 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.tm-cara.revelado { grid-template-columns: 1fr; place-items: center; }
.tm-cara.revelado b {
  font: 700 clamp(5rem, 28vw, 8.5rem)/1 var(--display); color: #4a1680;
  text-shadow: 0 0 30px rgba(155, 77, 255, .55), 0 0 2px rgba(233, 185, 73, .9);
  animation: conjuro 1s cubic-bezier(.2, 1.4, .3, 1) both;
}
.tm-dorso { --cw: 300px; transform: rotateY(180deg); }
.m-progreso { display: flex; gap: 10px; }
.m-progreso i { width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid var(--oro); transition: background-color .3s, box-shadow .3s; }
.m-progreso i.hecha { background: var(--oro); box-shadow: 0 0 10px var(--oro); }
.m-progreso i.actual { box-shadow: 0 0 0 3px rgba(233, 185, 73, .3), 0 0 12px var(--oro); }

/* Cuarto acto: la carta que desaparece */
.princesa-escena { --cw: 110px; position: relative; width: min(470px, 90vw); height: 330px; }
.pcarta {
  position: absolute; left: 0; top: 0; width: var(--cw); height: calc(var(--cw) * 1.4); perspective: 800px;
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)) scale(var(--e, 1));
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .6s;
}
.pcarta .giro { transition-delay: calc(var(--i) * 70ms); }
.pcarta .reverso { transform: rotateY(180deg); }
.pcarta.boca-abajo .giro { transform: rotateY(180deg); }
.pcarta.vuela { --e: .15; opacity: 0; transform: translate(var(--x, 0), calc(var(--y, 0) - 240px)) rotate(200deg) scale(.15); transition-duration: .8s; }
.pcarta .frente { transition: box-shadow .3s; }
.figura {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: calc(var(--cw) * .02);
  font: 700 calc(var(--cw) * .46)/1 var(--display);
}
.figura svg { width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); }
@media (hover: hover) {
  .pcarta:not(.boca-abajo):hover .frente { box-shadow: 0 0 0 1.5px var(--oro), 0 0 26px rgba(233, 185, 73, .6), 0 0 60px rgba(155, 77, 255, .5); }
}

/* Quinto acto: la bola de cristal */
.bola-escena { display: grid; justify-items: center; padding-top: 10px; }
.bola {
  position: relative; z-index: 2; width: min(310px, 72vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 58%, #5b1a8c, #2a0b45 52%, #0b0414 82%);
  box-shadow: inset 0 0 44px rgba(207, 168, 255, .45), inset 0 -24px 60px rgba(0, 0, 0, .65), 0 0 70px rgba(155, 77, 255, .55), 0 0 0 1px rgba(207, 168, 255, .35);
  animation: flotar 7s ease-in-out infinite;
}
.bola-niebla {
  position: absolute; inset: -30%; z-index: 1; mix-blend-mode: screen;
  background: conic-gradient(from var(--ang), rgba(207, 168, 255, 0), rgba(207, 168, 255, .45), rgba(233, 185, 73, .2), rgba(207, 168, 255, 0) 55%, rgba(207, 168, 255, .38) 78%, rgba(207, 168, 255, 0));
  filter: blur(22px); animation: girar 7s linear infinite; transition: opacity 1.4s;
}
.bola-niebla.dos { inset: -15%; animation-duration: 11s; animation-direction: reverse; }
.bola-brillo { position: absolute; inset: 0; z-index: 3; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 18%), radial-gradient(circle at 70% 80%, rgba(233, 185, 73, .18), transparent 30%); }
.bola-cifra { position: absolute; inset: 0; z-index: 2; display: flex; justify-content: center; align-items: center; gap: .04em; font: 700 clamp(3.2rem, 15vw, 4.8rem)/1 var(--display); }
.bola-cifra span {
  display: inline-block; opacity: 0; transform: scale(.5); filter: blur(14px);
  background: var(--oro-grad); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity 1s, transform 1.1s cubic-bezier(.2, 1.4, .3, 1), filter 1.1s;
  transition-delay: calc(var(--i) * .38s);
}
.bola.revelada .bola-cifra span { opacity: 1; transform: none; filter: blur(0) drop-shadow(0 0 14px rgba(233, 185, 73, .8)); animation: brillo 6s linear infinite; }
.bola.revelada .bola-niebla { opacity: .35; }
.bola.agitada { animation: agitar .5s ease-in-out infinite; box-shadow: inset 0 0 60px rgba(207, 168, 255, .7), inset 0 -24px 60px rgba(0, 0, 0, .6), 0 0 110px rgba(155, 77, 255, .85), 0 0 0 1px rgba(207, 168, 255, .5); }
.bola.agitada .bola-niebla { animation-duration: 1.4s; }
@keyframes agitar { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3px, 1px) rotate(-1deg); } 75% { transform: translate(3px, -1px) rotate(1deg); } }
.bola-base {
  width: min(190px, 44vw); height: 46px; margin-top: -26px; z-index: 1;
  background: linear-gradient(180deg, #ffe08a, var(--oro) 35%, var(--oro-hondo) 75%, #5e3d0d);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
  border-radius: 0 0 8px 8px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .6));
}

.tablero {
  --s: 56px;
  position: relative; width: min(460px, 88vw); aspect-ratio: 1 / 1.36;
}
.v-centro {
  position: absolute; left: 50%; top: 35.3%; width: 52%; aspect-ratio: 1; translate: -50% -50%; /* 35.3% = centro del círculo (0.48 del ancho / 1.36) */
  display: grid; place-items: center;
}
.v-centro img {
  width: 52%; height: auto; opacity: .9;
  filter: drop-shadow(0 0 16px rgba(233, 185, 73, .55)) drop-shadow(0 0 40px rgba(155, 77, 255, .5));
  animation: flotar 6s ease-in-out infinite;
}
.v-flecha {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  fill: none; stroke: var(--oro); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 6 9; opacity: 0; transition: opacity .6s;
  filter: drop-shadow(0 0 6px rgba(233, 185, 73, .7));
}
.v-flecha marker path { fill: var(--oro-claro); stroke: none; }
.v-flecha.ver { opacity: 1; animation: rastro 1.2s linear infinite; }
.v-flecha.contraria { transform: scaleX(-1); }
@keyframes rastro { to { stroke-dashoffset: -30; } }
.lugar {
  position: absolute; left: 0; top: 0; width: var(--s); height: var(--s);
  display: grid; place-items: center; border-radius: 50%;
  color: var(--oro-claro);
  background: radial-gradient(circle at 35% 30%, rgba(155, 77, 255, .45), rgba(18, 6, 31, .95) 72%);
  box-shadow: 0 0 0 1.5px rgba(233, 185, 73, .6), 0 0 18px rgba(155, 77, 255, .35);
  transform: translate(calc(var(--x) - 50%), calc(var(--y) - 50%)) scale(var(--e, 1));
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .7s, filter .7s, box-shadow .35s;
}
.lugar svg { width: 54%; height: 54%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(233, 185, 73, .6)); }
.lugar.lleno svg { fill: currentColor; stroke: none; }
.lugar.rojo { color: var(--rojo-luz); }
.lugar.salida { --e: .82; background: none; box-shadow: none; color: var(--oro); font-size: calc(var(--s) * .62); line-height: 1; text-shadow: 0 0 14px var(--oro); }
.lugar.salida small {
  position: absolute; top: 92%; left: 50%; translate: -50% 0;
  font: 700 .62rem/1 var(--cuerpo); letter-spacing: .22em; text-transform: uppercase; color: var(--humo); text-shadow: none;
}
.lugar.pulso { --e: 1.2; box-shadow: 0 0 0 2px var(--oro-claro), 0 0 30px rgba(233, 185, 73, .8), 0 0 60px rgba(155, 77, 255, .7); }
.lugar.salida.pulso { --e: 1.05; box-shadow: none; }
.lugar.esfuma { --e: .2; opacity: 0; filter: blur(8px); }
.lugar.hallado {
  --e: 1.55; z-index: 5; color: #fff;
  animation: hallado 1.6s ease-in-out infinite;
}
@keyframes hallado {
  0%, 100% { box-shadow: 0 0 0 2px var(--oro-claro), 0 0 34px rgba(233, 185, 73, .85), 0 0 90px rgba(155, 77, 255, .75); }
  50% { box-shadow: 0 0 0 3px #fff6d8, 0 0 54px rgba(255, 224, 138, 1), 0 0 130px rgba(155, 77, 255, .9); }
}
@media (hover: hover) {
  .lugar:not(.esfuma):hover { box-shadow: 0 0 0 2px var(--oro-claro), 0 0 26px rgba(233, 185, 73, .7); }
}

/* ---------- Galería: anillo 3D ---------- */
.galeria { overflow: clip; }
.galeria .cabeza { margin-bottom: clamp(8px, 2vw, 20px); }
.magia-titulo {
  display: flex; justify-content: center;
  font: 700 clamp(3.6rem, 15vw, 8.5rem)/1.05 var(--display); letter-spacing: .04em;
  transition: filter .35s;
}
.magia-titulo span {
  display: inline-block;
  background: var(--oro-grad); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(.6em) scale(.3) rotate(-25deg);
  filter: blur(14px) drop-shadow(0 0 0 rgba(233, 185, 73, 0));
  transition: opacity .7s, transform 1s cubic-bezier(.2, 1.4, .3, 1), filter 1s;
  transition-delay: calc(var(--i) * 110ms);
}
.visto .magia-titulo span {
  opacity: 1; transform: none;
  filter: blur(0) drop-shadow(0 0 22px rgba(233, 185, 73, .5));
  animation: brillo 6s linear infinite, ola 3.4s ease-in-out calc(var(--i) * .16s + 1.6s) infinite;
}
@keyframes ola { 0%, 100% { transform: none; } 50% { transform: translateY(-.1em) rotate(-3deg); } }
.magia-titulo.destello { filter: brightness(1.5) drop-shadow(0 0 30px rgba(255, 224, 138, .8)); }
.anillo-escena {
  --fw: clamp(160px, 44vw, 290px);
  position: relative; height: calc(var(--fw) * 1.42 + 90px);
  perspective: 1500px; perspective-origin: 50% 40%;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
}
.anillo-escena.arrastrando { cursor: grabbing; }
.anillo-escena::after {
  content: ""; position: absolute; left: 50%; bottom: 10px; width: min(900px, 120vw); height: 120px; translate: -50% 0; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(155, 77, 255, .35), rgba(233, 185, 73, .08) 40%, transparent 70%);
  filter: blur(10px);
}
.anillo {
  position: absolute; left: 50%; top: 30px; width: var(--fw); height: calc(var(--fw) * 4 / 3);
  margin-left: calc(var(--fw) / -2);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--R, 300px) * -1)) rotateY(var(--giro, 0deg));
}
.foto {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateY(calc(var(--k) * 360deg / 7)) translateZ(var(--R, 300px));
}
.foto-btn {
  position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: inherit;
  transform-style: preserve-3d; border-radius: 14px;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.foto-giro { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.5, 0, .3, 1); }
.foto.volteada .foto-giro { transform: rotateY(180deg); }
.foto-cara, .foto .reverso {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.foto-cara {
  background: var(--terciopelo);
  box-shadow: 0 0 0 1px rgba(233, 185, 73, .65), 0 0 0 5px rgba(18, 6, 31, .9), 0 0 0 6px rgba(233, 185, 73, .35), 0 30px 50px -20px #000;
  filter: brightness(var(--luz, 1)) saturate(calc(var(--luz, 1) * .6 + .4));
  transition: box-shadow .4s;
}
.foto-cara img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.foto-cara::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .22), transparent 35%, transparent 70%, rgba(155, 77, 255, .25));
}
.foto .reverso { --cw: 220px; transform: rotateY(180deg); }
@media (hover: hover) {
  .foto-btn:hover { transform: translateZ(46px) scale(1.04); }
  .foto-btn:hover .foto-cara { box-shadow: 0 0 0 1.5px var(--oro-claro), 0 0 0 6px rgba(18, 6, 31, .9), 0 0 0 7px var(--oro), 0 0 50px rgba(233, 185, 73, .55), 0 0 110px rgba(155, 77, 255, .6); }
  .foto-btn:hover img { transform: scale(1.08); }
}
.controles { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 22px; padding-inline: 16px; }
.pista { font: 600 var(--t-xs)/1.3 var(--cuerpo); letter-spacing: .16em; text-transform: uppercase; color: var(--humo); text-align: center; }

/* Visor */
.visor {
  padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100dvh;
  display: none; place-items: center; overflow: hidden;
}
.visor[open] { display: grid; }
.visor::backdrop { background: rgba(7, 3, 12, .9); backdrop-filter: blur(10px); }
.visor img {
  max-width: min(92vw, 1200px); max-height: 84dvh; width: auto; height: auto; border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(233, 185, 73, .6), 0 0 80px rgba(155, 77, 255, .5);
  view-transition-name: var(--vt, none);
}
.visor .redondo { position: fixed; }
.visor-cerrar { top: 16px; right: 16px; font-size: 1.1rem; }
.visor-ant { left: 16px; top: 50%; translate: 0 -50%; }
.visor-sig { right: 16px; top: 50%; translate: 0 -50%; }
::view-transition-group(foto-activa) { animation-duration: .55s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }

/* ---------- Videos: flujo de cartas ---------- */
.videos { overflow: clip; }
.flujo-escena { position: relative; height: clamp(420px, 118vw, 620px); }
.flujo-aura {
  position: absolute; left: 50%; top: 50%; width: min(760px, 120vw); height: 80%; translate: -50% -50%;
  background-size: cover; background-position: center;
  filter: blur(70px) saturate(1.6); opacity: .55; transition: background-image .8s;
  border-radius: 50%;
}
.flujo {
  --vw: clamp(200px, 56vw, 300px);
  position: absolute; inset: 0; perspective: 1200px; touch-action: pan-y;
}
.clip {
  position: absolute; left: 50%; top: 50%; width: var(--vw); aspect-ratio: 9 / 16;
  margin: calc(var(--vw) * -16 / 18) 0 0 calc(var(--vw) / -2);
  border-radius: 18px; overflow: hidden; cursor: pointer;
  background: var(--terciopelo) center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(233, 185, 73, .45), 0 30px 60px -20px #000;
  transform: translateX(calc(var(--d) * var(--vw) * .62)) translateZ(calc(var(--ad) * -180px)) rotateY(calc(var(--d) * -32deg));
  z-index: calc(10 - var(--ad));
  filter: brightness(calc(1 - var(--ad) * .25));
  transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .8s, opacity .6s, box-shadow .5s;
}
.clip[data-ad="3"] { opacity: 0; pointer-events: none; }
.clip video { width: 100%; height: 100%; object-fit: cover; }
.clip::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, transparent 70%, rgba(7, 3, 12, .6)), linear-gradient(125deg, rgba(255, 255, 255, .14), transparent 40%);
}
.clip.activo {
  box-shadow: 0 0 0 1.5px var(--oro), 0 0 40px rgba(233, 185, 73, .45), 0 0 120px rgba(155, 77, 255, .55), 0 40px 60px -20px #000;
}
.clip.activo::before {
  content: ""; position: absolute; inset: 0; z-index: 2; padding: 2px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 60%, var(--oro-claro) 75%, var(--violeta) 85%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: rodar 3s linear infinite;
}
.clip-barra { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .2); overflow: hidden; opacity: 0; transition: opacity .4s; }
.clip-barra i { display: block; height: 100%; width: 100%; background: var(--oro-grad); transform-origin: left; transform: scaleX(var(--p, 0)); }
.clip.activo .clip-barra { opacity: 1; }
.clip-play {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: 64px; height: 64px; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%; pointer-events: none;
  background: rgba(18, 6, 31, .55); border: 1px solid var(--oro); color: var(--oro-claro); backdrop-filter: blur(4px);
  opacity: 0; transform: scale(.6); transition: opacity .3s, transform .3s;
}
.clip-play::before { content: ""; margin-left: 5px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent currentColor; }
.clip.pausado .clip-play { opacity: 1; transform: none; }
@media (hover: hover) {
  .clip:not(.activo):hover { filter: brightness(1.05); box-shadow: 0 0 0 1.5px var(--oro-claro), 0 0 50px rgba(233, 185, 73, .5); }
}

/* ---------- La predicción: el sobre ---------- */
.prediccion { background: linear-gradient(transparent, rgba(28, 10, 46, .55) 40%, transparent); }
.pre-grid { display: grid; gap: clamp(28px, 6vw, 72px); justify-items: center; text-align: center; }
.pre-texto { display: grid; gap: 16px; justify-items: center; min-width: 0; }
.pre-texto p:not(.ceja) { color: var(--humo); max-width: 40ch; min-height: 3.1em; }
@media (min-width: 820px) {
  .pre-grid { grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; text-align: left; }
  .pre-texto { justify-items: start; }
}
.sobre {
  --sw: min(320px, 78vw);
  --cw: calc(var(--sw) * .31);
  position: relative; width: var(--sw); max-width: 100%; aspect-ratio: 3 / 2;
  margin-top: calc(var(--sw) * .42); perspective: 900px;
  animation: flotar 7s ease-in-out infinite;
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .6)) drop-shadow(0 0 40px rgba(155, 77, 255, .35));
}
.s-fondo { position: absolute; inset: 0; border-radius: 8px; background: #2c0d4a; }
.s-carta {
  position: absolute; left: 50%; bottom: 10%; z-index: 2;
  width: var(--cw); height: calc(var(--cw) * 1.4);
  transform: translateX(-50%);
  transition: transform .95s cubic-bezier(.2, .8, .2, 1) .4s;
}
.s-carta .cara { backface-visibility: visible; -webkit-backface-visibility: visible; }
.sobre.abierto .s-carta { transform: translate(-50%, -80%) rotate(-5deg); }
.sobre.abierto .s-carta .frente { box-shadow: 0 0 0 1px var(--oro), 0 0 34px rgba(233, 185, 73, .7); }
.s-frente {
  position: absolute; inset: 0; z-index: 3; border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, rgba(233, 185, 73, .07) 0 1px, transparent 1px 9px),
    linear-gradient(#4a1680, #2a0b45 70%);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(233, 185, 73, .35);
}
.s-solapa {
  position: absolute; inset: 0 0 auto 0; height: 60%; z-index: 4;
  transform-origin: top;
  transition: transform .7s cubic-bezier(.4, 0, .2, 1), z-index 0s .32s;
}
.s-solapa::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(#5b1a8c, #3a0e5d);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.sobre.abierto .s-solapa { transform: rotateX(180deg); z-index: 1; }
.lacre {
  position: absolute; left: 50%; top: 100%; width: 52px; height: 52px; border-radius: 50%;
  transform: translate(-50%, -64%);
  display: grid; place-items: center;
  background: radial-gradient(circle at 34% 30%, #fff1b8, var(--oro) 40%, var(--oro-hondo) 75%, #6d4710);
  box-shadow: 0 2px 6px var(--sombra), 0 0 18px rgba(233, 185, 73, .5);
  color: #3a0e5d;
  transition: opacity .25s, transform .4s;
}
.lacre svg { width: 24px; height: 24px; }
.sobre.abierto .lacre { opacity: 0; transform: translate(-50%, -64%) scale(1.6); }

/* ---------- Informes ---------- */
.res-grid { display: grid; gap: clamp(36px, 7vw, 80px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .res-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.pasos { display: grid; gap: 24px; counter-reset: paso; }
.pasos li { counter-increment: paso; display: grid; grid-template-columns: 2.8rem minmax(0, 1fr); column-gap: 12px; row-gap: 4px; }
.pasos li::before {
  content: counter(paso); grid-row: span 2;
  font: 600 2.6rem/.9 var(--display);
  background: var(--oro-grad); background-size: 200%; -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pasos h3 { font-size: 1.2rem; }
.pasos p { color: var(--humo); font-size: 1rem; }
.tel {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 34px; text-decoration: none;
  padding: 14px 22px 14px 16px; border-radius: 16px;
  border: 1px solid rgba(233, 185, 73, .35); background: rgba(18, 6, 31, .6);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.tel svg { width: 34px; height: 34px; color: var(--oro); }
.tel span { display: grid; font: 700 1.35rem/1.15 var(--display); letter-spacing: .04em; color: var(--marfil); }
.tel small { font: 600 var(--t-xs)/1.3 var(--cuerpo); letter-spacing: .2em; text-transform: uppercase; color: var(--humo); }
@media (hover: hover) { .tel:hover { border-color: var(--oro); box-shadow: 0 0 40px rgba(233, 185, 73, .3); transform: translateY(-3px); } }

.form {
  display: grid; gap: 18px; min-width: 0;
  padding: clamp(20px, 5vw, 36px);
  background: linear-gradient(160deg, rgba(42, 11, 69, .75), rgba(18, 6, 31, .85));
  border: 1px solid rgba(233, 185, 73, .3);
  border-radius: 20px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px);
}
.campo { display: grid; gap: 7px; min-width: 0; }
.campo label, .campo .rotulo, .form legend {
  font: 600 var(--t-xs)/1.3 var(--cuerpo); letter-spacing: .16em; text-transform: uppercase; color: var(--humo);
}
.form legend { margin-bottom: 9px; padding: 0; }
.campo input {
  width: 100%; min-width: 0; min-height: 48px; padding: 10px 14px;
  background: rgba(7, 3, 12, .7); color: var(--texto);
  border: 1px solid rgba(187, 168, 207, .35); border-radius: 10px;
  font: 400 1rem/1.3 var(--cuerpo);
  transition: border-color .25s, box-shadow .25s;
}
.campo input::placeholder { color: rgba(187, 168, 207, .55); }
.campo input:focus-visible { border-color: var(--oro); outline: none; box-shadow: 0 0 0 3px rgba(233, 185, 73, .2), 0 0 22px rgba(233, 185, 73, .2); }
.campo input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) saturate(4) hue-rotate(5deg); }
.par { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.fichas { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ficha { position: relative; min-width: 0; }
.ficha input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ficha span {
  display: flex; align-items: center; gap: 9px; min-height: 50px; padding: 8px 12px;
  border: 1px solid rgba(187, 168, 207, .35); border-radius: 10px;
  font: 600 .95rem/1.2 var(--cuerpo); color: var(--texto);
  transition: border-color .25s, background-color .25s, box-shadow .25s, transform .25s;
}
.ficha svg { flex: none; width: 18px; height: 18px; color: var(--pinta); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.ficha.rojo { --pinta: var(--rojo-luz); }
.ficha.negro { --pinta: var(--marfil); }
.ficha input:checked + span { border-color: var(--oro); background: rgba(233, 185, 73, .14); box-shadow: 0 0 20px rgba(233, 185, 73, .2); }
.ficha input:checked + span svg { transform: scale(1.25) rotate(-10deg); }
.ficha input:focus-visible + span { outline: 2px solid var(--oro); outline-offset: 3px; }
@media (hover: hover) { .ficha:hover span { border-color: rgba(233, 185, 73, .7); transform: translateY(-2px); } }
.nota-carta {
  padding: 18px 18px 20px; border-radius: 10px;
  background: linear-gradient(160deg, #fffaf0, var(--marfil)); color: var(--tinta);
  font: 400 1.02rem/1.55 var(--cuerpo);
  overflow-wrap: anywhere;
  box-shadow: inset 0 0 0 1px rgba(168, 118, 31, .35);
}
.form .grupo { justify-content: flex-start; }

/* ---------- Redes con polvo de hadas ---------- */
.redes-bloque { display: grid; gap: 14px; justify-items: start; margin-top: 36px; }
.redes { display: flex; gap: 34px; justify-content: center; padding: 26px; }
.redes-bloque .redes { padding-left: 4px; }
.pie .red, .pie .red:hover { color: var(--oro-claro); }
.red {
  position: relative; display: grid; place-items: center; width: 58px; height: 58px; flex: none;
  border-radius: 50%; color: var(--oro-claro); text-decoration: none;
  background: radial-gradient(circle at 35% 30%, rgba(155, 77, 255, .4), rgba(18, 6, 31, .9) 70%);
  box-shadow: 0 0 0 1px rgba(233, 185, 73, .55), 0 0 24px rgba(155, 77, 255, .45);
  transition: transform .45s cubic-bezier(.2, 1.4, .3, 1), box-shadow .4s, color .3s;
}
.red::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, rgba(255, 224, 138, .9) 72%, rgba(207, 168, 255, .8) 82%, transparent 94%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  animation: girar 4s linear infinite;
}
.ico-red { position: relative; z-index: 2; width: 25px; height: 25px; filter: drop-shadow(0 0 6px rgba(233, 185, 73, .6)); }
.polvo { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.polvo i {
  position: absolute; left: 50%; top: 50%;
  width: var(--t); height: var(--t); margin: calc(var(--t) / -2) 0 0 calc(var(--t) / -2);
  border-radius: 50%; background: var(--c);
  box-shadow: 0 0 5px var(--c), 0 0 12px var(--c), 0 0 22px rgba(233, 185, 73, .6);
  opacity: 0;
  animation: hada var(--dur) linear var(--d) infinite;
}
.polvo i.estrella {
  border-radius: 0; box-shadow: none; filter: drop-shadow(0 0 4px var(--c));
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
@keyframes hada {
  0% { opacity: 0; transform: rotate(var(--a)) translateX(var(--r)) translateY(0) scale(.2); }
  18% { opacity: 1; transform: rotate(calc(var(--a) + 30deg)) translateX(calc(var(--r) + 3px)) translateY(-2px) scale(1); }
  45% { opacity: .45; }
  60% { opacity: 1; }
  75% { transform: rotate(calc(var(--a) + 125deg)) translateX(calc(var(--r) + 11px)) translateY(-8px) scale(.9); }
  100% { opacity: 0; transform: rotate(calc(var(--a) + 170deg)) translateX(calc(var(--r) + 16px)) translateY(-12px) scale(0); }
}
@media (hover: hover) {
  .red:hover {
    transform: translateY(-5px) scale(1.14); color: #fff;
    box-shadow: 0 0 0 1.5px var(--oro-claro), 0 0 34px rgba(233, 185, 73, .65), 0 0 70px rgba(155, 77, 255, .6);
  }
  .red:hover .polvo i { animation-duration: calc(var(--dur) * .55); }
}

/* ---------- Pie ---------- */
.pie {
  border-top: 1px solid rgba(233, 185, 73, .25);
  padding-block: 48px calc(110px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, rgba(7, 3, 12, .85));
}
.pie-grid { display: grid; gap: 10px; justify-items: center; text-align: center; }
.pie img { width: 84px; height: auto; filter: drop-shadow(0 0 14px rgba(233, 185, 73, .45)); }
.pie-lema { font: italic 600 1.6rem/1.2 var(--serif); color: var(--oro-claro); }
.pie-seo { max-width: 46ch; font-size: var(--t-s); color: rgba(187, 168, 207, .8); }
.pie a { color: var(--humo); text-decoration: none; transition: color .25s; }
.pie a:hover { color: var(--oro-claro); }
.pie small { font-size: var(--t-s); color: rgba(187, 168, 207, .7); }

/* ---------- Botón flotante ---------- */
.flotante {
  position: fixed; z-index: 80; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 18px 0 14px;
  border-radius: 999px; text-decoration: none; color: var(--tinta);
  background: var(--oro-grad); background-size: 200%;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .7), 0 0 26px rgba(233, 185, 73, .45);
  opacity: 0; transform: translateY(30px) scale(.8); pointer-events: none;
  translate: var(--mx, 0px) var(--my, 0px);
  transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .2, 1), translate .3s, box-shadow .3s, background-position .8s;
}
.flotante.mostrar { opacity: 1; transform: none; pointer-events: auto; }
.flotante::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--oro);
  animation: onda 2.4s ease-out infinite; pointer-events: none;
}
@keyframes onda { from { transform: scale(1); opacity: .8; } to { transform: scale(1.35, 1.6); opacity: 0; } }
.flotante svg { width: 30px; height: 30px; flex: none; }
.flotante-txt { font: 700 var(--t-xs)/1 var(--cuerpo); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 520px) { .flotante-txt { display: none; } .flotante { padding: 0 14px; } }
@media (hover: hover) { .flotante:hover { background-position: 100% 0; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .7), 0 0 50px rgba(233, 185, 73, .75); } }
.mini {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px 4px 5px; border-radius: 4px;
  background: var(--marfil); color: var(--tinta);
  font: 700 .95rem/1 var(--display); letter-spacing: -.04em;
}
.mini.es-rojo { color: var(--rojo-naipe); }
.mini svg { width: 11px; height: 11px; }

/* ---------- Celulares y tabletas: mismos efectos, menos trabajo para el procesador ---------- */
@media (hover: none), (pointer: coarse) {
  .btn-linea, .redondo, .form, .clip-play { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .btn-linea, .redondo { background: rgba(18, 6, 31, .85); }
  .form { background: linear-gradient(160deg, rgba(42, 11, 69, .95), rgba(18, 6, 31, .97)); }
  h2 em, h2 em .letra, .firma-n, .funcion h3, .cuenta b { animation: none; }
  .acto::before, .acto::after, .candilejas, .levita-aura, .levita-sombra { animation: none; }
  .levita-aura { filter: blur(30px); }
  .flujo-aura { filter: blur(40px) saturate(1.5); }
  /* Bordes rectangulares que giran: en celular quedan quietos (redibujarlos cada cuadro es caro) */
  .funcion::before, .clip.activo::before, .naipe::before { animation: none; }
  .funcion-poster { animation: none; filter: drop-shadow(0 0 18px rgba(255, 170, 70, .35)); }
  /* Las letras aparecen deslizándose, sin desenfoque */
  .js [data-magia] .letra, .magia-titulo span, .visto .magia-titulo span, .bola-cifra span, .bola.revelada .bola-cifra span { filter: none; }
  /* El dorado se queda fijo en lugar de recorrer el texto */
  #titulo { animation: none; }
  .visto .magia-titulo span { animation: ola 3.4s ease-in-out calc(var(--i) * .16s + 1.6s) infinite; }
  .bola.revelada .bola-cifra span { animation: none; }
  #titulo.conjuro span, #vTitulo.conjuro span, .acto-titulo.conjuro span {
    animation: conjuro .9s cubic-bezier(.2, 1.4, .3, 1) calc(var(--i) * 90ms) both, ola 3.4s ease-in-out calc(var(--i) * .16s + 1.4s) infinite;
  }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .js [data-aparece], .js [data-magia] .letra, .firma-pix span { opacity: 1; translate: none; transform: none; filter: none; }
}
