{"id":533,"date":"2026-01-14T21:52:18","date_gmt":"2026-01-14T21:52:18","guid":{"rendered":"https:\/\/plentylearning.com\/espanol\/?page_id=533"},"modified":"2026-01-15T02:24:49","modified_gmt":"2026-01-15T02:24:49","slug":"common-spanish-expressions","status":"publish","type":"page","link":"https:\/\/plentylearning.com\/espanol\/common-spanish-expressions\/","title":{"rendered":"Common Spanish Expressions"},"content":{"rendered":"\n<div id=\"quiz-app-container\">\n<style>\n  \/* CONFIGURACI\u00d3N VISUAL *\/\n  #quiz-app-container { \n    --ink:#111827; \n    --muted:#6b7280; \n    --line:#e5e7eb; \n    --accent:#2563eb; \n    font-family: system-ui, -apple-system, sans-serif; \n    background:#f8fafc; \n    padding:20px; \n    border-radius:16px; \n    border:1px solid #e5e7eb; \n    max-width: 700px; \n    margin: 20px auto; \n  }\n  .top-stats { display: flex; justify-content: space-between; margin-bottom: 15px; font-weight: bold; }\n  .quiz-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }\n  .prog-bar { background: #eee; height: 12px; border-radius: 6px; margin: 15px 0; overflow: hidden; }\n  #bar-fill { background: var(--accent); height: 100%; width: 0%; transition: width 0.4s; }\n  \n  \/* Letras de alternativas en NEGRO *\/\n  .opt-btn { \n    display: block; width: 100%; padding: 14px; margin: 10px 0; \n    border: 2px solid var(--line); border-radius: 10px; cursor: pointer; \n    text-align: left; background: white; font-size: 16px;\n    color: #000000 !important; font-weight: 600; transition: all 0.2s;\n  }\n  .opt-btn:not(:disabled):hover { border-color: var(--accent); background: #f0f7ff; }\n  .opt-btn:disabled { cursor: default; opacity: 0.8; }\n  \n  .fb-box { display: none; padding: 15px; border-radius: 10px; margin-top: 20px; border: 1px solid #ddd; }\n  .btn-main { background: var(--accent); color: white; border: none; padding: 12px 25px; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 16px; width: 100%; }\n  .hidden { display: none; }\n<\/style>\n\n<div class=\"top-stats\">\n    <span>Nivel: <strong id=\"lvl-txt\" style=\"color:var(--accent);\">Basic<\/strong><\/span>\n    <span>Aciertos: <strong id=\"score-txt\">0<\/strong><\/span>\n<\/div>\n\n<div class=\"quiz-card\">\n    <div class=\"prog-bar\"><div id=\"bar-fill\"><\/div><\/div>\n    \n    <div id=\"setup-area\" style=\"text-align:center;\">\n        <p>\u00bfListo para practicar expresiones diarias?<\/p>\n        <button class=\"btn-main\" onclick=\"startQuiz()\">Comenzar Cuestionario<\/button>\n    <\/div>\n\n    <div id=\"quiz-area\" class=\"hidden\">\n        <p id=\"q-prompt\" style=\"color:var(--muted); font-size:14px; margin-bottom:5px;\">\u00bfCu\u00e1l es la traducci\u00f3n correcta?<\/p>\n        <h2 id=\"q-expr\" style=\"margin-top:0; color:var(--ink);\">&#8230;<\/h2>\n        <div id=\"options-list\"><\/div>\n        \n        <div id=\"fb-area\" class=\"fb-box\">\n            <p id=\"fb-text\" style=\"color: #000; margin-bottom: 15px;\"><\/p>\n            <button class=\"btn-main\" onclick=\"nextQuestion()\">Siguiente Pregunta \u2192<\/button>\n        <\/div>\n    <\/div>\n<\/div>\n\n<script>\n\/\/ Base de datos de ejemplo (corregida para aceptar \"You're welcome\")\nconst quizData = [\n    { q: \"\u00a1Hola! \u00bfC\u00f3mo est\u00e1s?\", a: \"Hi! How are you?\", opts: [\"Hi! How are you?\", \"Good morning\", \"See you soon\"], why: \"Es el saludo m\u00e1s com\u00fan para preguntar c\u00f3mo se encuentra alguien.\" },\n    { q: \"Mucho gusto\", a: \"Nice to meet you\", opts: [\"I am hungry\", \"Nice to meet you\", \"Excuse me\"], why: \"'Mucho gusto' se utiliza formal e informalmente al conocer a alguien.\" },\n    { q: \"De nada\", a: \"You are welcome\", opts: [\"Please\", \"Sorry\", \"You are welcome\"], why:\"Es la respuesta cort\u00e9s tras recibir un 'Gracias'. La opci\u00f3n correcta es 'You're welcome'.\" },\n    { q: \"\u00a1Buen provecho!\", a: \"Enjoy your meal!\", opts: [\"Good luck!\", \"Enjoy your meal!\", \"Have a nice trip!\"], why: \"Se dice antes de empezar a comer.\" }\n];\n\nlet currentQ = 0;\nlet score = 0;\n\nfunction startQuiz() {\n    document.getElementById('setup-area').classList.add('hidden');\n    document.getElementById('quiz-area').classList.remove('hidden');\n    showQuestion();\n}\n\nfunction showQuestion() {\n    let q = quizData[currentQ];\n    document.getElementById('q-expr').innerText = q.q;\n    document.getElementById('fb-area').style.display = 'none';\n    \n    let optsHtml = '';\n    \/\/ Mezclar opciones para que no siempre la primera sea la correcta\n    let shuffledOpts = [...q.opts].sort(() => Math.random() - 0.5);\n    \n    shuffledOpts.forEach(opt => {\n        optsHtml += `<button class=\"opt-btn\" onclick=\"checkAns('${opt}')\">${opt}<\/button>`;\n    });\n    document.getElementById('options-list').innerHTML = optsHtml;\n    updateBar();\n}\n\nfunction checkAns(selected) {\n    let q = quizData[currentQ];\n    let isCorrect = selected === q.a;\n    \n    \/\/ Deshabilitar botones para evitar m\u00faltiples clics\n    const buttons = document.querySelectorAll('.opt-btn');\n    buttons.forEach(b => b.disabled = true);\n\n    if(isCorrect) {\n        score++;\n    }\n    \n    document.getElementById('score-txt').innerText = score;\n    let fb = document.getElementById('fb-area');\n    fb.style.display = 'block';\n    fb.style.background = isCorrect ? '#e8f5e9' : '#ffebee';\n    fb.style.borderColor = isCorrect ? '#4caf50' : '#f44336';\n    \n    document.getElementById('fb-text').innerHTML = `<strong>${isCorrect ? '\u2705 \u00a1Correcto!' : '\u274c Incorrecto'}<\/strong><br><span style=\"font-size:14px;\">${q.why}<\/span>`;\n}\n\nfunction nextQuestion() {\n    currentQ++;\n    if(currentQ < quizData.length) {\n        showQuestion();\n    } else {\n        document.getElementById('quiz-area').innerHTML = `\n            <div style=\"text-align:center; padding:20px;\">\n                <h2>\u00a1Completado!<\/h2>\n                <p style=\"font-size:24px;\">Puntuaci\u00f3n: <strong>${score} \/ ${quizData.length}<\/strong><\/p>\n                <button class=\"btn-main\" onclick=\"location.reload()\">Repetir<\/button>\n            <\/div>\n        `;\n    }\n}\n\nfunction updateBar() {\n    let perc = (currentQ \/ quizData.length) * 100;\n    document.getElementById('bar-fill').style.width = perc + \"%\";\n}\n<\/script>\n<\/div>\n\n\n\n<div id=\"pl-quiz-container-intermedio\">\n<style>\n  #pl-quiz-container-intermedio { \n    --ink:#111827; --muted:#6b7280; --line:#e5e7eb; --accent:#16a34a; \n    font-family: system-ui, -apple-system, sans-serif; \n    background:#f8fafc; padding:20px; border-radius:16px; border:1px solid #e5e7eb; \n    max-width: 700px; margin: 20px auto; color: var(--ink);\n  }\n  .pl-stats { display: flex; justify-content: space-between; margin-bottom: 15px; font-weight: bold; }\n  .pl-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }\n  .pl-prog-bar { background: #eee; height: 12px; border-radius: 6px; margin: 15px 0; overflow: hidden; }\n  #pl-bar-fill { background: var(--accent); height: 100%; width: 0%; transition: width 0.4s; }\n  \n  \/* Alternativas con letras en negro garantizado *\/\n  .pl-opt-btn { \n    display: block; width: 100%; padding: 14px; margin: 10px 0; \n    border: 2px solid var(--line); border-radius: 10px; cursor: pointer; \n    text-align: left; background: white; font-size: 16px;\n    color: #000000 !important; font-weight: 600; transition: all 0.2s;\n  }\n  .pl-opt-btn:not(:disabled):hover { border-color: var(--accent); background: #f0fdf4; }\n  .pl-opt-btn:disabled { cursor: default; opacity: 0.8; }\n  \n  .pl-fb-box { display: none; padding: 15px; border-radius: 10px; margin-top: 20px; border: 1px solid #ddd; }\n  .pl-btn-main { background: var(--accent); color: white; border: none; padding: 12px 25px; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 16px; width: 100%; }\n  .hidden { display: none; }\n<\/style>\n\n<div class=\"pl-stats\">\n    <span>Nivel: <strong style=\"color:var(--accent)\">Intermediate<\/strong><\/span>\n    <span>Aciertos: <strong id=\"pl-score-txt\">0<\/strong><\/span>\n<\/div>\n\n<div class=\"pl-card\">\n    <div class=\"pl-prog-bar\"><div id=\"pl-bar-fill\"><\/div><\/div>\n    \n    <div id=\"pl-setup-area\" style=\"text-align:center;\">\n        <p>\u00bfListo para practicar expresiones de nivel intermedio?<\/p>\n        <button class=\"pl-btn-main\" onclick=\"plStartQuiz()\">Comenzar Cuestionario<\/button>\n    <\/div>\n\n    <div id=\"pl-quiz-area\" class=\"hidden\">\n        <p style=\"color:var(--muted); font-size:14px; margin-bottom:5px;\">\u00bfCu\u00e1l es el significado correcto?<\/p>\n        <h2 id=\"pl-q-expr\" style=\"margin-top:0; color:var(--ink); font-size: 28px;\">&#8230;<\/h2>\n        <div id=\"pl-options-list\"><\/div>\n        \n        <div id=\"pl-fb-area\" class=\"pl-fb-box\">\n            <p id=\"pl-fb-text\" style=\"color: #000; margin-bottom: 15px;\"><\/p>\n            <button class=\"pl-btn-main\" style=\"background:#111827\" onclick=\"plNextQuestion()\">Siguiente Pregunta \u2192<\/button>\n        <\/div>\n    <\/div>\n<\/div>\n\n<script>\nconst plQuizData = [\n    { q: \"Echar una mano\", a: \"To lend a hand\", opts: [\"To throw a hand\", \"To lend a hand\", \"To hit someone\"], why: \"Significa ayudar a alguien de manera informal.\" },\n    { q: \"Me da igual\", a: \"I do not mind\", opts: [\"I am equal\", \"I do not mind\", \"It is bad\"], why: \"Se usa para expresar indiferencia.\" },\n    { q: \"\u00a1No pasa nada!\", a: \"No problem \/ It is okay\", opts: [\"Nothing happens\", \"No problem \/ It is okay\", \"Go away\"], why: \"Se usa para quitar importancia a un error o problema.\" },\n    { q: \"Por si acaso\", a: \"Just in case\", opts: [\"Almost\", \"Just in case\", \"Never\"], why: \"Expresa precauci\u00f3n ante algo que podr\u00eda pasar.\" },\n    { q: \"Estar hecho un l\u00edo\", a: \"To be confused\", opts: [\"To be confused\", \"To be tidy\", \"To be angry\"], why: \"Se usa cuando alguien no entiende algo o tiene muchas cosas en la cabeza.\" },\n    { q: \"Poco a poco\", a: \"Little by little\", opts: [\"Small and small\", \"Very fast\", \"Little by little\"], why: \"Indica progreso gradual.\" },\n    { q: \"A la larga\", a: \"In the long run\", opts: [\"Very long\", \"In the long run\", \"Sometimes\"], why: \"Se refiere a las consecuencias futuras de algo.\" },\n    { q: \"Estar a dos velas\", a: \"To be broke (no money)\", opts: [\"To have two candles\", \"To be broke (no money)\", \"To be romantic\"], why: \"Es una expresi\u00f3n coloquial para decir que no tienes dinero.\" },\n    { q: \"Vale la pena\", a: \"It is worth it\", opts: [\"It is a pain\", \"It is worth it\", \"It is cheap\"], why: \"Indica que el esfuerzo merece el resultado.\" },\n    { q: \"Dar en el clavo\", a: \"To hit the nail on the head\", opts: [\"To hit the nail on the head\", \"To fail\", \"To build something\"], why: \"Significa acertar exactamente con la soluci\u00f3n o idea.\" }\n];\n\nlet plCurrentQ = 0;\nlet plScore = 0;\n\nfunction plStartQuiz() {\n    document.getElementById('pl-setup-area').classList.add('hidden');\n    document.getElementById('pl-quiz-area').classList.remove('hidden');\n    plShowQuestion();\n}\n\nfunction plShowQuestion() {\n    let q = plQuizData[plCurrentQ];\n    document.getElementById('pl-q-expr').innerText = q.q;\n    document.getElementById('pl-fb-area').style.display = 'none';\n    \n    let optsHtml = '';\n    let shuffled = [...q.opts].sort(() => Math.random() - 0.5);\n    \n    shuffled.forEach(opt => {\n        optsHtml += `<button class=\"pl-opt-btn\" onclick=\"plCheckAns('${opt}')\">${opt}<\/button>`;\n    });\n    document.getElementById('pl-options-list').innerHTML = optsHtml;\n    plUpdateBar();\n}\n\nfunction plCheckAns(selected) {\n    let q = plQuizData[plCurrentQ];\n    let isCorrect = selected === q.a;\n    \n    const btns = document.querySelectorAll('.pl-opt-btn');\n    btns.forEach(b => b.disabled = true);\n\n    if(isCorrect) plScore++;\n    \n    document.getElementById('pl-score-txt').innerText = plScore;\n    let fb = document.getElementById('pl-fb-area');\n    fb.style.display = 'block';\n    fb.style.background = isCorrect ? '#f0fdf4' : '#fef2f2';\n    fb.style.borderColor = isCorrect ? '#22c55e' : '#ef4444';\n    \n    document.getElementById('pl-fb-text').innerHTML = `<strong>${isCorrect ? '\u2705 \u00a1Correcto!' : '\u274c Incorrecto'}<\/strong><br><span style=\"font-size:14px;\">${q.why}<\/span>`;\n}\n\nfunction plNextQuestion() {\n    plCurrentQ++;\n    if(plCurrentQ < plQuizData.length) {\n        plShowQuestion();\n    } else {\n        document.getElementById('pl-quiz-area').innerHTML = `\n            <div style=\"text-align:center; padding:20px;\">\n                <h2>\u00a1Nivel Intermedio Completado!<\/h2>\n                <p style=\"font-size:24px;\">Puntuaci\u00f3n: <strong>${plScore} \/ ${plQuizData.length}<\/strong><\/p>\n                <button class=\"pl-btn-main\" onclick=\"location.reload()\">Repetir Quiz<\/button>\n            <\/div>\n        `;\n    }\n}\n\nfunction plUpdateBar() {\n    let perc = (plCurrentQ \/ plQuizData.length) * 100;\n    document.getElementById('pl-bar-fill').style.width = perc + \"%\";\n}\n<\/script>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n <div id=\"adv-quiz-container\">\n<style>\n  \/* CONFIGURACI\u00d3N VISUAL NIVEL AVANZADO *\/\n  #adv-quiz-container { \n    --ink:#111827; \n    --muted:#6b7280; \n    --line:#e5e7eb; \n    --accent:#7c3aed; \/* P\u00farpura para distinguir nivel Avanzado *\/\n    font-family: system-ui, -apple-system, sans-serif; \n    background:#f8fafc; \n    padding:20px; \n    border-radius:16px; \n    border:1px solid #e5e7eb; \n    max-width: 700px; \n    margin: 20px auto; \n  }\n  .adv-stats { display: flex; justify-content: space-between; margin-bottom: 15px; font-weight: bold; }\n  .adv-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }\n  .adv-prog-bar { background: #eee; height: 12px; border-radius: 6px; margin: 15px 0; overflow: hidden; }\n  #adv-bar-fill { background: var(--accent); height: 100%; width: 0%; transition: width 0.4s; }\n  \n  \/* Letras de alternativas en NEGRO *\/\n  .adv-opt-btn { \n    display: block; width: 100%; padding: 14px; margin: 10px 0; \n    border: 2px solid var(--line); border-radius: 10px; cursor: pointer; \n    text-align: left; background: white; font-size: 16px;\n    color: #000000 !important; \/* Negro total *\/\n    font-weight: 600; transition: all 0.2s;\n  }\n  .adv-opt-btn:not(:disabled):hover { border-color: var(--accent); background: #f5f3ff; }\n  .adv-opt-btn:disabled { cursor: default; opacity: 0.8; }\n  \n  .adv-fb-box { display: none; padding: 15px; border-radius: 10px; margin-top: 20px; border: 1px solid #ddd; }\n  .adv-btn-main { background: var(--accent); color: white; border: none; padding: 12px 25px; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 16px; width: 100%; }\n  .adv-hidden { display: none; }\n<\/style>\n\n<div class=\"adv-stats\">\n    <span>Nivel: <strong style=\"color:var(--accent);\">Advanced<\/strong><\/span>\n    <span>Aciertos: <strong id=\"adv-score-txt\">0<\/strong><\/span>\n<\/div>\n\n<div class=\"adv-card\">\n    <div class=\"adv-prog-bar\"><div id=\"adv-bar-fill\"><\/div><\/div>\n    \n    <div id=\"adv-setup-area\" style=\"text-align:center;\">\n        <p>\u00bfListo para dominar el espa\u00f1ol avanzado?<\/p>\n        <button class=\"adv-btn-main\" onclick=\"startAdvQuiz()\">Comenzar Nivel Avanzado<\/button>\n    <\/div>\n\n    <div id=\"adv-quiz-area\" class=\"adv-hidden\">\n        <p style=\"color:var(--muted); font-size:14px; margin-bottom:5px;\">\u00bfCu\u00e1l es la interpretaci\u00f3n o traducci\u00f3n correcta?<\/p>\n        <h2 id=\"adv-q-expr\" style=\"margin-top:0; color:var(--ink); font-size: 26px;\">&#8230;<\/h2>\n        <div id=\"adv-options-list\"><\/div>\n        \n        <div id=\"adv-fb-area\" class=\"adv-fb-box\">\n            <p id=\"adv-fb-text\" style=\"color: #000; margin-bottom: 15px;\"><\/p>\n            <button class=\"adv-btn-main\" onclick=\"nextAdvQuestion()\">Siguiente Pregunta \u2192<\/button>\n        <\/div>\n    <\/div>\n<\/div>\n\n<script>\n\/\/ Base de datos de 10 t\u00e9rminos avanzados\nconst advQuizData = [\n    { q: \"Estar en las nubes\", a: \"To be daydreaming\", opts: [\"To be in the clouds\", \"To be daydreaming\", \"To be flying\"], why: \"Se usa cuando alguien est\u00e1 distra\u00eddo o no presta atenci\u00f3n.\" },\n    { q: \"Tirar la casa por la ventana\", a: \"To spare no expense\", opts: [\"To throw furniture out\", \"To spare no expense\", \"To clean the house\"], why: \"Significa gastar mucho dinero para celebrar algo especial.\" },\n    { q: \"No tener pelos en la lengua\", a: \"To speak one s mind \/ Be blunt\", opts: [\"To have a clean mouth\", \"To speak one s mind \/ Be blunt\", \"To be unable to speak\"], why: \"Significa decir las cosas de forma directa, sin filtros.\" },\n    { q: \"De nada\", a: \"You are welcome\", opts: [\"For nothing\", \"Please\", \"You are welcome\"], why: \"Es la respuesta cort\u00e9s tras recibir un 'Gracias'.\" },\n    { q: \"Hacer borr\u00f3n y cuenta nueva\", a: \"To start with a clean slate\", opts: [\"To start with a clean slate\", \"To delete an account\", \"To fix a mistake\"], why: \"Olvidar problemas pasados para empezar de cero.\" },\n    { q: \"Estar hecho un l\u00edo\", a: \"To be confused\", opts: [\"To be confused\", \"To be messy\", \"To be angry\"], why: \"Se usa cuando alguien tiene dudas o est\u00e1 desorientado.\" },\n    { q: \"Ponerse las pilas\", a: \"To get your act together\", opts: [\"To buy batteries\", \"To get your act together\", \"To charge a phone\"], why: \"Significa empezar a esforzarse o prestar atenci\u00f3n a algo.\" },\n    { q: \"Tomar el pelo\", a: \"To pull someone s leg \/ To tease\", opts: [\"To cut hair\", \"To pull someone s leg \/ To tease\", \"To be bald\"], why: \"Se usa cuando est\u00e1s bromeando o enga\u00f1ando a alguien de forma divertida.\" },\n    { q: \"Estar a dos velas\", a: \"To be broke (no money)\", opts: [\"To be romantic\", \"To be broke (no money)\", \"To have no electricity\"], why: \"Expresi\u00f3n coloquial para decir que no tienes nada de dinero.\" },\n    { q: \"Dar en el clavo\", a: \"To hit the nail on the head\", opts: [\"To hit the nail on the head\", \"To build a house\", \"To fail\"], why: \"Significa acertar exactamente con la soluci\u00f3n o la respuesta correcta.\" }\n];\n\nlet advCurrentQ = 0;\nlet advScore = 0;\n\nfunction startAdvQuiz() {\n    document.getElementById('adv-setup-area').classList.add('adv-hidden');\n    document.getElementById('adv-quiz-area').classList.remove('adv-hidden');\n    showAdvQuestion();\n}\n\nfunction showAdvQuestion() {\n    let q = advQuizData[advCurrentQ];\n    document.getElementById('adv-q-expr').innerText = q.q;\n    document.getElementById('adv-fb-area').style.display = 'none';\n    \n    let optsHtml = '';\n    let shuffled = [...q.opts].sort(() => Math.random() - 0.5);\n    \n    shuffled.forEach(opt => {\n        optsHtml += `<button class=\"adv-opt-btn\" onclick=\"checkAdvAns('${opt}')\">${opt}<\/button>`;\n    });\n    document.getElementById('adv-options-list').innerHTML = optsHtml;\n    updateAdvBar();\n}\n\nfunction checkAdvAns(selected) {\n    let q = advQuizData[advCurrentQ];\n    let isCorrect = selected === q.a;\n    \n    const buttons = document.querySelectorAll('.adv-opt-btn');\n    buttons.forEach(b => b.disabled = true);\n\n    if(isCorrect) advScore++;\n    \n    document.getElementById('adv-score-txt').innerText = advScore;\n    let fb = document.getElementById('adv-fb-area');\n    fb.style.display = 'block';\n    fb.style.background = isCorrect ? '#f5f3ff' : '#fef2f2';\n    fb.style.borderColor = isCorrect ? '#7c3aed' : '#ef4444';\n    \n    document.getElementById('adv-fb-text').innerHTML = `<strong>${isCorrect ? '\u2705 \u00a1Correcto!' : '\u274c Incorrecto'}<\/strong><br><span style=\"font-size:14px;\">${q.why}<\/span>`;\n}\n\nfunction nextAdvQuestion() {\n    advCurrentQ++;\n    if(advCurrentQ < advQuizData.length) {\n        showAdvQuestion();\n    } else {\n        document.getElementById('adv-quiz-area').innerHTML = `\n            <div style=\"text-align:center; padding:20px;\">\n                <h2>\u00a1Nivel Avanzado Completado!<\/h2>\n                <p style=\"font-size:24px;\">Puntuaci\u00f3n: <strong>${advScore} \/ ${advQuizData.length}<\/strong><\/p>\n                <button class=\"adv-btn-main\" onclick=\"location.reload()\">Reiniciar<\/button>\n            <\/div>\n        `;\n    }\n}\n\nfunction updateAdvBar() {\n    let perc = (advCurrentQ \/ advQuizData.length) * 100;\n    document.getElementById('adv-bar-fill').style.width = perc + \"%\";\n}\n<\/script>\n<\/div>\n\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\" \/>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\/>\n<title>Spanish Daily Expressions Quiz (Basic\/Intermediate\/Advanced)<\/title>\n<style>\n  :root{\n    --bg:#ffffff;\n    --ink:#111827;\n    --muted:#6b7280;\n    --line:#e5e7eb;\n    --accent:#2563eb;\n    --ok:#16a34a;\n    --bad:#dc2626;\n    --card:#ffffff;\n    --soft:#f8fafc;\n  }\n  body{\n    margin:0;\n    font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;\n    background: var(--soft);\n    color: var(--ink);\n  }\n  .wrap{ max-width: 980px; margin: 0 auto; padding: 18px; }\n  header{\n    background: var(--card);\n    border: 1px solid var(--line);\n    border-radius: 16px;\n    padding: 14px 16px;\n    box-shadow: 0 6px 18px rgba(17,24,39,.06);\n  }\n  h1{ margin:0 0 6px 0; font-size: 20px; }\n  .sub{ margin:0; color: var(--muted); font-size: 14px; line-height: 1.4; }\n\n  .topbar{\n    margin-top: 12px;\n    display:flex;\n    gap:10px;\n    flex-wrap:wrap;\n    justify-content:space-between;\n    align-items:center;\n  }\n  .levels{ display:flex; gap:8px; flex-wrap:wrap; }\n  .btn{\n    border: 1px solid var(--line);\n    background:#fff;\n    border-radius: 12px;\n    padding: 9px 10px;\n    cursor:pointer;\n    font-weight: 900;\n    font-size: 13px;\n  }\n  .btn:hover{ border-color:#cbd5e1; }\n  .btn.primary{ background: var(--accent); border-color: var(--accent); color:#fff; }\n  .btn.primary:hover{ filter:brightness(.95); }\n  .btn.active{ box-shadow: inset 0 0 0 2px rgba(37,99,235,.25); }\n  .btn.ghost{ background:#fff; }\n  .btn.danger{ border-color:#fecaca; color:#991b1b; }\n\n  .chips{ display:flex; gap:8px; flex-wrap:wrap; align-items:center;}\n  .chip{\n    background:#fff;\n    border:1px solid var(--line);\n    border-radius:999px;\n    padding:6px 10px;\n    font-size: 12px;\n    color: var(--muted);\n    user-select:none;\n  }\n  .chip strong{ color: var(--ink); }\n\n  .card{\n    margin-top: 12px;\n    background: var(--card);\n    border: 1px solid var(--line);\n    border-radius: 16px;\n    padding: 12px;\n    box-shadow: 0 6px 18px rgba(17,24,39,.06);\n  }\n\n  .row{\n    display:flex;\n    gap:10px;\n    flex-wrap:wrap;\n    align-items:center;\n    justify-content:space-between;\n    margin-bottom: 10px;\n  }\n\n  .progress{\n    width:100%;\n    height:10px;\n    border:1px solid var(--line);\n    background:#f1f5f9;\n    border-radius:999px;\n    overflow:hidden;\n  }\n  .progress > div{\n    height:100%;\n    width:0%;\n    background: var(--accent);\n  }\n\n  .qbox{\n    border:1px solid var(--line);\n    border-radius: 14px;\n    padding: 12px;\n    background:#fff;\n  }\n  .qhead{\n    display:flex;\n    gap:10px;\n    flex-wrap:wrap;\n    justify-content:space-between;\n    align-items:baseline;\n    margin-bottom: 8px;\n  }\n  .qnum{ font-weight: 900; color: var(--accent); }\n  .qmeta{ font-size: 12px; color: var(--muted); font-weight: 800; }\n\n  .expr{\n    font-size: 18px;\n    font-weight: 950;\n    margin: 4px 0 8px 0;\n  }\n  .example{\n    margin: 0 0 10px 0;\n    color: var(--muted);\n    font-size: 13px;\n    line-height: 1.35;\n  }\n\n  .opts{\n    display:grid;\n    grid-template-columns: 1fr;\n    gap: 8px;\n  }\n  label.opt{\n    border:1px solid var(--line);\n    border-radius: 12px;\n    padding: 10px;\n    display:flex;\n    gap:10px;\n    align-items:flex-start;\n    cursor:pointer;\n    background:#fff;\n  }\n  label.opt:hover{ border-color:#cbd5e1; background:#f8fafc; }\n  label.opt input{ margin-top: 2px; transform: scale(1.05); }\n  .opt strong{ display:block; }\n  .small{ color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.35; }\n\n  .feedback{\n    margin-top: 12px;\n    border-top: 1px dashed var(--line);\n    padding-top: 10px;\n    display:none;\n  }\n  .feedback.show{ display:block; }\n  .ok{ color: var(--ok); font-weight: 950; }\n  .bad{ color: var(--bad); font-weight: 950; }\n  .fbbox{\n    border:1px solid var(--line);\n    border-radius: 12px;\n    padding: 10px;\n    background:#fff;\n  }\n  .fbbox p{ margin:0; font-size: 13px; line-height: 1.45; color: var(--ink); }\n  .fbbox p + p{ margin-top: 8px; color: var(--muted); }\n\n  .actions{\n    margin-top: 10px;\n    display:flex;\n    gap:8px;\n    flex-wrap:wrap;\n    justify-content:space-between;\n    align-items:center;\n  }\n  .actions .left, .actions .right{ display:flex; gap:8px; flex-wrap:wrap; }\n\n  .glossary{\n    margin-top: 12px;\n    border:1px solid var(--line);\n    border-radius: 14px;\n    background:#fff;\n    overflow:hidden;\n  }\n  .ghead{\n    padding: 10px 12px;\n    display:flex;\n    gap:10px;\n    flex-wrap:wrap;\n    align-items:center;\n    justify-content:space-between;\n    background:#fff;\n  }\n  .ghead h2{ margin:0; font-size: 14px; }\n  .gcontrols{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }\n  .gcontrols input{\n    border:1px solid var(--line);\n    border-radius: 12px;\n    padding: 9px 10px;\n    font-size: 13px;\n    width: 260px;\n    max-width: 70vw;\n    outline:none;\n  }\n  .gcontrols input:focus{ border-color:#cbd5e1; }\n  .glist{\n    padding: 0 12px 12px 12px;\n    display:none;\n  }\n  .glist.show{ display:block; }\n  .gitem{\n    border-top: 1px solid var(--line);\n    padding: 10px 0;\n  }\n  .gitem .gexpr{ font-weight: 950; }\n  .gitem .gmean{ color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 4px; }\n  .note{\n    margin-top: 10px;\n    color: var(--muted);\n    font-size: 12px;\n    line-height: 1.35;\n  }\n  .mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; }\n<\/style>\n<\/head>\n<body>\n<div class=\"wrap\">\n  <header>\n    <h1>Spanish Daily Expressions (EN learners)<\/h1>\n    <p class=\"sub\">\n      Choose your level, then answer the quiz. You\u2019ll get feedback explaining <b>why the correct answer works<\/b>\n      and <b>why your wrong choice doesn\u2019t fit<\/b> (plus what it means).\n    <\/p>\n\n    <div class=\"topbar\">\n      <div class=\"levels\">\n        <button class=\"btn active\" id=\"lvlBasic\" type=\"button\">Basic<\/button>\n        <button class=\"btn\" id=\"lvlInter\" type=\"button\">Intermediate<\/button>\n        <button class=\"btn\" id=\"lvlAdv\" type=\"button\">Advanced<\/button>\n      <\/div>\n\n      <div class=\"chips\">\n        <div class=\"chip\">Level: <strong id=\"levelLabel\">Basic<\/strong><\/div>\n        <div class=\"chip\">Score: <strong id=\"score\">0<\/strong>\/<span id=\"total\">10<\/span><\/div>\n        <div class=\"chip\">Wrong list: <strong id=\"wrongCount\">0<\/strong><\/div>\n      <\/div>\n    <\/div>\n  <\/header>\n\n  <section class=\"card\">\n    <div class=\"row\">\n      <div style=\"min-width:260px;\">\n        <div class=\"progress\"><div id=\"bar\"><\/div><\/div>\n        <div class=\"note\" id=\"progressText\">Progress: 0 \/ 10<\/div>\n      <\/div>\n\n      <div class=\"levels\" aria-label=\"quiz controls\">\n        <button class=\"btn primary\" id=\"btnStart\" type=\"button\">Start \/ New set<\/button>\n        <button class=\"btn ghost\" id=\"btnRetryWrong\" type=\"button\">Retry wrong answers<\/button>\n        <button class=\"btn danger\" id=\"btnReset\" type=\"button\">Reset<\/button>\n      <\/div>\n    <\/div>\n\n    <div class=\"qbox\" id=\"qbox\">\n      <div class=\"qhead\">\n        <div class=\"qnum\" id=\"qnum\">#1<\/div>\n        <div class=\"qmeta\" id=\"qmeta\">Pick the best meaning<\/div>\n      <\/div>\n\n      <div class=\"expr\" id=\"expr\">Choose a level and press \u201cStart \/ New set\u201d.<\/div>\n      <p class=\"example\" id=\"example\"><\/p>\n\n      <div class=\"opts\" id=\"opts\"><\/div>\n\n      <div class=\"feedback\" id=\"feedback\">\n        <div class=\"fbbox\">\n          <p id=\"fbMain\"><\/p>\n          <p id=\"fbWhy\"><\/p>\n        <\/div>\n\n        <div class=\"actions\">\n          <div class=\"left\">\n            <button class=\"btn primary\" id=\"btnNext\" type=\"button\">Next<\/button>\n          <\/div>\n          <div class=\"right\">\n            <button class=\"btn ghost\" id=\"btnShowAnswer\" type=\"button\">Reveal correct<\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n\n    <div class=\"glossary\" style=\"margin-top:12px;\">\n      <div class=\"ghead\">\n        <h2>Expression Bank (Glossary)<\/h2>\n        <div class=\"gcontrols\">\n          <button class=\"btn ghost\" id=\"btnToggleGlossary\" type=\"button\">Show \/ Hide<\/button>\n          <input id=\"glossarySearch\" type=\"text\" placeholder=\"Search (Spanish or English)...\" \/>\n        <\/div>\n      <\/div>\n      <div class=\"glist\" id=\"glist\"><\/div>\n    <\/div>\n\n    <div class=\"note\">\n      \n    <\/div>\n  <\/section>\n<\/div>\n\n<script>\n(() => {\n  \/\/ ---- BANK (15 per level). Quiz will draw 10 random each time. ----\n  \/\/ Each question: expression (ES), example (ES), options with meaning & rationale.\n  const BANK = {\n    basic: [\n      {\n        expr:\"\u00bfQu\u00e9 tal?\",\n        example:\"\u2014Hola, Juan. \u00bfQu\u00e9 tal? \u2014Bien, gracias.\",\n        options:[\n          { t:\"How are you? \/ How\u2019s it going?\", ok:true,  why:\"This is a common greeting to ask how someone is doing.\" },\n          { t:\"Where are you from?\",           ok:false, why:\"That would be \u00ab\u00bfDe d\u00f3nde eres?\u00bb (asking origin, not wellbeing).\" },\n          { t:\"How much is it?\",              ok:false, why:\"That\u2019s \u00ab\u00bfCu\u00e1nto cuesta?\u00bb (prices\/shopping).\" },\n          { t:\"What time is it?\",             ok:false, why:\"That\u2019s \u00ab\u00bfQu\u00e9 hora es?\u00bb (time).\" }\n        ]\n      },\n      {\n        expr:\"\u00a1Qu\u00e9 bueno!\",\n        example:\"\u2014Aprob\u00e9 el examen. \u2014\u00a1Qu\u00e9 bueno!\",\n        options:[\n          { t:\"That\u2019s great! \/ Good for you!\", ok:true,  why:\"It expresses positive reaction to good news.\" },\n          { t:\"That\u2019s weird!\",                 ok:false, why:\"That\u2019s closer to \u00ab\u00a1Qu\u00e9 raro!\u00bb.\" },\n          { t:\"I\u2019m sorry (sad news).\",         ok:false, why:\"For sad news you\u2019d say \u00abLo siento\u00bb or \u00abQu\u00e9 pena\u00bb.\" },\n          { t:\"Maybe later.\",                  ok:false, why:\"That\u2019s \u00abQuiz\u00e1s m\u00e1s tarde\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"De nada.\",\n        example:\"\u2014Gracias por tu ayuda. \u2014De nada.\",\n        options:[\n          { t:\"You\u2019re welcome.\", ok:true,  why:\"Standard reply after someone says thanks.\" },\n          { t:\"No problem (it\u2019s fine).\", ok:false, why:\"Similar idea, but the common Spanish is \u00abNo hay problema\u00bb \/ \u00abNo pasa nada\u00bb.\" },\n          { t:\"Excuse me.\", ok:false, why:\"That\u2019s \u00abPerd\u00f3n\u00bb or \u00abDisculpa\u00bb.\" },\n          { t:\"Nice to meet you.\", ok:false, why:\"That\u2019s \u00abMucho gusto\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"\u00a1Claro!\",\n        example:\"\u2014\u00bfPuedes ayudarme? \u2014\u00a1Claro!\",\n        options:[\n          { t:\"Of course \/ Sure!\", ok:true,  why:\"It shows agreement or willingness.\" },\n          { t:\"I don\u2019t know.\",     ok:false, why:\"That\u2019s \u00abNo s\u00e9\u00bb.\" },\n          { t:\"Later.\",            ok:false, why:\"That\u2019s \u00abLuego \/ M\u00e1s tarde\u00bb.\" },\n          { t:\"Never.\",            ok:false, why:\"That\u2019s \u00abNunca\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Por favor.\",\n        example:\"\u2014Un caf\u00e9, por favor.\",\n        options:[\n          { t:\"Please.\", ok:true,  why:\"Used to make polite requests.\" },\n          { t:\"Because.\", ok:false, why:\"Because is \u00abporque\u00bb (one word).\" },\n          { t:\"Sorry.\", ok:false,  why:\"Sorry is \u00ablo siento\u00bb.\" },\n          { t:\"Thanks.\", ok:false, why:\"Thanks is \u00abgracias\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Perd\u00f3n \/ Disculpa.\",\n        example:\"Perd\u00f3n, \u00bfpuedo pasar?\",\n        options:[\n          { t:\"Excuse me \/ Sorry (to get attention or apologize).\", ok:true, why:\"Used to apologize or politely get attention.\" },\n          { t:\"Congratulations!\", ok:false, why:\"That\u2019s \u00ab\u00a1Felicidades!\u00bb.\" },\n          { t:\"Good luck!\", ok:false, why:\"That\u2019s \u00ab\u00a1Suerte!\u00bb.\" },\n          { t:\"Enjoy your meal!\", ok:false, why:\"That\u2019s \u00ab\u00a1Buen provecho!\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Lo siento.\",\n        example:\"Lo siento, llegu\u00e9 tarde.\",\n        options:[\n          { t:\"I\u2019m sorry.\", ok:true,  why:\"Used to apologize or express sympathy.\" },\n          { t:\"I\u2019m tired.\", ok:false, why:\"That\u2019s \u00abEstoy cansado\/a\u00bb.\" },\n          { t:\"I\u2019m hungry.\", ok:false, why:\"That\u2019s \u00abTengo hambre\u00bb.\" },\n          { t:\"I\u2019m ready.\", ok:false,  why:\"That\u2019s \u00abEstoy listo\/a\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Hasta luego.\",\n        example:\"Nos vemos ma\u00f1ana. \u00a1Hasta luego!\",\n        options:[\n          { t:\"See you later.\", ok:true,  why:\"A common goodbye for \u2018later\u2019.\" },\n          { t:\"Good morning.\", ok:false, why:\"That\u2019s \u00abBuenos d\u00edas\u00bb.\" },\n          { t:\"Nice to meet you.\", ok:false, why:\"That\u2019s \u00abMucho gusto\u00bb.\" },\n          { t:\"What\u2019s up?\", ok:false, why:\"That\u2019s \u00ab\u00bfQu\u00e9 tal?\u00bb \/ \u00ab\u00bfQu\u00e9 pasa?\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Nos vemos.\",\n        example:\"\u2014Chao, nos vemos. \u2014\u00a1Nos vemos!\",\n        options:[\n          { t:\"See you (we\u2019ll see each other).\", ok:true, why:\"Very common friendly goodbye.\" },\n          { t:\"Let\u2019s go.\", ok:false, why:\"That\u2019s \u00abVamos\u00bb.\" },\n          { t:\"I\u2019m lost.\", ok:false, why:\"That\u2019s \u00abEstoy perdido\/a\u00bb.\" },\n          { t:\"I don\u2019t understand.\", ok:false, why:\"That\u2019s \u00abNo entiendo\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"No entiendo.\",\n        example:\"Perd\u00f3n, no entiendo. \u00bfPuedes repetir?\",\n        options:[\n          { t:\"I don\u2019t understand.\", ok:true,  why:\"Used when you didn\u2019t get the message.\" },\n          { t:\"I don\u2019t agree.\", ok:false,      why:\"That\u2019s \u00abNo estoy de acuerdo\u00bb.\" },\n          { t:\"I don\u2019t care.\", ok:false,       why:\"That\u2019s \u00abNo me importa\u00bb \/ \u00abMe da igual\u00bb.\" },\n          { t:\"I don\u2019t know.\", ok:false,       why:\"That\u2019s \u00abNo s\u00e9\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"\u00bfCu\u00e1nto cuesta?\",\n        example:\"\u00bfCu\u00e1nto cuesta este libro?\",\n        options:[\n          { t:\"How much does it cost?\", ok:true, why:\"Used for prices in shops\/markets.\" },\n          { t:\"Where is it?\", ok:false,          why:\"That\u2019s \u00ab\u00bfD\u00f3nde est\u00e1?\u00bb.\" },\n          { t:\"How old are you?\", ok:false,      why:\"That\u2019s \u00ab\u00bfCu\u00e1ntos a\u00f1os tienes?\u00bb.\" },\n          { t:\"What do you want?\", ok:false,     why:\"That\u2019s \u00ab\u00bfQu\u00e9 quieres?\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Tengo hambre.\",\n        example:\"Tengo hambre. \u00bfComemos algo?\",\n        options:[\n          { t:\"I\u2019m hungry.\", ok:true,  why:\"In Spanish hunger is expressed with \u00abtener\u00bb: \u2018to have hunger\u2019.\" },\n          { t:\"I\u2019m thirsty.\", ok:false,why:\"Thirst is \u00abtengo sed\u00bb.\" },\n          { t:\"I\u2019m sleepy.\", ok:false, why:\"Sleepy is \u00abtengo sue\u00f1o\u00bb.\" },\n          { t:\"I\u2019m cold.\", ok:false,   why:\"Cold is \u00abtengo fr\u00edo\u00bb \/ \u00abhace fr\u00edo\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Estoy cansado\/a.\",\n        example:\"Estoy cansada. Necesito descansar.\",\n        options:[\n          { t:\"I\u2019m tired.\", ok:true,  why:\"Temporary state \u2192 \u00abestar\u00bb.\" },\n          { t:\"I\u2019m bored.\", ok:false, why:\"Bored is \u00abestoy aburrido\/a\u00bb.\" },\n          { t:\"I\u2019m busy.\", ok:false,  why:\"Busy is \u00abestoy ocupado\/a\u00bb.\" },\n          { t:\"I\u2019m excited.\", ok:false,why:\"Excited is \u00abestoy emocionado\/a\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"\u00bfD\u00f3nde queda\u2026?\",\n        example:\"\u00bfD\u00f3nde queda la estaci\u00f3n de metro?\",\n        options:[\n          { t:\"Where is \u2026 located?\", ok:true, why:\"Common for asking directions (location of a place).\" },\n          { t:\"How far is it?\", ok:false,    why:\"That\u2019s \u00ab\u00bfQu\u00e9 tan lejos est\u00e1?\u00bb.\" },\n          { t:\"What does it mean?\", ok:false,why:\"That\u2019s \u00ab\u00bfQu\u00e9 significa?\u00bb.\" },\n          { t:\"What time does it open?\", ok:false, why:\"That\u2019s \u00ab\u00bfA qu\u00e9 hora abre?\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"\u00a1Qu\u00e9 rico!\",\n        example:\"\u00a1Qu\u00e9 rico! Esta comida est\u00e1 deliciosa.\",\n        options:[\n          { t:\"So tasty! \/ Delicious!\", ok:true, why:\"Common in Latin America for delicious food.\" },\n          { t:\"How expensive!\", ok:false,       why:\"That\u2019s \u00ab\u00a1Qu\u00e9 caro!\u00bb.\" },\n          { t:\"How scary!\", ok:false,           why:\"That\u2019s \u00ab\u00a1Qu\u00e9 miedo!\u00bb.\" },\n          { t:\"How boring!\", ok:false,          why:\"That\u2019s \u00ab\u00a1Qu\u00e9 fome!\u00bb \/ \u00ab\u00a1Qu\u00e9 aburrido!\u00bb (varies by country).\" }\n        ]\n      }\n    ],\n\n    intermediate: [\n      {\n        expr:\"Me da igual.\",\n        example:\"\u2014\u00bfPizza o pasta? \u2014Me da igual.\",\n        options:[\n          { t:\"I don\u2019t mind \/ Either is fine.\", ok:true,  why:\"Means you have no preference.\" },\n          { t:\"I\u2019m angry.\", ok:false,           why:\"Angry is \u00abestoy enojado\/a\u00bb.\" },\n          { t:\"I\u2019m in a hurry.\", ok:false,      why:\"That\u2019s \u00abtengo prisa\u00bb.\" },\n          { t:\"I\u2019m excited.\", ok:false,         why:\"That\u2019s \u00abestoy emocionado\/a\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"No pasa nada.\",\n        example:\"\u2014Perd\u00f3n por el error. \u2014No pasa nada.\",\n        options:[\n          { t:\"No worries \/ It\u2019s fine.\", ok:true, why:\"Used to reassure someone: it\u2019s not a problem.\" },\n          { t:\"Nothing happened (literal, like an accident).\", ok:false, why:\"It can be literal, but here it\u2019s a social \u2018don\u2019t worry\u2019.\" },\n          { t:\"It depends.\", ok:false,            why:\"That\u2019s \u00abdepende\u00bb.\" },\n          { t:\"I don\u2019t know.\", ok:false,          why:\"That\u2019s \u00abno s\u00e9\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Ni idea.\",\n        example:\"\u2014\u00bfD\u00f3nde est\u00e1 Pedro? \u2014Ni idea.\",\n        options:[\n          { t:\"No idea \/ I have no clue.\", ok:true,  why:\"Informal: you really don\u2019t know.\" },\n          { t:\"I don\u2019t care.\", ok:false,            why:\"That\u2019s \u00abno me importa\u00bb \/ \u00abme da igual\u00bb (different nuance).\" },\n          { t:\"I\u2019m not sure (maybe).\", ok:false,    why:\"That\u2019s \u00abno estoy seguro\/a\u00bb \/ \u00abquiz\u00e1s\u00bb.\" },\n          { t:\"I remember.\", ok:false,             why:\"That\u2019s \u00abme acuerdo\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Echar una mano.\",\n        example:\"\u00bfMe echas una mano con esto?\",\n        options:[\n          { t:\"To help (lend a hand).\", ok:true,  why:\"Idiom: \u2018throw a hand\u2019 = help.\" },\n          { t:\"To throw something away.\", ok:false, why:\"Throw away is \u00abtirar\/botar\u00bb (not \u2018echar una mano\u2019).\" },\n          { t:\"To clap.\", ok:false,              why:\"Clap is \u00abaplaudir\u00bb.\" },\n          { t:\"To pay attention.\", ok:false,     why:\"That\u2019s \u00abprestar atenci\u00f3n\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Estoy hecho polvo.\",\n        example:\"Hoy trabaj\u00e9 mucho\u2026 estoy hecho polvo.\",\n        options:[\n          { t:\"I\u2019m exhausted.\", ok:true,  why:\"Very common informal way to say very tired.\" },\n          { t:\"I\u2019m sick.\", ok:false,      why:\"Sick is \u00abestoy enfermo\/a\u00bb.\" },\n          { t:\"I\u2019m confused.\", ok:false,  why:\"Confused is \u00abestoy confundido\/a\u00bb.\" },\n          { t:\"I\u2019m hungry.\", ok:false,    why:\"Hungry is \u00abtengo hambre\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Me cae bien \/ mal.\",\n        example:\"Mar\u00eda me cae bien. Es muy simp\u00e1tica.\",\n        options:[\n          { t:\"I like \/ I don\u2019t like someone (as a person).\", ok:true,  why:\"Used for personal impression (NOT romantic love).\" },\n          { t:\"I love someone (romantically).\", ok:false,     why:\"Romantic love is \u00abamo\u00bb \/ \u00abestoy enamorado\/a\u00bb.\" },\n          { t:\"I miss someone.\", ok:false,                   why:\"That\u2019s \u00abecho de menos\u00bb \/ \u00abextra\u00f1o\u00bb.\" },\n          { t:\"I respect someone.\", ok:false,                why:\"Respect is \u00abrespeto\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Estoy en las nubes.\",\n        example:\"Perd\u00f3n, estaba en las nubes. \u00bfQu\u00e9 dijiste?\",\n        options:[\n          { t:\"I was daydreaming \/ not paying attention.\", ok:true, why:\"Idiom: \u2018in the clouds\u2019 = distracted.\" },\n          { t:\"I\u2019m very happy.\", ok:false,       why:\"Happy is \u00abestoy feliz\/contento\/a\u00bb.\" },\n          { t:\"I\u2019m scared.\", ok:false,           why:\"Scared is \u00abtengo miedo\u00bb.\" },\n          { t:\"I\u2019m lost (physically).\", ok:false,why:\"Lost is \u00abestoy perdido\/a\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Qu\u00e9 pena.\",\n        example:\"Qu\u00e9 pena\u2026 lo siento mucho.\",\n        options:[\n          { t:\"What a shame \/ That\u2019s sad.\", ok:true,  why:\"Reaction to bad news or disappointment.\" },\n          { t:\"That\u2019s awesome!\", ok:false,            why:\"That\u2019s \u00ab\u00a1Qu\u00e9 genial!\u00bb \/ \u00ab\u00a1Qu\u00e9 bueno!\u00bb.\" },\n          { t:\"I\u2019m annoyed.\", ok:false,              why:\"Annoyed is \u00abestoy molesto\/a\u00bb.\" },\n          { t:\"No problem.\", ok:false,               why:\"That\u2019s \u00abno pasa nada\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"De repente.\",\n        example:\"De repente, empez\u00f3 a llover.\",\n        options:[\n          { t:\"Suddenly \/ all of a sudden.\", ok:true,  why:\"Often used for unexpected events.\" },\n          { t:\"Maybe (perhaps).\", ok:false,           why:\"In some places it can mean \u2018maybe\u2019, but here it\u2019s \u2018suddenly\u2019.\" },\n          { t:\"Every day.\", ok:false,                why:\"Every day is \u00abtodos los d\u00edas\u00bb.\" },\n          { t:\"Right now.\", ok:false,                why:\"Right now is \u00abahora mismo\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Estar al tanto.\",\n        example:\"Estoy al tanto del problema.\",\n        options:[\n          { t:\"To be aware \/ to be up to date.\", ok:true,  why:\"Means you know what\u2019s going on.\" },\n          { t:\"To be late.\", ok:false,                   why:\"Late is \u00abllegar tarde\u00bb.\" },\n          { t:\"To be bored.\", ok:false,                  why:\"Bored is \u00abestar aburrido\/a\u00bb.\" },\n          { t:\"To be asleep.\", ok:false,                 why:\"Asleep is \u00abestar dormido\/a\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Dar la vuelta.\",\n        example:\"Voy a dar la vuelta a la manzana.\",\n        options:[\n          { t:\"To go around \/ take a lap \/ turn around.\", ok:true, why:\"Context-dependent: physically go around or turn back.\" },\n          { t:\"To turn on (a device).\", ok:false,                 why:\"Turn on is \u00abencender\u00bb.\" },\n          { t:\"To translate.\", ok:false,                          why:\"Translate is \u00abtraducir\u00bb.\" },\n          { t:\"To give a gift.\", ok:false,                        why:\"Give a gift is \u00abdar un regalo\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Qu\u00e9 fuerte.\",\n        example:\"\u00bfEn serio? \u00a1Qu\u00e9 fuerte!\",\n        options:[\n          { t:\"No way! \/ That\u2019s intense \/ shocking!\", ok:true, why:\"Reaction to surprising or shocking news.\" },\n          { t:\"How strong (physically).\", ok:false,           why:\"Literal \u2018strong\u2019 exists, but here it\u2019s an emotional reaction.\" },\n          { t:\"How delicious!\", ok:false,                     why:\"That\u2019s \u00abqu\u00e9 rico\u00bb.\" },\n          { t:\"How expensive!\", ok:false,                     why:\"That\u2019s \u00abqu\u00e9 caro\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Qu\u00e9 rollo.\",\n        example:\"Uff\u2026 qu\u00e9 rollo esta reuni\u00f3n.\",\n        options:[\n          { t:\"What a drag \/ so boring \/ annoying.\", ok:true,  why:\"Informal: something is tedious or annoying.\" },\n          { t:\"What a party!\", ok:false,                     why:\"Party is \u00abfiesta\u00bb.\" },\n          { t:\"What a surprise!\", ok:false,                  why:\"Surprise reaction: \u00ab\u00a1qu\u00e9 sorpresa!\u00bb \/ \u00ab\u00a1no me digas!\u00bb.\" },\n          { t:\"What time is it?\", ok:false,                  why:\"Time: \u00ab\u00bfqu\u00e9 hora es?\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"\u00bfQu\u00e9 onda? (LatAm)\",\n        example:\"\u00a1Hola! \u00bfQu\u00e9 onda?\",\n        options:[\n          { t:\"What\u2019s up? \/ How\u2019s it going? (informal).\", ok:true, why:\"Very common in Latin America; casual greeting.\" },\n          { t:\"Where\u2019s the wave? (literal).\", ok:false,          why:\"It\u2019s an idiom; not about waves.\" },\n          { t:\"Goodbye.\", ok:false,                               why:\"Goodbye: \u00abchao \/ hasta luego\u00bb.\" },\n          { t:\"Thank you.\", ok:false,                             why:\"Thank you: \u00abgracias\u00bb.\" }\n        ]\n      }\n    ],\n\n    advanced: [\n      {\n        expr:\"Meter la pata.\",\n        example:\"Ups\u2026 met\u00ed la pata con ese comentario.\",\n        options:[\n          { t:\"To mess up \/ to put your foot in it.\", ok:true, why:\"Idiom: make a mistake (often socially).\" },\n          { t:\"To walk slowly.\", ok:false,                    why:\"Walk slowly is \u00abcaminar despacio\u00bb.\" },\n          { t:\"To kick a ball.\", ok:false,                    why:\"Kick is \u00abpatear\u00bb.\" },\n          { t:\"To be late.\", ok:false,                        why:\"Late is \u00abllegar tarde\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Dar en el clavo.\",\n        example:\"\u00a1Lo dijiste perfecto! Diste en el clavo.\",\n        options:[\n          { t:\"To hit the nail on the head (exactly right).\", ok:true, why:\"Means you were exactly correct.\" },\n          { t:\"To repair something.\", ok:false,                       why:\"Repair is \u00abarreglar\/reparar\u00bb.\" },\n          { t:\"To argue.\", ok:false,                                  why:\"Argue is \u00abdiscutir\u00bb.\" },\n          { t:\"To change your mind.\", ok:false,                       why:\"Change your mind is \u00abcambiar de opini\u00f3n\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Ponerse las pilas.\",\n        example:\"Tengo que ponerme las pilas y estudiar m\u00e1s.\",\n        options:[\n          { t:\"To get your act together \/ get energized \/ step up.\", ok:true, why:\"Idiom: start working seriously with energy.\" },\n          { t:\"To buy batteries.\", ok:false,                                  why:\"Literal batteries exist, but this is figurative.\" },\n          { t:\"To take a nap.\", ok:false,                                     why:\"Nap is \u00abtomar una siesta\u00bb.\" },\n          { t:\"To calm down.\", ok:false,                                      why:\"Calm down is \u00abtranquilizarse\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Tomar el pelo.\",\n        example:\"\u00a1No te creo! Me est\u00e1s tomando el pelo.\",\n        options:[\n          { t:\"To tease \/ to kid \/ to mess with someone.\", ok:true, why:\"It means you\u2019re joking at someone s expense.\" },\n          { t:\"To cut hair.\", ok:false,                             why:\"Cut hair is \u00abcortar el pelo\u00bb.\" },\n          { t:\"To get angry.\", ok:false,                            why:\"Angry is \u00abenojarse\u00bb.\" },\n          { t:\"To apologize.\", ok:false,                            why:\"Apologize is \u00abpedir perd\u00f3n\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Echar de menos.\",\n        example:\"Echo de menos a mi familia.\",\n        options:[\n          { t:\"To miss someone\/something.\", ok:true,  why:\"Very common in Spain; in LatAm also \u00abextra\u00f1ar\u00bb.\" },\n          { t:\"To throw less.\", ok:false,             why:\"Not literal; it\u2019s an idiom, not about throwing.\" },\n          { t:\"To forget.\", ok:false,                 why:\"Forget is \u00abolvidar\u00bb.\" },\n          { t:\"To meet someone.\", ok:false,           why:\"Meet is \u00abconocer \/ encontrarse con\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Hacer la vista gorda.\",\n        example:\"El profesor hizo la vista gorda con el retraso.\",\n        options:[\n          { t:\"To turn a blind eye (ignore on purpose).\", ok:true, why:\"You ignore something intentionally.\" },\n          { t:\"To look carefully.\", ok:false,                       why:\"Look carefully is \u00abmirar con atenci\u00f3n\u00bb.\" },\n          { t:\"To see better.\", ok:false,                           why:\"See better is \u00abver mejor\u00bb.\" },\n          { t:\"To be strict.\", ok:false,                            why:\"Strict is \u00abser estricto\/a\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Irse por las ramas.\",\n        example:\"No te vayas por las ramas: responde directo.\",\n        options:[\n          { t:\"To go off on a tangent \/ not get to the point.\", ok:true, why:\"Means you\u2019re avoiding the main point.\" },\n          { t:\"To go hiking.\", ok:false,                                  why:\"Hiking is \u00abhacer senderismo\u00bb.\" },\n          { t:\"To leave early.\", ok:false,                                why:\"Leave early is \u00abirse temprano\u00bb.\" },\n          { t:\"To change jobs.\", ok:false,                                why:\"Change jobs is \u00abcambiar de trabajo\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Estar hasta las narices.\",\n        example:\"Estoy hasta las narices de este ruido.\",\n        options:[\n          { t:\"To be fed up \/ sick and tired (of something).\", ok:true, why:\"Strong: you\u2019ve had enough.\" },\n          { t:\"To be sick (ill).\", ok:false,                            why:\"Ill is \u00abestar enfermo\/a\u00bb (different meaning).\" },\n          { t:\"To be happy.\", ok:false,                                 why:\"Happy is \u00abestar feliz\u00bb.\" },\n          { t:\"To be surprised.\", ok:false,                             why:\"Surprised is \u00abestar sorprendido\/a\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Entre la espada y la pared.\",\n        example:\"Estoy entre la espada y la pared con esta decisi\u00f3n.\",\n        options:[\n          { t:\"Between a rock and a hard place (no good options).\", ok:true, why:\"A difficult situation with limited choices.\" },\n          { t:\"In a very safe situation.\", ok:false,                        why:\"Opposite meaning; it\u2019s not safe\/easy.\" },\n          { t:\"In love.\", ok:false,                                         why:\"In love is \u00abenamorado\/a\u00bb.\" },\n          { t:\"At the beach.\", ok:false,                                    why:\"Beach is \u00abplaya\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Tirar la toalla.\",\n        example:\"Despu\u00e9s de tantos intentos, tir\u00f3 la toalla.\",\n        options:[\n          { t:\"To give up \/ throw in the towel.\", ok:true,  why:\"Idiom from boxing: stop trying.\" },\n          { t:\"To clean the table.\", ok:false,              why:\"Clean is \u00ablimpiar\u00bb.\" },\n          { t:\"To start again.\", ok:false,                  why:\"Start again is \u00abempezar de nuevo\u00bb.\" },\n          { t:\"To win easily.\", ok:false,                   why:\"Win easily is \u00abganar f\u00e1cilmente\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"A fin de cuentas.\",\n        example:\"A fin de cuentas, lo importante es la salud.\",\n        options:[\n          { t:\"At the end of the day \/ all things considered.\", ok:true, why:\"Used to conclude after considering everything.\" },\n          { t:\"Right now.\", ok:false,                                     why:\"Right now is \u00abahora mismo\u00bb.\" },\n          { t:\"Once in a while.\", ok:false,                               why:\"Once in a while is \u00abde vez en cuando\u00bb.\" },\n          { t:\"In the future.\", ok:false,                                 why:\"In the future is \u00aben el futuro\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"No tener pelos en la lengua.\",\n        example:\"Ella no tiene pelos en la lengua: dice todo directo.\",\n        options:[\n          { t:\"To be blunt \/ speak your mind.\", ok:true,  why:\"Means you speak frankly without holding back.\" },\n          { t:\"To be shy.\", ok:false,                     why:\"Shy is \u00abt\u00edmido\/a\u00bb.\" },\n          { t:\"To lie.\", ok:false,                        why:\"Lie is \u00abmentir\u00bb.\" },\n          { t:\"To be polite.\", ok:false,                  why:\"Polite is \u00abser educado\/a\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Ser pan comido.\",\n        example:\"No te preocupes: el examen ser\u00e1 pan comido.\",\n        options:[\n          { t:\"To be very easy (a piece of cake).\", ok:true, why:\"Means something is extremely easy.\" },\n          { t:\"To be delicious bread.\", ok:false,            why:\"Literal bread exists, but this is figurative.\" },\n          { t:\"To be difficult.\", ok:false,                  why:\"Difficult is \u00abdif\u00edcil\/complicado\u00bb.\" },\n          { t:\"To be expensive.\", ok:false,                  why:\"Expensive is \u00abcaro\u00bb.\" }\n        ]\n      },\n      {\n        expr:\"Estar en el ajo.\",\n        example:\"No me cuentes secretos: no estoy en el ajo.\",\n        options:[\n          { t:\"To be in the know \/ involved in what\u2019s going on.\", ok:true, why:\"Means you\u2019re informed\/involved.\" },\n          { t:\"To cook with garlic.\", ok:false,                            why:\"Not literal; it\u2019s about knowing what\u2019s happening.\" },\n          { t:\"To be absent-minded.\", ok:false,                            why:\"Absent-minded is \u00abestar en las nubes\u00bb.\" },\n          { t:\"To be late.\", ok:false,                                     why:\"Late is \u00abllegar tarde\u00bb.\" }\n        ]\n      }\n    ]\n  };\n\n  \/\/ ---- SETTINGS ----\n  const QUIZ_LEN = 10;\n\n  \/\/ ---- DOM ----\n  const lvlBasic = document.getElementById(\"lvlBasic\");\n  const lvlInter = document.getElementById(\"lvlInter\");\n  const lvlAdv   = document.getElementById(\"lvlAdv\");\n\n  const levelLabel = document.getElementById(\"levelLabel\");\n  const scoreEl = document.getElementById(\"score\");\n  const totalEl = document.getElementById(\"total\");\n  const wrongCountEl = document.getElementById(\"wrongCount\");\n\n  const btnStart = document.getElementById(\"btnStart\");\n  const btnRetryWrong = document.getElementById(\"btnRetryWrong\");\n  const btnReset = document.getElementById(\"btnReset\");\n\n  const bar = document.getElementById(\"bar\");\n  const progressText = document.getElementById(\"progressText\");\n\n  const qnum = document.getElementById(\"qnum\");\n  const qmeta = document.getElementById(\"qmeta\");\n  const exprEl = document.getElementById(\"expr\");\n  const exampleEl = document.getElementById(\"example\");\n  const optsEl = document.getElementById(\"opts\");\n\n  const feedback = document.getElementById(\"feedback\");\n  const fbMain = document.getElementById(\"fbMain\");\n  const fbWhy  = document.getElementById(\"fbWhy\");\n  const btnNext = document.getElementById(\"btnNext\");\n  const btnShowAnswer = document.getElementById(\"btnShowAnswer\");\n\n  const btnToggleGlossary = document.getElementById(\"btnToggleGlossary\");\n  const glist = document.getElementById(\"glist\");\n  const glossarySearch = document.getElementById(\"glossarySearch\");\n\n  \/\/ ---- STATE ----\n  let level = \"basic\"; \/\/ basic | intermediate | advanced\n  let quiz = [];       \/\/ current question objects\n  let index = 0;       \/\/ current question index\n  let locked = false;  \/\/ answered lock\n  let score = 0;\n  let wrongIds = [];   \/\/ ids (by expr string) for retry\n  let lastSetMap = new Map(); \/\/ expr -> question (for retry)\n  let selectedOptionIndex = null;\n\n  \/\/ ---- HELPERS ----\n  const rand = (n) => Math.floor(Math.random()*n);\n  function shuffle(arr){\n    const a = [...arr];\n    for(let i=a.length-1;i>0;i--){\n      const j = rand(i+1);\n      [a[i],a[j]]=[a[j],a[i]];\n    }\n    return a;\n  }\n\n  function setActive(btn){\n    [lvlBasic,lvlInter,lvlAdv].forEach(b=>b.classList.remove(\"active\"));\n    btn.classList.add(\"active\");\n  }\n\n  function setLevel(newLevel){\n    level = newLevel;\n    levelLabel.textContent = (level===\"basic\"?\"Basic\":level===\"intermediate\"?\"Intermediate\":\"Advanced\");\n    renderGlossary();\n    softResetView();\n  }\n\n  function bankForLevel(){\n    return BANK[level];\n  }\n\n  function pickNewSet(){\n    const bank = bankForLevel();\n    const picked = shuffle(bank).slice(0, Math.min(QUIZ_LEN, bank.length));\n    quiz = picked.map(q => ({...q, id: q.expr})); \/\/ id by expr text\n    index = 0;\n    locked = false;\n    score = 0;\n    wrongIds = [];\n    selectedOptionIndex = null;\n\n    \/\/ Save map for retry\n    lastSetMap = new Map();\n    quiz.forEach(q => lastSetMap.set(q.id, q));\n\n    totalEl.textContent = String(quiz.length);\n    updateTopStats();\n    renderQuestion();\n  }\n\n  function updateTopStats(){\n    scoreEl.textContent = String(score);\n    wrongCountEl.textContent = String(wrongIds.length);\n    const total = quiz.length || QUIZ_LEN;\n    const done = Math.min(index, total);\n    progressText.textContent = `Progress: ${done} \/ ${total}`;\n    bar.style.width = total ? `${Math.round((done\/total)*100)}%` : \"0%\";\n  }\n\n  function softResetView(){\n    \/\/ keep level, clear quiz view\n    quiz = [];\n    index = 0;\n    locked = false;\n    score = 0;\n    wrongIds = [];\n    totalEl.textContent = String(QUIZ_LEN);\n    updateTopStats();\n    qnum.textContent = \"#1\";\n    qmeta.textContent = \"Pick the best meaning\";\n    exprEl.textContent = \"Choose a level and press \u201cStart \/ New set\u201d.\";\n    exampleEl.textContent = \"\";\n    optsEl.innerHTML = \"\";\n    feedback.classList.remove(\"show\");\n  }\n\n  function renderQuestion(){\n    if(!quiz.length){\n      softResetView();\n      return;\n    }\n    if(index >= quiz.length){\n      \/\/ done\n      const total = quiz.length;\n      const pct = Math.round((score\/total)*100);\n      qnum.textContent = \"\u2705 Finished\";\n      qmeta.textContent = `Score: ${score}\/${total} (${pct}%)`;\n      exprEl.textContent = (wrongIds.length === 0)\n        ? \"Perfect! You got everything right.\"\n        : \"Nice work! You can retry only your wrong answers.\";\n      exampleEl.textContent = \"\";\n      optsEl.innerHTML = \"\";\n      feedback.classList.remove(\"show\");\n      updateTopStats();\n      return;\n    }\n\n    locked = false;\n    selectedOptionIndex = null;\n    feedback.classList.remove(\"show\");\n\n    const q = quiz[index];\n    qnum.textContent = `#${index+1}`;\n    qmeta.textContent = \"Pick the best meaning (English)\";\n    exprEl.textContent = q.expr;\n    exampleEl.innerHTML = `<b>Example:<\/b> ${q.example}`;\n\n    optsEl.innerHTML = \"\";\n    q.options.forEach((opt, oi) => {\n      const lab = document.createElement(\"label\");\n      lab.className = \"opt\";\n      lab.innerHTML = `\n        <input type=\"radio\" name=\"opt\" value=\"${oi}\">\n        <div>\n          <strong>${opt.t}<\/strong>\n          <div class=\"small\">Click to choose<\/div>\n        <\/div>\n      `;\n      lab.addEventListener(\"click\", () => {\n        if(locked) return;\n        selectedOptionIndex = oi;\n      });\n      optsEl.appendChild(lab);\n    });\n\n    updateTopStats();\n  }\n\n  function revealCorrect(){\n    if(!quiz.length || index >= quiz.length) return;\n    const q = quiz[index];\n    const correctIndex = q.options.findIndex(o => o.ok);\n    const correct = q.options[correctIndex];\n    feedback.classList.add(\"show\");\n    fbMain.innerHTML = `<span class=\"ok\">Correct meaning:<\/span> <b>${correct.t}<\/b>`;\n    fbWhy.textContent = correct.why;\n  }\n\n  function submitAnswer(){\n    if(!quiz.length || index >= quiz.length) return;\n    if(locked) return;\n\n    const q = quiz[index];\n    const correctIndex = q.options.findIndex(o => o.ok);\n\n    if(selectedOptionIndex === null){\n      feedback.classList.add(\"show\");\n      fbMain.innerHTML = `<span class=\"bad\">Choose an option<\/span> to get feedback.`;\n      fbWhy.textContent = \"Tip: click one answer, then press Next.\";\n      return;\n    }\n\n    locked = true;\n    const chosen = q.options[selectedOptionIndex];\n    const correct = q.options[correctIndex];\n\n    if(selectedOptionIndex === correctIndex){\n      score += 1;\n      feedback.classList.add(\"show\");\n      fbMain.innerHTML = `<span class=\"ok\">Correct<\/span> \u2705 <br><b>${q.expr}<\/b> = <b>${correct.t}<\/b>`;\n      fbWhy.textContent = correct.why;\n    } else {\n      \/\/ wrong: add to wrong list (avoid duplicates)\n      if(!wrongIds.includes(q.id)) wrongIds.push(q.id);\n\n      feedback.classList.add(\"show\");\n      fbMain.innerHTML =\n        `<span class=\"bad\">Incorrect<\/span> \u274c<br>\n         <b>Your choice:<\/b> ${chosen.t}<br>\n         <b>Correct:<\/b> ${correct.t}`;\n\n      \/\/ Explain why wrong + correct\n      fbWhy.textContent =\n        `Why your choice doesn\u2019t fit: ${chosen.why}  \u2022  Why the correct answer fits: ${correct.why}`;\n    }\n\n    updateTopStats();\n  }\n\n  function next(){\n    if(!quiz.length) return;\n    \/\/ If not answered, force submit (so they receive explanations)\n    if(!locked) submitAnswer();\n    \/\/ If still not locked, they didn't choose anything.\n    if(!locked) return;\n\n    index += 1;\n    renderQuestion();\n  }\n\n  function retryWrong(){\n    if(!wrongIds.length){\n      \/\/ if none, just pick new set\n      pickNewSet();\n      return;\n    }\n    \/\/ Build a quiz from wrong ids using lastSetMap if possible, else from bank\n    const items = [];\n    wrongIds.forEach(id => {\n      if(lastSetMap.has(id)) items.push(lastSetMap.get(id));\n    });\n    \/\/ fallback: if map missing (shouldn't), search the bank\n    const bank = bankForLevel();\n    wrongIds.forEach(id => {\n      if(!items.find(x=>x.expr===id)){\n        const found = bank.find(x=>x.expr===id);\n        if(found) items.push(found);\n      }\n    });\n\n    quiz = shuffle(items).map(q => ({...q, id:q.expr}));\n    index = 0;\n    locked = false;\n    selectedOptionIndex = null;\n    score = 0; \/\/ score for this retry set\n    totalEl.textContent = String(quiz.length);\n    updateTopStats();\n    renderQuestion();\n  }\n\n  function resetAll(){\n    softResetView();\n    renderGlossary();\n  }\n\n  \/\/ ---- GLOSSARY ----\n  function renderGlossary(){\n    const bank = bankForLevel();\n    const query = (glossarySearch.value || \"\").trim().toLowerCase();\n\n    const filtered = bank.filter(q => {\n      const correct = q.options.find(o=>o.ok)?.t || \"\";\n      const hay = (q.expr + \" \" + correct + \" \" + q.example).toLowerCase();\n      return hay.includes(query);\n    });\n\n    glist.innerHTML = \"\";\n    filtered.forEach(q => {\n      const correct = q.options.find(o=>o.ok);\n      const div = document.createElement(\"div\");\n      div.className = \"gitem\";\n      div.innerHTML = `\n        <div class=\"gexpr\">\u2022 ${q.expr}<\/div>\n        <div class=\"gmean\"><b>Meaning:<\/b> ${correct ? correct.t : \"(n\/a)\"}<br>\n        <b>Example:<\/b> ${q.example}<\/div>\n      `;\n      glist.appendChild(div);\n    });\n  }\n\n  \/\/ ---- EVENTS ----\n  lvlBasic.addEventListener(\"click\", () => { setActive(lvlBasic); setLevel(\"basic\"); });\n  lvlInter.addEventListener(\"click\", () => { setActive(lvlInter); setLevel(\"intermediate\"); });\n  lvlAdv.addEventListener(\"click\",   () => { setActive(lvlAdv);   setLevel(\"advanced\"); });\n\n  btnStart.addEventListener(\"click\", pickNewSet);\n  btnRetryWrong.addEventListener(\"click\", retryWrong);\n  btnReset.addEventListener(\"click\", resetAll);\n\n  btnNext.addEventListener(\"click\", next);\n  btnShowAnswer.addEventListener(\"click\", revealCorrect);\n\n  \/\/ Pressing Enter = next\n  document.addEventListener(\"keydown\", (e) => {\n    if(e.key === \"Enter\") {\n      \/\/ avoid interfering when typing in glossary search\n      if(document.activeElement === glossarySearch) return;\n      e.preventDefault();\n      next();\n    }\n  });\n\n  btnToggleGlossary.addEventListener(\"click\", () => {\n    glist.classList.toggle(\"show\");\n    if(glist.classList.contains(\"show\")) renderGlossary();\n  });\n\n  glossarySearch.addEventListener(\"input\", renderGlossary);\n\n  \/\/ Clicking options should submit automatically? (Optional)\n  \/\/ Here: user selects then press Next (Enter works).\n  optsEl.addEventListener(\"change\", () => { \/* placeholder *\/ });\n\n  \/\/ Init\n  setLevel(\"basic\");\n  renderGlossary();\n})();\n<\/script>\n<\/body>\n<\/html>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>Nivel: Basic Aciertos: 0 \u00bfListo para practicar expresiones diarias? Comenzar Cuestionario \u00bfCu\u00e1l es la traducci\u00f3n correcta? &#8230; Siguiente Pregunta \u2192 Nivel: Intermediate Aciertos: 0 \u00bfListo para practicar expresiones de nivel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"class_list":["post-533","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/comments?post=533"}],"version-history":[{"count":29,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/533\/revisions"}],"predecessor-version":[{"id":571,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/533\/revisions\/571"}],"wp:attachment":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/media?parent=533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}