/* Temporada 8 — secuencia del salto. Sólo se animan transform y opacity. */

.drop {
  position: absolute;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background: #2B2466;
  opacity: 0;
  transition: opacity .35s ease;
  touch-action: none;
}
.drop.is-open { opacity: 1; }
/* Mientras se desvanece al cerrar no bloquea el lobby (JUGAR se puede tocar de inmediato) */
.drop:not(.is-open), .drop:not(.is-open) * { pointer-events: none !important; }

.drop-cam { position: absolute; inset: 0; }
.drop-cam > * { position: absolute; }

.drop-sky {
  inset: -12px;
  background: linear-gradient(180deg, #7B5BD6 0%, var(--dusk-b) 26%, #E7A0C8 52%, var(--dusk-a) 74%, #FFC98F 100%);
  transition: opacity .3s linear;
}
.drop-sun {
  left: 50%;
  top: 58%;
  width: 360px;
  height: 360px;
  margin: -180px 0 0 -180px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF6D8 0 18%, rgba(255, 214, 140, .75) 30%, rgba(255, 158, 107, 0) 68%);
}
.drop-sky-day {
  inset: -12px;
  opacity: 0;
  background: linear-gradient(180deg, #CFEFFF 0%, #9EDCF7 60%, #8FD86C 140%);
}
.drop-map { opacity: 0; transform-origin: 50% 50%; }
.drop-map .map-layer { position: absolute; inset: 0; }
.drop-map svg { width: 100%; height: 100%; }
.drop-clouds { inset: 0; width: 100%; height: 100%; }

.drop-balloon {
  left: 50%;
  top: 9%;
  width: min(52%, 220px);
  translate: -50% 0;
}
.drop-balloon svg { width: 100%; height: auto; filter: drop-shadow(0 10px 0 rgba(43, 36, 102, .18)); }
.drop-balloon-bob { animation: balloon-bob 3.2s ease-in-out infinite; }
@keyframes balloon-bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
.drop-balloon.is-empty .balloon-kid { opacity: 0; }
.balloon-flame { transform-origin: 100px 190px; animation: flame .18s ease-in-out infinite alternate; }
@keyframes flame { from { transform: scale(.85, .8); } to { transform: scale(1.05, 1.15); } }

.drop-diver {
  left: 50%;
  top: 42%;
  width: min(34%, 150px);
  aspect-ratio: 140 / 150;
  translate: -50% -50%;
  opacity: 0;
}
.drop-diver-img { width: 100%; height: 100%; transform-origin: 50% 90%; }
.drop-diver-img svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 0 rgba(27, 42, 107, .25)); }
.drop-glider {
  position: absolute;
  left: 50%;
  bottom: 52%;
  width: 190%;
  aspect-ratio: 220 / 120;
  transform-origin: 50% 100%;
  transform: translate3d(-50%, 0, 0) scale(0);
  opacity: 0;
}
.drop-glider svg { width: 100%; height: 100%; }

/* ---------- Vista frontal a nivel de suelo (aterrizaje) ---------- */
.drop-ground { inset: 0; visibility: hidden; opacity: 0; }
.ground-sky {
  position: absolute;
  inset: -12px;
  background: linear-gradient(180deg, #2FA8E0 0%, #6AD3F5 45%, #CFF5FF 100%);
}
.ground-floor {
  position: absolute;
  left: -12px;
  right: -12px;
  bottom: -12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #8FD86C 0%, #7CC95A 100%);
  border-top: 3px solid #5FAE45;
}
/* Camino hacia la puerta con perspectiva */
.ground-floor::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 140%;
  height: 100%;
  transform: translateX(-50%);
  background: #F4E6C4;
  clip-path: polygon(46% 0, 54% 0, 80% 100%, 20% 100%);
}
.ground-set {
  position: absolute;
  left: 50%;
  width: 400px;
  height: 320px;
  transform-origin: 50% 100%;
}
.ground-art, .ground-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ground-art svg { overflow: visible; } /* las colinas se extienden más allá de la caja de diseño */
.ground-pin { animation: pin-bob 1.4s ease-in-out infinite; }
/* Círculo de luz bajo los pies (plataforma pequeña) */
.ground-glow {
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 104px;
  height: 28px;
  margin-left: -52px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 242, 180, .6) 55%, rgba(255, 210, 63, 0));
  box-shadow: 0 0 18px rgba(255, 210, 63, .6);
}
.ground-glow i {
  position: absolute;
  inset: 3px 8px;
  border-radius: 50%;
  border: 3px solid rgba(255, 210, 63, .95);
  animation: glow-pulse 2s ease-in-out infinite;
}
.ground-avatar {
  position: absolute;
  left: 50%;
  bottom: -2px;
  translate: -50% 0;
  transform-origin: 50% 96%;
}
/* Rodillas flexionadas al tocar el suelo */
.ground-avatar .jt-swing { transition: transform .12s ease-out; }
.ground-avatar.is-crouch .j-leg-l .jt-swing,
.ground-avatar.is-crouch .j-leg-r .jt-swing { transform: rotateX(-32deg); }
.ground-avatar.is-crouch .av-upper { animation: none; transform: translate3d(0, 1.4em, 0); }
/* Pose de victoria: brazos arriba ~0.8 s y vuelve al idle */
.ground-avatar .is-victory .j-arm-l .jt-swing { animation: av-victory-l .85s var(--ease-back) both; }
.ground-avatar .is-victory .j-arm-r .jt-swing { animation: av-victory-r .85s var(--ease-back) both; }
.ground-avatar .is-victory .av-hop { animation: av-victory-hop .85s ease-out both; }
@keyframes av-victory-l { 0% { transform: rotateZ(3deg); } 30%, 78% { transform: rotateZ(160deg); } 100% { transform: rotateZ(3deg); } }
@keyframes av-victory-r { 0% { transform: rotateZ(-3deg); } 30%, 78% { transform: rotateZ(-160deg); } 100% { transform: rotateZ(-3deg); } }
@keyframes av-victory-hop { 0%, 100% { transform: translate3d(0, 0, 0); } 30% { transform: translate3d(0, -1.6em, 0); } 55% { transform: translate3d(0, 0, 0); } }
.is-rm .ground-pin, .is-rm .ground-glow i, .is-rm .ground-avatar .av-hop { animation: none !important; }

/* Toque a pantalla completa */
.drop-tap {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.drop-tap:focus-visible { outline: none; box-shadow: none; }

/* HUD del salto */
.drop-hud { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.drop-skip {
  position: absolute;
  left: calc(var(--sal) + 14px);
  top: calc(var(--sat) + 14px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2.5px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: rgba(27, 42, 107, .45);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  pointer-events: auto;
  cursor: pointer;
}
.drop-skip:active { transform: scale(.94); }
[data-phase="card"] .drop-skip, [data-phase="card"] .alti { opacity: 0; pointer-events: none; transition: opacity .3s; }

.alti {
  position: absolute;
  right: calc(var(--sar) + 14px);
  top: calc(var(--sat) + 14px);
  display: grid;
  grid-template-columns: auto 14px;
  grid-template-rows: auto auto;
  column-gap: 8px;
  padding: 8px 10px 8px 14px;
  border: var(--line);
  border-radius: 14px;
  background: rgba(255, 248, 236, .92);
  box-shadow: var(--drop);
}
.alti-label { grid-column: 1; font-weight: 800; font-size: 11px; letter-spacing: .12em; }
.alti-row { grid-column: 1; display: flex; align-items: baseline; gap: 3px; min-width: 76px; }
.alti-num { font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.alti-unit { font-size: 18px; }
.alti-bar {
  grid-column: 2;
  grid-row: 1 / 3;
  position: relative;
  border: 2.5px solid var(--navy);
  border-radius: 7px;
  background: rgba(27, 42, 107, .15);
  overflow: hidden;
}
.alti-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--lilac), var(--coral));
  transform-origin: 50% 100%;
}

.drop-prompt {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(var(--sab) + 13%);
  margin: 0;
  text-align: center;
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.05;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .25s, transform .35s var(--ease-back);
}
.drop-prompt.is-on { opacity: 1; transform: scale(1); animation: prompt-pulse 1s ease-in-out .35s infinite; }
@keyframes prompt-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.drop-prompt::after {
  content: "";
  display: block;
  width: 46px;
  height: 46px;
  margin: 12px auto 0;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px var(--navy), inset 0 0 0 3px var(--navy);
  animation: tap-ring 1s ease-out infinite;
}
@keyframes tap-ring { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

/* Buscando partida */
.drop-search {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(27, 42, 107, .72);
  color: #fff;
  transition: opacity .35s ease;
}
.drop-search.is-out { opacity: 0; }
.search-spinner { position: relative; width: 64px; height: 64px; animation: spin 1.1s steps(8) infinite; }
.search-spinner i {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 3px solid var(--navy);
  background: var(--yellow);
}
.search-spinner i:nth-child(1) { left: 0; top: 0; }
.search-spinner i:nth-child(2) { right: 0; top: 0; background: var(--coral); }
.search-spinner i:nth-child(3) { right: 0; bottom: 0; background: var(--lime); }
.search-spinner i:nth-child(4) { left: 0; bottom: 0; background: var(--sky); }
.is-found .search-spinner { animation: found-pop .45s var(--ease-back) both; }
@keyframes found-pop { 0% { transform: scale(1); } 50% { transform: scale(1.3) rotate(45deg); } 100% { transform: scale(1) rotate(90deg); } }
.search-text { margin: 0; font-size: 28px; text-shadow: 0 3px 0 var(--navy); }
.is-found .search-text { color: var(--yellow); animation: pop-bounce .45s var(--ease-back); }
.search-sub { margin: 0; font-size: 16px; font-weight: 600; opacity: .85; }

/* Tarjeta final */
.drop-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 60px calc(var(--sar) + 14px) calc(var(--sab) + 16px) calc(var(--sal) + 14px);
  background: linear-gradient(180deg, rgba(27, 42, 107, 0), rgba(27, 42, 107, .55) 40%);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .3s ease, transform .55s var(--ease-back);
}
.drop-card.is-in { opacity: 1; transform: translateY(0); }
.drop-card .mission-card { width: 100%; }
.drop-card.is-in .mission-card { animation: card-slam .6s var(--ease-back) both; }
@keyframes card-slam { 0% { transform: translateY(80px) scale(.85); opacity: 0; } 100% { transform: none; opacity: 1; } }
.landed { margin: 0 0 24px; font-size: 26px; animation: slam .6s var(--ease-back) both; }
.drop-card .btn { font-size: 17px; padding: 10px; white-space: nowrap; }
.drop-card .btn .ic { width: 22px; height: 22px; }

/* ---------- Ayuda progresiva: manita, personaje asomándose, rebote ---------- */
.drop-hand {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sab) + 13% + 128px);
  width: 64px;
  height: 72px;
  margin-left: -20px;
  opacity: 0;
  transform: translateY(12px) scale(.8);
  transition: opacity .3s ease, transform .35s var(--ease-back);
  pointer-events: none;
}
.drop-hand svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 0 rgba(27, 42, 107, .35)); }
.drop-hand.is-on { opacity: 1; transform: none; }
.drop-hand.is-on svg { animation: hand-tap 1.1s ease-in-out infinite; transform-origin: 40% 10%; }
@keyframes hand-tap {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  35% { transform: translateY(14px) rotate(-8deg) scale(.92); }
  50% { transform: translateY(14px) rotate(-8deg) scale(.92); }
}
.drop-hand::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid #fff;
  opacity: 0;
}
.drop-hand.is-on::before { animation: hand-ring 1.1s ease-out infinite; }
@keyframes hand-ring {
  0%, 30% { opacity: 0; transform: translateY(14px) scale(.4); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px) scale(1.5); }
}

/* El personaje se asoma por la canasta mirando hacia abajo; el globo se balancea */
.balloon-kid, .balloon-eyes {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform .5s var(--ease-back);
}
.drop-balloon.is-peek .balloon-kid { transform: translate(7px, -9px) rotate(16deg); }
.drop-balloon.is-peek .balloon-eyes { transform: translateY(3px); }
.drop-balloon.is-peek .drop-balloon-bob { animation: balloon-sway 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes balloon-sway {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}
.drop-prompt.is-on.is-urge { animation: prompt-urge 1.2s cubic-bezier(.3, 1.6, .5, 1) infinite; }
@keyframes prompt-urge {
  0%, 55%, 100% { transform: translateY(0) scale(1); }
  20% { transform: translateY(-22px) scale(1.14); }
  38% { transform: translateY(0) scale(.96); }
}

/* ---------- Destellos al abrir el planeador a tiempo ---------- */
.drop-sparkles { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.drop-sparkles i {
  position: absolute;
  left: -11px;
  top: -11px;
  width: 22px;
  height: 22px;
  background: #FFF6C2;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
}
.drop-sparkles i:nth-child(even) { background: var(--yellow); width: 16px; height: 16px; left: -8px; top: -8px; }
.drop-sparkles.is-on i { animation: sparkle 1s var(--ease-out) var(--d) both; }
@keyframes sparkle {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(-20px) scale(.3); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-110px) scale(1.1) rotate(90deg); }
}

/* ---------- Alerta de planeador automático (informativa, sin regaño) ---------- */
.drop-alert {
  position: absolute;
  left: 50%;
  top: calc(var(--sat) + 96px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 16px 7px 8px;
  border: var(--line);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: var(--drop);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -16px) scale(.9);
  transition: opacity .25s ease, transform .35s var(--ease-back);
}
.drop-alert.is-on { opacity: 1; transform: translate(-50%, 0); }
.drop-alert-ic {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--yellow);
  font-size: 17px;
}

/* ---------- Premio de aterrizaje perfecto ---------- */
.drop-reward {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--sat) + 13%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.reward-title { margin: 0; font-size: clamp(34px, 10.5vw, 44px); line-height: 1; text-align: center; opacity: 0; }
.reward-xp { font-size: 24px; padding: 8px 16px; background: var(--lime); box-shadow: var(--drop); opacity: 0; }
.drop-reward.is-in .reward-title { opacity: 1; animation: slam .6s var(--ease-back) both; }
.drop-reward.is-in .reward-xp { opacity: 1; animation: slam .6s .25s var(--ease-back) both; }

/* Movimiento reducido */
.is-rm .drop-hand.is-on svg, .is-rm .drop-hand.is-on::before, .is-rm .drop-sparkles.is-on i { animation: none; }
.is-rm .drop-reward.is-in .reward-title, .is-rm .drop-reward.is-in .reward-xp { animation: fade-in .3s ease both; opacity: 1; }
.is-rm .drop-balloon-bob, .is-rm .balloon-flame, .is-rm .search-spinner,
.is-rm .drop-prompt.is-on, .is-rm .drop-prompt::after, .is-rm .landed,
.is-rm.drop-card.is-in .mission-card, .is-rm .drop-card.is-in .mission-card { animation: none !important; }
.is-rm .drop-card { transform: none; transition: opacity .3s ease; }
