/* ============================================================
   juego-comida.css — focused Exprésate food speech sandbox.
   ============================================================ */

body[data-page="juego"] {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, .24), transparent 32rem),
    radial-gradient(circle at 92% 12%, rgba(139, 92, 246, .22), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(67, 88, 244, .10), transparent 36rem),
    linear-gradient(180deg, #eef7ff 0%, #f7f5ff 54%, #f8fbff 100%);
}

.food-game-shell {
  display: grid;
  place-items: center;
  width: min(100%, 66rem);
  min-height: calc(100svh - 4.6rem);
  height: calc(100svh - 4.6rem);
  margin-inline: auto;
  padding: clamp(.55rem, 1.5vw, .9rem) clamp(1rem, 3vw, 2rem);
  overflow: hidden;
}

.food-game-page {
  display: flex;
  flex-direction: column;
  gap: clamp(.55rem, 1.5vw, .8rem);
  width: min(100%, 56rem);
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

.sandbox-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex: 0 0 auto;
  margin-bottom: 0;
}

.game-kicker {
  margin: 0 0 .3rem;
  color: var(--brand-blue, #4358f4);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.sandbox-topline h1 {
  margin: 0;
  color: #111827;
  font-family: var(--font-display, "Ribeye", serif);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: .01em;
  text-shadow: 0 .12rem 0 rgba(255, 255, 255, .65);
}

.sandbox-reset {
  flex: 0 0 auto;
  border-color: rgba(67, 88, 244, .24);
  background: rgba(255, 255, 255, .72);
  color: var(--brand-blue, #4358f4);
  backdrop-filter: blur(.75rem);
}

.sandbox-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .45rem;
}

.sandbox-nav a,
.sandbox-nav .sandbox-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 .7rem;
  border: 1px solid rgba(67, 88, 244, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  color: #334155;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 .35rem 1rem rgba(67, 88, 244, .07);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.sandbox-nav a:hover,
.sandbox-nav .sandbox-reset:hover {
  transform: translateY(-1px);
  border-color: rgba(67, 88, 244, .32);
  background: rgba(255, 255, 255, .90);
  color: var(--brand-blue, #4358f4);
}

.sandbox-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: 100%;
  border: 1px solid rgba(67, 88, 244, .16);
  border-radius: clamp(1.15rem, 3vw, 1.75rem);
  background:
    radial-gradient(circle at 92% 4%, rgba(139, 92, 246, .18), transparent 18rem),
    radial-gradient(circle at 8% 18%, rgba(56, 189, 248, .18), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(223, 243, 255, .62) 48%, rgba(237, 233, 254, .70));
  box-shadow:
    0 .55rem 0 rgba(67, 88, 244, .10),
    0 1.5rem 4rem rgba(67, 88, 244, .15);
  backdrop-filter: blur(1rem);
}

.sandbox-stage::before,
.sandbox-stage::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.sandbox-stage::before {
  top: -5rem;
  right: -3rem;
  width: clamp(12rem, 26vw, 19rem);
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(67, 88, 244, .16), rgba(139, 92, 246, .18));
}

.sandbox-stage::after {
  bottom: -7rem;
  left: -4rem;
  width: clamp(13rem, 30vw, 22rem);
  aspect-ratio: 1;
  background: rgba(56, 189, 248, .14);
}

.sandbox-hud {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: clamp(.7rem, 1.5vw, .9rem) clamp(.85rem, 2vw, 1.2rem) 0;
}

.exercise-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  color: rgba(17, 24, 39, .58);
  font-size: .78rem;
  font-weight: 950;
}

.exercise-progress-track {
  position: relative;
  height: .42rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(67, 88, 244, .13);
  box-shadow: inset 0 0 0 1px rgba(67, 88, 244, .08);
}

.exercise-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: .45rem;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #4358f4 55%, #8b5cf6);
  box-shadow: 0 0 1rem rgba(67, 88, 244, .35);
  transition: width .35s cubic-bezier(.16, 1, .3, 1);
}

.exercise-streak {
  color: var(--brand-blue, #4358f4);
}

.game-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
}

.game-stat,
.hud-tip {
  border: 1px solid rgba(67, 88, 244, .12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 .45rem 1.4rem rgba(67, 88, 244, .07);
}

.game-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .62rem .72rem;
}

.game-stat-icon {
  width: 1.8rem;
  aspect-ratio: 1;
  border-radius: .78rem;
  background: linear-gradient(135deg, rgba(67, 88, 244, .22), rgba(139, 92, 246, .16));
}

.game-stat-streak .game-stat-icon {
  background: linear-gradient(135deg, rgba(250, 204, 21, .38), rgba(139, 92, 246, .18));
}

.game-stat-practice .game-stat-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, .25), rgba(67, 88, 244, .16));
}

.game-stat-value {
  color: #111827;
  font-size: clamp(.95rem, 1.8vw, 1.12rem);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.game-stat-value small {
  color: rgba(17, 24, 39, .46);
  font-size: .66rem;
  font-weight: 850;
}

.game-stat-label {
  margin-top: .16rem;
  color: rgba(17, 24, 39, .52);
  font-size: .73rem;
  font-weight: 850;
}

.game-stat-progress {
  position: relative;
  width: 100%;
  height: .38rem;
  margin-top: .46rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(67, 88, 244, .12);
  box-shadow: inset 0 0 0 1px rgba(67, 88, 244, .08);
}

.game-stat-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: .42rem;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8 0%, #4358f4 54%, #8b5cf6 100%);
  box-shadow: 0 0 .9rem rgba(67, 88, 244, .38);
  transition: width .42s cubic-bezier(.16, 1, .3, 1);
}

.game-stat-streak .game-stat-progress span {
  background: linear-gradient(90deg, #facc15 0%, #a78bfa 48%, #4358f4 100%);
}

.game-stat-practice .game-stat-progress span,
.hud-tip .game-stat-progress span {
  background: linear-gradient(90deg, #7dd3fc 0%, #4358f4 58%, #8b5cf6 100%);
}

.hud-tip {
  display: grid;
  gap: .42rem;
  padding: .62rem .72rem;
  color: rgba(17, 24, 39, .62);
  font-size: .8rem;
  font-weight: 780;
  line-height: 1.3;
}

.hud-tip > div:first-child {
  display: grid;
  gap: .12rem;
}

.hud-tip strong {
  color: var(--brand-blue, #4358f4);
}

.sandbox-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto auto;
  gap: clamp(.52rem, 1.25vw, .82rem);
  width: min(100%, 38rem);
  min-height: 0;
  margin: 0 auto;
  padding: clamp(.7rem, 1.8vw, 1rem) clamp(1rem, 3vw, 1.5rem) clamp(.9rem, 2vw, 1.2rem);
  flex: 1 1 auto;
}

.sandbox-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(17, 24, 39, .48);
  font-size: .8rem;
  font-weight: 950;
}

.gc-card-dots-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .32rem;
}

.gc-dot-f {
  flex: 0 0 auto;
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: rgba(67, 88, 244, .18);
  transition: width .2s ease, background .2s ease;
}

.gc-dot-f.is-done {
  background: rgba(16, 185, 129, .78);
}

.gc-dot-f.is-current {
  width: 1.35rem;
  background: var(--brand-blue, #4358f4);
}

.sandbox-prompt {
  display: grid;
  gap: .25rem;
  text-align: center;
}

.sandbox-label,
.overlay-kicker {
  color: var(--brand-blue, #4358f4);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.sandbox-prompt strong {
  color: #111827;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 950;
  line-height: 1;
}

.sandbox-prompt p {
  max-width: 32rem;
  margin: 0 auto;
  color: rgba(17, 24, 39, .62);
  font-size: clamp(.82rem, 1.45vw, .96rem);
  font-weight: 750;
  line-height: 1.45;
}

.sandbox-image-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  height: clamp(12rem, 30svh, 19rem);
  max-height: 19rem;
  margin: .1rem auto .25rem;
  padding: clamp(.45rem, 1.2vw, .75rem);
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: clamp(1.2rem, 3.5vw, 2rem);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .82), transparent 13rem),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, .13), transparent 18rem),
    linear-gradient(135deg, rgba(223, 243, 255, .84), rgba(237, 233, 254, .86));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .78),
    0 1rem 2.8rem rgba(67, 88, 244, .13);
}

.food-visual {
  position: relative;
  width: min(88%, clamp(14rem, 38vw, 24rem));
  max-height: clamp(10rem, 24svh, 16.5rem);
  aspect-ratio: 3 / 2;
  padding: clamp(.42rem, 1.15vw, .75rem);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: clamp(1rem, 3vw, 1.6rem);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .86), transparent 12rem),
    linear-gradient(135deg, rgba(255, 255, 255, .58), rgba(223, 243, 255, .50));
  box-sizing: border-box;
  box-shadow:
    0 1.1rem 2.5rem rgba(67, 88, 244, .16),
    inset 0 0 0 1px rgba(67, 88, 244, .08);
  overflow: hidden;
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
}

.food-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: calc(clamp(1rem, 3vw, 1.6rem) - .45rem);
  object-fit: contain;
  object-position: center;
}

.food-image-fallback {
  display: grid;
  place-items: center;
  align-content: center;
  gap: .3rem;
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  box-sizing: border-box;
  color: #111827;
  text-align: center;
}

.food-image-fallback strong {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 950;
  line-height: 1;
}

.food-image-fallback small {
  color: var(--brand-blue, #4358f4);
  font-size: 1rem;
  font-weight: 900;
}

.food-fallback-kicker {
  color: rgba(17, 24, 39, .46);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sandbox-stage.card-correct .food-visual {
  transform: scale(1.045) rotate(-1deg);
}

.sandbox-stage.is-transitioning-out .sandbox-card {
  animation: game-card-out .34s cubic-bezier(.4, 0, .2, 1) both;
}

.sandbox-stage.is-transitioning-in .sandbox-card {
  animation: game-card-in .48s cubic-bezier(.16, 1, .3, 1) both;
}

.sandbox-stage.card-wrong {
  animation: game-shake .34s ease both;
}

.sandbox-stage.card-wrong .food-visual {
  transform: scale(.97) rotate(1deg);
}

@keyframes game-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-.28rem); }
  50% { transform: translateX(.22rem); }
  75% { transform: translateX(-.14rem); }
}

@keyframes game-card-out {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-.7rem) scale(.985); filter: blur(.25rem); }
}

@keyframes game-card-in {
  0% { opacity: 0; transform: translateY(.75rem) scale(.985); filter: blur(.2rem); }
  60% { opacity: 1; transform: translateY(-.08rem) scale(1.005); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.gc-xp-toast {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #5f3b00;
  font-size: .86rem;
  font-weight: 950;
  box-shadow: 0 .5rem 1.2rem rgba(245, 158, 11, .30);
  pointer-events: none;
  animation: gc-xp-float 1.25s ease-out both;
}

@keyframes gc-xp-float {
  0% { opacity: 0; transform: translateY(.45rem) scale(.86); }
  16% { opacity: 1; transform: translateY(0) scale(1); }
  78% { opacity: 1; transform: translateY(-1.4rem) scale(1); }
  100% { opacity: 0; transform: translateY(-2.3rem) scale(.94); }
}

.sandbox-word-row {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: .7rem;
}

.sandbox-word-row > div {
  padding: .62rem .78rem;
  border: 1px solid rgba(67, 88, 244, .12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 .55rem 1.4rem rgba(67, 88, 244, .08);
  backdrop-filter: blur(.75rem);
}

.target-word-panel {
  border-color: rgba(67, 88, 244, .22) !important;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(223,243,255,.88)) !important;
}

.target-word-panel .gc-lang-label {
  color: rgba(67, 88, 244, .64);
}

.target-word-panel .gc-word-en {
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
}

.gc-lang-label {
  display: block;
  margin-bottom: .28rem;
  color: rgba(17, 24, 39, .45);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gc-word-es,
.gc-word-en {
  color: #111827;
  font-size: clamp(1rem, 2.2vw, 1.32rem);
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.gc-word-en {
  color: var(--brand-blue, #4358f4);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: .01em;
}

.gc-speech-practice .speech-practice-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .7rem;
  padding: clamp(.68rem, 1.5vw, .9rem);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 189, 248, .14), transparent 14rem),
    rgba(255, 255, 255, .72);
  border-color: rgba(67, 88, 244, .14);
  box-shadow: 0 .7rem 1.8rem rgba(67, 88, 244, .10);
}

.gc-speech-practice {
  width: min(100%, 32rem);
  margin-inline: auto;
}

.gc-speech-practice .speech-practice-target {
  font-size: clamp(1rem, 2.4vw, 1.38rem);
}

.gc-speech-practice .speech-practice-btn {
  min-width: min(100%, 10rem);
  min-height: 2.85rem;
  border-color: rgba(67, 88, 244, .42);
  background: var(--brand-blue, #4358f4);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 .7rem 1.4rem rgba(67, 88, 244, .22);
}

.sandbox-fallback {
  display: grid;
  gap: .55rem;
  padding: .9rem;
  border: 1px solid rgba(67, 88, 244, .14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .66);
}

.sandbox-fallback[hidden] {
  display: none;
}

.sandbox-fallback label {
  color: rgba(17, 24, 39, .58);
  font-size: .82rem;
  font-weight: 900;
}

.fallback-row {
  display: flex;
  gap: .65rem;
}

.gc-input {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: .9rem 1rem;
  border: 2px solid rgba(67, 88, 244, .16);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .86);
  color: #111827;
  font: inherit;
  font-size: 1rem;
  font-weight: 850;
}

.gc-input:focus {
  outline: none;
  border-color: var(--brand-blue, #4358f4);
  box-shadow: 0 0 0 .22rem rgba(67, 88, 244, .13);
}

.sandbox-actions {
  display: flex;
  justify-content: center;
  gap: .6rem;
}

.sandbox-actions .btn {
  min-width: 7.25rem;
}

#skipBtn {
  color: rgba(17, 24, 39, .58);
  background: rgba(255, 255, 255, .56);
  border-color: rgba(67, 88, 244, .12);
}

.sandbox-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .72), transparent 20rem),
    rgba(237, 244, 255, .68);
  backdrop-filter: blur(.85rem);
}

.feedback-screen {
  align-items: end;
  place-items: end center;
  padding: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(237, 244, 255, .52) 54%, rgba(223, 243, 255, .94) 100%);
  backdrop-filter: none;
  pointer-events: none;
}

.sandbox-overlay[hidden] {
  display: none;
}

.sandbox-overlay-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 31rem);
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid rgba(67, 88, 244, .16);
  border-radius: clamp(1.25rem, 4vw, 1.8rem);
  background:
    radial-gradient(circle at 90% 8%, rgba(139, 92, 246, .13), transparent 12rem),
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(223, 243, 255, .84));
  box-shadow: 0 1.4rem 3.4rem rgba(67, 88, 244, .20);
  text-align: center;
  animation: overlay-pop .22s ease both;
}

.feedback-screen .result-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.15rem);
  width: 100%;
  min-height: clamp(7.25rem, 17svh, 9.25rem);
  padding: clamp(1rem, 2.4vw, 1.35rem) clamp(1rem, 4vw, 2.5rem);
  border: 0;
  border-top: 1px solid rgba(67, 88, 244, .14);
  border-radius: 0 0 clamp(1.15rem, 3vw, 1.75rem) clamp(1.15rem, 3vw, 1.75rem);
  text-align: left;
  box-shadow: 0 -1rem 2.5rem rgba(67, 88, 244, .10);
  pointer-events: auto;
}

.feedback-screen .result-card::after {
  content: "";
  width: 3.25rem;
  height: 3.25rem;
  grid-row: 1 / span 4;
  grid-column: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(223,243,255,.86));
  border: 1px solid rgba(67, 88, 244, .14);
  box-shadow: 0 .75rem 1.7rem rgba(67, 88, 244, .14);
}

.feedback-screen .result-card.is-success::after {
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(209, 250, 229, .92));
}

.feedback-screen .result-card.is-almost::after {
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(254, 243, 199, .92));
}

.feedback-screen .result-card.is-try-again::after {
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(254, 226, 226, .92));
}

.feedback-screen .overlay-kicker,
.feedback-screen .result-card h2,
.feedback-screen .result-card p,
.feedback-screen .reward-pill,
.feedback-screen .success-progress {
  grid-column: 2;
}

.feedback-screen .result-card h2 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 950;
}

.feedback-screen .result-card p {
  margin: 0;
}

.feedback-screen .reward-pill {
  margin: .25rem 0 0;
}

.feedback-screen .success-progress {
  display: none;
}

.feedback-screen .result-actions {
  grid-column: 3;
  grid-row: 1 / span 4;
  align-self: center;
  justify-content: end;
  min-width: 11rem;
}

.feedback-screen .result-actions .btn {
  min-width: 10.5rem;
}

.transition-screen {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .82), transparent 16rem),
    linear-gradient(135deg, rgba(223, 243, 255, .78), rgba(237, 233, 254, .72));
}

.transition-card {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  gap: .65rem;
  width: min(100%, 24rem);
  padding: clamp(1.5rem, 4vw, 2.1rem);
  border: 1px solid rgba(67, 88, 244, .14);
  border-radius: 1.65rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(223,243,255,.90) 48%, rgba(237,233,254,.88));
  box-shadow:
    0 1rem 2.4rem rgba(67, 88, 244, .18),
    inset 0 1px 0 rgba(255, 255, 255, .86);
  text-align: center;
  animation: transition-pop .52s cubic-bezier(.16, 1, .3, 1) both;
}

.transition-card::before,
.result-card.is-success::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, .56) 48%, transparent 72%);
  transform: translateX(-120%);
  pointer-events: none;
}

.transition-screen.is-running .transition-card::before,
.result-card.is-success.is-animating::before {
  animation: soft-shimmer .86s ease-out both;
}

.transition-card h2 {
  margin: 0;
  color: #111827;
  font-family: var(--font-display, "Ribeye", serif);
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  font-weight: 400;
  line-height: 1;
}

.transition-card p {
  margin: 0;
  color: rgba(17, 24, 39, .58);
  font-size: .92rem;
  font-weight: 900;
}

.transition-rail,
.success-progress {
  position: relative;
  width: min(100%, 18rem);
  height: .46rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(67, 88, 244, .12);
  box-shadow:
    inset 0 0 0 1px rgba(67, 88, 244, .08),
    0 .65rem 1.5rem rgba(67, 88, 244, .12);
}

.transition-rail span,
.success-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8 0%, #4358f4 48%, #8b5cf6 100%);
  box-shadow: 0 0 1.2rem rgba(67, 88, 244, .45);
}

.transition-rail i,
.success-progress i {
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  transform: translateX(-125%);
}

.transition-screen.is-running .transition-rail span {
  animation: premium-progress .78s cubic-bezier(.22, 1, .36, 1) both;
}

.transition-screen.is-running .transition-rail i {
  animation: rail-shine .78s ease-out both;
}

@keyframes transition-pop {
  0% { opacity: 0; transform: scale(.94) translateY(.65rem); }
  42% { opacity: 1; transform: scale(1.025) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes soft-shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes premium-progress {
  0% { width: 0%; }
  55% { width: 72%; }
  100% { width: 100%; }
}

@keyframes rail-shine {
  0% { transform: translateX(-125%); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translateX(250%); opacity: 0; }
}

@keyframes overlay-pop {
  from { opacity: 0; transform: translateY(.6rem) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sandbox-overlay-card h2 {
  margin: .4rem 0 .65rem;
  color: #111827;
  font-family: var(--font-display, "Ribeye", serif);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  line-height: 1;
}

.sandbox-overlay-card p {
  margin: 0 0 1.2rem;
  color: rgba(17, 24, 39, .64);
  font-size: 1rem;
  font-weight: 720;
  line-height: 1.5;
}

.result-card.is-success {
  background:
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, .14), transparent 15rem),
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(223, 243, 255, .86));
}

.result-card.is-success.is-animating {
  animation: success-card-pop .46s cubic-bezier(.16, 1, .3, 1) both;
}

.result-card.is-success.is-animating .success-progress span {
  animation: premium-progress .92s cubic-bezier(.22, 1, .36, 1) both;
}

.result-card.is-success.is-animating .success-progress i {
  animation: rail-shine .92s ease-out both;
}

.result-card:not(.is-success) .success-progress {
  display: none;
}

.result-card.is-almost {
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, .18), transparent 15rem),
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(237, 233, 254, .84));
}

.result-card.is-try-again {
  background:
    radial-gradient(circle at 50% 0%, rgba(239, 68, 68, .10), transparent 15rem),
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(223, 243, 255, .82));
}

.reward-pill {
  width: fit-content;
  margin: 0 auto 1.2rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #5f3b00;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 .6rem 1.4rem rgba(245, 158, 11, .24);
}

.result-card.is-success.is-animating .reward-pill {
  animation: reward-pop .58s cubic-bezier(.34, 1.56, .64, 1) both;
}

.reward-pill[hidden] {
  display: none;
}

.result-actions,
.reset-modal-actions {
  display: flex;
  justify-content: center;
  gap: .75rem;
}

.success-progress {
  width: min(100%, 14rem);
  margin: -.45rem auto 1rem;
  height: .36rem;
}

@keyframes success-card-pop {
  0% { opacity: 0; transform: translateY(.65rem) scale(.97); }
  62% { opacity: 1; transform: translateY(-.06rem) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes reward-pop {
  0% { opacity: 0; transform: translateY(.3rem) scale(.72); }
  58% { opacity: 1; transform: translateY(-.08rem) scale(1.08); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.complete-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, .18), transparent 15rem),
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(223, 243, 255, .84));
}

.streak-pop {
  display: inline-block;
  animation: hud-streak-pop .42s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes hud-streak-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  66% { transform: scale(.9); }
  100% { transform: scale(1); }
}

.reset-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(17, 24, 39, .55);
  backdrop-filter: blur(.25rem);
}

.reset-modal[hidden] {
  display: none;
}

.reset-modal-box {
  width: min(100%, 24rem);
  padding: 1.8rem;
  border: 1px solid rgba(67, 88, 244, .13);
  border-radius: 1.45rem;
  background: linear-gradient(135deg, #fff, #f1f5ff);
  box-shadow: 0 1.5rem 4rem rgba(17, 24, 39, .28);
  text-align: center;
}

.reset-modal-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  margin: 0 auto .75rem;
  border-radius: 1rem;
  background: rgba(239, 68, 68, .10);
  color: #dc2626;
  font-size: 1.7rem;
  font-weight: 900;
}

.reset-modal-box h3 {
  margin: 0 0 .45rem;
  color: #111827;
}

.reset-modal-box p {
  margin: 0 0 1.35rem;
  color: rgba(17, 24, 39, .62);
  line-height: 1.5;
}

.reset-danger {
  border-color: #ef4444 !important;
  background: #ef4444 !important;
  color: #fff !important;
}

.game-boot-error {
  padding: 2rem;
  color: #dc2626;
  text-align: center;
}

.game-page-footer {
  flex: 0 0 auto;
  margin: 0;
  color: rgba(17, 24, 39, .42);
  text-align: center;
}

@media (min-width: 761px) {
  body[data-page="juego"] {
    overflow: hidden;
  }
}

@media (max-width: 900px) {
  .game-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hud-tip {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .food-game-shell {
    min-height: auto;
    height: auto;
    overflow: visible;
    padding-block: 1rem 1.5rem;
  }

  .sandbox-topline {
    align-items: start;
    flex-direction: column;
  }

  .sandbox-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .sandbox-nav a,
  .sandbox-nav .sandbox-reset,
  .sandbox-reset {
    width: 100%;
  }

  .sandbox-stage {
    min-height: auto;
    height: auto;
    max-height: none;
    overflow: hidden;
  }

  .sandbox-word-row,
  .game-hud {
    grid-template-columns: 1fr;
  }

  .sandbox-image-wrap {
    min-height: 14rem;
    height: auto;
  }

  .gc-speech-practice .speech-practice-card,
  .fallback-row,
  .result-actions,
  .reset-modal-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .feedback-screen .result-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    text-align: center;
    border-radius: 1.35rem 1.35rem 0 0;
  }

  .feedback-screen .result-card::after {
    display: none;
  }

  .feedback-screen .overlay-kicker,
  .feedback-screen .result-card h2,
  .feedback-screen .result-card p,
  .feedback-screen .reward-pill,
  .feedback-screen .success-progress,
  .feedback-screen .result-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .feedback-screen .result-actions {
    min-width: 0;
    justify-content: stretch;
  }

  .gc-speech-practice .speech-practice-btn,
  .sandbox-actions .btn,
  .result-actions .btn,
  .reset-modal-actions .btn,
  .fallback-row .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .food-game-shell {
    padding-inline: .75rem;
  }

  .sandbox-card {
    padding-inline: .85rem;
  }

  .sandbox-progress {
    align-items: flex-start;
    flex-direction: column;
  }

  .gc-card-dots-row {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sandbox-stage,
  .food-visual,
  .gc-dot-f,
  .transition-card,
  .sandbox-overlay-card,
  .transition-rail span,
  .transition-rail i,
  .success-progress span,
  .success-progress i,
  .game-stat-progress span,
  .reward-pill,
  .sandbox-card {
    transition: none !important;
    animation: none !important;
  }

  .sandbox-stage.card-wrong,
  .gc-xp-toast,
  .streak-pop,
  .sandbox-stage.is-transitioning-out .sandbox-card,
  .sandbox-stage.is-transitioning-in .sandbox-card,
  .result-card.is-success.is-animating {
    animation: none !important;
  }

  .transition-rail span,
  .success-progress span {
    width: 100%;
  }
}
