/* Salto de Delfines — base: VIDRIO DE MAR y NÁCAR. Tarjetas de vidrio turquesa/aqua translúcido con orilla de espuma,
   botones como BURBUJAS (aqua brillante con su reflejo) y conchas de nácar, el contador de aros como PERLAS en un hilo,
   la instrucción siempre visible (arrastrar / deslizar), el "¡AHORA! ⬆", la manita, el mini tutorial, los avisos de
   espuma, el "¡cumple!" y el resumen final. Colores: turquesa, aqua, coral suave, arena y lila (nada de rojo con
   amarillo). Letras: Pacifico (títulos de playa) + Baloo 2. Todo cuelga de html.sd. Por dentro se mide contra el marco
   (.app es un contenedor de tamaño: cqw/cqh), nunca contra la ventana. Contraste de textos ≥ 4.5:1. */
.sd {
  --tinta: #0B3B4A; --tinta-2: #23586A; --espuma: #FFFFFF; --crema: #FFFBF2;
  --vidrio: #E6FBF8; --vidrio-2: #CCF3EF; --vidrio-borde: rgba(255, 255, 255, .85);
  --aqua: #8DEEE6; --aqua-2: #5FDCD4; --turquesa: #22B8B2; --turquesa-d: #0E8A8C; --mar: #0D6E86; --mar-d: #08465A;
  --coral: #FF9F90; --coral-l: #FFE1DA; --arena: #F7E8CF; --arena-d: #E6CFA6; --lila: #B9A6F0; --lila-l: #ECE5FF;
  --nacar: linear-gradient(135deg, #FFFFFF 0%, #F6EEFF 30%, #E3F8F6 60%, #FFF0F3 85%, #FFFFFF 100%);
  --wa: #25D366;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --f-playa: "Pacifico", "Baloo 2", cursive;
  --f-texto: "Baloo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
.sd *, .sd *::before, .sd *::after { box-sizing: border-box; }
.sd body { margin: 0; font-family: var(--f-texto); color: var(--tinta); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.sd button { font: inherit; color: inherit; }
.sd :focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; box-shadow: 0 0 0 6px var(--aqua); }
.sd .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sd .noscript { margin: 24px; font: 700 18px/1.5 var(--f-texto); background: var(--vidrio); padding: 16px; border-radius: 16px; }

/* ---------- marco ---------- */
.sd .fondo { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(36% 22% at 50% 62%, rgba(255, 240, 200, .9), rgba(255, 200, 140, 0) 70%),
  linear-gradient(180deg, #2E2468 0%, #6E4AA6 28%, #E07AA8 48%, #FFA772 60%, #FFD08C 64%, #1D7E96 64.4%, #0A4A60 100%); }
.sd:not(.is-showcase) .fondo { filter: blur(6px) saturate(1.05); }
.sd.is-showcase .fondo { display: none; }
.sd .app { position: fixed; inset: 0; z-index: 1; overflow: hidden; isolation: isolate; container-type: size; container-name: marco; background: #1D6E86; transition: opacity .5s ease; }
/* computadora y tableta: el mismo marco de teléfono que los demás diseños, con el atardecer difuminado alrededor */
@media (min-width: 560px) and (min-height: 560px) {
  .sd .app { inset: auto; left: 50%; top: 50%; width: min(430px, 100vw - 32px); height: min(932px, 100dvh - 40px); transform: translate(-50%, -50%); border-radius: 36px;
    box-shadow: 0 0 0 4px #FFFFFF, 0 0 0 8px var(--aqua-2), 0 0 0 11px rgba(255, 255, 255, .9), 0 30px 90px rgba(6, 30, 50, .55); }
}
.sd.is-showcase .app { inset: 0 !important; width: auto !important; height: auto !important; transform: none !important; border-radius: 0 !important; box-shadow: none !important; }
.sd .stage { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; }
.sd .stage:focus-visible { box-shadow: inset 0 0 0 4px var(--aqua), inset 0 0 0 7px var(--tinta); }
.sd .gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .7s ease; }
.sd .gl.is-on { opacity: 1; }
/* viñeta suave de película (sin costo de GPU) */
.sd .vineta { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(135% 95% at 50% 45%, rgba(0, 0, 0, 0) 60%, rgba(6, 30, 50, .28) 100%); }
.sd .sin-gl .stage { background: url("../assets/poster/fondo-delfines.webp") center / cover no-repeat, linear-gradient(180deg, #2E2468 0%, #6E4AA6 30%, #E07AA8 50%, #FFD08C 64%, #1D7E96 64.4%, #0A4A60); }
.sd .ui { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.sd .ui > * { pointer-events: auto; }

/* ---------- botones: BURBUJAS (aqua brillante con su reflejo) y conchas de NÁCAR ---------- */
.sd .btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 999px; color: var(--tinta); text-decoration: none; cursor: pointer; overflow: hidden;
  font: 800 17px/1.12 var(--f-texto); letter-spacing: .01em; text-align: center;
  background: var(--nacar);
  box-shadow: inset 0 0 0 2px rgba(11, 59, 74, .55), inset 0 -4px 8px rgba(185, 166, 240, .25), 0 4px 0 rgba(11, 59, 74, .45), 0 8px 18px rgba(6, 40, 56, .25);
  transition: transform .1s ease, box-shadow .1s ease; touch-action: manipulation; user-select: none;
}
/* el reflejo de la burbuja: una franja de luz arriba a la izquierda */
.sd .btn::before { content: ""; position: absolute; left: 10%; right: 38%; top: 5px; height: 38%; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0)); pointer-events: none; }
.sd .btn > * { position: relative; }
.sd .btn:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(11, 59, 74, .55), 0 1px 0 rgba(11, 59, 74, .45); }
.sd .btn.is-ola { color: #063B44; background: radial-gradient(120% 140% at 30% 10%, #C9FFF8 0%, var(--aqua) 38%, var(--aqua-2) 70%, #34C3BC 100%);
  box-shadow: inset 0 0 0 2px #0B6E73, inset 0 -6px 12px rgba(8, 110, 115, .35), 0 4px 0 #0B5E66, 0 10px 22px rgba(8, 90, 100, .38); }
.sd .btn.is-nacar { background: var(--nacar); }
.sd .btn.is-wa { color: #06301A; background: radial-gradient(120% 140% at 30% 10%, #C8F8DA 0%, #7CEBA6 40%, var(--wa) 80%); box-shadow: inset 0 0 0 2px #0B5A2E, 0 4px 0 #0B5A2E, 0 8px 16px rgba(11, 90, 46, .25); }
.sd .btn.is-chica { min-height: 44px; padding: 0 18px; font-size: 15.5px; }
.sd .btn.is-grande { min-height: 58px; font-size: 20px; padding: 0 28px; }
.sd .btn.is-bloque { width: 100%; }
/* los botones grandes del juego no arrancan desplazamientos: un dedo tembloroso igual los "toca" (main.js → tocable) */
.sd .tj-seguir, .sd .is-saltar { touch-action: none; }
.sd .btn .pi { display: inline-flex; }
/* botones redondos: burbujas de vidrio */
.sd .burbuja-btn { position: relative; display: inline-grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: var(--tinta);
  background: radial-gradient(circle at 32% 26%, #FFFFFF 0 12%, rgba(240, 255, 253, .96) 30%, rgba(200, 244, 240, .94) 70%, rgba(150, 226, 222, .95) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .95), inset 0 -5px 10px rgba(34, 184, 178, .3), 0 0 0 1.5px rgba(11, 59, 74, .45), 0 5px 14px rgba(6, 40, 56, .3); }
.sd .burbuja-btn::after { content: ""; position: absolute; right: 9px; bottom: 9px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .8); pointer-events: none; }
.sd .burbuja-btn svg { position: relative; z-index: 1; }
.sd .burbuja-btn:active { transform: scale(.94); }
.sd .enlace { border: 0; background: none; padding: 10px 8px; min-height: 44px; font: 800 16px var(--f-texto); color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }

/* ---------- HUD: sonido, perlas, datos ---------- */
.sd .hud { position: absolute; z-index: 25; left: 10px; right: 10px; top: calc(var(--safe-t) + 10px); display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; pointer-events: none; }
.sd .hud > * { pointer-events: auto; }
/* cinco perlas ensartadas en un hilo de nácar */
.sd .perlas { position: relative; margin: 6px 0 0; display: flex; gap: 6px; padding: 6px 12px; border-radius: 999px; pointer-events: none !important;
  background: linear-gradient(180deg, rgba(8, 70, 90, .55), rgba(8, 70, 90, .38)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.sd .perlas-hilo { position: absolute; left: 16px; right: 16px; top: 50%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .8), rgba(255, 255, 255, .2)); }
.sd .pl { position: relative; display: inline-flex; filter: drop-shadow(0 2px 2px rgba(6, 30, 50, .35)); }
.sd .pl.is-llena { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .85)) drop-shadow(0 2px 2px rgba(6, 30, 50, .35)); }
.sd .pl.is-pop { animation: sd-pl .8s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sd-pl { 0% { transform: scale(.3); } 60% { transform: scale(1.45); } 100% { transform: scale(1); } }
.sd .hud.is-portada .perlas, .sd [data-fase="celebra"] .perlas, .sd [data-fase="final"] .perlas { visibility: hidden; }
.sd .hud.is-intro .hud-datos { visibility: hidden; }
.sd .tj-t:focus-visible { outline: none; box-shadow: none; }
.sd [data-fase="celebra"] .hud-datos { visibility: hidden; }

/* ---------- PORTADA ---------- */
.sd .portada { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 70px) 16px calc(var(--safe-b) + 16px); text-align: center; pointer-events: none; transition: opacity .45s ease; }
.sd .portada > * { pointer-events: auto; }
.sd .portada.is-out { opacity: 0; pointer-events: none; }
.sd .portada-letrero { width: min(100%, 360px); animation: sd-entra .9s .1s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes sd-entra { from { opacity: 0; transform: translateY(-24px) scale(.94); } }
.sd .portada-k { display: inline-block; margin: 0 0 6px; padding: 2px 14px 1px; border-radius: 99px; background: rgba(8, 70, 90, .72); color: #FFFFFF; font: 800 14px/1.5 var(--f-texto); letter-spacing: .02em; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.sd .portada-t { margin: 0; font: 400 clamp(30px, 9.6cqw, 42px)/1.18 var(--f-playa); color: #FFFFFF; text-wrap: balance;
  text-shadow: 0 3px 0 var(--turquesa-d), 0 5px 0 var(--mar-d), 0 10px 22px rgba(6, 30, 50, .55); }
.sd .portada-sub { position: relative; display: inline-block; margin: 14px 0 0; padding: 10px 16px; border-radius: 22px; color: var(--tinta); font: 700 clamp(15px, 4cqw, 16.5px)/1.32 var(--f-texto);
  background: linear-gradient(180deg, rgba(240, 255, 253, .96), rgba(208, 245, 241, .95)); box-shadow: inset 0 0 0 2px var(--vidrio-borde), 0 0 0 1.5px rgba(11, 59, 74, .25), 0 8px 18px rgba(6, 30, 50, .3); }
.sd .portada-acciones { display: flex; flex-direction: column; align-items: center; gap: 2px; width: min(100%, 360px); color: #FFFFFF; text-shadow: 0 1px 2px rgba(4, 20, 34, .95), 0 0 10px rgba(4, 20, 34, .6); }
.sd .portada-acciones .btn { width: 100%; text-shadow: none; }
.sd .is-saltar { animation: sd-late 1.8s 1.2s ease-in-out 4; }
@keyframes sd-late { 50% { transform: translateY(-4px) scale(1.02); } }
.sd .saltar-intro { position: absolute; right: 12px; bottom: calc(var(--safe-b) + 12px); color: #FFFFFF; text-shadow: 0 1px 3px rgba(4, 20, 34, .95); font-size: 15px; }

/* ---------- juego: la instrucción (siempre visible), "¡AHORA! ⬆" y la manita ---------- */
.sd .abajo { position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 18px); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.sd .abajo > * { pointer-events: none; }
.sd .pista { position: relative; display: flex; align-items: center; gap: 10px; max-width: 100%; margin: 0; padding: 8px 18px 8px 8px; border-radius: 99px; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s, padding .3s;
  background: linear-gradient(180deg, rgba(240, 255, 253, .97), rgba(205, 244, 240, .96)); box-shadow: inset 0 0 0 2px var(--vidrio-borde), 0 0 0 1.5px rgba(11, 59, 74, .35), 0 8px 20px rgba(6, 30, 50, .3);
  font: 800 17px/1.22 var(--f-texto); color: var(--tinta); will-change: opacity, transform; }
.sd .pista.is-on { opacity: 1; transform: none; }
.sd .pista-ic { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: #063B44; background: radial-gradient(circle at 32% 28%, #E4FFFB, var(--aqua) 55%, var(--aqua-2)); box-shadow: inset 0 0 0 2px #0B6E73; }
.sd .pista[data-modo="mover"] .pista-ic svg { animation: sd-ladeo 1.6s ease-in-out infinite; }
.sd .pista[data-modo="saltar"] .pista-ic svg { animation: sd-arriba .9s ease-in-out infinite; }
@keyframes sd-ladeo { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes sd-arriba { 50% { transform: translateY(-4px); } }
.sd .pista[data-modo="saltar"] { background: linear-gradient(180deg, #FFFFFF, #E9FFFC); box-shadow: inset 0 0 0 2px #FFFFFF, 0 0 0 2.5px var(--turquesa), 0 0 26px rgba(141, 238, 230, .9), 0 8px 20px rgba(6, 30, 50, .3); }
/* discreta: después de dos buenos saltos, más chica y translúcida (sigue a la vista) */
.sd .pista.is-on.is-discreta { opacity: .82; padding: 5px 14px 5px 5px; font-size: 15px; }
.sd .pista.is-discreta .pista-ic { width: 32px; height: 32px; }
.sd .pista.is-on.is-discreta[data-modo="saltar"] { opacity: 1; }
.sd .ahora { position: absolute; left: 50%; top: 21%; margin: 0; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none !important; transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1); color: #FFFFFF; }
.sd .ahora-t { display: block; padding: 2px 26px 8px; border-radius: 99px; font: 400 clamp(36px, 11cqw, 46px)/1.25 var(--f-playa); color: #063B44;
  background: radial-gradient(120% 140% at 30% 10%, #FFFFFF 0%, #C9FFF8 35%, var(--aqua) 70%, var(--aqua-2)); box-shadow: inset 0 0 0 2.5px #FFFFFF, 0 0 0 3px #0B6E73, 0 0 44px rgba(141, 238, 230, .95), 0 8px 20px rgba(6, 30, 50, .35); }
.sd .ahora-flecha { display: block; margin-top: 6px; filter: drop-shadow(0 0 10px rgba(141, 238, 230, .95)) drop-shadow(0 2px 2px rgba(6, 30, 50, .6)); }
.sd .ahora.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.sd .ahora.is-on .ahora-t { animation: sd-ahora .7s .35s ease-in-out infinite; }
.sd .ahora.is-on .ahora-flecha { animation: sd-flecha .7s ease-in-out infinite; }
@keyframes sd-ahora { 50% { transform: scale(1.07); } }
@keyframes sd-flecha { 0% { transform: translateY(10px); opacity: .5; } 60% { transform: translateY(-8px); opacity: 1; } 100% { transform: translateY(-12px); opacity: 0; } }
.sd .manita { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; pointer-events: none !important; transition: opacity .3s; transform: translate(var(--x, 50%), var(--y, 60%)); }
.sd .manita.is-on { opacity: 1; }
.sd .con-tutorial .manita { opacity: 0 !important; }
.sd .manita-dedo { position: absolute; left: -16px; top: -6px; filter: drop-shadow(0 3px 4px rgba(6, 30, 50, .5)); }
.sd .manita-rastro { position: absolute; opacity: 0; border-radius: 6px; }
/* arrastrar de lado (hacia el aro) */
.sd .manita[data-modo="mover"].is-on .manita-dedo { animation: sd-arrastra 1.7s ease-in-out infinite; }
.sd .manita[data-modo="mover"] .manita-rastro { left: -70px; top: 2px; width: 140px; height: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .9), rgba(255, 255, 255, 0)); }
.sd .manita[data-modo="mover"].is-on .manita-rastro { animation: sd-rastro 1.7s ease-in-out infinite; }
@keyframes sd-arrastra { 0%, 100% { transform: translateX(calc(-60px * var(--lado, 1))); } 50% { transform: translateX(calc(60px * var(--lado, 1))); } }
/* deslizar hacia arriba */
.sd .manita[data-modo="saltar"].is-on .manita-dedo { animation: sd-desliza 1.2s ease-in-out infinite; }
.sd .manita[data-modo="saltar"] .manita-rastro { left: -2px; top: -70px; width: 6px; height: 70px; background: linear-gradient(0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95)); }
.sd .manita[data-modo="saltar"].is-on .manita-rastro { animation: sd-rastro 1.2s ease-in-out infinite; }
@keyframes sd-desliza { 0% { transform: translateY(20px); opacity: 0; } 15% { opacity: 1; } 60% { transform: translateY(-60px); opacity: 1; } 80%, 100% { transform: translateY(-70px); opacity: 0; } }
@keyframes sd-rastro { 0%, 20% { opacity: 0; } 50% { opacity: .9; } 85%, 100% { opacity: 0; } }

/* ---------- mini tutorial: dos pasos animados (arrastrar · deslizar hacia arriba) ---------- */
.sd .tutorial { position: absolute; z-index: 27; left: 50%; top: calc(var(--safe-t) + 72px); width: min(100% - 28px, 340px); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; transform: translate(-50%, -12px); opacity: 0; transition: opacity .35s, transform .45s cubic-bezier(.3, 1.3, .5, 1); pointer-events: none !important; }
.sd .tutorial.is-in { opacity: 1; transform: translate(-50%, 0); }
.sd .tutorial.is-out { opacity: 0; transform: translate(-50%, -12px); }
.sd .tt-paso { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 10px; border-radius: 22px; text-align: center; transition: transform .35s, opacity .35s;
  background: linear-gradient(180deg, rgba(240, 255, 253, .97), rgba(205, 244, 240, .96)); box-shadow: inset 0 0 0 2px var(--vidrio-borde), 0 0 0 1.5px rgba(11, 59, 74, .3), 0 8px 18px rgba(6, 30, 50, .3); }
.sd .tutorial .tt-paso.is-saltar { opacity: .55; transform: scale(.94); }
.sd .tutorial.is-paso2 .tt-paso.is-mover { opacity: .55; transform: scale(.94); }
.sd .tutorial.is-paso2 .tt-paso.is-saltar { opacity: 1; transform: none; box-shadow: inset 0 0 0 2px #FFFFFF, 0 0 0 2.5px var(--turquesa), 0 0 22px rgba(141, 238, 230, .8), 0 8px 18px rgba(6, 30, 50, .3); }
.sd .tutorial:not(.is-paso2) .tt-paso.is-mover { box-shadow: inset 0 0 0 2px #FFFFFF, 0 0 0 2.5px var(--turquesa), 0 0 22px rgba(141, 238, 230, .8), 0 8px 18px rgba(6, 30, 50, .3); }
.sd .tt-n { position: absolute; left: -6px; top: -8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--f-texto); color: #063B44; background: radial-gradient(circle at 32% 28%, #FFFFFF, var(--aqua)); box-shadow: inset 0 0 0 2px #0B6E73; }
.sd .tt-escena { position: relative; width: 100%; height: 74px; overflow: hidden; border-radius: 16px; background: linear-gradient(180deg, #FFC9A0 0%, #FFE2B8 42%, #4FB8CC 42.5%, #1D7E96 100%); }
.sd .tt-delfin { position: absolute; left: 50%; top: 34px; margin-left: -30px; }
.sd .tt-mano { position: absolute; left: 50%; top: 40px; margin-left: -8px; filter: drop-shadow(0 2px 3px rgba(6, 30, 50, .5)); }
.sd .tt-aro { position: absolute; left: 50%; top: 4px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; border: 5px solid #BFFBFF; box-shadow: 0 0 12px rgba(191, 251, 255, .95); }
.sd .tt-paso.is-mover .tt-delfin { animation: tt-lado 2.2s ease-in-out infinite; }
.sd .tt-paso.is-mover .tt-mano { animation: tt-lado-mano 2.2s ease-in-out infinite; }
@keyframes tt-lado { 0%, 100% { transform: translateX(-34px); } 50% { transform: translateX(34px); } }
@keyframes tt-lado-mano { 0%, 100% { transform: translateX(-34px); } 50% { transform: translateX(34px); } }
.sd .tt-paso.is-saltar .tt-delfin { animation: tt-salta 1.6s ease-in-out infinite; }
.sd .tt-paso.is-saltar .tt-mano { animation: tt-sube 1.6s ease-in-out infinite; }
@keyframes tt-salta { 0%, 30% { transform: translateY(6px) rotate(0); } 60% { transform: translateY(-26px) rotate(-18deg); } 85%, 100% { transform: translateY(6px) rotate(10deg); } }
@keyframes tt-sube { 0% { transform: translateY(14px); opacity: 0; } 15% { opacity: 1; } 45% { transform: translateY(-14px); opacity: 1; } 60%, 100% { transform: translateY(-18px); opacity: 0; } }
.sd .tt-t { margin: 0; font: 800 15px/1.2 var(--f-texto); color: var(--tinta); }

/* "¡Chapuzón!" de aviso: salpicadura de espuma con letras de playa */
.sd .chapuzon { position: absolute; left: 50%; top: 24%; z-index: 30; margin: 0; transform: translate(-50%, -50%); pointer-events: none !important; text-align: center; animation: sd-chap .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.sd .chapuzon.is-out { animation: sd-chap-fuera .38s ease-in both; }
@keyframes sd-chap { from { opacity: 0; transform: translate(-50%, -30%) scale(.4) rotate(-8deg); } }
@keyframes sd-chap-fuera { to { opacity: 0; transform: translate(-50%, -70%) scale(1.1); } }
.sd .chapuzon-t { position: relative; display: block; white-space: nowrap; padding: 2px 10px 10px; font: 400 clamp(32px, 10cqw, 42px)/1.25 var(--f-playa); color: #FFFFFF; transform: rotate(-4deg);
  text-shadow: 0 3px 0 var(--turquesa-d), 0 6px 0 var(--mar-d), 0 0 26px rgba(141, 238, 230, .8); }
.sd .chapuzon.is-nacar .chapuzon-t { color: #FFFFFF; text-shadow: 0 3px 0 #8F78D8, 0 6px 0 #5B43A8, 0 0 30px rgba(255, 255, 255, .95), 0 0 50px rgba(185, 166, 240, .9); }
.sd .chapuzon-gotas { position: absolute; left: 50%; top: 50%; width: 260px; height: 140px; transform: translate(-50%, -50%); background:
  radial-gradient(circle at 12% 30%, rgba(255, 255, 255, .95) 0 6px, transparent 7px), radial-gradient(circle at 88% 26%, rgba(255, 255, 255, .95) 0 7px, transparent 8px),
  radial-gradient(circle at 20% 80%, rgba(255, 255, 255, .9) 0 4px, transparent 5px), radial-gradient(circle at 82% 82%, rgba(255, 255, 255, .9) 0 5px, transparent 6px),
  radial-gradient(circle at 50% 4%, rgba(255, 255, 255, .9) 0 5px, transparent 6px), radial-gradient(60% 50% at 50% 55%, rgba(141, 238, 230, .55), rgba(141, 238, 230, 0) 70%); animation: sd-gotas .7s ease-out both; }
@keyframes sd-gotas { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 50% { opacity: 1; } }

/* ---------- tarjetas: VIDRIO DE MAR con orilla de espuma, conchita y perla ---------- */
.sd .tarjeta { position: absolute; z-index: 28; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 12px); max-height: calc(100% - var(--safe-t) - 150px); overflow: auto; overscroll-behavior: contain; padding: 30px 20px 18px;
  --t1: rgba(232, 252, 250, .97); --t2: rgba(196, 240, 236, .96); --acento: var(--turquesa); --acento-l: #D4F7F4;
  border-radius: 30px;
  background: radial-gradient(90% 60% at 85% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%), linear-gradient(180deg, var(--t1), var(--t2));
  box-shadow: inset 0 0 0 2px var(--vidrio-borde), inset 0 -10px 24px rgba(34, 184, 178, .14), 0 0 0 1.5px rgba(11, 59, 74, .3), 0 18px 40px rgba(6, 30, 50, .45);
  transform: translateY(115%); transition: transform .55s cubic-bezier(.25, 1.2, .4, 1); scrollbar-width: thin; }
.sd .tarjeta.is-in { transform: none; }
.sd .tarjeta.is-out { transform: translateY(120%); transition-duration: .32s; transition-timing-function: ease-in; }
.sd .tarjeta.tono-aqua { --t2: rgba(196, 240, 236, .96); --acento: var(--turquesa); --acento-l: #D4F7F4; }
.sd .tarjeta.tono-arena { --t2: rgba(247, 232, 207, .96); --acento: #B27A2E; --acento-l: #FBEFD9; }
.sd .tarjeta.tono-turquesa { --t2: rgba(170, 232, 236, .96); --acento: var(--mar); --acento-l: #CFF2F6; }
.sd .tarjeta.tono-coral { --t2: rgba(255, 222, 214, .96); --acento: #C0574A; --acento-l: #FFE8E2; }
.sd .tarjeta.tono-lila { --t2: rgba(226, 216, 255, .96); --acento: #6B55B8; --acento-l: #EEE8FF; }
/* la orilla de espuma: ondas blancas con burbujitas sobre el canto de arriba */
.sd .tj-espuma { position: absolute; left: 0; right: 0; top: 0; height: 22px; pointer-events: none; border-radius: 30px 30px 0 0; background:
  radial-gradient(14px 10px at 14px 0, #FFFFFF 98%, transparent 100%) 0 0 / 28px 12px repeat-x,
  radial-gradient(circle at 6px 15px, rgba(255, 255, 255, .95) 0 2.6px, transparent 3.4px) 3px 0 / 23px 22px repeat-x,
  radial-gradient(circle at 15px 18px, rgba(255, 255, 255, .8) 0 1.8px, transparent 2.6px) 9px 0 / 31px 22px repeat-x; }
.sd .tj-concha { position: absolute; right: 16px; top: 18px; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--acento); background: var(--nacar); box-shadow: inset 0 0 0 1.5px rgba(11, 59, 74, .25), 0 3px 8px rgba(6, 30, 50, .15); }
.sd .tj-k { display: flex; align-items: center; gap: 8px; margin: 6px 56px 4px 0; font: 800 14.5px/1.2 var(--f-texto); letter-spacing: .02em; color: var(--tinta-2); }
.sd .tj-perla { display: inline-flex; }
.sd .tj-t { margin: 0 0 10px; font: 400 clamp(27px, 8.4cqw, 34px)/1.25 var(--f-playa); color: var(--tinta); }
.sd .tj-cuerpo { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.sd .tj-seguir { overflow: hidden; }
.sd .tj-avance { position: absolute !important; inset: auto 0 0 0; height: 5px; background: rgba(255, 255, 255, .8); transform-origin: left; transform: scaleX(0); }
.sd .tarjeta.is-auto .tj-avance { animation: sd-avance var(--auto, 11s) linear both; }
@keyframes sd-avance { to { transform: scaleX(1); } }

/* piezas de las tarjetas (también en "Todos los datos" y en el final) */
.sd .dato-grande { position: relative; text-align: center; padding: 12px 10px 10px; border-radius: 22px; background: var(--nacar); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 1.5px rgba(11, 59, 74, .3), 0 4px 10px rgba(6, 30, 50, .12); }
.sd .dg-k { margin: 0; font: 800 15px/1.2 var(--f-texto); letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-2); }
.sd .dg-v { margin: 2px 0; font: 800 clamp(30px, 9cqw, 38px)/1.05 var(--f-texto); color: var(--tinta); }
.sd .dg-s { margin: 0; font: 700 16px/1.3 var(--f-texto); color: var(--tinta-2); }
.sd .chip { align-self: center; margin: 0; padding: 4px 16px; border-radius: 99px; background: var(--mar); color: #FFFFFF; font: 800 16px/1.4 var(--f-texto); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45), 0 3px 0 var(--mar-d); }
.sd .acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.sd .acciones > * { flex: 1 1 140px; }
.sd .marea { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sd .marea li { display: flex; align-items: baseline; gap: 10px; padding: 7px 12px; border-radius: 14px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1.5px rgba(11, 59, 74, .16); font: 700 16px/1.3 var(--f-texto); }
.sd .mr-hora { flex: none; min-width: 72px; font-weight: 800; color: var(--mar-d); }
.sd .mapa-playa { border-radius: 20px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 1.5px rgba(11, 59, 74, .3); line-height: 0; }
.sd .mapa-playa svg { display: block; width: 100%; height: auto; }
.sd .lugar-nombre { margin: 0; font: 800 22px/1.2 var(--f-texto); }
.sd .lugar-dir { margin: -6px 0 0; font: 600 16px/1.4 var(--f-texto); color: var(--tinta-2); }
.sd .mensaje { margin: 0; padding: 16px 18px 12px; border-radius: 22px; background: linear-gradient(180deg, #FFF3F0, var(--coral-l)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 1.5px rgba(11, 59, 74, .25); }
.sd .mensaje p { margin: 0; font: 700 19px/1.4 var(--f-texto); color: var(--tinta); }
.sd .mensaje footer { margin-top: 6px; font: 400 20px/1.3 var(--f-playa); color: #8E3D33; text-align: right; }
.sd .anfitriones { margin: 0; padding: 14px 16px; border-radius: 22px; text-align: center; background: linear-gradient(180deg, #F5F1FF, var(--lila-l)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 1.5px rgba(11, 59, 74, .25); font: 400 clamp(25px, 7.6cqw, 30px)/1.3 var(--f-playa); color: var(--tinta); }
.sd .invita-nota { margin: 0; font: 700 16px/1.4 var(--f-texto); text-align: center; color: var(--tinta-2); }

/* ---------- final: "¡cumple!" y el resumen en vidrio de mar ---------- */
.sd .cumple { position: absolute; z-index: 24; left: 12px; right: 12px; top: calc(var(--safe-t) + 74px); text-align: center; pointer-events: none !important; animation: sd-entra 1s cubic-bezier(.3, 1.3, .5, 1) both; transition: top .7s ease, transform .7s ease; }
.sd .cumple-k { display: inline-block; margin: 0; padding: 2px 14px; border-radius: 99px; background: rgba(8, 70, 90, .7); color: #FFFFFF; font: 800 15px/1.5 var(--f-texto); letter-spacing: .04em; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.sd .cumple-t { margin: 2px 0 0; font: 400 clamp(40px, 13cqw, 58px)/1.2 var(--f-playa); color: #FFFFFF; text-shadow: 0 3px 0 var(--turquesa-d), 0 6px 0 var(--mar-d), 0 0 34px rgba(141, 238, 230, .85); }
.sd .cumple-s { margin: 0; font: 800 18px/1.3 var(--f-texto); color: #FFFFFF; text-shadow: 0 1px 3px rgba(4, 20, 34, .95), 0 0 12px rgba(4, 20, 34, .6); }
.sd .cumple.is-arriba { top: calc(var(--safe-t) + 58px); }
.sd .cumple.is-arriba .cumple-t { font-size: clamp(28px, 9.4cqw, 46px); white-space: nowrap; }
.sd .fin { position: absolute; z-index: 26; left: 10px; right: 10px; bottom: calc(var(--safe-b) + 10px); max-height: calc(100% - var(--safe-t) - var(--safe-b) - 220px); overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 26px 16px 12px; border-radius: 28px; animation: sd-sube .7s cubic-bezier(.25, 1.2, .4, 1) both;
  background: radial-gradient(90% 60% at 85% 0%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%), linear-gradient(180deg, rgba(232, 252, 250, .97), rgba(196, 240, 236, .96));
  box-shadow: inset 0 0 0 2px var(--vidrio-borde), 0 0 0 1.5px rgba(11, 59, 74, .3), 0 18px 40px rgba(6, 30, 50, .5); }
@keyframes sd-sube { from { transform: translateY(110%); } }
.sd .fin-linea { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px rgba(11, 59, 74, .2); font: 800 17px/1.3 var(--f-texto); text-align: center; }
.sd .fin-lugar { border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px rgba(11, 59, 74, .2); }
.sd .fin-lugar summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; cursor: pointer; list-style: none; font: 800 17px/1.2 var(--f-texto); }
.sd .fin-lugar summary::-webkit-details-marker { display: none; }
.sd .fin-salon { flex: 1; text-align: left; }
.sd .fin-vermapa { font: 800 14px var(--f-texto); color: var(--mar-d); text-decoration: underline; }
.sd .fin-lugar[open] { padding-bottom: 12px; }
.sd .fin-lugar[open] > :not(summary) { margin: 0 12px 10px; }
.sd .fin-enlaces { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 4px; }
.sd .saltar { position: absolute; z-index: 26; right: 12px; bottom: calc(var(--safe-b) + 12px); }
.sd .vitrina-t { position: absolute; left: 0; right: 0; top: 6%; margin: 0; text-align: center; font: 400 64px/1.2 var(--f-playa); color: #FFFFFF; text-shadow: 0 4px 0 var(--turquesa-d), 0 0 30px rgba(6, 30, 50, .6); }
.sd .vitrina-t small { display: block; font: 800 28px var(--f-texto); }
.sd .is-vitrina .vineta { background: none; }
.sd .dbg-fps { position: absolute; left: 6px; bottom: 4px; z-index: 99; margin: 0; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; font: 11px/1.3 ui-monospace, monospace; pointer-events: none !important; }

/* ---------- con la tarjeta abierta, el mar de fondo se oscurece un poco ---------- */
.sd .con-tarjeta .vineta { background: radial-gradient(135% 95% at 50% 30%, rgba(0, 0, 0, 0) 40%, rgba(6, 30, 50, .42) 100%); }

/* ---------- movimiento reducido ---------- */
.sd.rm *, .sd.rm *::before, .sd.rm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
@media (prefers-reduced-motion: reduce) {
  .sd *, .sd *::before, .sd *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sd .tarjeta.is-auto .tj-avance { animation: none; }
}
