/* Los juegos de la app dentro de un móvil, tal cual se ven en Reddu.
   Medidas y colores copiados de docs/diseno/primeras-misiones/presentar-juegos.html (reddu-app),
   que a su vez copia las pantallas reales. La pantalla se dibuja a 390×844 (el móvil de la app)
   y se escala para que quepa. Encima solo se añade la etiqueta de «lo que entrenas». */

.movil { position: relative; width: min(300px, 78vw); aspect-ratio: 390 / 844; border-radius: 46px; padding: 10px; background: #111; box-shadow: 0 0 0 2px #2b2b2b inset, 0 30px 60px -20px rgba(0,0,0,.45), 0 12px 24px -12px rgba(0,0,0,.3); }
.movil::before { content: ""; position: absolute; top: 18px; left: 50%; width: 88px; height: 24px; margin-left: -44px; border-radius: 14px; background: #111; z-index: 3; }
.movil-pantalla { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #FDF9E9; }

.dev { position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform-origin: 0 0; overflow: hidden;
  background: #FDF9E9; color: #000; font-family: "Lexend", system-ui, sans-serif; font-size: 14px; line-height: 1.25;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.dev * { box-sizing: border-box; }
.dev button { font: inherit; color: inherit; }
.dev p { margin: 0; }
.dev .ico { display: inline-block; width: 1em; height: 1em; fill: currentColor; flex: none; }

/* marco del juego */
.g-head { position: absolute; left: 16px; right: 16px; top: 56px; z-index: 1; display: flex; align-items: center; gap: 12px; }
.g-cerrar { width: 28px; height: 28px; color: #8E8E8E; flex: none; }
.g-bar { flex: 1; height: 16px; border-radius: 100px; background: #D9D9D9; overflow: hidden; position: relative; }
.g-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 8%; background: #52E1C7; border-radius: 100px; transition: width .5s linear; }
.g-area { position: absolute; left: 0; right: 0; top: 132px; height: 712px; }
.g-page { position: absolute; inset: 0; }
.g-pad { padding: 24px 16px 0; display: flex; flex-direction: column; }
.g-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: #FDF9E9; border-top: 2px solid #D9D9D9; padding: 24px 16px 0; }

/* el botón «3D» de la app */
.b3 { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 400px; height: 56px; margin: 0 auto; border-radius: 16px;
  border: 2px solid var(--bd); box-shadow: 0 4px 0 var(--bd); background: var(--bg3); color: var(--fg3); font: 600 18px/1 "Lexend", system-ui, sans-serif; cursor: pointer; padding: 0; }
.b3.grey { --bg3: #D9D9D9; --bd: #8E8E8E; --fg3: #fff; cursor: default; }
.b3.turq { --bg3: #52E1C7; --bd: #4FA898; --fg3: #000; }
.b3.blue { --bg3: #4931FF; --bd: #1C0E76; --fg3: #fff; }
.b3.orange { --bg3: #FF6601; --bd: #923418; --fg3: #fff; }
.b3.green { --bg3: #42E35D; --bd: #278436; --fg3: #000; }
.b3:not(.grey):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bd); }

/* insignia + instrucción */
.badge { align-self: flex-start; display: inline-flex; align-items: center; height: 40px; background: #fff; border-radius: 16px; padding: 2px 0; color: #C024FF; }
.badge .ico { width: 24px; height: 24px; margin-left: 12px; }
.badge span { padding: 8px 12px 8px 8px; font: 600 16px/1.25 "Lexend", sans-serif; }
.ins { margin: 16px 0 0 !important; font: 600 16px/1.25 "Lexend", sans-serif; }

/* deslizar (swiper) */
.sw-box { position: relative; width: 350px; height: 350px; margin: 0 auto; flex: none; }
.sw-card { position: absolute; left: 20px; top: 25px; width: 310px; height: 300px; background: #fff; border-radius: 16px; border: 2px solid #8E8E8E; box-shadow: 0 4px 0 #8E8E8E;
  touch-action: none; cursor: grab; will-change: transform; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.sw-card:active { cursor: grabbing; }
.sw-card.invita { animation: invita 2.4s ease-in-out 1s infinite; }
@keyframes invita { 0%, 60%, 100% { transform: none } 70% { transform: translateX(-26px) rotate(-3deg) } 85% { transform: translateX(26px) rotate(3deg) } }
.sw-words { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 12px; }
.sw-words b { font: 700 18px/1.25 "Lexend", sans-serif; text-align: center; }
.sw-line { width: 160px; height: 2px; background: #D9D9D9; margin: 11px 0; }
.sw-labs { position: absolute; left: 12px; right: 12px; bottom: 16px; display: flex; justify-content: space-between; }
.sw-labs span { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 "Lexend", sans-serif; }
.sw-labs .ico { width: 20px; height: 20px; }
.sw-labs .l { color: #FF2567; } .sw-labs .r { color: #52E1C7; }
.sw-res { position: absolute; left: 41px; top: 182px; width: 308px; height: 308px; border-radius: 16px; border: 2px solid; }
.sw-res.ok { border-color: #42E35D; background: #FAFFF8; color: #42E35D; }
.sw-res.ko { border-color: #FF6601; background: #FFE4CF; color: #FF6601; }
.sw-res .sw-labs { top: 16px; bottom: auto; justify-content: flex-start; }
.sw-res .sw-labs span, .sw-res .sw-words b { color: inherit; }

/* fila de arriba de memoria, arrastrar y dictado */
.toprow { display: flex; justify-content: center; align-items: flex-start; margin-top: 24px; }
.av80 { width: 80px; height: 80px; flex: none; background-size: cover; background-position: 50% 0; margin-right: 8px; }
.audio { width: 100px; height: 64px; border-radius: 16px; background: #4931FF; border: 2px solid #3120B7; box-shadow: 0 4px 0 #3120B7; display: grid; place-items: center; color: #fff; margin: 0 0 8px 12px; cursor: pointer; padding: 0; }
.audio .ico { width: 32px; height: 32px; }
.audio.llama { animation: llama 1.4s ease-in-out infinite; }
@keyframes llama { 50% { box-shadow: 0 4px 0 #3120B7, 0 0 0 9px rgba(73, 49, 255, .18); } }
.hr { height: 2px; background: #D9D9D9; margin: 0 -16px; flex: none; }

/* memoria (flipper) */
.fl-timer { margin-left: 12px; display: flex; flex-direction: column; }
.fl-timer b { font: 700 24px/1.25 "Lexend", sans-serif; color: #4931FF; margin-bottom: 8px; }
.fl-timer small { font: 600 14px/1.25 "Lexend", sans-serif; color: rgba(0,0,0,.4); }
.fl-show { padding: 32px 12px 8px; font: 600 18px/1.25 "Lexend", sans-serif; }
.fl-help { margin: 16px 0 !important; text-align: center; font: 700 14px/1.25 "Lexend", sans-serif; color: #8E8E8E; }
.fl-list { display: flex; flex-direction: column; gap: 24px; margin-top: 8px; }
.fl-opt { height: 56px; border-radius: 16px; background: #fff; border: 2px solid #8E8E8E; display: grid; place-items: center; font: 600 18px/1 "Lexend", sans-serif; color: #4931FF; }
.fl-pick { height: 74px; border-radius: 16px; background: #fff; border: 2px solid #8E8E8E; box-shadow: 0 4px 0 #8E8E8E; display: grid; place-items: center; font: 600 18px/1 "Lexend", sans-serif; color: #4931FF; cursor: pointer; width: 100%; padding: 0; }

/* arrastrar (dragger) */
.dr-zone { position: relative; margin: 0 -16px; min-height: 56px; background: #fff; padding: 8px 4px 12px 0; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 16px 5px; }
.dr-pool { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 6px; padding: 28px 0 32px; }
.chip { height: 32px; padding: 4px 8px; border-radius: 8px; background: #fff; border: 2px solid #D9D9D9; box-shadow: 0 4px 0 #D9D9D9; font: 600 16px/1.25 "Lexend", sans-serif; display: inline-flex; align-items: center; touch-action: none; cursor: grab; }
.chip.used { background: #8E8E8E; border-color: #8E8E8E; color: #8E8E8E; box-shadow: none; cursor: default; }

/* dictado (writer) */
.wr-pill { margin-top: 32px; margin-right: 8px; padding: 4px 8px; border-radius: 100px; background: #4931FF; border: 2px solid #4931FF; color: #fff; font: 700 14px/1.25 "Lexend", sans-serif; }
.wr-box { margin-top: 16px; width: 100%; min-height: 122px; resize: none; border: 1px solid #D9D9D9; border-radius: 3px 16px 16px 16px; background: #fff; padding: 20px 12px 12px;
  font: 600 18px/1.3 "Lexend", sans-serif; color: #000; outline: none; user-select: text; -webkit-user-select: text; }
.wr-box::placeholder { color: #D9D9D9; font-weight: 400; }
.wr-box:focus { border-color: #FDF9E9; }

/* panel de respuesta (acierto / fallo) */
.fb { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; background: #FDF9E9; border-top: 2px solid #D9D9D9; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding: 0 16px; animation: fbSube .28s cubic-bezier(.2,.8,.2,1); }
@keyframes fbSube { from { transform: translateY(100%) } }
.fb.ko { height: 296px; } .fb.ok { height: 240px; }
.fb .ico { width: 32px; height: 32px; }
.fb h4 { margin: 0; font: 500 18px/1.25 "Lexend", sans-serif; }
.fb.ko .ico, .fb.ko h4 { color: #FF6601; } .fb.ok .ico { color: #42E35D; }
.fb p { text-align: center; font: 400 16px/1.3 "Lexend", sans-serif; }
.fb p b { display: block; font: 700 18px/1.3 "Lexend", sans-serif; color: #FF6601; }
.fb .b3 { margin-bottom: 26px; }

/* encima del juego: lo que entrenas (como las insignias del juego) */
.entrenas { position: absolute; left: 50%; top: 96px; z-index: 6; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 16px; background: #000; color: #fff;
  font: 700 18px/1 "Lexend", sans-serif; white-space: nowrap; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45); animation: entrenas 1.9s cubic-bezier(.2,.8,.2,1) forwards; pointer-events: none; }
.entrenas i { font-style: normal; color: #FFB223; }
@keyframes entrenas { 0% { opacity: 0; transform: translate(-50%, 16px) scale(.8) } 14% { opacity: 1; transform: translate(-50%, 0) scale(1.06) } 22% { transform: translate(-50%, 0) scale(1) } 80% { opacity: 1 } 100% { opacity: 0; transform: translate(-50%, -18px) } }
