/* ============================================================
   LAS AVENTURAS DE JOSEFA — Storybook Cartoon Styling
   Designed for 4-year-old touch targets, phones, tablets & PC
   ============================================================ */

:root {
  --pink: #ff6b9d;
  --pink-dark: #e6487f;
  --yellow: #ffd166;
  --orange: #ff9f43;
  --mint: #2ed573;
  --sky: #54a0ff;
  --purple: #7c5cff;
  --cream: #fff8ec;
  --card-bg: #ffffff;
  --ink: #2d2346;
  --muted: #6c6285;
  --shadow-soft: 0 10px 26px rgba(45, 35, 70, 0.14);
  --shadow-pop: 0 8px 0 rgba(0, 0, 0, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --font-display: 'Fredoka', 'Nunito', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #a8e6ff 0%, #fff6e5 100%);
  overflow-x: hidden;
  touch-action: manipulation;
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
  position: relative;
}

.screen {
  display: none;
  width: 100%;
  min-height: 100dvh;
  position: relative;
  flex-direction: column;
}

.screen.active {
  display: flex;
  animation: screenFade 0.35s ease;
}

@keyframes screenFade {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.hidden {
  display: none !important;
}

/* ==================== WELCOME SCREEN ==================== */
.screen-welcome {
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, #74d0ff 0%, #b8ecff 45%, #fff5d9 80%, #a3e67c 100%);
  overflow: hidden;
}

.sky-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cloud {
  position: absolute;
  font-size: 4.5rem;
  opacity: 0.9;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.08));
}
.cloud.c1 { top: 5%; left: 6%; animation: floatCloud 18s ease-in-out infinite alternate; }
.cloud.c2 { top: 12%; right: 8%; font-size: 3.8rem; animation: floatCloud 22s ease-in-out infinite alternate-reverse; }

.sun-spin {
  position: absolute;
  top: 4%;
  right: 16%;
  font-size: 4.2rem;
  animation: slowSpin 24s linear infinite;
}

.rainbow-float {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 4rem;
  opacity: 0.85;
}

@keyframes floatCloud {
  from { transform: translateX(-12px); }
  to { transform: translateX(28px); }
}

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.welcome-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(8px);
  border-radius: 36px;
  padding: 26px 22px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(45, 35, 70, 0.18), 0 0 0 6px rgba(255, 255, 255, 0.6);
}

.welcome-badge {
  display: inline-block;
  background: linear-gradient(90deg, #ffe066, #ffb347);
  color: #5b3200;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 10px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

.welcome-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  line-height: 1.15;
}

.title-en {
  display: block;
  font-size: 2rem;
  color: var(--purple);
  text-shadow: 0 3px 0 rgba(124, 92, 255, 0.16);
}

.title-es {
  display: block;
  font-size: 1.35rem;
  color: var(--pink-dark);
  margin-top: 4px;
}

.welcome-heroes {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 24px;
}

.hero-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.hero-bubble img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--yellow);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.hero-main img {
  width: 132px;
  height: 132px;
  border: 6px solid var(--pink);
}

.hero-bubble span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  background: #fff;
  padding: 2px 12px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.btn-giant-play {
  width: 100%;
  max-width: 310px;
  border: none;
  border-radius: 999px;
  padding: 16px 28px;
  background: linear-gradient(180deg, #3be87a 0%, #16b85a 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 9px 0 #0d823e, 0 16px 28px rgba(22, 184, 90, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  animation: pulseGlow 2.2s infinite;
}

.btn-giant-play:active {
  transform: translateY(6px);
  box-shadow: 0 3px 0 #0d823e, 0 6px 14px rgba(22, 184, 90, 0.3);
}

.play-icon {
  font-size: 2.2rem;
}

.play-labels {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.05;
}

.play-labels strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.5px;
}

.play-labels small {
  font-size: 1rem;
  font-weight: 800;
  opacity: 0.95;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

.install-banner {
  margin-top: 16px;
}

.btn-install {
  border: 2px dashed var(--purple);
  background: #f3efff;
  color: var(--purple);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
}

/* ==================== HUB / ADVENTURE MAP ==================== */
.screen-hub {
  background: linear-gradient(180deg, #ffeaf3 0%, #fff7e6 50%, #e8f8ff 100%);
  padding: 14px 14px 32px;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto 12px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.hub-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.hub-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--pink);
  background: #fff;
}

.hub-title-wrap h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--purple);
}

.hub-title-wrap p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--pink-dark);
}

.hub-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-pill {
  border: none;
  background: #f2edff;
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(124, 92, 255, 0.2);
}

.icon-pill:active { transform: translateY(3px); }

.star-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #ffe26a, #ffbe3d);
  color: #5a3400;
  font-family: var(--font-display);
  font-size: 1.3rem;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 0 #d99116;
}

.speech-bar {
  max-width: 980px;
  width: 100%;
  margin: 0 auto 16px;
  background: #fff;
  border-radius: 22px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 18px rgba(45, 35, 70, 0.08);
  border: 3px solid #ffe0ee;
}

.btn-mini-speak {
  flex-shrink: 0;
  border: none;
  background: linear-gradient(180deg, #ff7eb3, #ff4f93);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #cc2b6b;
}

.btn-mini-speak:active { transform: translateY(3px); }

.speech-texts {
  flex: 1;
  min-width: 0;
}

.speech-en {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--purple);
  font-weight: 700;
}

.speech-es {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--muted);
}

.adventures-grid {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
}

.adventure-card {
  position: relative;
  border: none;
  border-radius: var(--radius-xl);
  padding: 18px 16px 16px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.14), 0 14px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  overflow: hidden;
}

.adventure-card:hover {
  transform: translateY(-3px);
}

.adventure-card:active {
  transform: translateY(5px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.14);
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-emoji-badge {
  font-size: 2.3rem;
  background: rgba(255, 255, 255, 0.28);
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.35);
}

.card-stars {
  background: rgba(0, 0, 0, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
}

.card-cast {
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.card-cast img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 3px solid #fff;
  margin-left: -10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  animation: cartoonIdle 2.8s ease-in-out infinite;
}

.card-cast img:nth-child(2) { animation-delay: 0.35s; }
.card-cast img:nth-child(3) { animation-delay: 0.7s; }
.card-cast img:nth-child(4) { animation-delay: 1.05s; }
.card-cast img:nth-child(5) { animation-delay: 1.4s; }

@keyframes cartoonIdle {
  0%, 100% { transform: translateY(0) rotate(-2deg) scale(1); }
  50% { transform: translateY(-4px) rotate(2.5deg) scale(1.04); }
}

.card-cast img:first-child {
  margin-left: 0;
}

.card-titles h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.28rem;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.16);
}

.card-titles p {
  margin: 3px 0 0;
  font-size: 0.92rem;
  font-weight: 800;
  opacity: 0.95;
}

.card-topic-pill {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ==================== GAMEPLAY SCREEN ==================== */
.screen-game {
  padding: 12px 14px 20px;
  align-items: center;
  overflow: hidden;
}

.scene-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: background 0.4s ease;
}

/* Theme Backdrops */
.theme-market { background: linear-gradient(180deg, #ffdf7e 0%, #fff4cc 52%, #a9e37b 100%); }
.theme-park { background: linear-gradient(180deg, #8ee3ff 0%, #d4f7ff 48%, #7be06b 100%); }
.theme-numbers { background: linear-gradient(180deg, #a594ff 0%, #e1d8ff 55%, #fff0b8 100%); }
.theme-costanera { background: linear-gradient(180deg, #6ecbff 0%, #baeaff 44%, #38b6ff 64%, #f4d399 100%); }
.theme-supermarket { background: linear-gradient(180deg, #ffd1e6 0%, #fff5fa 55%, #ffe6b3 100%); }
.theme-sports { background: linear-gradient(180deg, #72d5ff 0%, #c7f0ff 48%, #5cd66c 100%); }
.theme-beach { background: linear-gradient(180deg, #56ccff 0%, #b5ecff 45%, #2ec4f1 62%, #ffe08a 100%); }
.theme-cumbia { background: linear-gradient(180deg, #ff7eb3 0%, #ffd166 50%, #ff9f43 100%); }
.theme-school { background: linear-gradient(180deg, #9be7ff 0%, #fff8dc 55%, #ffd6a5 100%); }
.theme-cerro { background: linear-gradient(180deg, #87dbff 0%, #d4f4c9 52%, #7cc957 100%); }

.game-header,
.cast-stage,
.game-speech-bubble,
.play-area,
.cart-zone,
.cumbia-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.btn-round-nav {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #fff;
  font-size: 1.7rem;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(45, 35, 70, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-round-nav:active { transform: translateY(3px); }

.btn-speak-big {
  background: linear-gradient(180deg, #ff7eb3, #ff4785);
  color: #fff;
  box-shadow: 0 5px 0 #c72059;
}

.progress-track {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.progress-star {
  font-size: 1.65rem;
  opacity: 0.28;
  transform: scale(0.85);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-star.earned {
  opacity: 1;
  transform: scale(1.18);
  filter: drop-shadow(0 3px 6px rgba(255, 190, 0, 0.55));
}

/* Cast Stage */
.cast-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.cast-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  animation: cartoonIdle 2.4s ease-in-out infinite;
}

.cast-member:nth-child(2) { animation-delay: 0.4s; }
.cast-member:nth-child(3) { animation-delay: 0.8s; }
.cast-member:nth-child(4) { animation-delay: 1.2s; }

.cast-member img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease;
}

.cast-member.is-josefa img {
  width: 78px;
  height: 78px;
  border-color: var(--pink);
}

.cast-member span {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  padding: 2px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.cast-member.celebrate img {
  animation: happyJump 0.55s ease 2;
}

.cast-member.dance-cumbia {
  animation: cumbiaSway 0.65s ease-in-out infinite alternate;
}

.cast-member.dance-spin img {
  animation: spinMove 0.8s ease;
}

.cast-member.dance-jump {
  animation: happyJump 0.45s ease 2;
}

@keyframes gentleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes happyJump {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-18px) scale(1.1); }
}

@keyframes cumbiaSway {
  from { transform: translateY(0) rotate(-6deg); }
  to { transform: translateY(-8px) rotate(6deg); }
}

@keyframes spinMove {
  from { transform: rotate(0deg) scale(1.1); }
  to { transform: rotate(360deg) scale(1); }
}

/* Speech Bubble */
.game-speech-bubble {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 26px;
  padding: 12px 18px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(45, 35, 70, 0.12);
  border: 4px solid var(--yellow);
  cursor: pointer;
}

.bubble-en {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--purple);
  font-weight: 700;
}

.bubble-es {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--pink-dark);
  margin-top: 2px;
}

/* ==================== PLAY AREA & ITEM CARDS ==================== */
.play-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* Count Stage (Numbers with Tata Victor) */
.count-visual-box {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 26px;
  padding: 14px 20px;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-soft);
  border: 4px solid #fff;
}

.count-token {
  font-size: 2.5rem;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* Costanera Scenic Strip */
.costanera-banner {
  width: 100%;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0b4f6c;
}

.items-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(135px, 1fr));
  gap: 14px;
  max-width: 600px;
}

@media (min-width: 640px) {
  .items-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.item-btn {
  position: relative;
  border: 5px solid #fff;
  border-radius: 26px;
  background: #fff;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(45, 35, 70, 0.14), 0 10px 18px rgba(45, 35, 70, 0.12);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.2s ease;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.item-btn:active {
  transform: translateY(5px) scale(0.97);
  box-shadow: 0 3px 0 rgba(45, 35, 70, 0.14);
}

.item-btn .item-emoji {
  font-size: 3.4rem;
  line-height: 1;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.12));
}

.item-btn .item-number-big {
  font-family: var(--font-display);
  font-size: 3.6rem;
  line-height: 1;
  font-weight: 700;
}

.item-btn .item-en {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 700;
}

.item-btn .item-es {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}

.item-btn.color-card {
  color: #fff;
}

.item-btn.color-card .item-en,
.item-btn.color-card .item-es {
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
}

.item-btn.color-card.light-color .item-en,
.item-btn.color-card.light-color .item-es {
  color: var(--ink);
  text-shadow: none;
}

.item-btn.correct-hit {
  border-color: var(--mint) !important;
  background: #eafff2 !important;
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(46, 213, 115, 0.35);
}

.item-btn.gentle-wiggle {
  animation: gentleShake 0.4s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.75); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes gentleShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px) rotate(-3deg); }
  75% { transform: translateX(8px) rotate(3deg); }
}

/* ==================== CART ZONE (FERIA & SUPERMERCADO) ==================== */
.cart-zone {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.cart-visual {
  background: rgba(255, 255, 255, 0.94);
  border: 4px solid var(--orange);
  border-radius: 26px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-visual.cart-bounce {
  transform: scale(1.12);
}

.cart-body {
  font-size: 2.7rem;
}

.cart-items-inside {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.9rem;
  min-width: 30px;
}

.cart-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #b55400;
  font-weight: 700;
}

/* ==================== CUMBIA BAR ==================== */
.cumbia-bar {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.btn-cumbia-toggle {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  background: #fff;
  color: var(--pink-dark);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.14);
}

/* ==================== VICTORY SCREEN ==================== */
.screen-victory {
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, #ff9a9e 0%, #fad0c4 45%, #ffe699 100%);
  overflow: hidden;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  font-size: 1.8rem;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(540deg);
    opacity: 0.85;
  }
}

.victory-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 470px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 36px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 22px 50px rgba(45, 35, 70, 0.22);
}

.victory-stars {
  font-size: 3.3rem;
  margin-bottom: 6px;
  animation: happyJump 1.2s ease infinite;
}

.victory-en {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--purple);
}

.victory-es {
  margin: 6px 0 18px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pink-dark);
}

.victory-cast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.victory-cast img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--yellow);
  background: #fff;
  animation: happyJump 0.9s ease infinite;
}

.victory-cast img:nth-child(2) { animation-delay: 0.15s; }
.victory-cast img:nth-child(3) { animation-delay: 0.3s; }
.victory-cast img:nth-child(4) { animation-delay: 0.45s; }

.victory-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-action {
  flex: 1;
  border: none;
  border-radius: 22px;
  padding: 14px 12px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.15;
}

.btn-again {
  background: linear-gradient(180deg, #3be87a, #16b85a);
  box-shadow: 0 6px 0 #0d823e;
}

.btn-more {
  background: linear-gradient(180deg, #6fa8ff, #3b7bff);
  box-shadow: 0 6px 0 #2151b8;
}

.btn-action:active { transform: translateY(4px); }

/* ==================== FLYING FX LAYER ==================== */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.flying-emoji {
  position: fixed;
  font-size: 3.6rem;
  transition: all 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1000;
}

/* ==================== HELPER ANIMATIONS ==================== */
.bounce-happy { animation: gentleBob 2.2s ease-in-out infinite; }
.bounce-slow { animation: gentleBob 3s ease-in-out infinite; }
.delay-1 { animation-delay: 0.6s; }
