/* rodrigodavila.com · modo juego
   Ciudad cyberpunk en pixel art dibujada en canvas. La interfaz va en
   paneles oscuros con filo de neón; es siempre de noche, en los dos temas. */

.juego {
    --caja: rgba(9, 8, 18, .9); /* taste-skill-ignore: panel del juego */
    --caja-2: #1d1a33;
    --marco: #22e4ff;
    --marco-2: #ff2fb3;
    --texto-j: #eef4ff;
    --tenue-j: #a9b3d6;
    --gema: #3dffb0;
    --pixel: "Silkscreen", var(--font);
    position: fixed; inset: 0; z-index: 60;
    background: #05040a; color: var(--texto-j); /* taste-skill-ignore: noche del juego */
    overflow: hidden; touch-action: manipulation; user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.juego[hidden] { display: none; }
html.en-juego, html.en-juego body { overflow: hidden; }
html.en-juego .barra, html.en-juego main, html.en-juego .pie, html.en-juego .saltar, html.en-juego .subir { visibility: hidden; }

.juego-lienzo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: grab; touch-action: none; }
.juego.arrastrando .juego-lienzo { cursor: grabbing; }

/* Paneles con filo de neón */
.hud-marca, .hud-gemas, .hud-boton, .hud-paso, .hud-entrar, .hud-ayuda, .boton-a, .mapa-aviso, .hada-globo, .inventario, .minimapa {
    background: var(--caja); color: var(--texto-j);
    border: 2px solid color-mix(in srgb, var(--marco) 75%, transparent); border-radius: 4px;
    box-shadow: 0 0 0 2px #05040a, 0 0 16px color-mix(in srgb, var(--marco) 28%, transparent); /* taste-skill-ignore: brillo de neón del HUD */
}

/* HUD */
.hud { position: absolute; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-arriba {
    top: 0; justify-content: space-between; flex-wrap: wrap;
    padding: max(14px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
}
.hud-marca { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px 0 6px; font-weight: 600; font-size: var(--t-s); }
.hud-marca .marca-sello { border-radius: 3px; background: var(--marco-2); color: #fff; } /* taste-skill-ignore */
.hud-gemas-caja { position: relative; margin-right: auto; }
.hud-gemas { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; font-size: var(--t-s); font-weight: 600; transition: transform .15s, background-color .2s; }
.hud-gemas:hover { background: var(--caja-2); }
.hud-gemas:active { transform: scale(.94); }
.gema-icono, .inv-gema {
    display: block; width: 12px; height: 17px; background: var(--gema);
    clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0 70%, 0 30%);
}
.inv-gema { width: 10px; height: 14px; background: #2e2b4a; transition: background-color .3s; } /* taste-skill-ignore: hueco de gema */
.inv-gema.llena { background: var(--gema); }
.inventario {
    position: absolute; top: calc(100% + 12px); left: 0; z-index: 4; width: min(280px, calc(100vw - 32px));
    max-height: min(60vh, 520px); overflow: auto; padding: 12px;
}
.inventario-titulo { font-family: var(--pixel); font-size: 13px; color: var(--marco); padding: 2px 6px 8px; } /* taste-skill-ignore */
.inventario ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.inventario button {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 8px; border-radius: 4px;
    appearance: none; background: transparent; border: 0; outline: 0; cursor: pointer;
    font: inherit; font-size: var(--t-s); color: var(--tenue-j); text-align: left; transition: background-color .15s;
}
.inventario button:hover, .inventario button:focus-visible { background: var(--caja-2); color: var(--texto-j); }
.inventario li.hecho button { color: var(--texto-j); }
.inventario .inventario-reinicio { justify-content: center; margin-top: 8px; color: var(--tenue-j); font-size: 13px; background: var(--caja-2); }

/* Minimapa siempre visible */
.minimapa {
    position: absolute; z-index: 2; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(max(14px, env(safe-area-inset-top, 0px)) + 62px);
    width: 200px; height: 138px; cursor: pointer; image-rendering: auto; padding: 0;
    border-color: color-mix(in srgb, var(--marco-2) 75%, transparent);
}
.juego.en-mapa .minimapa { display: none; }

/* Cartel del barrio al entrar en él */
.barrio-cartel {
    position: absolute; z-index: 1; left: 50%; top: calc(max(14px, env(safe-area-inset-top, 0px)) + 70px); translate: -50% 0;
    font-family: var(--pixel); font-size: clamp(1rem, .8rem + 1vw, 1.5rem); color: #ffd6f1; letter-spacing: .08em; text-transform: uppercase; /* taste-skill-ignore */
    text-shadow: 0 0 8px #ff2fb3, 0 0 22px #ff2fb3; /* taste-skill-ignore: rótulo de neón */
    white-space: nowrap; pointer-events: none; opacity: 0;
}
.barrio-cartel.visible { animation: cartel 3.2s ease both; }
@keyframes cartel { 0% { opacity: 0; transform: translateY(-8px); } 12%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.gemas-cuenta { font-family: var(--pixel); font-size: 13px; } /* taste-skill-ignore: marcador del juego */
.hud-botones { display: flex; align-items: center; gap: 10px; }
.hud-boton { height: 44px; padding: 0 14px; font-size: var(--t-s); font-weight: 600; transition: transform .15s, background-color .2s; }
.hud-boton:hover, .hud-paso:hover:not(:disabled) { background: var(--caja-2); }
.hud-boton:active, .hud-paso:active:not(:disabled), .hud-entrar:active, .boton-a:active { transform: scale(.94); }
.juego.en-mapa [data-j-mapa] { background: var(--marco); color: #05040a; } /* taste-skill-ignore */

.hud-niveles {
    position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 2;
    display: flex; align-items: center; gap: 10px; transform: translateX(-50%);
}
.hud-paso { display: grid; place-items: center; width: 52px; height: 56px; font-size: 18px; color: var(--marco); transition: transform .15s, opacity .2s, background-color .2s; }
.hud-paso:disabled { opacity: .35; cursor: default; }
.hud-entrar {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 16px;
    width: min(380px, calc(100vw - 180px)); height: 56px; padding: 0 6px 0 16px; text-align: left; transition: transform .15s;
}
.hud-nivel { grid-column: 1; font-family: var(--pixel); font-size: 12px; color: var(--marco); line-height: 1.1; } /* taste-skill-ignore: marcador del juego */
.hud-entrar strong { grid-column: 1; font-size: var(--t-b); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-accion {
    grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; min-width: 64px; height: 40px; padding: 0 14px;
    border-radius: 3px; background: var(--caja-2); font-family: var(--pixel); font-size: 13px; /* taste-skill-ignore */
}
.hud-entrar.listo .hud-accion { background: var(--marco-2); color: #fff; animation: latido 1.2s ease-in-out infinite; } /* taste-skill-ignore */
@keyframes latido { 50% { transform: scale(1.06); } }

.hud-ayuda {
    position: absolute; z-index: 2; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; height: 56px; padding: 0 14px; font-size: 13px; color: var(--tenue-j); /* taste-skill-ignore */
}
.hud-ayuda kbd {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; margin: 0 2px;
    border-radius: 3px; background: var(--marco); color: #05040a; font-family: var(--pixel); font-size: 11px; /* taste-skill-ignore */
}
@media (max-width: 1240px) { .hud-ayuda { display: none; } }

/* Mando y botón A (pantallas táctiles) */
.mando, .boton-a { display: none; }
.juego.tactil .mando, .juego.tactil .boton-a { display: grid; }
.juego.tactil .hud-ayuda { display: none; }
.mando {
    position: absolute; z-index: 2; left: max(18px, env(safe-area-inset-left, 0px)); bottom: max(22px, env(safe-area-inset-bottom, 0px));
    width: 124px; height: 124px; place-items: center; border-radius: 50%;
    background: rgba(9, 8, 18, .7); border: 2px solid var(--marco); /* taste-skill-ignore */
    touch-action: none;
}
.mando::before, .mando::after { content: ""; position: absolute; background: color-mix(in srgb, var(--marco) 30%, transparent); }
.mando::before { width: 70%; height: 4px; }
.mando::after { width: 4px; height: 70%; }
.mando-bola {
    position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%;
    background: var(--marco); border: 3px solid #05040a; transition: transform .12s;
}
.mando.activo .mando-bola { transition: none; background: #fff; } /* taste-skill-ignore */
.boton-a {
    position: absolute; z-index: 2; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(34px, env(safe-area-inset-bottom, 0px));
    width: 88px; height: 88px; place-items: center; align-content: center; gap: 0; border-radius: 50%; padding: 0;
    transition: transform .15s, background-color .2s;
}
.boton-a span { font-family: var(--pixel); font-size: 28px; line-height: 1; } /* taste-skill-ignore: botón del mando */
.boton-a small { font-size: 12px; color: var(--tenue-j); } /* taste-skill-ignore */
.boton-a.listo { background: var(--marco-2); animation: latido 1.2s ease-in-out infinite; }
.boton-a.listo small { color: #fff; } /* taste-skill-ignore */

@media (max-width: 899px) {
    .hud-marca > span:last-child { display: none; }
    .hud-marca { padding: 0 6px; }
    .hud-niveles { bottom: auto; top: calc(max(14px, env(safe-area-inset-top, 0px)) + 60px); }
    .hud-entrar { width: min(300px, calc(100vw - 160px)); height: 50px; }
    .hud-paso { width: 46px; height: 50px; }
    .minimapa { width: 150px; height: 104px; top: calc(max(14px, env(safe-area-inset-top, 0px)) + 124px); }
    .barrio-cartel { top: auto; bottom: calc(max(22px, env(safe-area-inset-bottom, 0px)) + 140px); }
}
@media (max-width: 520px) {
    .hud-arriba { gap: 8px; }
    .hud-marca { display: none; }
    .gemas-txt { display: none; }
    .hud-boton { padding: 0 10px; }
    .minimapa { width: 120px; height: 83px; }
    .hud-clasica [lang] { font-size: 0; }
    .hud-clasica [lang]::after { font-size: var(--t-s); }
    .hud-clasica [lang="es"]::after { content: "Clásica"; }
    .hud-clasica [lang="en"]::after { content: "Classic"; }
}

.mapa-aviso {
    position: absolute; z-index: 2; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
    display: none; padding: 12px 16px; font-size: var(--t-s); white-space: nowrap;
}
.juego.en-mapa .mapa-aviso { display: block; }
.juego.en-mapa .hud-niveles, .juego.en-mapa .mando, .juego.en-mapa .boton-a, .juego.en-mapa .hud-ayuda, .juego.en-mapa .hada-globo, .juego.en-mapa .barrio-cartel { display: none; }

/* Bocadillo de aRDi */
.hada-globo {
    position: absolute; left: 0; top: 0; z-index: 1; width: max-content; max-width: min(300px, 70vw);
    padding: 10px 14px 12px; margin: 0; pointer-events: auto; cursor: pointer;
    translate: -50% 18px;
    opacity: 0; scale: .9; transition: opacity .2s, scale .2s;
    visibility: hidden;
}
.hada-globo.visible { opacity: 1; scale: 1; visibility: visible; }
.hada-globo::after {
    content: ""; position: absolute; left: 50%; top: -11px; width: 14px; height: 9px; translate: -50% 0;
    background: var(--marco); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.hada-globo.arriba { translate: -50% calc(-100% - 18px); }
.hada-globo.arriba::after { top: auto; bottom: -11px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.hada-nombre { font-family: var(--pixel); font-size: 12px; color: var(--marco); line-height: 1.2; } /* taste-skill-ignore: nombre del dron */
.hada-texto { font-size: 15px; line-height: 1.4; min-height: 1.4em; }

/* En el móvil se juega en horizontal */
.girar {
    position: absolute; inset: 0; z-index: 3; display: none; place-content: center; justify-items: center; gap: 14px; text-align: center;
    padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
    background: rgba(5, 4, 10, .9); color: var(--marco); /* taste-skill-ignore */
}
.girar svg { animation: girar 2.4s ease-in-out infinite; }
@keyframes girar { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
.girar-titulo { font-family: var(--pixel); font-size: 1.25rem; color: #ffd6f1; text-shadow: 0 0 10px #ff2fb3; } /* taste-skill-ignore: rótulo de neón */
.girar-texto { color: var(--tenue-j); }
.girar .opcion { margin-top: 10px; text-align: center; }
@media (orientation: portrait) and (pointer: coarse) {
    .juego.tactil .girar { display: grid; }
}
/* Móvil en horizontal: HUD mínimo. Arriba, gemas a la izquierda y Mapa + menú a la
   derecha; abajo, el mando y el botón A. El nombre del edificio solo aparece junto a su puerta. */
.hud-menu { display: none; }
.hud-sitio { display: none; }
.juego.movil .hud-sitio {
    display: block; order: 2; margin-right: auto; align-self: center; pointer-events: none;
    font-family: var(--pixel); font-size: 11px; color: #ffd6f1; text-transform: uppercase; letter-spacing: .06em; /* taste-skill-ignore */
    text-shadow: 0 0 8px #ff2fb3; white-space: nowrap; /* taste-skill-ignore: rótulo de neón */
}
.juego.movil .hud-gemas-caja { order: 1; margin-right: 0; }
.juego.movil .hud-botones { order: 3; }
.juego.movil .hud-arriba { padding-top: max(10px, env(safe-area-inset-top, 0px)); gap: 8px; }
.juego.movil .hud-marca, .juego.movil .minimapa, .juego.movil .barrio-cartel, .juego.movil .gemas-txt, .juego.movil .hud-paso { display: none; }
.juego.movil .hud-gemas, .juego.movil .hud-boton { height: 40px; }
.juego.movil .hud-menu { display: grid; place-items: center; width: 40px; padding: 0; }
.juego.movil .hud-botones { gap: 8px; }
.juego.movil .hud-botones [data-j-idioma], .juego.movil .hud-botones .hud-clasica { display: none; }
.juego.movil .hud-botones.abierto [data-j-idioma], .juego.movil .hud-botones.abierto .hud-clasica { display: block; }
.juego.movil.menu-abierto .hada-globo { visibility: hidden; }
.juego.movil .hud-clasica [lang] { font-size: 0; }
.juego.movil .hud-clasica [lang]::after { font-size: var(--t-s); }
.juego.movil .hud-clasica [lang="es"]::after { content: "Clásica"; }
.juego.movil .hud-clasica [lang="en"]::after { content: "Classic"; }
.juego.movil .hud-entrar { width: auto; min-width: 200px; max-width: calc(100vw - 340px); }
.juego.movil .hud-botones.abierto .hud-menu { background: var(--marco); color: #05040a; } /* taste-skill-ignore */
.juego.movil .hud-niveles { display: flex; top: auto; bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
.juego.movil .hud-entrar { width: min(320px, calc(100vw - 380px)); height: 52px; }
.juego.movil .hud-nivel { font-size: 10px; } /* taste-skill-ignore */
.juego.movil .hud-entrar strong { font-size: var(--t-s); }
.juego.movil .hud-accion { height: 38px; }
/* Mando grande y algo más arriba, donde cae el pulgar */
.juego.movil .mando { width: 140px; height: 140px; left: max(20px, env(safe-area-inset-left, 0px)); bottom: max(34px, env(safe-area-inset-bottom, 0px)); background: rgba(9, 8, 18, .5); } /* taste-skill-ignore */
.juego.movil .mando-bola { width: 58px; height: 58px; }
.juego.movil .boton-a { width: 92px; height: 92px; right: max(24px, env(safe-area-inset-right, 0px)); bottom: max(46px, env(safe-area-inset-bottom, 0px)); }
.juego.movil .boton-a span { font-size: 26px; } /* taste-skill-ignore */
.juego.movil .boton-a small { font-size: 13px; font-weight: 600; } /* taste-skill-ignore */
/* aRDi habla arriba, en el centro, sin tapar al personaje */
.juego.movil .hada-globo {
    left: 50%; top: max(10px, env(safe-area-inset-top, 0px)); translate: -50% 0;
    max-width: min(400px, calc(100vw - 340px)); padding: 7px 12px 8px;
}
.juego.movil .hada-globo::after { display: none; }
.juego.movil .hada-texto { font-size: 13px; line-height: 1.35; } /* taste-skill-ignore */
.juego.movil .hada-nombre { font-size: 10px; } /* taste-skill-ignore */
.juego.movil .mapa-aviso { top: calc(max(10px, env(safe-area-inset-top, 0px)) + 48px); bottom: auto; padding: 6px 12px; font-size: 13px; } /* taste-skill-ignore */
.juego.movil .mapa-aviso, .juego.movil.en-mapa .mapa-aviso { display: none; }
.juego.movil.hablando:not(.en-mapa) .hud-sitio { visibility: hidden; }
.juego.movil .hud { z-index: 3; }
.juego.movil.en-mapa .hud-niveles { display: none; }
@media (max-height: 500px) and (orientation: landscape) {
    .titulo-caja { gap: 10px; }
    .titulo-caja h2 { font-size: 2.2rem; }
    .titulo-opciones { grid-template-columns: 1fr 1fr; }
    .opcion { padding: 12px 16px; }
}

/* Pantalla de entrada: juego o clásica */
.juego-titulo {
    position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
    background: rgba(5, 4, 10, .72); /* taste-skill-ignore */
    transition: opacity .35s var(--curva);
}
.juego-titulo.fuera { opacity: 0; }
.juego-titulo[hidden] { display: none; }
.titulo-caja {
    display: grid; gap: 18px; justify-items: center; text-align: center; max-width: 760px;
    animation: entra-titulo .6s var(--curva) both;
}
@keyframes entra-titulo { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.titulo-pixel { font-family: var(--pixel); font-size: var(--t-s); color: var(--marco); letter-spacing: .06em; } /* taste-skill-ignore */
.titulo-caja h2 {
    font-family: var(--pixel); font-weight: 400; font-size: clamp(2.4rem, 1rem + 6vw, 5.5rem); line-height: 1; letter-spacing: -0.02em;
    color: #fff0fa; text-shadow: 0 0 10px #ff2fb3, 0 0 34px #ff2fb3; /* taste-skill-ignore: rótulo de neón */
}
.titulo-lead { font-size: var(--t-l); color: var(--texto-j); max-width: 42ch; }
.titulo-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; width: 100%; margin-top: 6px; }
.opcion {
    display: grid; gap: 6px; padding: 20px 22px; text-align: left; cursor: pointer;
    background: var(--caja); color: var(--texto-j); border: 2px solid #3a3560; border-radius: 4px; /* taste-skill-ignore */
    transition: transform .15s, border-color .2s, background-color .2s;
}
.opcion strong { font-size: var(--t-l); }
.opcion small { font-size: var(--t-s); color: var(--tenue-j); }
.opcion:hover, .opcion:focus-visible { border-color: var(--marco); background: var(--caja-2); }
.opcion:active { transform: scale(.97); }
.opcion-juego { border-color: var(--marco); }
.opcion-juego strong { color: var(--marco); }
.titulo-ayuda { font-family: var(--pixel); font-size: 13px; color: var(--tenue-j); animation: parpadeo 1.2s steps(2) infinite; } /* taste-skill-ignore */
@keyframes parpadeo { 50% { opacity: .35; } }
@media (pointer: coarse) { .titulo-ayuda { display: none; } }

/* Panel de nivel */
.juego-panel {
    position: absolute; inset: 0; z-index: 4; display: grid; place-items: end center;
    background: rgba(5, 4, 10, .6); /* taste-skill-ignore */
    opacity: 0; transition: opacity .25s var(--curva); touch-action: auto; user-select: text;
}
.juego-panel.abierto { opacity: 1; }
.juego-panel[hidden] { display: none; }
@media (min-width: 900px) { .juego-panel { place-items: center; padding: 28px; } }
.panel-caja {
    width: 100%; max-width: 1180px; max-height: calc(100% - 12px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg); color: var(--ink);
    border: 2px solid var(--marco); border-radius: 6px 6px 0 0;
    transform: translateY(40px); transition: transform .35s var(--curva);
}
@media (min-width: 900px) { .panel-caja { max-height: calc(100vh - 56px); border-radius: 8px; } }
.juego-panel.abierto .panel-caja { transform: none; }
.panel-cabeza {
    position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px clamp(16px, 3vw, 32px); background: var(--surface);
}
.panel-num { font-family: var(--pixel); font-size: 13px; color: var(--acento-texto); }
.panel-cabeza h2 { font-size: var(--t-h); outline: none; }
.panel-cerrar {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; flex: none;
    border: 0; border-radius: 6px; background: var(--surface-2); font-size: var(--t-s); font-weight: 600;
}
.panel-cerrar:hover { background: var(--line-strong); }
.panel-cuerpo { display: grid; gap: 16px; padding: 20px clamp(16px, 3vw, 32px) 24px; }
.panel-cuerpo > .portada-texto h1 { font-size: clamp(2.5rem, 1.2rem + 5vw, 5rem); }
.panel-cuerpo .chat { padding: clamp(16px, 3vw, 36px); }
.panel-pie {
    position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px;
    padding: 14px clamp(16px, 3vw, 32px) max(14px, env(safe-area-inset-bottom, 0px)); background: var(--surface);
}
.panel-pie .boton[hidden] { display: none; }
.panel-pie .boton:last-child { margin-left: auto; }
@media (max-width: 599px) {
    .panel-cerrar > span { display: none; }
    .panel-cerrar { width: 44px; padding: 0; justify-content: center; }
    .panel-pie .boton { flex: 1; }
    .sig-nombre { display: none; }
}

/* Panel en el móvil (horizontal): una barra fina arriba (cerrar, nivel y título, anterior
   y siguiente) y el contenido a todo lo ancho, con su propio scroll. */
.juego.movil .juego-panel { place-items: stretch; padding: 0; }
.juego.movil .panel-caja {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr);
    max-width: none; max-height: none; height: 100%; overflow: hidden; border: 0; border-radius: 0;
}
.juego.movil .panel-cabeza {
    grid-column: 1; grid-row: 1; position: static; justify-content: flex-start; gap: 12px;
    padding: max(6px, env(safe-area-inset-top, 0px)) 8px 6px max(12px, env(safe-area-inset-left, 0px));
    border-bottom: 2px solid var(--marco);
}
.juego.movil .panel-cabeza > div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.juego.movil .panel-num { font-size: 10px; white-space: nowrap; } /* taste-skill-ignore */
.juego.movil .panel-cabeza h2 { font-size: 1.05rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.juego.movil .panel-cerrar { order: -1; width: 40px; height: 40px; padding: 0; justify-content: center; }
.juego.movil .panel-cerrar > span { display: none; }
.juego.movil .panel-pie {
    grid-column: 2; grid-row: 1; position: static; align-items: center; gap: 6px;
    padding: max(6px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 6px 0;
    border-bottom: 2px solid var(--marco);
}
.juego.movil .panel-pie .boton { min-height: 40px; height: 40px; padding: 0 14px; margin-left: 0; font-size: var(--t-s); flex: none; }
.juego.movil .panel-pie [data-j-panel-paso="-1"] > span[lang] { display: none; }
.juego.movil .panel-pie .sig-nombre { display: inline; }
.juego.movil .panel-cuerpo {
    grid-column: 1 / -1; grid-row: 2; display: block; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch;
    padding: 14px max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    zoom: .9;
}
.juego.movil .panel-cuerpo > .portada-texto h1 { font-size: 2.6rem; }
.juego.movil .panel-cuerpo > * + * { margin-top: 16px; }
.juego.movil .panel-cuerpo [class*="carrusel"], .juego.movil .panel-cuerpo [class*="capturas"] { touch-action: pan-x pan-y; }

/* Empresas: todos los proyectos */
.mision-cabeza { display: grid; gap: 6px; max-width: 70ch; }
.mision-rol { font-size: var(--t-l); font-weight: 600; }
.mision-fechas { color: var(--muted); font-size: var(--t-s); }
.mision-intro { font-size: var(--t-b); line-height: 1.6; margin-top: 6px; }
.misiones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; margin-top: 8px; }
.mision { display: grid; align-content: start; gap: 10px; padding: 22px; border-radius: 10px; background: var(--surface); }
.mision-grande { grid-column: 1 / -1; background: var(--acento-suave); }
.mision-cliente { font-family: var(--pixel); font-size: 13px; color: var(--acento-texto); }
.mision h3 { font-size: var(--t-l); letter-spacing: -0.015em; line-height: 1.25; }
.mision-texto { line-height: 1.6; }
.mision-grande .mision-texto { max-width: 75ch; }
.mision-puntos { display: grid; gap: 8px; padding-left: 0; list-style: none; }
.mision-puntos li { position: relative; padding-left: 18px; line-height: 1.55; }
.mision-puntos li::before {
    content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 9px; background: var(--acento);
    clip-path: polygon(50% 0, 100% 35%, 100% 65%, 50% 100%, 0 65%, 0 35%);
}
.mision-grande .mision-puntos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); column-gap: 24px; }
.mision .pila { margin-top: 4px; }

/* Botón para volver al modo juego desde la versión clásica */
.ajuste[data-modo-juego] { width: auto; }

@media (prefers-reduced-motion: reduce) {
    .juego *, .juego *::before { animation: none !important; transition: none !important; }
}
