/* ==========================================================================
   Pool Party · estilos
   Marfil uniforme en toda la página. El color vive en las ilustraciones,
   la tipografía y los detalles finos, nunca en fondos saturados.
   ========================================================================== */

:root {
  --marfil: #FFF9F3;
  --bordo: #8F2029;
  --frambuesa: #D82E59;
  --coral: #F16B61;
  --terracota: #D85B43;
  --naranja: #F58B45;
  --durazno: #F6B18B;
  --champagne: #F5DCC0;
  --amarillo: #F8C46A;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --columna: 640px;
  --lateral: max(22px, env(safe-area-inset-left, 0px));
  --lateral-d: max(22px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--marfil);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--marfil);
  color: var(--bordo);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* La invitación queda bloqueada hasta ganar o saltar el juego */
html.js:not(.desbloqueada),
html.js:not(.desbloqueada) body { overflow: hidden; height: 100%; }
html.jugando, html.jugando body { overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }

img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sin-js { padding: 24px; text-align: center; font-family: var(--serif); font-size: 20px; }

:focus-visible { outline: 2px solid var(--frambuesa); outline-offset: 3px; border-radius: 6px; }

/* --------------------------------------------------------------------------
   Piezas tipográficas
   -------------------------------------------------------------------------- */
.kicker {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(13px, 3.9vw, 18px);
  letter-spacing: .32em;
  padding-left: .32em;           /* compensa el espaciado final para centrar */
  white-space: nowrap;
  color: var(--bordo);
  text-align: center;
}

.titulo-grande {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(62px, 21vw, 112px);
  line-height: .95;
  letter-spacing: .01em;
  color: var(--bordo);
  text-align: center;
}

.titulo-medio {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 14vw, 72px);
  line-height: .98;
  color: var(--bordo);
  text-align: center;
}

.bajada, .italica {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 4.8vw, 23px);
  line-height: 1.3;
  color: var(--bordo);
  text-align: center;
}

.titulo-seccion {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 7vw, 34px);
  letter-spacing: .3em;
  padding-left: .3em;
  color: var(--bordo);
  text-align: center;
  line-height: 1.15;
}

.script {
  font-family: var(--script);
  font-size: clamp(64px, 20vw, 108px);
  line-height: 1;
  color: var(--bordo);
  text-align: center;
  margin-top: -.14em;
  transform: rotate(-3deg);
}

/* --------------------------------------------------------------------------
   Botones y vínculos
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 34px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--serif); font-weight: 600; font-size: clamp(19px, 5vw, 22px);
  letter-spacing: .05em; text-decoration: none; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primario {
  background: linear-gradient(180deg, #DF3A63, var(--frambuesa) 55%, #C42450);
  color: var(--marfil);
  box-shadow: 0 10px 22px -10px rgba(216, 46, 89, .65), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn-contorno { background: transparent; color: var(--bordo); border-color: var(--durazno); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn-ancho { width: 100%; max-width: 380px; padding: 0 20px; font-size: clamp(16px, 4.4vw, 21px); letter-spacing: .03em; white-space: nowrap; }
.ico-flecha { width: 22px; height: 22px; flex: none; }
.ico-reiniciar { width: 22px; height: 22px; flex: none; }

.link-saltar {
  background: none; border: 0; cursor: pointer;
  font-family: var(--serif); font-weight: 500; font-size: 14px;
  letter-spacing: .3em; padding: 10px 14px .6em calc(14px + .3em);
  color: var(--bordo); opacity: .8;
  text-decoration: underline; text-decoration-color: var(--durazno); text-underline-offset: 6px;
}
.link-saltar:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Juego
   -------------------------------------------------------------------------- */
.juego {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 580px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --ola: clamp(100px, 16svh, 142px);
}
.juego-marco {
  position: relative;
  width: 100%; max-width: var(--columna); height: 100%;
  margin: 0 auto;
  overflow: hidden;
}
#lienzo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none; -webkit-user-select: none; user-select: none;
  z-index: 1;
}

.panel {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: space-evenly;
  padding: clamp(12px, 3svh, 28px) var(--lateral) clamp(10px, 2.4svh, 24px) var(--lateral-d);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.panel.activo {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .6s ease;
}

.divisor-chispa { display: flex; align-items: center; gap: 12px; width: min(300px, 70%); }
.divisor-chispa span { flex: 1; height: 1px; background: var(--bordo); opacity: .45; }
.divisor-chispa svg { width: 16px; height: 16px; fill: var(--bordo); flex: none; }

.copa-wrap {
  position: relative; display: flex; justify-content: center;
  height: clamp(120px, 27svh, 250px);
}
.copa-img { height: 100%; width: auto; max-width: 62vw; display: block; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(143,32,41,.22)); }
.copa-intro .copa-img { animation: flota 5s ease-in-out infinite; }
.copa-final { height: clamp(150px, 34svh, 300px); }
.copa-derrota .copa-img { transform: rotate(-6deg); }
.chispita, .bub { position: absolute; left: var(--x); top: var(--y); pointer-events: none; }
.chispita { width: 18px; height: 18px; margin: -9px 0 0 -9px; fill: var(--naranja); animation: destello 2.6s ease-in-out infinite; animation-delay: var(--d); opacity: 0; transform-origin: center; }
.copa-final .chispita { fill: #FBC268; }
.bub { width: 7px; height: 7px; margin: -3px 0 0 -3px; border-radius: 50%; border: 1px solid rgba(255,255,255,.95); background: rgba(255,220,235,.5); animation: burbuja 3.4s ease-in infinite; animation-delay: var(--d); opacity: 0; }

@keyframes flota { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }

/* Elementos de la partida: aparecen solo mientras se juega */
.hud, .mensaje, .pie-juego {
  position: absolute; z-index: 2; left: 0; right: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.juego[data-estado="jugando"] .hud,
.juego[data-estado="jugando"] .pie-juego,
.juego[data-estado="jugando"] .mensaje.visible {
  opacity: 1; visibility: visible; transition: opacity .35s ease;
}

.hud {
  top: 0; padding: clamp(12px, 2.6svh, 22px) max(22px, 7%) 0;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.hud-fila { display: flex; gap: 14px; justify-content: center; width: 100%; }
.pastilla {
  flex: 1 1 0; max-width: 170px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; line-height: 1.05;
  padding: 7px 14px 8px;
  background: var(--marfil);
  border: 1.2px solid var(--coral); border-radius: 999px;
}
.pastilla .et { font-family: var(--serif); font-weight: 500; font-size: 12px; letter-spacing: .12em; color: var(--bordo); }
.pastilla strong {
  font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--bordo);
  font-variant-numeric: tabular-nums lining-nums;
}
.pastilla.alerta strong { color: var(--frambuesa); }
.barra {
  width: min(100%, 360px); height: 10px; border-radius: 999px;
  background: #F8D9D4; overflow: hidden; border: 1px solid #F3C4BC;
}
.barra i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--frambuesa), var(--coral)); border-radius: 999px; transition: width .25s ease; }

.mensaje {
  top: 27%; padding: 0 24px; text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: clamp(22px, 6vw, 30px); color: var(--bordo);
  text-shadow: 0 0 14px var(--marfil), 0 0 6px var(--marfil);
}
.mensaje.visible { animation: mensaje 1.6s ease both; }
@keyframes mensaje { 0% { transform: translateY(8px); opacity: 0; } 12% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-6px); opacity: 0; } }

.pie-juego { bottom: max(6px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; }
.juego[data-estado="jugando"] .pie-juego { pointer-events: none; }
.juego[data-estado="jugando"] .pie-juego .link-saltar { pointer-events: auto; }
.pista { text-align: center; font-family: var(--serif); font-size: 16px; line-height: 1.25; color: var(--bordo); padding: 0 20px; transition: opacity .6s ease; }
.pista.oculta { opacity: 0; }
.pie-juego .link-saltar { font-size: 13px; }

/* --------------------------------------------------------------------------
   Transición
   -------------------------------------------------------------------------- */
.transicion {
  max-width: var(--columna); margin: 0 auto;
  padding: 10px var(--lateral) 0 var(--lateral-d);
  line-height: 0;
}
.transicion svg { width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   Invitación
   -------------------------------------------------------------------------- */
.invitacion { max-width: var(--columna); margin: 0 auto; padding: 0 var(--lateral) 0 var(--lateral-d); }

.bloque { padding: clamp(34px, 8vw, 56px) 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.hero { padding-top: clamp(24px, 6vw, 40px); gap: 8px; }
.chispa-sola { width: 30px; height: 30px; fill: var(--naranja); margin-bottom: 10px; }
.titulo-cumple {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 13.4vw, 80px); line-height: 1;
  letter-spacing: .02em; color: var(--bordo); text-align: center; margin-top: 8px;
}
.sol-horizonte { width: min(380px, 94%); height: auto; display: block; margin-top: 6px; }

/* Fecha y horario */
.fecha { gap: 30px; padding-top: 10px; }
.fecha-fila { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 4vw, 30px); width: 100%; }
.dato { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.dato strong {
  font-family: var(--serif); font-weight: 500; font-size: clamp(19px, 5.6vw, 30px);
  letter-spacing: .05em; line-height: 1.1; color: var(--bordo);
}
.ico-dato { width: clamp(32px, 9vw, 42px); height: clamp(32px, 9vw, 42px); flex: none; fill: none; stroke: var(--bordo); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sep-v { width: 1px; align-self: stretch; min-height: 54px; background: var(--bordo); opacity: .35; }

.cuenta { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.cuenta-etiqueta { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--bordo); }
.cuenta-fila { display: flex; justify-content: center; width: 100%; max-width: 420px; }
.unidad {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 2px 0; position: relative;
}
.unidad + .unidad::before { content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 1px; background: var(--durazno); }
.unidad b {
  font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 11vw, 52px); line-height: 1;
  color: var(--frambuesa); font-variant-numeric: tabular-nums lining-nums;
}
.unidad span { font-family: var(--sans); font-weight: 400; font-size: 11px; letter-spacing: .22em; padding-left: .22em; color: var(--bordo); }
.hoy { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 10vw, 54px); letter-spacing: .06em; color: var(--frambuesa); text-align: center; line-height: 1.05; }

/* Reglas finas con chispa */
.regla { display: flex; align-items: center; gap: 14px; margin: 0 auto; width: 100%; max-width: 560px; }
.regla span { flex: 1; height: 1px; background: var(--bordo); opacity: .35; }
.regla svg { width: 16px; height: 16px; fill: var(--bordo); flex: none; }

/* Ubicación */
.ico-pin { width: 30px; height: 36px; fill: none; stroke: var(--bordo); stroke-width: 2; stroke-linejoin: round; }
.ubicacion { gap: 12px; min-height: 230px; justify-content: center; }
.resaltado { position: relative; padding: 6px 30px 8px; margin-top: 2px; }
.resaltado::before {
  content: ""; position: absolute; inset: 3px 0 3px 0; z-index: 0;
  background: linear-gradient(90deg, rgba(246,177,139,0) 0%, rgba(246,177,139,.55) 8%, rgba(246,177,139,.5) 92%, rgba(246,177,139,0) 100%);
  border-radius: 40% 60% 55% 45% / 80% 60% 70% 80%;
  transform: rotate(-.8deg);
}
.resaltado span {
  position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 7vw, 32px); letter-spacing: .1em; color: var(--bordo);
}
.ubi-lista { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.ubi-lista:not([hidden]) { animation: aparece 1.1s cubic-bezier(.2,.7,.2,1) both; }
.direccion { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 7vw, 32px); line-height: 1.2; text-align: center; color: var(--bordo); max-width: 22ch; }
.direccion:empty { display: none; }
.direccion { white-space: pre-line; max-width: 26ch; }
.mapa { position: relative; width: 100%; aspect-ratio: 4 / 3.4; max-height: 420px; border-radius: 22px; overflow: hidden; border: 1.2px solid var(--durazno); background: #FBEBDD; box-shadow: 0 14px 28px -20px rgba(143,32,41,.45); }
.mapa iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.mapa-capa { position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 14px; }
.mapa-capa span { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 16px; color: var(--bordo); background: rgba(255,249,243,.92); border: 1px solid var(--durazno); border-radius: 999px; padding: 6px 16px; }
.mapa.activo .mapa-capa { display: none; }
.mapa-soltar { position: absolute; z-index: 3; top: 10px; right: 10px; display: none; border: 1px solid var(--durazno); background: rgba(255,249,243,.94); color: var(--bordo); border-radius: 999px; padding: 6px 14px; font-family: var(--serif); font-weight: 600; font-size: 14px; cursor: pointer; }
.mapa.activo .mapa-soltar { display: block; }
.ubi-lista { width: 100%; }
@keyframes aparece { from { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* Dress code */
.dress { gap: 16px; }
.paleta { display: flex; justify-content: center; gap: clamp(10px, 3.4vw, 18px); margin: 10px 0 4px; }
.paleta li {
  width: clamp(44px, 13vw, 62px); aspect-ratio: 1; border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 -6px 12px rgba(143,32,41,.12), 0 8px 14px -10px var(--c);
  transition: transform .3s ease;
}
.paleta li:hover { transform: translateY(-4px) scale(1.04); }
.nota { font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.55; color: var(--bordo); text-align: center; max-width: 30ch; }

/* Qué traer */
.traer { gap: 28px; }
.traer-grilla {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%;
  row-gap: 30px;
}
.traer-grilla li {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 4px 8px; position: relative;
}
.traer-grilla li:not(:nth-child(3n+1))::before {
  content: ""; position: absolute; left: 0; top: 8%; bottom: 8%; width: 1px; background: var(--durazno); opacity: .8;
}
img.icono { height: clamp(52px, 15vw, 70px); width: auto; max-width: 100%; object-fit: contain; margin-bottom: 6px; filter: drop-shadow(0 6px 8px rgba(143,32,41,.12)); }
.traer-grilla b { font-family: var(--sans); font-weight: 500; font-size: 14px; line-height: 1.2; color: var(--bordo); }
.traer-grilla li span { font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.2; color: var(--bordo); opacity: .85; }

/* ¿Venís? */
.rsvp { gap: 22px; }
.titulo-rsvp {
  display: flex; align-items: center; gap: 16px; width: 100%;
  font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 11vw, 52px);
  letter-spacing: .1em; color: var(--bordo); line-height: 1;
}
.titulo-rsvp .linea { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--coral)); opacity: .7; }
.titulo-rsvp .linea:last-child { background: linear-gradient(270deg, transparent, var(--coral)); }

#form-rsvp { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.opciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; border: 0; padding: 0; margin: 0 0 4px; min-width: 0; }
.pildora { position: relative; cursor: pointer; }
.pildora input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pildora span {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px 0 16px;
  border-radius: 999px; border: 1.3px solid var(--durazno); background: transparent;
  font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--bordo);
  transition: background-color .25s, color .25s, border-color .25s;
}
.pildora .marca { width: 24px; height: 24px; flex: none; }
.pildora .marca-vacia { display: inline-block; border: 1.5px solid var(--bordo); border-radius: 50%; }
.pildora input:checked + span { background: linear-gradient(180deg, #DF3A63, var(--frambuesa)); border-color: var(--frambuesa); color: var(--marfil); box-shadow: 0 8px 18px -10px rgba(216,46,89,.7); }
.pildora input:checked + span .marca-vacia { border-color: var(--marfil); background: radial-gradient(circle, var(--marfil) 38%, transparent 42%); }
.pildora input:focus-visible + span { outline: 2px solid var(--frambuesa); outline-offset: 3px; }

.campo {
  width: 100%; position: relative;
  border: 1.2px solid var(--durazno); border-radius: 26px; background: transparent;
  padding: 9px 20px 10px; transition: border-color .2s, box-shadow .2s;
}
.campo:focus-within { border-color: var(--frambuesa); box-shadow: 0 0 0 3px rgba(216,46,89,.12); }
.campo label { display: block; font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--bordo); line-height: 1.2; }
.campo input[type="text"], .campo textarea {
  width: 100%; border: 0; outline: 0; background: transparent; padding: 3px 0 0; resize: none;
  font-family: var(--sans); font-size: 16px; color: var(--bordo);  /* 16px evita el zoom en iOS */
}
.campo textarea { min-height: 62px; line-height: 1.4; }
.campo.invalido { border-color: var(--frambuesa); background: rgba(216,46,89,.04); }


.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.error {
  width: 100%; text-align: center; font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: 18px; color: var(--frambuesa); line-height: 1.3;
}
#form-rsvp .btn-ancho { margin-top: 6px; }

.gracias { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 10px 0 0; outline: 0; }
.gracias:not([hidden]) { animation: aparece 1s cubic-bezier(.2,.7,.2,1) both; }
.gracias-titulo { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 10vw, 52px); line-height: 1.05; letter-spacing: .02em; color: var(--bordo); max-width: 14ch; }

/* Cierre */
.cierre { margin: 8px calc(-1 * var(--lateral-d)) 0 calc(-1 * var(--lateral)); line-height: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.cierre svg { width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   Aparición progresiva al hacer scroll
   -------------------------------------------------------------------------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
html.js .reveal.visto { opacity: 1; transform: none; }

/* Líneas de ola con movimiento muy suave */
.onda-l { animation: ola 9s ease-in-out infinite alternate; }
.onda-l:nth-of-type(2) { animation-duration: 11s; }
@keyframes ola { from { transform: translateX(-8px); } to { transform: translateX(8px); } }

/* --------------------------------------------------------------------------
   Detalles de la copa (SVG): líquido, burbujas, destellos
   -------------------------------------------------------------------------- */
.onda { animation: onda 3.2s linear infinite; }
@keyframes onda { to { transform: translateX(-60px); } }
.nivel { transition: transform 1.5s cubic-bezier(.3,.7,.2,1); }
.burbuja { animation: burbuja 3.4s ease-in infinite; opacity: 0; }
@keyframes burbuja { 0% { transform: translateY(8px); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-26px); opacity: 0; } }
.destello { animation: destello 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; opacity: 0; }
@keyframes destello { 0%,100% { transform: scale(.2) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
.flor { transform-box: fill-box; transform-origin: center; animation: florEntra .9s cubic-bezier(.3,1.5,.5,1) .6s both; }
@keyframes florEntra { from { transform: scale(0) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.gota { animation: gota 2.8s ease-in infinite; opacity: 0; }
@keyframes gota { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(54px); opacity: 0; } }

/* --------------------------------------------------------------------------
   Movimiento reducido
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .burbuja, .destello, .gota { opacity: 0; }
}

/* --------------------------------------------------------------------------
   Pantallas bajas (celulares chicos o en horizontal)
   -------------------------------------------------------------------------- */
@media (max-height: 640px) {
  .titulo-grande { font-size: clamp(52px, 17vw, 84px); }
  .copa-wrap { height: clamp(100px, 24svh, 170px); }
  .copa-final { height: clamp(100px, 26svh, 180px); }
}
@media (min-width: 700px) {
  .invitacion, .transicion { padding-left: 0; padding-right: 0; }
}

/* --------------------------------------------------------------------------
   Pantalla inicial: fondo Sunset (ilustración original, solo se ve en la bienvenida)
   -------------------------------------------------------------------------- */
.escena {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity .8s ease, visibility 0s linear .8s;
}
.juego[data-panel="intro"] .escena { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.juego-marco { z-index: 1; }

/* cover: ocupa todo el ancho y alto sin estirar ni deformar; se ancla donde está el horizonte */
.esc-foto { position: absolute; inset: 0; background: #E8466B url("assets/img/sunset.webp") 50% 60% / cover no-repeat; }
.esc-ola { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: calc(var(--ola) + env(safe-area-inset-bottom, 0px) + 22px); display: block; }

/* Panel de bienvenida sobre el atardecer */
.panel-intro { justify-content: flex-start; padding-bottom: 0; }
.intro-cuerpo { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding-top: clamp(6px, 2svh, 22px); }
.intro-pie { position: relative; flex: none; width: 100%; height: calc(var(--ola) - 6px); display: flex; flex-direction: column; align-items: center; }
.intro-pie .btn { transform: translateY(-52%); }
.intro-pie .btn:hover { transform: translateY(-56%); }
.intro-pie .btn:active { transform: translateY(-52%) scale(.98); }
.intro-pie .link-saltar { margin-top: -14px; color: #E98E73; opacity: 1; text-decoration-color: #F6B18B; }
.panel-intro .kicker, .panel-intro .titulo-grande, .panel-intro .bajada { color: var(--marfil); }
.panel-intro .titulo-grande { text-shadow: 0 2px 18px rgba(143,32,41,.25); }
.panel-intro .bajada { text-shadow: 0 1px 10px rgba(143,32,41,.25); }
.panel-intro .divisor-chispa span { background: var(--marfil); opacity: .6; }
.panel-intro .divisor-chispa svg { fill: var(--marfil); }
.panel-intro .copa-wrap { height: clamp(130px, 31svh, 290px); }
.btn-claro {
  background: linear-gradient(180deg, #FFFDF9, #FFF1E2); color: var(--bordo);
  box-shadow: 0 12px 26px -12px rgba(143,32,41,.55), inset 0 1px 0 #fff;
}

/* Transición al desbloquear la invitación */
.inv-raiz.revelando { animation: revelaInv 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes revelaInv { from { opacity: 0; transform: translateY(28px); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }
