/* ═══════════════ Emoji Heroes · UI ═══════════════
   Unidad base: 1em de .eh-root ≈ 1 % del ancho a 16:9 (19 px en 1080p, 10 px mínimo en celular). */

.eh-root {
  --yellow: #ffc928;
  --yellow-hi: #fff3a8;
  --orange: #ff9416;
  --red: #f2452e;
  --blue: #2fa8f5;
  --green: #5bd23c;
  --purple: #a455f0;
  --white: #f4f1ff;
  --indigo: #3b2fb8;
  --indigo-hi: #5b4be0;
  --indigo-pale: #a79cff;
  --ink: #1b1446;
  --ink-2: #2a1f8f;
  --panel: linear-gradient(180deg, rgba(98, 82, 232, 0.9), rgba(59, 47, 184, 0.9));
  --panel-border: rgba(183, 174, 255, 0.6);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --elastic: cubic-bezier(0.5, 1.9, 0.5, 0.85);
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --btn: clamp(48px, 15vh, 84px);
  --emoji-font: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', emoji, sans-serif;

  position: absolute;
  inset: 0;
  overflow: hidden;
  font-family: 'Fredoka', var(--emoji-font);
  font-weight: 600;
  font-size: clamp(10px, min(1vw, 1.78vh), 26px);
  line-height: 1.2;
  color: var(--white);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.eh-root *, .eh-root *::before, .eh-root *::after { box-sizing: border-box; }
.eh-root button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; touch-action: none; }
.eh-root.eh-sysemoji { --emoji-font: 'Apple Color Emoji', 'Segoe UI Emoji', emoji, sans-serif; }
.eh-emo { font-family: var(--emoji-font); font-weight: 400; font-style: normal; line-height: 1; display: inline-block; }
.eh-hidden { display: none !important; }

/* ── Piezas comunes ── */
.eh-panel {
  background: var(--panel);
  border: 0.16em solid var(--panel-border);
  border-radius: 1.5em;
  box-shadow: 0 0.35em 0 rgba(27, 20, 70, 0.5), 0 0.9em 1.6em rgba(27, 20, 70, 0.35), inset 0 0.14em 0 rgba(255, 255, 255, 0.22);
}
.eh-pill {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.22em 0.9em 0.26em;
  border-radius: 99em;
  background: linear-gradient(180deg, #6f60f0, #4a3bd0);
  border: 0.12em solid var(--panel-border);
  box-shadow: 0 0.2em 0 rgba(27, 20, 70, 0.5);
  font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  text-shadow: 0 0.1em 0 rgba(27, 20, 70, 0.6);
  white-space: nowrap;
}
.eh-title-text {
  font-weight: 700;
  color: var(--yellow);
  -webkit-text-stroke: 0.3em var(--ink-2);
  paint-order: stroke fill;
  text-shadow: 0 0.1em 0 var(--ink), 0 0.22em 0.25em rgba(27, 20, 70, 0.5);
  letter-spacing: 0.02em;
}
.eh-key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.7em; height: 1.55em; padding: 0 0.45em;
  border-radius: 0.45em;
  background: var(--white); color: var(--indigo);
  font-weight: 700; font-size: 0.9em; line-height: 1; white-space: nowrap;
  box-shadow: 0 0.16em 0 #b9b0ea, 0 0.26em 0 rgba(27, 20, 70, 0.55);
  text-shadow: none; -webkit-text-stroke: 0; text-transform: none; letter-spacing: 0;
  vertical-align: 0.08em; margin: 0 0.12em;
}
.eh-root[data-device='gamepad'] .eh-key { border-radius: 99em; background: var(--yellow); color: var(--ink); box-shadow: 0 0.16em 0 #c98f00, 0 0.26em 0 rgba(27, 20, 70, 0.55); }
.eh-root[data-device='touch'] .eh-key { background: rgba(244, 241, 255, 0.25); box-shadow: 0 0 0 0.1em rgba(244, 241, 255, 0.6); font-family: var(--emoji-font); }

/* ═══════════════ HUD ═══════════════ */
/* El HUD va POR ENCIMA de la capa táctil (z 20) y no intercepta toques: así la
 * barra de EmojiPowers (pointer-events:auto) recibe sus toques aunque la zona
 * del stick la cubra por geometría, y el resto de toques atraviesa al stick y
 * los botones de abajo. */
.eh-hud { position: absolute; inset: 0; z-index: 25; pointer-events: none; transition: opacity 0.25s; }
.eh-root.eh-title-open .eh-hud, .eh-root.eh-title-open .eh-touch { opacity: 0; visibility: hidden; }
.eh-root.eh-dialog-open .eh-bottom, .eh-root.eh-dialog-open .eh-tools { opacity: 0; transform: translateY(2em); }

.eh-tl { position: absolute; left: calc(1.1em + var(--sal)); top: calc(0.9em + var(--sat)); display: flex; flex-direction: column; align-items: flex-start; gap: 0.5em; }
.eh-hearts { display: flex; gap: 0.15em; filter: drop-shadow(0 0.18em 0 rgba(27, 20, 70, 0.55)); }
.eh-heart { position: relative; font-size: 2.5em; width: 1.12em; height: 1.1em; }
.eh-heart i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.eh-heart .bg { filter: grayscale(1) brightness(0.42); opacity: 0.75; }
.eh-heart .fg { transition: clip-path 0.2s; clip-path: inset(0 0 0 0); }
.eh-heart[data-fill='half'] .fg { clip-path: inset(0 50% 0 0); }
.eh-heart[data-fill='empty'] .fg { clip-path: inset(0 100% 0 0); }
.eh-heart.lost { animation: eh-heart-lost 0.6s var(--bounce); }
.eh-heart.gain { animation: eh-pop 0.5s var(--bounce); }
.eh-hearts.hurt { animation: eh-shake 0.45s; }
.eh-hearts.low .eh-heart:not([data-fill='empty']) { animation: eh-beat 0.7s infinite; }
@keyframes eh-heart-lost { 0% { transform: scale(1); } 25% { transform: scale(1.55) rotate(-10deg); filter: brightness(2.2); } 55% { transform: scale(0.8) rotate(6deg); } 100% { transform: scale(1); } }
@keyframes eh-beat { 0%, 100% { transform: scale(1); } 18% { transform: scale(1.22); } 36% { transform: scale(0.96); } 54% { transform: scale(1.12); } }
@keyframes eh-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-0.5em); } 40% { transform: translateX(0.45em); } 60% { transform: translateX(-0.3em); } 80% { transform: translateX(0.18em); } }
@keyframes eh-pop { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }

.eh-counters { display: flex; gap: 0.6em; }
.eh-counter { display: flex; align-items: center; gap: 0.35em; padding: 0.15em 0.85em 0.15em 0.3em; border-radius: 99em; background: rgba(42, 31, 143, 0.72); border: 0.12em solid var(--panel-border); box-shadow: 0 0.2em 0 rgba(27, 20, 70, 0.45); }
.eh-counter .eh-emo { font-size: 1.7em; }
.eh-counter b { font-size: 1.55em; font-weight: 700; min-width: 1.1em; text-align: right; text-shadow: 0 0.1em 0 rgba(27, 20, 70, 0.7); font-variant-numeric: tabular-nums; }
.eh-counter.bump .eh-emo { animation: eh-spin-pop 0.5s var(--bounce); }
.eh-counter.bump b { animation: eh-pop 0.4s var(--bounce); color: var(--yellow-hi); }
@keyframes eh-spin-pop { 0% { transform: scale(1) rotate(0); } 40% { transform: scale(1.6) rotate(-20deg); } 100% { transform: scale(1) rotate(0); } }

.eh-objective { max-width: 34em; white-space: normal; text-transform: none; font-size: 1.25em; font-weight: 600; padding: 0.3em 1em 0.34em 0.5em; border-radius: 1.2em; line-height: 1.15; }
.eh-objective.show { animation: eh-slide-l 0.55s var(--bounce); }
.eh-objective .eh-emo { font-size: 1.25em; }
@keyframes eh-slide-l { 0% { transform: translateX(-120%); } 100% { transform: translateX(0); } }

/* Barra de EmojiPowers */
.eh-bottom { position: absolute; left: 50%; bottom: calc(0.9em + var(--sab)); transform: translateX(-50%); display: flex; align-items: flex-end; gap: 0.5em; transition: opacity 0.2s, transform 0.25s; }
.eh-root.eh-dialog-open .eh-bottom { transform: translate(-50%, 2em); }
/* Acción del EmojiPower: mismo lenguaje visual que los controles táctiles. */
.eh-tb.special {
  background: radial-gradient(circle at 50% 30%, rgba(255, 228, 92, 0.95), rgba(255, 180, 0, 0.9) 48%, rgba(139, 92, 255, 0.9) 118%) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 0 rgba(27, 20, 70, 0.4), 0 0 0.9em rgba(255, 201, 40, 0.35);
}
.eh-tb.special .eh-emo { filter: drop-shadow(0 0.08em 0 rgba(27, 20, 70, 0.3)); }.eh-powers { display: flex; align-items: center; gap: 0.35em; padding: 0.35em 0.6em; border-radius: 99em; background: rgba(42, 31, 143, 0.7); border: 0.14em solid var(--panel-border); box-shadow: 0 0.28em 0 rgba(27, 20, 70, 0.45); pointer-events: auto; }
.eh-pw-hint { opacity: 0.85; font-size: 0.95em; }
.eh-root[data-device='touch'] .eh-pw-hint, .eh-root[data-device='touch'] .eh-power .eh-key { display: none; }
.eh-root[data-device='gamepad'] .eh-power .eh-key { display: none; }
.eh-root[data-device='keyboard'] .eh-pw-hint { display: none; }
.eh-power { position: relative; width: 3.3em; height: 3.3em; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(27, 20, 70, 0.45); border: 0.14em solid rgba(183, 174, 255, 0.35); transition: transform 0.3s var(--bounce), background 0.2s, border-color 0.2s, margin 0.3s var(--bounce); }
.eh-power .eh-emo { font-size: 2.1em; filter: saturate(0.6) brightness(0.8); transition: filter 0.2s; }
.eh-power .eh-key { position: absolute; left: -0.35em; top: -0.45em; font-size: 0.72em; min-width: 1.5em; height: 1.4em; }
.eh-power .name { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 0.4em) scale(0.6); opacity: 0; font-size: 0.82em; padding: 0.1em 0.7em 0.14em; transition: transform 0.3s var(--bounce), opacity 0.2s; pointer-events: none; }
.eh-power.active { transform: scale(1.28) translateY(-0.35em); margin: 0 0.45em; background: radial-gradient(circle at 50% 35%, var(--pc, #ffc928), rgba(27, 20, 70, 0.5) 130%); border-color: var(--yellow); box-shadow: 0 0 0 0.14em rgba(255, 201, 40, 0.35), 0 0 1.2em var(--pc, #ffc928); }
.eh-power.active .eh-emo { filter: none; }
.eh-power.active .name { transform: translate(-50%, -0.3em) scale(0.8); opacity: 1; }
.eh-power.switch .eh-emo { animation: eh-switch 0.5s var(--bounce); }
.eh-power.new { animation: eh-new 0.9s var(--elastic); }
.eh-power.new::after { content: ''; position: absolute; inset: -0.3em; border-radius: 50%; border: 0.3em solid var(--yellow); animation: eh-ring 0.9s ease-out forwards; pointer-events: none; }
@keyframes eh-switch { 0% { transform: scale(0.3) rotate(-90deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes eh-new { 0% { transform: scale(0) rotate(-180deg); } 60% { transform: scale(1.6) rotate(10deg); } 100% { transform: scale(1); } }
@keyframes eh-ring { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }

/* Herramientas */
.eh-tools { position: absolute; right: calc(1.1em + var(--sar)); bottom: calc(0.9em + var(--sab)); display: flex; gap: 0.5em; transition: opacity 0.2s, transform 0.25s; }
.eh-root[data-device='touch'] .eh-tools { bottom: auto; top: calc(5.2em + var(--sat)); flex-direction: column; }
.eh-root[data-device='touch'] .eh-tool .eh-key { display: none; }
.eh-root[data-device='touch'] .eh-tool { width: 2.5em; height: 2.5em; border-radius: 0.8em; }
.eh-root[data-device='touch'] .eh-tool .eh-emo { font-size: 1.5em; }
.eh-tool { position: relative; width: 3.4em; height: 3.4em; border-radius: 1em; display: flex; align-items: center; justify-content: center; background: rgba(42, 31, 143, 0.72); border: 0.14em solid var(--panel-border); box-shadow: 0 0.25em 0 rgba(27, 20, 70, 0.45); }
.eh-tool .eh-emo { font-size: 2em; }
.eh-tool .eh-key { position: absolute; right: -0.4em; bottom: -0.4em; font-size: 0.75em; }
.eh-tool.new { animation: eh-new 0.9s var(--elastic); }
.eh-tool.on {
  border-color: var(--yellow-hi);
  background: radial-gradient(circle at 50% 30%, rgba(255, 239, 150, 0.95), rgba(255, 180, 0, 0.9) 62%, rgba(90, 66, 210, 0.9));
  box-shadow: 0 0.25em 0 rgba(27, 20, 70, 0.45), 0 0 0.9em rgba(255, 214, 80, 0.58);
}
.eh-tool.on[data-tool='rain'] {
  border-color: rgba(160, 225, 255, 0.95);
  background: radial-gradient(circle at 50% 30%, rgba(190, 240, 255, 0.95), rgba(47, 168, 245, 0.9) 62%, rgba(59, 47, 184, 0.9));
  box-shadow: 0 0.25em 0 rgba(27, 20, 70, 0.45), 0 0 0.9em rgba(80, 200, 255, 0.55);
}
.eh-tool.on .eh-emo { filter: drop-shadow(0 0 0.32em rgba(255, 244, 174, 0.9)); }

/* Jefe */
.eh-boss { position: absolute; left: 50%; top: calc(7.6em + var(--sat)); width: min(38em, 72%); transform: translateX(-50%); display: flex; align-items: center; gap: 0.6em; animation: eh-drop 0.6s var(--bounce); }
.eh-boss .face { flex: none; width: 3.6em; height: 3.6em; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #ff7a5c, #8f1c2a); border: 0.18em solid var(--white); box-shadow: 0 0.25em 0 rgba(27, 20, 70, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1; }
.eh-boss .face .eh-emo { font-size: 2.3em; }
.eh-boss .col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.2em; margin-left: -1.4em; }
.eh-boss .name { font-size: 0.95em; margin-left: 1.6em; }
.eh-boss .bar { position: relative; width: 100%; height: 1.5em; border-radius: 99em; background: rgba(27, 20, 70, 0.8); border: 0.16em solid var(--white); box-shadow: 0 0.25em 0 rgba(27, 20, 70, 0.5); overflow: hidden; }
.eh-boss .lag, .eh-boss .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform-origin: 0 50%; border-radius: 99em; }
.eh-boss .lag { background: var(--yellow-hi); transition: transform 0.6s ease-in 0.4s; }
.eh-boss .fill { background: linear-gradient(180deg, #ff8a6a 0%, var(--red) 45%, #c2241a 100%); transition: transform 0.12s; }
.eh-boss .fill::after { content: ''; position: absolute; left: 0.5em; right: 0.5em; top: 0.16em; height: 0.25em; border-radius: 99em; background: rgba(255, 255, 255, 0.45); }
.eh-boss.hit { animation: eh-boss-hit 0.35s; }
.eh-boss.hit .face { animation: eh-pop 0.35s; }
@keyframes eh-boss-hit { 0%, 100% { transform: translateX(-50%); } 25% { transform: translateX(calc(-50% - 0.5em)); } 50% { transform: translateX(calc(-50% + 0.4em)); } 75% { transform: translateX(calc(-50% - 0.2em)); } }
@keyframes eh-drop { 0% { transform: translate(-50%, -8em); } 100% { transform: translate(-50%, 0); } }

/* ═══════════════ Avisos ═══════════════ */
.eh-zone { position: absolute; left: 50%; top: 17%; z-index: 30; transform: translateX(-50%); display: flex; align-items: center; gap: 0.5em; padding: 0.3em 1.6em 0.38em 0.5em; border-radius: 99em; background: linear-gradient(180deg, rgba(111, 96, 240, 0.94), rgba(59, 47, 184, 0.94)); border: 0.18em solid var(--panel-border); box-shadow: 0 0.35em 0 rgba(27, 20, 70, 0.5); animation: eh-zone 3.2s both; white-space: nowrap; }
.eh-zone .eh-emo { font-size: 3em; animation: eh-wobble 1.2s ease-in-out infinite; }
.eh-zone .t { font-size: 2.3em; -webkit-text-stroke-width: 0.22em; }
@keyframes eh-zone { 0% { transform: translate(-50%, -3em) scale(0.3); opacity: 0; } 9% { transform: translate(-50%, 0) scale(1.12); opacity: 1; } 14% { transform: translate(-50%, 0) scale(0.97); } 18%, 85% { transform: translate(-50%, 0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -2em) scale(0.8); opacity: 0; } }
@keyframes eh-wobble { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.08); } }

.eh-banner { position: absolute; left: 50%; top: 44%; z-index: 31; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; text-align: center; width: 90%; animation: eh-banner 3.4s both; }
.eh-banner .rays { position: absolute; left: 50%; top: 5.2em; width: 34em; height: 34em; margin: -17em 0 0 -17em; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 233, 130, 0.5) 0 10deg, transparent 10deg 30deg); -webkit-mask: radial-gradient(circle, #000 15%, transparent 68%); mask: radial-gradient(circle, #000 15%, transparent 68%); animation: eh-rot 9s linear infinite; }
.eh-banner .big { position: relative; font-size: 9em; filter: drop-shadow(0 0.06em 0 rgba(27, 20, 70, 0.5)); animation: eh-banner-emo 0.9s var(--elastic) both, eh-wobble 1.4s 0.9s ease-in-out infinite; }
.eh-banner .t { position: relative; font-size: 4.4em; line-height: 1.05; margin-top: 0.05em; -webkit-text-stroke-width: 0.26em; }
.eh-banner .s { position: relative; font-size: 1.5em; margin-top: 0.5em; text-transform: none; padding: 0.25em 1.2em 0.3em; }
.eh-banner .st { position: absolute; top: 5em; left: 50%; font-size: 2.2em; animation: eh-star-fly 1.3s ease-out both; }
@keyframes eh-banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } 7% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 11% { transform: translate(-50%, -50%) scale(0.95); } 15%, 86% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1.15); } }
@keyframes eh-banner-emo { 0% { transform: scale(0) rotate(-200deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes eh-rot { to { transform: rotate(360deg); } }
@keyframes eh-star-fly { 0% { transform: translate(-50%, 0) scale(0.2) rotate(0); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), var(--dy)) scale(1) rotate(var(--r)); opacity: 0; } }

.eh-toasts { position: absolute; left: calc(0.7em + var(--sal)); right: calc(0.7em + var(--sar)); top: 22%; z-index: 35; display: flex; flex-direction: column; align-items: flex-end; gap: 0.45em; pointer-events: none; }
.eh-toast { display: flex; align-items: center; gap: 0.45em; width: fit-content; max-width: min(100%, 32em); min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; font-size: 1.3em; padding: 0.28em 1em 0.32em 0.6em; border-radius: 99em; background: linear-gradient(180deg, rgba(111, 96, 240, 0.95), rgba(59, 47, 184, 0.95)); border: 0.12em solid var(--panel-border); box-shadow: 0 0.22em 0 rgba(27, 20, 70, 0.5); animation: eh-toast-in 0.5s var(--bounce) both; text-shadow: 0 0.08em 0 rgba(27, 20, 70, 0.6); }
.eh-toast .eh-emo { font-size: 1.3em; flex: 0 0 auto; }
.eh-toast span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .eh-toasts { left: calc(0.45em + var(--sal)); right: calc(0.45em + var(--sar)); top: 15%; } .eh-toast { max-width: 100%; font-size: clamp(1em, 3.5vw, 1.25em); padding: 0.3em 0.7em; } }
.eh-toast.out { animation: eh-toast-out 0.35s ease-in both; }
@keyframes eh-toast-in { 0% { transform: translateX(130%) scale(0.6); } 100% { transform: translateX(0) scale(1); } }
@keyframes eh-toast-out { to { transform: translateX(130%); opacity: 0; } }
@media (max-width: 600px) { @keyframes eh-toast-in { 0% { transform: translateX(35%) scale(0.92); opacity: 0; } 100% { transform: translateX(0) scale(1); opacity: 1; } } @keyframes eh-toast-out { to { transform: translateX(20%); opacity: 0; } } }

.eh-prompt { position: absolute; left: 0; top: 0; z-index: 12; pointer-events: auto; }
.eh-prompt .in { display: flex; align-items: center; gap: 0.15em; transform: translate(-50%, -100%); font-size: 1.2em; text-transform: none; padding: 0.3em 0.9em 0.36em; animation: eh-prompt 1.1s ease-in-out infinite; }
.eh-prompt .in::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -0.45em; border: 0.45em solid transparent; border-top-color: #4a3bd0; border-bottom-width: 0; }
@keyframes eh-prompt { 0%, 100% { transform: translate(-50%, -100%); } 50% { transform: translate(-50%, calc(-100% - 0.4em)); } }

/* ═══════════════ Diálogo ═══════════════ */
.eh-dialog { position: absolute; inset: 0; z-index: 40; pointer-events: auto; display: flex; align-items: flex-end; justify-content: center; padding: 0 calc(1.2em + var(--sar)) calc(12em + var(--sab)) calc(1.2em + var(--sal)); }
/* Cajón subido un bloque (Rafael, 2026-11-16): el padding inferior era 1.1em
 * (el cajón pegado abajo); a 12em el cajón queda con su base a ~12em del borde
 * inferior (~82% de la altura en vertical), donde lo marcó. Solo se mueve el
 * overlay del diálogo; el área de juego (canvas, cámara) no se toca. */
.eh-dbox { position: relative; width: min(66em, 100%); min-height: 9.2em; padding: 1.5em 2.2em 1.3em 10.6em; animation: eh-dbox 0.45s var(--bounce) both; cursor: pointer; }
.eh-dialog.out .eh-dbox { animation: eh-dbox-out 0.18s ease-in both; }
@keyframes eh-dbox { 0% { transform: translateY(60%) scale(0.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes eh-dbox-out { to { transform: translateY(50%) scale(0.85); opacity: 0; } }
.eh-dface { position: absolute; left: 1.1em; bottom: 1.1em; width: 8.4em; height: 8.4em; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #9d91ff, #3b2fb8 85%); border: 0.24em solid var(--white); box-shadow: 0 0.35em 0 rgba(27, 20, 70, 0.5); display: flex; align-items: center; justify-content: center; }
.eh-dface .eh-emo { font-size: 5.6em; animation: eh-talk-idle 1.6s ease-in-out infinite; }
.eh-dface.swap { animation: eh-new 0.5s var(--bounce); }
.eh-dialog.typing .eh-dface .eh-emo { animation: eh-talk 0.26s ease-in-out infinite; }
@keyframes eh-talk { 0%, 100% { transform: scale(1, 1) translateY(0); } 50% { transform: scale(1.06, 0.92) translateY(0.05em); } }
@keyframes eh-talk-idle { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-0.06em) rotate(3deg); } }
.eh-dname { position: absolute; left: 9.6em; top: -1em; font-size: 1.25em; background: linear-gradient(180deg, #ffd955, #ffb400); color: var(--ink); text-shadow: none; border-color: var(--white); }
.eh-dtext { font-size: 1.75em; font-weight: 500; line-height: 1.28; min-height: 2.56em; text-shadow: 0 0.08em 0 rgba(27, 20, 70, 0.55); white-space: pre-wrap; }
.eh-dtext .ghost { visibility: hidden; }
.eh-dnext { position: absolute; right: 1.2em; bottom: 0.6em; display: flex; align-items: center; gap: 0.2em; font-size: 1em; opacity: 0; }
.eh-dnext .arrow { color: var(--yellow); font-size: 1.4em; animation: eh-next 0.7s ease-in-out infinite; text-shadow: 0 0.1em 0 var(--ink); }
.eh-dialog.ready .eh-dnext { opacity: 1; }
.eh-dialog.choosing .eh-dnext { opacity: 0; }
@keyframes eh-next { 0%, 100% { transform: translateY(-0.15em); } 50% { transform: translateY(0.2em); } }
.eh-dopts { position: absolute; right: 1.4em; bottom: calc(100% + 0.7em); display: flex; flex-direction: column; align-items: stretch; gap: 0.45em; min-width: 16em; }
.eh-dopt { font-size: 1.45em; text-align: left; padding: 0.35em 1.1em 0.4em 2em !important; border-radius: 99em; background: linear-gradient(180deg, rgba(111, 96, 240, 0.96), rgba(59, 47, 184, 0.96)) !important; border: 0.13em solid var(--panel-border) !important; box-shadow: 0 0.22em 0 rgba(27, 20, 70, 0.5); position: relative; animation: eh-toast-in 0.4s var(--bounce) both; transition: transform 0.2s var(--bounce); font-weight: 600; }
.eh-dopt.sel { background: linear-gradient(180deg, #ffe16a, #ffb400) !important; color: var(--ink) !important; border-color: var(--white) !important; transform: translateX(-0.5em) scale(1.05); }
.eh-dopt.sel::before { content: '▶'; position: absolute; left: 0.75em; top: 50%; transform: translateY(-50%); font-size: 0.75em; }

/* ═══════════════ Menús ═══════════════ */
.eh-menu-btn { display: flex; align-items: center; gap: 0.6em; width: 100%; font-size: 1.7em; font-weight: 700; padding: 0.42em 1.2em 0.48em !important; border-radius: 99em; background: linear-gradient(180deg, #7667f5, #4a3bd0) !important; border: 0.13em solid var(--panel-border) !important; box-shadow: 0 0.24em 0 rgba(27, 20, 70, 0.55); text-shadow: 0 0.09em 0 rgba(27, 20, 70, 0.6); transition: transform 0.22s var(--bounce); pointer-events: auto; white-space: nowrap; }
.eh-menu-btn.sel { background: linear-gradient(180deg, #ffe675, #ffb400) !important; color: var(--ink) !important; border-color: var(--white) !important; text-shadow: none; transform: scale(1.07); }
.eh-menu-btn.sel .eh-emo { animation: eh-wobble 0.8s ease-in-out infinite; }
.eh-menu-btn.danger.sel { background: linear-gradient(180deg, #ff8a6a, var(--red)) !important; color: var(--white) !important; }

/* Título */
.eh-titlescreen { position: absolute; inset: 0; z-index: 70; pointer-events: auto; display: flex; align-items: center; justify-content: center; gap: 4em; padding: calc(1.5em + var(--sat)) calc(3em + var(--sar)) calc(1.5em + var(--sab)) calc(3em + var(--sal)); background: radial-gradient(120% 90% at 30% 35%, rgba(126, 190, 255, 0.55), rgba(91, 75, 224, 0.62) 55%, rgba(27, 20, 70, 0.82)); animation: eh-fadein 0.5s both; }
.eh-titlescreen.out { animation: eh-fadeout 0.5s both; pointer-events: none; }
@keyframes eh-fadein { from { opacity: 0; } }
@keyframes eh-fadeout { to { opacity: 0; } }
.eh-float { position: absolute; font-size: 3.4em; opacity: 0.85; animation: eh-floaty 5s ease-in-out infinite; filter: drop-shadow(0 0.1em 0 rgba(27, 20, 70, 0.35)); }
@keyframes eh-floaty { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-0.5em) rotate(8deg); } }
.eh-tleft { position: relative; display: flex; flex-direction: column; align-items: center; }
.eh-logo { position: relative; display: flex; flex-direction: column; align-items: center; transform: rotate(-5deg); animation: eh-logo-bob 3.2s ease-in-out infinite; padding: 0 1.5em; }
@keyframes eh-logo-bob { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-0.6em); } }
.eh-logo .swoosh { position: absolute; left: -4%; top: 22%; width: 108%; height: 86%; overflow: visible; }
.eh-logo .row { position: relative; display: flex; align-items: center; font-weight: 700; line-height: 0.95; }
.eh-logo .r1 { font-size: 8.4em; margin-right: 0.5em; }
.eh-logo .r2 { font-size: 9.2em; margin-top: -0.06em; }
.eh-logo .ch { position: relative; display: inline-block; color: var(--ink-2); -webkit-text-stroke: 0.2em var(--ink-2); paint-order: stroke fill; text-shadow: 0 0.09em 0 var(--ink), 0 0.16em 0.14em rgba(27, 20, 70, 0.45); animation: eh-letter 0.7s var(--elastic) both; animation-delay: calc(var(--i) * 0.06s + 0.15s); }
.eh-logo .ch::before { content: attr(data-t); position: absolute; left: 0; top: 0; -webkit-text-stroke: 0.1em #fff; text-shadow: none; color: #fff; }
.eh-logo .ch::after { content: attr(data-t); position: absolute; left: 0; top: 0; -webkit-text-stroke: 0; text-shadow: none; background: linear-gradient(180deg, #fff3a8 8%, #ffd53a 40%, #ff9a16 92%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eh-logo .r2 .ch::before { -webkit-text-stroke-color: #9fd4ff; color: #9fd4ff; }
.eh-logo .r2 .ch::after { background-image: linear-gradient(180deg, #ffffff 30%, #cfe6ff 70%, #8fc4ff 100%); }
@keyframes eh-letter { 0% { transform: translateY(-1.2em) scale(0.2) rotate(-25deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.eh-logo .star { position: absolute; right: -0.62em; top: -0.12em; width: 0.8em; height: 0.8em; overflow: visible; animation: eh-star 2.4s ease-in-out infinite; filter: drop-shadow(0 0.05em 0 var(--ink)); }
@keyframes eh-star { 0%, 100% { transform: rotate(8deg) scale(1); } 50% { transform: rotate(22deg) scale(1.14); } }
.eh-tagline { margin-top: 1.1em; font-size: 2em; font-weight: 600; font-style: italic; transform: rotate(-5deg); color: var(--white); -webkit-text-stroke: 0.22em var(--ink-2); paint-order: stroke fill; text-shadow: 0 0.1em 0 var(--ink); animation: eh-letter 0.7s 0.9s var(--bounce) both; }
.eh-tagline b { color: var(--yellow); font-weight: 700; }
.eh-tright { position: relative; display: flex; flex-direction: column; gap: 1em; width: 25em; flex: none; animation: eh-dbox 0.6s 0.5s var(--bounce) both; }
.eh-tmenu { display: flex; flex-direction: column; gap: 0.7em; padding: 1.2em 1.3em 1.4em; }
.eh-tmenu .eh-menu-btn { font-size: 1.9em; }
.eh-thelp { padding: 0.9em 1.2em 1em; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4em 1em; font-size: 1.05em; font-weight: 500; }
.eh-thelp .lbl { grid-column: 1 / -1; justify-self: start; font-size: 0.9em; margin: -1.7em 0 0.1em -0.3em; }
.eh-thelp span { display: flex; align-items: center; justify-content: space-between; gap: 0.3em; white-space: nowrap; }
.eh-ver { position: absolute; right: calc(1em + var(--sar)); bottom: calc(0.6em + var(--sab)); font-size: 0.95em; font-weight: 500; opacity: 0.75; }

/* Pausa */
.eh-pause { position: absolute; inset: 0; z-index: 60; pointer-events: auto; display: flex; align-items: center; justify-content: center; background: rgba(27, 20, 70, 0.6); animation: eh-fadein 0.2s both; padding: calc(1em + var(--sat)) 1em calc(1em + var(--sab)); }
.eh-pbox { position: relative; width: min(34em, 96%); max-height: 100%; padding: 2.6em 1.6em 1.5em; display: flex; flex-direction: column; gap: 0.65em; animation: eh-dbox 0.4s var(--bounce) both; }
.eh-pbox.wide { width: min(46em, 96%); }
.eh-ptitle { position: absolute; left: 50%; top: -0.62em; transform: translateX(-50%); font-size: 3em; white-space: nowrap; -webkit-text-stroke-width: 0.26em; }
.eh-pbox .eh-menu-btn { font-size: 1.55em; }
.eh-ptext { font-size: 1.4em; text-align: center; font-weight: 500; padding: 0.3em 0 0.5em; }
.eh-ctable { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0.28em 0.8em; font-size: 1.12em; font-weight: 500; align-items: center; }
.eh-ctable .hd { font-weight: 700; color: var(--yellow); text-transform: uppercase; font-size: 0.9em; letter-spacing: 0.04em; }
.eh-ctable .eh-key { background: var(--white) !important; color: var(--indigo) !important; border-radius: 0.45em !important; font-family: inherit !important; box-shadow: 0 0.16em 0 #b9b0ea !important; }
.eh-ctable .pad .eh-key { background: var(--yellow) !important; color: var(--ink) !important; border-radius: 99em !important; box-shadow: 0 0.16em 0 #c98f00 !important; }
.eh-vol { display: flex; align-items: center; gap: 0.6em; font-size: 1.4em; padding: 0.3em 0.6em; border-radius: 99em; border: 0.13em solid transparent; }
.eh-vol.sel { background: rgba(27, 20, 70, 0.4); border-color: var(--yellow); }
.eh-vol .lb { width: 6.4em; display: flex; align-items: center; gap: 0.35em; white-space: nowrap; }
.eh-vol .pips { flex: 1; display: flex; gap: 0.18em; height: 1.1em; cursor: pointer; }
.eh-vol .pips i { flex: 1; border-radius: 0.3em; background: rgba(27, 20, 70, 0.6); transition: background 0.15s, transform 0.2s var(--bounce); }
.eh-vol .pips i.on { background: linear-gradient(180deg, #ffe675, #ffb400); transform: scaleY(1.15); }
.eh-vol button { width: 1.7em; height: 1.7em; border-radius: 50% !important; background: linear-gradient(180deg, #7667f5, #4a3bd0) !important; border: 0.1em solid var(--panel-border) !important; font-weight: 700; line-height: 1; flex: none; }
.eh-phint { text-align: center; font-size: 1em; font-weight: 500; opacity: 0.9; margin-top: 0.2em; }

/* ═══════════════ Mapa ═══════════════ */
.eh-map { position: absolute; inset: 0; z-index: 50; pointer-events: auto; display: flex; align-items: center; justify-content: center; background: rgba(27, 20, 70, 0.72); animation: eh-fadein 0.2s both; padding: calc(2.4em + var(--sat)) calc(1.4em + var(--sar)) calc(1.2em + var(--sab)) calc(1.4em + var(--sal)); }
.eh-mbox { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; padding: 2.4em 1.4em 0.9em; animation: eh-dbox 0.4s var(--bounce) both; background: linear-gradient(180deg, rgba(64, 52, 190, 0.94), rgba(34, 26, 120, 0.94)); }
.eh-mscroll { flex: 1; min-height: 0; overflow: auto; touch-action: pan-x pan-y; display: flex; flex-wrap: wrap; align-content: safe center; justify-content: safe center; gap: 2.2em 1.6em; padding: 1.2em 0.6em 0.6em; background-image: radial-gradient(rgba(167, 156, 255, 0.22) 0.09em, transparent 0.1em); background-size: 1.6em 1.6em; border-radius: 1em; }
.eh-mzone { position: relative; flex: none; }
.eh-mzone .zl { position: absolute; left: 0; bottom: calc(100% + 0.15em); font-size: 0.95em; }
.eh-mzone.cur .zl { background: linear-gradient(180deg, #ffd955, #ffb400); color: var(--ink); text-shadow: none; border-color: var(--white); }
.eh-mgrid { position: relative; border-radius: 0.5em; outline: 0.1em dashed rgba(167, 156, 255, 0.28); }
.eh-mcell { position: absolute; background: #7d6ff5; box-shadow: inset 0 0 0 0.09em rgba(27, 20, 70, 0.35), inset 0 0.22em 0 rgba(255, 255, 255, 0.2); border-radius: 0.3em; }
.eh-mcell.here { background: #a79cff; box-shadow: inset 0 0 0 0.14em var(--yellow); }
.eh-mpoi { position: absolute; transform: translate(-50%, 40%); font-size: 1.45em; filter: drop-shadow(0 0.08em 0 rgba(27, 20, 70, 0.7)); }
.eh-mhero { position: absolute; transform: translate(-50%, 50%); font-size: 1.7em; z-index: 2; animation: eh-blink 0.9s steps(1) infinite; filter: drop-shadow(0 0 0.25em var(--yellow)); }
.eh-mhero::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1.5em; height: 1.5em; margin: -0.75em; border-radius: 50%; border: 0.1em solid var(--yellow); animation: eh-ring 1.2s ease-out infinite; }
@keyframes eh-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.eh-mlegend { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em 1.4em; padding-top: 0.6em; font-size: 1.05em; font-weight: 500; }
.eh-mlegend span { display: flex; align-items: center; gap: 0.3em; white-space: nowrap; }
.eh-mclose { position: absolute; right: 0.7em; top: 0.6em; width: 2.2em; height: 2.2em; border-radius: 50% !important; background: linear-gradient(180deg, #ff8a6a, var(--red)) !important; border: 0.14em solid var(--white) !important; font-size: 1.2em; font-weight: 700; box-shadow: 0 0.2em 0 rgba(27, 20, 70, 0.5); }

/* ═══════════════ Táctil ═══════════════ */
.eh-touch { position: absolute; inset: 0; z-index: 20; display: none; }
.eh-root[data-device='touch'] .eh-touch { display: block; }
.eh-root.eh-modal .eh-touch { display: none; }
.eh-stickzone { position: absolute; left: 0; bottom: 0; width: 40%; height: 68%; pointer-events: auto; }
.eh-stick { position: absolute; left: calc(var(--btn) * 0.45 + var(--sal)); bottom: calc(var(--btn) * 0.35 + var(--sab)); width: calc(var(--btn) * 1.9); height: calc(var(--btn) * 1.9); border-radius: 50%; background: radial-gradient(circle, rgba(91, 75, 224, 0.25), rgba(59, 47, 184, 0.5)); border: 3px solid rgba(244, 241, 255, 0.5); pointer-events: none; }
.eh-stick .knob { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; margin: -23%; border-radius: 50%; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.95), rgba(167, 156, 255, 0.85)); box-shadow: 0 4px 0 rgba(27, 20, 70, 0.4); }
.eh-stick.on { background: radial-gradient(circle, rgba(91, 75, 224, 0.35), rgba(59, 47, 184, 0.65)); }
.eh-tbtns { position: absolute; right: calc(var(--btn) * 0.22 + var(--sar)); bottom: calc(var(--btn) * 0.22 + var(--sab)); width: 0; height: 0; }
.eh-tb { position: absolute; width: calc(var(--btn) * var(--s, 1)); height: calc(var(--btn) * var(--s, 1)); right: calc(var(--btn) * var(--r, 0)); bottom: calc(var(--btn) * var(--b, 0)); border-radius: 50% !important; background: radial-gradient(circle at 50% 30%, rgba(125, 111, 245, 0.62), rgba(59, 47, 184, 0.62)) !important; border: 3px solid rgba(244, 241, 255, 0.6) !important; box-shadow: 0 4px 0 rgba(27, 20, 70, 0.35); pointer-events: auto; display: flex; align-items: center; justify-content: center; transition: transform 0.12s var(--bounce); }
.eh-tb .eh-emo { font-size: calc(var(--btn) * var(--s, 1) * 0.5); pointer-events: none; }
.eh-tb.down { transform: scale(0.88); background: radial-gradient(circle at 50% 30%, rgba(255, 230, 117, 0.9), rgba(255, 180, 0, 0.85)) !important; }
.eh-tb.jump { background: radial-gradient(circle at 50% 30%, rgba(255, 230, 117, 0.7), rgba(255, 160, 0, 0.66)) !important; }
.eh-tb.on {
  background: radial-gradient(circle at 50% 30%, rgba(255, 242, 153, 0.98), rgba(255, 184, 0, 0.94) 62%, rgba(126, 74, 224, 0.94)) !important;
  border-color: var(--yellow-hi) !important;
  box-shadow: 0 4px 0 rgba(27, 20, 70, 0.38), 0 0 1.15em rgba(255, 217, 80, 0.72);
}
.eh-tb.on[data-tool='rain'] {
  background: radial-gradient(circle at 50% 30%, rgba(186, 238, 255, 0.98), rgba(43, 164, 245, 0.94) 62%, rgba(77, 62, 196, 0.94)) !important;
  border-color: rgba(190, 244, 255, 0.98) !important;
  box-shadow: 0 4px 0 rgba(27, 20, 70, 0.38), 0 0 1.15em rgba(68, 194, 255, 0.68);
}
.eh-tb.on .eh-emo { filter: drop-shadow(0 0 0.25em rgba(255, 255, 235, 0.95)); }
.eh-tb.on.down { transform: scale(0.88); filter: brightness(1.18); }
.eh-ttop { position: absolute; right: calc(0.9em + var(--sar)); top: calc(0.8em + var(--sat)); display: flex; gap: 0.6em; }
.eh-ttop .eh-tb { position: relative; right: auto; bottom: auto; --s: 0.66; }

/* ═══════════════ Fundido y aviso de giro ═══════════════ */
.eh-starwipe { position: fixed; left: 0; top: 0; z-index: 80; display: none; pointer-events: none; transform-origin: 50% 50%; background: radial-gradient(circle, #3b2fb8 0%, #1b1446 70%); clip-path: polygon(50% 0%, 61.8% 33.8%, 97.6% 34.5%, 69% 56.2%, 79.4% 90.5%, 50% 70%, 20.6% 90.5%, 31% 56.2%, 2.4% 34.5%, 38.2% 33.8%); will-change: transform; }
.eh-fade-simple { position: absolute; inset: 0; z-index: 80; background: var(--ink); opacity: 0; display: none; }

.eh-rotate { position: absolute; inset: 0; z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 0.8em; text-align: center; padding: 2em; background: linear-gradient(180deg, #5b4be0, #2a1f8f); pointer-events: auto; font-size: 1.6em; }
.eh-rotate .eh-emo { font-size: 5em; animation: eh-turn 2.2s var(--bounce) infinite; }
.eh-rotate .eh-title-text { font-size: 1.9em; }
.eh-rotate p { margin: 0; font-weight: 500; max-width: 16em; }
@keyframes eh-turn { 0%, 25% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
/* El juego se juega en vertical por defecto: ya no se pide girar el teléfono. */

@media (prefers-reduced-motion: reduce) {
  .eh-root *, .eh-root *::before, .eh-root *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .eh-zone, .eh-banner { animation-duration: 3.2s !important; animation-timing-function: step-end !important; }
  .eh-banner .rays, .eh-banner .st { display: none; }
}

/* ═══════════════ Tarjeta de recompensa ═══════════════ */
.eh-reward { position: absolute; inset: 0; z-index: 45; pointer-events: auto; display: flex; align-items: center; justify-content: center; }
.eh-reward-dim { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(59, 47, 184, 0.35), rgba(20, 14, 60, 0.72)); animation: eh-fade-in 0.3s ease-out both; }
.eh-reward-card {
  position: relative; width: min(21em, 78vw); padding: 1.6em 1.6em 1.3em; display: flex; flex-direction: column; align-items: center; text-align: center;
  border-radius: 2em; background: linear-gradient(180deg, #7a6cf4 0%, #4b3dd2 55%, #3b2fb8 100%);
  border: 0.28em solid #fff; box-shadow: 0 0 0 0.22em var(--accent), 0 0.55em 0 rgba(27, 20, 70, 0.55), 0 1.4em 2.6em rgba(10, 6, 40, 0.55), inset 0 0.2em 0 rgba(255, 255, 255, 0.3);
  animation: eh-reward-in 0.6s var(--elastic) both; overflow: visible;
}
.eh-reward.out .eh-reward-card { animation: eh-reward-out 0.22s ease-in both; }
.eh-reward.out .eh-reward-dim { animation: eh-fade-out 0.22s ease-in both; }
.eh-reward-rays { position: absolute; left: 50%; top: 7.2em; width: 26em; height: 26em; margin: -13em 0 0 -13em; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 233, 130, 0.55) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%); animation: eh-rot 10s linear infinite; z-index: 0; }
.eh-reward-kind { position: relative; z-index: 1; font-size: 1.05em; background: linear-gradient(180deg, #ffd955, #ffb400); color: var(--ink); text-shadow: none; border-color: #fff; margin-top: -2.6em; }
.eh-reward-medal { position: relative; z-index: 1; width: 8.6em; height: 8.6em; margin: 0.9em 0 0.6em; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #fff 0%, #fff3c2 38%, var(--accent) 100%); border: 0.3em solid #fff;
  box-shadow: 0 0.35em 0 rgba(27, 20, 70, 0.45), 0 0 1.6em var(--accent), inset 0 -0.35em 0.6em rgba(0, 0, 0, 0.12); }
.eh-reward-emoji { font-size: 5.4em; filter: drop-shadow(0 0.06em 0 rgba(27, 20, 70, 0.35)); animation: eh-banner-emo 0.8s 0.15s var(--elastic) both, eh-wobble 1.6s 1s ease-in-out infinite; }
.eh-reward-name { position: relative; z-index: 1; font-size: 2.3em; line-height: 1.05; -webkit-text-stroke-width: 0.24em; }
.eh-reward-desc { position: relative; z-index: 1; margin-top: 0.55em; font-size: 1.15em; font-weight: 500; line-height: 1.3; color: #fff; text-shadow: 0 0.08em 0 rgba(27, 20, 70, 0.55); max-width: 17em; }
.eh-reward-hint { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.4em; margin-top: 1.1em; font-weight: 600; font-size: 1em; color: #e5e0ff; animation: eh-reward-bob 1.1s ease-in-out infinite; }
@keyframes eh-reward-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.25em); } }
.eh-reward-spark { position: absolute; left: 50%; top: 9.4em; font-size: 1.8em; z-index: 2; pointer-events: none; animation: eh-reward-spark 1.1s ease-out both; }
@keyframes eh-reward-in { 0% { transform: scale(0.2) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes eh-reward-out { to { transform: scale(0.7) translateY(1em); opacity: 0; } }
@keyframes eh-reward-spark { 0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(160deg); opacity: 0; } }
@keyframes eh-fade-in { from { opacity: 0; } }
@keyframes eh-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .eh-reward-rays, .eh-reward-spark { display: none; } .eh-reward-card, .eh-reward-emoji { animation: none; } }

/* ═══════════════ Vertical (formato predeterminado en el celular) ═══════════════ */
@media (orientation: portrait) {
  .eh-root { font-size: clamp(10px, 2.75vw, 22px); --btn: clamp(54px, 17vw, 86px); }
  /* barra de poderes encima de los controles táctiles */
  .eh-root[data-device=touch] .eh-bottom { bottom: calc(var(--btn) * 2.88 + var(--sab)); }
  .eh-objective { max-width: 22em; }
  .eh-stickzone { width: 50%; height: 46%; }
  .eh-stick { left: calc(var(--btn) * 0.32 + var(--sal)); bottom: calc(var(--btn) * 0.52 + var(--sab)); }
  .eh-tbtns { bottom: calc(var(--btn) * 0.3 + var(--sab)); }
  /* título: logo arriba y menú debajo */
  .eh-titlescreen { flex-direction: column; gap: 2.4em; padding: calc(2em + var(--sat)) calc(1.4em + var(--sar)) calc(2em + var(--sab)) calc(1.4em + var(--sal)); }
  .eh-logo .r1 { font-size: 7em; }
  .eh-logo .r2 { font-size: 7.8em; }
  .eh-dbox { padding-left: 8.4em; min-height: 8em; }
  .eh-dface { width: 6.6em; height: 6.6em; }
  .eh-dface .eh-emo { font-size: 4.4em; }
  .eh-dname { left: 7.4em; }
  .eh-dtext { font-size: 1.55em; }
}

/* ═══════════════ Mochila ═══════════════ */
.eh-bagbox { width: min(36em, 96%); margin-top: 1.6em; }
.eh-bagcounts { display: flex; gap: 0.6em; justify-content: center; }
.eh-bagslots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6em; }
.eh-bagslot { display: flex; flex-direction: column; align-items: center; gap: 0.25em; padding: 0.55em 0.3em 0.5em; border-radius: 1em; background: rgba(42, 31, 143, 0.7); border: 0.12em solid var(--panel-border); }
.eh-bagslot.empty { opacity: 0.6; }
.eh-bagslot .big { font-size: 2.6em; line-height: 1.1; }
.eh-bagslot .lb { display: flex; align-items: center; gap: 0.2em; font-size: 0.95em; }
.eh-baghint { text-align: center; font-size: 1em; font-weight: 500; opacity: 0.85; }
.eh-baglist { display: flex; flex-direction: column; gap: 0.5em; max-height: 42vh; overflow-y: auto; padding: 0.2em; }
.eh-bagitem { align-items: center; text-align: left; white-space: normal !important; }
.eh-bagitem .eh-emo { font-size: 1.6em; }
.eh-bagitem .tx { flex: 1; display: flex; flex-direction: column; gap: 0.1em; }
.eh-bagitem .tx small { font-size: 0.62em; font-weight: 500; line-height: 1.2; opacity: 0.9; }
.eh-bagitem .tag { font-size: 0.6em; background: linear-gradient(180deg, #ffd955, #ffb400); color: var(--ink); text-shadow: none; }
.eh-bagitem .tag.off { background: rgba(255, 255, 255, 0.18); color: #fff; }
.eh-baghead { display: flex; align-items: center; justify-content: center; gap: 0.4em; font-size: 1.5em; }
.eh-baghead .big { font-size: 2em; }
.eh-menu-btn.cur { outline: 0.14em solid var(--yellow); }








/* Acceso rápido a la mochila junto al pulgar izquierdo, encima del joystick. */
/* Más a la izquierda y más separado del joystick (antes: left 1.1, bottom 2.45). */
.eh-bag-left { position:absolute !important; left:calc(var(--btn) * 0.22 + var(--sal)); bottom:calc(var(--btn) * 3.15 + var(--sab)); --s:0.78; right:auto !important; }

.eh-objective { position:absolute; left:calc(1.1em + var(--sal)); top:calc(5.8em + var(--sat)); }

/* ── Mochila: miniatura de controles + teclado de emojis ── */
.eh-bagbox { max-height: 100%; overflow-y: auto; }
.eh-minipad { display: flex; flex-direction: column; align-items: center; gap: 0.3em; padding: 0.5em 0.4em 0.4em; border-radius: 1.2em; background: rgba(27, 20, 70, 0.35); }
.eh-minipad-in { --btn: 4.6em; position: relative; width: calc(var(--btn) * 3.6); height: calc(var(--btn) * 2.45); }
.eh-mini { position: absolute; width: calc(var(--btn) * var(--s, 1)); height: calc(var(--btn) * var(--s, 1)); right: calc(var(--btn) * (var(--r, 0) + 0.18)); bottom: calc(var(--btn) * var(--b, 0)); border-radius: 50% !important; padding: 0 !important; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, rgba(125, 111, 245, 0.75), rgba(59, 47, 184, 0.75)) !important; border: 0.12em solid rgba(244, 241, 255, 0.6) !important; box-shadow: 0 0.18em 0 rgba(27, 20, 70, 0.35); }
.eh-mini:disabled { opacity: 0.85; cursor: default; }
.eh-mini .eh-emo { font-size: calc(var(--btn) * var(--s, 1) * 0.5); pointer-events: none; }
.eh-mini.jump { background: radial-gradient(circle at 50% 30%, rgba(255, 230, 117, 0.85), rgba(255, 160, 0, 0.8)) !important; }
.eh-mini.special { background: radial-gradient(circle at 50% 30%, rgba(255, 200, 120, 0.85), rgba(240, 110, 60, 0.8)) !important; }
.eh-mini.free .eh-emo { opacity: 0.45; font-size: calc(var(--btn) * var(--s, 1) * 0.42); }
.eh-mini.on { box-shadow: 0 0 0 0.16em #ffe066, 0 0.18em 0 rgba(27, 20, 70, 0.35); }
.eh-mini .num, .eh-emokey .num { position: absolute; top: -0.25em; right: -0.25em; min-width: 1.25em; height: 1.25em; border-radius: 99em; background: linear-gradient(180deg, #ffd955, #ffb400); color: var(--ink); font-style: normal; font-weight: 700; font-size: 0.72em; line-height: 1.25em; text-align: center; text-shadow: none; box-shadow: 0 0.1em 0 rgba(27, 20, 70, 0.4); }
.eh-minipad.picking .eh-mini.slot { animation: eh-pick 0.9s ease-in-out infinite alternate; border-color: #ffe066 !important; }
.eh-minipad.picking .eh-mini:not(.slot) { opacity: 0.35; }
@keyframes eh-pick { from { transform: scale(1); } to { transform: scale(1.12); } }
.eh-mini.sel { outline: 0.16em solid #fff; outline-offset: 0.12em; }
.eh-minicap { display: flex; align-items: center; gap: 0.3em; font-size: 0.95em; font-weight: 600; opacity: 0.9; text-align: center; }
.eh-emokb-title { font-size: 0.82em; font-weight: 700; letter-spacing: 0.08em; opacity: 0.7; padding: 0.2em 0.4em 0; }
.eh-emokb { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.2em 0.1em; }
.eh-emokey { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.05em; padding: 0.3em 0 0.2em !important; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0.8em !important; transition: transform 0.12s var(--bounce); }
.eh-emokey .eh-emo { font-size: 2.3em; line-height: 1.1; filter: drop-shadow(0 0.06em 0 rgba(27, 20, 70, 0.35)); }
.eh-emokey small { font-size: 0.72em; font-weight: 600; opacity: 0.85; white-space: nowrap; }
.eh-emokey .num { top: 0.1em; right: 18%; }
.eh-emokey.cur .eh-emo { filter: drop-shadow(0 0 0.22em rgba(255, 230, 117, 0.95)); }
.eh-emokey.cur small { color: #ffe066; opacity: 1; }
.eh-emokey.sel, .eh-emokey:hover { background: rgba(255, 255, 255, 0.12) !important; transform: scale(1.06); }
.eh-bagcancel { align-self: center; }
.eh-baginfo { display: flex; flex-direction: column; gap: 0.1em; min-height: 2.8em; padding: 0.4em 0.7em; border-radius: 0.8em; background: rgba(27, 20, 70, 0.3); font-size: 0.9em; line-height: 1.25; }
.eh-baginfo b { font-size: 1.05em; }

/* ── Mapa: tesoro por zonas ── */
.eh-tlist { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0.45em; padding: 0.4em 0.2em; }
.eh-trow { display: grid; grid-template-columns: 2.2em 1fr; align-items: center; gap: 0.15em 0.6em; padding: 0.45em 0.7em; border-radius: 0.9em; background: rgba(27, 20, 70, 0.35); }
.eh-trow.cur { box-shadow: 0 0 0 0.14em #ffe066; }
.eh-trow.unk { opacity: 0.55; }
.eh-trow > .eh-emo { grid-row: span 2; font-size: 1.8em; text-align: center; }
.eh-trow .nm { display: flex; justify-content: space-between; gap: 0.5em; font-weight: 700; font-size: 1em; }
.eh-trow .nm small { font-weight: 600; opacity: 0.75; font-size: 0.8em; }
.eh-tbars { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em; }
.eh-tbar { display: flex; align-items: center; gap: 0.3em; font-size: 0.85em; font-weight: 600; }
.eh-tbar .tr { flex: 1; height: 0.55em; border-radius: 99em; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.eh-tbar .tr i { display: block; height: 100%; border-radius: 99em; background: linear-gradient(90deg, #ffd955, #ffb400); }
.eh-tbar.d .tr i { background: linear-gradient(90deg, #9fe8ff, #4ac0ff); }
.eh-tbar.full { color: #9fffb0; }
.eh-tsum { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em 1.2em; padding-top: 0.5em; font-size: 0.95em; font-weight: 600; }
.eh-tsum span { display: flex; align-items: center; gap: 0.3em; white-space: nowrap; }
.eh-emokey.locked .eh-emo { filter: grayscale(1) brightness(0.85); opacity: 0.55; }
.eh-emokey.locked small { opacity: 0.45; }
.eh-emokey.info { cursor: default; }
