/* =========================================================
   BAÍA DO RETORNO — 8–9 ANOS — ROTA NORMAL
   Ajustes visuais específicos da faixa 8–9
========================================================= */

/* =========================================================
   1. PALCO / ÁREA VISUAL
========================================================= */

#palco-objetos.palco-padrao[data-exercicio-codigo="trilha_volta"],
#palco-objetos.palco-padrao[data-exercicio-codigo="pedras_numeradas"],
#palco-objetos.palco-padrao[data-exercicio-codigo="sacos_areia"],
#palco-objetos.palco-padrao[data-exercicio-codigo="retorno_duas_paradas"],
#palco-objetos.palco-padrao[data-exercicio-codigo="lanternas_baia"] {
    width: 100% !important;
    min-height: auto !important;

    margin: 4px auto 8px !important;
    padding: 0 !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

#palco-objetos[data-exercicio-codigo="trilha_volta"] .area-visual-tarefa,
#palco-objetos[data-exercicio-codigo="pedras_numeradas"] .area-visual-tarefa,
#palco-objetos[data-exercicio-codigo="sacos_areia"] .area-visual-tarefa,
#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"] .area-visual-tarefa,
#palco-objetos[data-exercicio-codigo="lanternas_baia"] .area-visual-tarefa {
    width: min(100%, 390px) !important;
    max-width: 390px !important;
    min-height: auto !important;

    margin: 2px auto 8px !important;
    padding: 0 !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

#palco-objetos[data-exercicio-codigo="trilha_volta"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="pedras_numeradas"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="sacos_areia"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="lanternas_baia"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="trilha_volta"] .area-visual-tarefa::after,
#palco-objetos[data-exercicio-codigo="pedras_numeradas"] .area-visual-tarefa::after,
#palco-objetos[data-exercicio-codigo="sacos_areia"] .area-visual-tarefa::after,
#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"] .area-visual-tarefa::after,
#palco-objetos[data-exercicio-codigo="lanternas_baia"] .area-visual-tarefa::after {
    display: none !important;
    content: none !important;
}

#palco-objetos[data-exercicio-codigo="trilha_volta"] .img-visual-tarefa,
#palco-objetos[data-exercicio-codigo="pedras_numeradas"] .img-visual-tarefa,
#palco-objetos[data-exercicio-codigo="sacos_areia"] .img-visual-tarefa,
#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"] .img-visual-tarefa,
#palco-objetos[data-exercicio-codigo="lanternas_baia"] .img-visual-tarefa {
    width: 100% !important;
    max-width: 385px !important;
    max-height: 285px !important;
    height: auto !important;

    display: block !important;
    margin: 0 auto !important;

    object-fit: contain !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 18px !important;
}

/* =========================================================
   2. BOTÕES — OPÇÕES CURTAS
========================================================= */

#tela-jogo:has(#palco-objetos[data-exercicio-codigo="trilha_volta"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="pedras_numeradas"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="sacos_areia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="lanternas_baia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas {
    width: min(320px, 86vw) !important;
    max-width: 320px !important;

    margin: 8px auto 14px !important;

    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 14px !important;

    justify-content: center !important;
    align-items: center !important;
}

#tela-jogo:has(#palco-objetos[data-exercicio-codigo="trilha_volta"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="pedras_numeradas"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="sacos_areia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="lanternas_baia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero {
    width: 100% !important;
    min-width: 0 !important;

    height: 52px !important;
    min-height: 52px !important;

    padding: 0 10px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 14px !important;

    font-size: 1rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
}

/* =========================================================
   3. AJUSTE FINO DO ENUNCIADO / OPERAÇÃO
========================================================= */

#tela-jogo:has(#palco-objetos[data-exercicio-codigo="trilha_volta"]) #instrucao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="pedras_numeradas"]) #instrucao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="sacos_areia"]) #instrucao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"]) #instrucao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="lanternas_baia"]) #instrucao {
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
}

#tela-jogo:has(#palco-objetos[data-exercicio-codigo="trilha_volta"]) #display-operacao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="pedras_numeradas"]) #display-operacao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="sacos_areia"]) #display-operacao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"]) #display-operacao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="lanternas_baia"]) #display-operacao {
    margin: 2px auto 6px !important;
}

/* =========================================================
   4. AJUSTE FINO MOBILE
========================================================= */

@media (max-width: 380px) {

    #palco-objetos[data-exercicio-codigo="trilha_volta"] .img-visual-tarefa,
    #palco-objetos[data-exercicio-codigo="pedras_numeradas"] .img-visual-tarefa,
    #palco-objetos[data-exercicio-codigo="sacos_areia"] .img-visual-tarefa,
    #palco-objetos[data-exercicio-codigo="retorno_duas_paradas"] .img-visual-tarefa,
    #palco-objetos[data-exercicio-codigo="lanternas_baia"] .img-visual-tarefa {
        max-width: 100% !important;
        max-height: 260px !important;
    }

    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="trilha_volta"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="pedras_numeradas"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="sacos_areia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="lanternas_baia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas {
        width: min(300px, 84vw) !important;
        gap: 8px 12px !important;
    }

    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="trilha_volta"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="pedras_numeradas"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="sacos_areia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="retorno_duas_paradas"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="lanternas_baia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero {
        height: 50px !important;
        min-height: 50px !important;
        font-size: 0.95rem !important;
    }
}

/* =========================================================
   BAÍA DO RETORNO — 8–9 ANOS — ROTA DESAFIO
   Ajustes visuais específicos da faixa 8–9
========================================================= */

/* =========================================================
   1. PALCO / ÁREA VISUAL
========================================================= */

#palco-objetos.palco-padrao[data-exercicio-codigo="mapa_volta"],
#palco-objetos.palco-padrao[data-exercicio-codigo="pegadas_mare"],
#palco-objetos.palco-padrao[data-exercicio-codigo="barris_emergencia"],
#palco-objetos.palco-padrao[data-exercicio-codigo="volta_carrinho_carga"],
#palco-objetos.palco-padrao[data-exercicio-codigo="sinal_retorno"] {
    width: 100% !important;
    min-height: auto !important;

    margin: 4px auto 8px !important;
    padding: 0 !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

#palco-objetos[data-exercicio-codigo="mapa_volta"] .area-visual-tarefa,
#palco-objetos[data-exercicio-codigo="pegadas_mare"] .area-visual-tarefa,
#palco-objetos[data-exercicio-codigo="barris_emergencia"] .area-visual-tarefa,
#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"] .area-visual-tarefa,
#palco-objetos[data-exercicio-codigo="sinal_retorno"] .area-visual-tarefa {
    width: min(100%, 390px) !important;
    max-width: 390px !important;
    min-height: auto !important;

    margin: 2px auto 8px !important;
    padding: 0 !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

#palco-objetos[data-exercicio-codigo="mapa_volta"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="pegadas_mare"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="barris_emergencia"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="sinal_retorno"] .area-visual-tarefa::before,
#palco-objetos[data-exercicio-codigo="mapa_volta"] .area-visual-tarefa::after,
#palco-objetos[data-exercicio-codigo="pegadas_mare"] .area-visual-tarefa::after,
#palco-objetos[data-exercicio-codigo="barris_emergencia"] .area-visual-tarefa::after,
#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"] .area-visual-tarefa::after,
#palco-objetos[data-exercicio-codigo="sinal_retorno"] .area-visual-tarefa::after {
    display: none !important;
    content: none !important;
}

#palco-objetos[data-exercicio-codigo="mapa_volta"] .img-visual-tarefa,
#palco-objetos[data-exercicio-codigo="pegadas_mare"] .img-visual-tarefa,
#palco-objetos[data-exercicio-codigo="barris_emergencia"] .img-visual-tarefa,
#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"] .img-visual-tarefa,
#palco-objetos[data-exercicio-codigo="sinal_retorno"] .img-visual-tarefa {
    width: 100% !important;
    max-width: 385px !important;
    max-height: 285px !important;
    height: auto !important;

    display: block !important;
    margin: 0 auto !important;

    object-fit: contain !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 18px !important;
}

/* =========================================================
   2. BOTÕES — OPÇÕES CURTAS
========================================================= */

#tela-jogo:has(#palco-objetos[data-exercicio-codigo="mapa_volta"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="pegadas_mare"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="barris_emergencia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="sinal_retorno"]) #teclado-numerico.opcoes-resposta.opcoes-curtas {
    width: min(320px, 86vw) !important;
    max-width: 320px !important;

    margin: 8px auto 14px !important;

    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 14px !important;

    justify-content: center !important;
    align-items: center !important;
}

#tela-jogo:has(#palco-objetos[data-exercicio-codigo="mapa_volta"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="pegadas_mare"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="barris_emergencia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="sinal_retorno"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero {
    width: 100% !important;
    min-width: 0 !important;

    height: 52px !important;
    min-height: 52px !important;

    padding: 0 10px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 14px !important;

    font-size: 1rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
}

/* =========================================================
   3. AJUSTE FINO DO ENUNCIADO / OPERAÇÃO
========================================================= */

#tela-jogo:has(#palco-objetos[data-exercicio-codigo="mapa_volta"]) #instrucao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="pegadas_mare"]) #instrucao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="barris_emergencia"]) #instrucao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"]) #instrucao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="sinal_retorno"]) #instrucao {
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
}

#tela-jogo:has(#palco-objetos[data-exercicio-codigo="mapa_volta"]) #display-operacao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="pegadas_mare"]) #display-operacao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="barris_emergencia"]) #display-operacao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"]) #display-operacao,
#tela-jogo:has(#palco-objetos[data-exercicio-codigo="sinal_retorno"]) #display-operacao {
    margin: 2px auto 6px !important;
}

/* =========================================================
   4. AJUSTE FINO MOBILE
========================================================= */

@media (max-width: 380px) {

    #palco-objetos[data-exercicio-codigo="mapa_volta"] .img-visual-tarefa,
    #palco-objetos[data-exercicio-codigo="pegadas_mare"] .img-visual-tarefa,
    #palco-objetos[data-exercicio-codigo="barris_emergencia"] .img-visual-tarefa,
    #palco-objetos[data-exercicio-codigo="volta_carrinho_carga"] .img-visual-tarefa,
    #palco-objetos[data-exercicio-codigo="sinal_retorno"] .img-visual-tarefa {
        max-width: 100% !important;
        max-height: 260px !important;
    }

    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="mapa_volta"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="pegadas_mare"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="barris_emergencia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"]) #teclado-numerico.opcoes-resposta.opcoes-curtas,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="sinal_retorno"]) #teclado-numerico.opcoes-resposta.opcoes-curtas {
        width: min(300px, 84vw) !important;
        gap: 8px 12px !important;
    }

    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="mapa_volta"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="pegadas_mare"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="barris_emergencia"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="volta_carrinho_carga"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero,
    #tela-jogo:has(#palco-objetos[data-exercicio-codigo="sinal_retorno"]) #teclado-numerico.opcoes-resposta.opcoes-curtas .btn-numero {
        height: 50px !important;
        min-height: 50px !important;
        font-size: 0.95rem !important;
    }
}