/* ═══════════════════════════════════════════════════
   CLAVE ÉTICA — Stylesheet
   ═══════════════════════════════════════════════════ */
* { box-sizing: border-box; }

body.clave-etica-body {
    background: url('../images/clave-etica/fondo_juego_clave_etica.png') center/cover no-repeat fixed !important;
    background-color: #f0f2f8;
    color: #1a2b5c;
    font-family: system-ui, 'Segoe UI', Arial, sans-serif;
}
body.clave-etica-body .game-state-wrapper {
    border: 5px solid rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 0 0 1px rgba(180,195,220,.2), 0 24px 64px rgba(0,0,0,.1) !important;
}
body.clave-etica-body .ad-game-wrapper-inner {
    position: relative;
    overflow: hidden;
    background: none !important;
}
body.clave-etica-body #game-container {
    background: url('../images/clave-etica/fondo_clave_etica.png') center/cover no-repeat !important;
    background-size: auto !important;
}
body.clave-etica-body #welcome-box{
    background: url('../images/clave-etica/fondo_clave_etica.png') center/cover no-repeat !important;
    background-size: auto !important;
}
body.clave-etica-body #game-container{
    background: url('../images/clave-etica/fondo_clave_etica.png') center/cover no-repeat !important;
    background-size: auto !important;
}
/* ══════════════════════════════════════════════
   LOGIN SCREEN  (content inside #welcome-box)
   ══════════════════════════════════════════════ */
.ce-intro {
    position: relative;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

/* Cuando el dilema tiene video de introducción: formulario a la izquierda, video a la derecha */
.ce-intro.has-video {
    gap: 50px;
    max-width: 1250px;
    margin: 0 auto;
}
.ce-video-side {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 525px;
    max-width: 525px;
    z-index: 10;
}
@media (max-width: 768px) {
    .ce-intro.has-video {
        flex-direction: column !important;
        gap: 20px !important;
        max-width: 100% !important;
    }
    .ce-video-side {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ── Sparkle wrapper around logo ── */
.ce-logo-wrap {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 32px 54px;
    padding-bottom: 5px;
    padding-top: 5px;
}
.ce-spark {
    position: absolute;
    pointer-events: none;
    line-height: 1;
    font-weight: 900;
    animation: ce-twinkle 2.2s ease-in-out infinite;
}
@keyframes ce-twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.75); }
    50%       { opacity: 1;   transform: scale(1.15); }
}
/* Positions & colors for each sparkle */
.cs1  { top: 0;      right: 22px;  font-size: 1.2rem;  color: #e05a3f; animation-duration: 2.1s; animation-delay: 0s; }
.cs2  { top: 22%;    right: 0;     font-size: 1rem;    color: #f0b429; animation-duration: 1.9s; animation-delay: 0.5s; }
.cs3  { top: 48%;    left: 2px;    font-size: 1.1rem;  color: #7bb5f5; font-weight: 300; animation-duration: 2.5s; animation-delay: 0.9s; }
.cs4  { bottom: 5%;  right: 18px;  font-size: 0.85rem; color: #e05a3f; animation-duration: 2s;   animation-delay: 0.3s; }
.cs5  { top: 18%;    left: 18px;   font-size: 1rem;    color: #c8b0e8; animation-duration: 2.3s; animation-delay: 0.7s; }
.cs6  { bottom: 25%; left: 0;      font-size: 0.75rem; color: #f0b429; animation-duration: 1.8s; animation-delay: 1.1s; }
.cs7  { top: -14px;  left: 50%;    font-size: 1.5rem;  color: #f0b429; animation-duration: 2.4s; animation-delay: 0.2s; transform: translateX(-50%); }
.cs8  { bottom: -8px; left: 48%;   font-size: 1rem;    color: #c8b0e8; animation-duration: 2.0s; animation-delay: 0.8s; }
.cs9  { top: 62%;    right: -16px; font-size: 1rem;    color: #7bb5f5; animation-duration: 2.6s; animation-delay: 1.4s; }
.cs10 { top: 62%;    left: -16px;  font-size: 1rem;    color: #e89878; animation-duration: 2.2s; animation-delay: 1.8s; }

/* ── Entrance animations ── */
@keyframes ce-enter-up {
    from { opacity: 0; transform: translateY(22px) scale(0.94); }
    to   { opacity: 1; transform: none; }
}
.ce-intro-logo     { animation: ce-enter-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both; }
.ce-intro-subtitle { animation: ce-enter-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both; }
.ce-intro-form     { animation: ce-enter-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both; }

/* ── Button pulse glow ── */
@keyframes ce-btn-glow {
    0%, 100% { box-shadow: 0 4px 16px rgba(240,180,41,.4); }
    50%       { box-shadow: 0 4px 30px rgba(240,180,41,.82), 0 0 0 5px rgba(240,180,41,.13); }
}
.ce-intro-btn { animation: ce-btn-glow 2.8s ease-in-out infinite; }

/* ── Floating ambient particles ── */
@keyframes ce-particle-rise {
    0%   { transform: translateY(0) scale(1); opacity: 0.7; }
    80%  { opacity: 0.35; }
    100% { transform: translateY(-110px) scale(0.55); opacity: 0; }
}
.ce-particle {
    position: absolute; pointer-events: none; border-radius: 50%;
    animation: ce-particle-rise linear infinite;
}
.cp1 { width: 10px; height: 10px; background: #f0b429; bottom: 28%; left: 11%;  animation-duration: 5.2s; animation-delay: 0s; }
.cp2 { width:  7px; height:  7px; background: #c8b8e8; bottom: 18%; left: 26%;  animation-duration: 6.8s; animation-delay: 1.3s; }
.cp3 { width:  8px; height:  8px; background: #e89878; bottom: 33%; right: 18%; animation-duration: 5.9s; animation-delay: 2.7s; }
.cp4 { width:  5px; height:  5px; background: #7bb5f5; bottom: 14%; right: 32%; animation-duration: 7.4s; animation-delay: 0.6s; }
.cp5 { width:  9px; height:  9px; background: #b8cdd8; bottom: 22%; left: 42%;  animation-duration: 6.1s; animation-delay: 3.8s; }
.cp6 { width:  6px; height:  6px; background: #e05a3f; bottom: 38%; right: 10%; animation-duration: 5.5s; animation-delay: 2.0s; }

.ce-intro-fge {
    position: absolute; top: 110px; left: 60px;
}
.ce-intro-fge-img { height: 34px; }

.ce-intro-org-leaf {
    background: transparent;
    padding: 0;
    position: absolute;
    top: 65px;
    right: 85px;
    width: 128px;
    height: 128px;
    border-radius: 45px 0 45px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}
.ce-intro-org-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ce-intro-org-placeholder { font-size: 0.7rem; color: #8898b0; text-align: center; }

.ce-intro-center {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    max-width: 440px; width: 90%; text-align: center;
}
.ce-intro-logo { width: 550px; max-width: 90vw; height: auto; }
.ce-intro-subtitle { font-size: 1.20rem; color: #3a4f82; margin: 0; line-height: 1.4; font-weight: 500;}
.ce-intro-form { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ce-form-label { font-size: 0.83rem; color: #5a6e9a; margin: 4px 0 0; }
.ce-intro-input {
    width: 100%; padding: 10px 18px;
    border: 1.5px solid #d0dae8 !important; border-radius: 10px;
    font-size: 0.95rem; color: #94a3b8; background: white;
    outline: none; transition: border-color .2s; font-family: inherit;
    margin-bottom: 0px;
}
select#user-area{
    margin-bottom: 10px ! IMPORTANT;
}
.ce-intro-input:focus { border-color: #6ba3d4; }
.ce-intro-input::placeholder { color: #a0b0cc; }
.ce-intro-btn {
    width: 100%; padding: 14px 24px;
    background: #FED863; color: #143161;
    border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 400; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: transform .15s, box-shadow .15s; font-family: inherit;
    box-shadow: 0 4px 16px rgba(240,180,41,.4);
}
.ce-intro-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(240,180,41,.55); }

.ce-lang-bottom {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    white-space: nowrap;
}

/* ══════════════════════════════════════════════
   INSTRUCTIONS SCREEN
   ══════════════════════════════════════════════ */
.ce-instructions-screen {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 25px 20px; overflow-y: auto;
}
.ce-instructions-screen.hidden { display: none !important; }

.ce-instr-org {
    background: transparent;
    position: absolute;
    top: 50px;
    left: 65px;
    width: 128px;
    height: 128px;
    padding: 0;
    border-radius: 45px 0 45px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}
.ce-instr-org-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ce-instr-org-txt { font-size: 0.7rem; color: #8898b0; text-align: center; }

.ce-instr-key { width: 86px; margin-bottom: 6px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.1)); }

.ce-instr-title { font-size: 2.1rem; font-weight: 900; color: #1a2b5c; margin: 0 0 4px; }
.ce-instr-title .ce-title-accent { color: #e05a3f; }
.ce-instr-subtitle { font-size: 0.93rem; color: #5a6e9a; margin: 0 0 18px; max-width: 520px; text-align: center; }

.ce-steps-card {
    background: white; border-radius: 16px; padding: 8px 24px;
    max-width: 560px; width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.ce-step {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 13px 0; border-bottom: 1px solid #f0f4fa;
}
.ce-step:last-child { border-bottom: none; }
.ce-step-num {
    min-width: 33px; height: 33px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 0.93rem; flex-shrink: 0;
    background: #e8edf8; color: #4a6a9a;
}
.ce-step:nth-child(1) .ce-step-num { background: #fdd0BF; color: #143062; }
.ce-step:nth-child(2) .ce-step-num { background: #c4dff4; color: #143062; }
.ce-step:nth-child(3) .ce-step-num { background: #e7e0f4; color: #143062; }
.ce-step:nth-child(4) .ce-step-num { background: #fee5d6; color: #143062; }
.ce-step:nth-child(5) .ce-step-num { background: #cadff4; color: #143062; }
.ce-step-body { display: flex; flex-direction: column; gap: 2px; }
.ce-step-body strong { font-size: 0.93rem; color: #1a2b5c; font-weight: 800; }
.ce-step-body span { font-size: 0.82rem; color: #6878a0; line-height: 1.4; }

.ce-instr-note {
    font-size: 0.8rem; color: #7888a8;
    margin: 12px 0 0; display: flex; align-items: center; gap: 5px; text-align: center;
}
.ce-note-icon { font-size: 0.95rem; }

.ce-instr-footer { display: flex; align-items: center; gap: 24px; margin-top: 20px; }
.ce-skip-btn {
    background: none; border: none; color: #8898b8;
    font-size: 0.9rem; cursor: pointer;
    text-decoration: underline dotted; font-family: inherit; padding: 0;
}
.ce-skip-btn:hover { color: #4a6a9a; }
.ce-start-game-btn {
    background: #FED863 !important; color: #1a1200;
    border: none; border-radius: 10px;
    padding: 13px 38px; font-size: 1rem !important; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: transform .15s, box-shadow .15s; font-family: inherit;
    box-shadow: 0 4px 16px rgba(240,180,41,.4);
    padding: 15px 40px ! IMPORTANT;
    margin-top: 5px !important;
    border-radius: 10px !important;
    font-weight: 400 !important;
}
.ce-start-game-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(240,180,41,.55); }

.ce-instr-fge { position: absolute; bottom: 30px; right: 40px; }
.ce-instr-fge-img { height: 30px; opacity: 0.8; }

/* ══════════════════════════════════════════════
   GAME AREA
   ══════════════════════════════════════════════ */
.ce-game-area {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    background: url('../images/clave-etica/fondo_clave_etica.png') center/cover no-repeat;
    background-color: #fdf6ee;
    overflow-x: hidden; overflow-y: auto; z-index: 100;
    background-size: auto;
}
.ce-game-area.hidden { display: none !important; }

/* Header */
.ce-game-header {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; padding: 14px 24px; flex-shrink: 0;
    margin-top:15px;
    margin-bottom: 0px;
}
.ce-gh-org {
    width: 128px;
    height: 128px;
    background: transparent; border-radius: 45px 0 45px 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    padding: 0;
    margin: -4px 20px 10px 42px;
}
.ce-gh-org-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ce-gh-org-txt { font-size: 0.65rem; color: #8898b0; text-align: center; }
.ce-gh-brand { display: flex; align-items: center; gap: 10px; zoom:2;}
.ce-gh-key { height: 45px; }
.ce-gh-title { font-size: 1.45rem; font-weight: 900; color: #1a2b5c; white-space: nowrap; }
.ce-gh-coral { color: #e05a3f; }
.ce-gh-spacer { flex: 1; }
.ce-gh-nav { display: flex; align-items: center; gap: 10px; }
.ce-nav-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.85); border: 1.5px solid #d0daea;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #1a2b5c; transition: all .15s;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.ce-nav-btn:hover:not(:disabled) { background: white; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.ce-nav-btn:disabled { opacity: 0.3; cursor: default; }
.ce-nav-btn .material-symbols-outlined { font-size: 18px; }
.ce-nav-label { font-size: 0.8rem; font-weight: 700; color: #1a2b5c; min-width: 42px; text-align: center; }
.ce-nav-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ce-nav-icon { font-size: 20px; color: #5636e3; }
.ce-nav-title { font-size: 0.8rem; font-weight: 700; color: #5a6e9a; margin: 0; }
.ce-nav-controls { display: flex; align-items: center; justify-content: center; gap: 10px; }
/* Tarjeta "Preguntas" compacta: título a la izquierda y controles a la derecha, en una sola fila */
.ce-sidebar-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.ce-sidebar-nav .ce-nav-hdr { margin-bottom: 0; }
.ce-sidebar-nav .ce-nav-controls { gap: 6px; }
.ce-sidebar-nav .ce-nav-btn { width: 28px; height: 28px; }
.ce-sidebar-nav .ce-nav-btn .material-symbols-outlined { font-size: 16px; }
.ce-sidebar-nav .ce-nav-label { min-width: 36px; }

/* Layout */
.ce-layout {
    flex: 1; display: grid; grid-template-columns: 1fr 270px;
    gap: 16px; padding: 0 100px 22px 200px; overflow: visible; min-height: 0;
}

/* Main (left) */
/* overflow: visible so Portuguese accent popups can float above the keyboard */
.ce-main { display: flex; flex-direction: column; gap: 14px; overflow: visible; }

/* Case card */
.ce-case-card {
    background: white; border-radius: 20px; padding: 28px 16px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    overflow: hidden; flex-shrink: 0;
    max-height: 48vh;
}
.ce-case-tag {
    background: #e8edf8; color: #4a6a9a;
    border-radius: 20px; padding: 5px 22px;
    font-size: 0.85rem; font-weight: 600;
}
.ce-case-text {
    font-size: 0.9rem; color: #3a4f7a; text-align: center;
    line-height: 1.1; margin: 0; max-width: 615px;
    overflow-y: auto; max-height: 18vh;
}
.ce-tiles { display: flex; gap: 6px 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.ce-tile-group { display: flex; gap: 4px; flex-wrap: nowrap; }
.ce-tile-spacer { width: 12px; flex-shrink: 0; }
.ce-tile {
    width: 40px; height: 45px;
    border: 2px solid #c8d8ec; border-radius: 10px; background: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 900; color: #1a2b5c; text-transform: uppercase;
    transition: all .25s;
}
.ce-tile.revealed { border-color: #7bb8f5; background: #f0f7ff; }
.ce-tile.tile-pop { animation: tile-pop .3s ease; }
@keyframes tile-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.22); }
    100% { transform: scale(1); }
}

/* Keyboard */
.ce-keyboard { display: flex; flex-direction: column; gap: 7px; align-items: center; flex-shrink: 0; padding: 4px 0; overflow: visible; }
.ce-kb-row { display: flex; gap: 6px; overflow: visible; position: relative; }
.ce-key {
    min-width: 50px; height: 50px; padding: 0 8px;
    background: white; border: 1.5px solid #d8e2ee; border-radius: 10px;
    font-size: 0.9rem; font-weight: 800; color: #1a2b5c;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .15s; font-family: inherit;
    box-shadow: 0 2px 6px rgba(0,0,0,.08), inset 0 -2px 0 rgba(0,0,0,.06);
}
.ce-key:hover:not(:disabled) { background: #f0f5ff; transform: translateY(-1px); }
.ce-key.correct { background: #a8c8f0; border-color: #7ab0e0; color: #1a3060; cursor: default; }
.ce-key.wrong   { background: #e07a6a; border-color: #c85a4a; color: white; cursor: default; }
.ce-key:disabled { cursor: default; }
.ce-key-special { min-width: 46px; font-size: 1.1rem; color: #6a7a9a; }
.ce-key-enter   { min-width: 52px; font-size: 0.75rem; letter-spacing: 0.02em; color: #6a7a9a; }

/* ── Teclado Portugués: popup de tildes sobre vocales ──────────────────── */

/* Wrapper: posición relativa para que el popup flote sobre el teclado */
.ce-key-wrapper {
    position: relative;
    display: inline-flex;
}

/* Vocales con variantes de acento — pequeño indicador visual */
.ce-key-has-accents {
    flex-direction: column;
    gap: 1px;
}
.ce-key-label {
    line-height: 1;
    pointer-events: none;
}
.ce-accent-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #9b8edc;
    pointer-events: none;
    transition: background .15s;
}
.ce-key-has-accents:hover:not(:disabled) .ce-accent-dot,
.ce-key-wrapper.is-open .ce-accent-dot {
    background: #5a3fb5;
}

/* Popup flotante */
.ce-accent-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 5px;
    padding: 7px 8px;
    background: #ffffff;
    border: 1.5px solid #c4b5f0;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(80,50,180,.18), 0 1px 4px rgba(0,0,0,.07);
    z-index: 200;
    white-space: nowrap;
    /* Triangle arrow pointing down */
    filter: drop-shadow(0 2px 6px rgba(80,50,180,.10));
}
/* Arrow */
.ce-accent-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #c4b5f0;
}
.ce-accent-popup::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #ffffff;
    margin-top: -1px;
    z-index: 1;
}

/* Show popup on hover (desktop) or .is-open class (touch) */
.ce-key-wrapper:hover .ce-accent-popup,
.ce-key-wrapper.is-open .ce-accent-popup {
    display: flex;
}

/* Individual accent option button */
.ce-accent-opt {
    min-width: 42px; height: 42px;
    padding: 0 6px;
    background: linear-gradient(160deg, #f5f0ff 0%, #eef4ff 100%);
    border: 1.5px solid #d0c4f4;
    border-radius: 9px;
    font-size: 0.95rem; font-weight: 800; color: #4a30a0;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit;
    transition: all .12s;
    box-shadow: 0 2px 5px rgba(100,80,200,.10), inset 0 -2px 0 rgba(100,80,200,.08);
}
.ce-accent-opt:hover:not(:disabled) {
    background: #ede4ff;
    border-color: #b09ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(100,80,200,.18);
}
.ce-accent-opt:active:not(:disabled) { transform: translateY(0); }
.ce-accent-opt.correct { background: #a8c8f0; border-color: #7ab0e0; color: #1a3060; cursor: default; }
.ce-accent-opt.wrong   { background: #e07a6a; border-color: #c85a4a; color: white;   cursor: default; }
.ce-accent-opt:disabled { cursor: default; }

/* Sidebar */
.ce-sidebar { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; padding-bottom: 6px; }
.ce-sidebar-card {
    background: white; border-radius: 14px; padding: 13px 15px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.ce-card-label { font-size: 0.8rem; font-weight: 700; color: #5a6e9a; margin: 0 0 9px; }

/* Attempt dots */
.ce-dots { display: flex; gap: 8px; align-items: center; }
.ce-dot { width: 22px; height: 22px; border-radius: 50%; background: #6aabf7; transition: all .3s; }
.ce-dot.consumed { background: transparent; border: 2px solid #b8d4f5; }
.ce-dot.fail-all {
    background: #e05a3f; border: none;
    animation: dot-shake .4s ease;
}
@keyframes dot-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-3px); }
    75%       { transform: translateX(3px); }
}

/* Progress */
.ce-prog-pair     { display: flex; gap: 10px; }
.ce-prog-pair > .ce-sidebar-card { flex: 1; min-width: 0; }
.ce-progress-row  { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ce-prog-text     { display: flex; flex-direction: column; gap: 2px; }
.ce-prog-fraction { display: flex; align-items: baseline; gap: 1px; line-height: 1; }
.ce-prog-num      { font-size: 2.4rem; font-weight: 900; color: #1a2b5c; line-height: 1; }
.ce-prog-total    { font-size: 1rem;   font-weight: 600; color: #8898b8; }
.ce-prog-label-words { font-size: 0.75rem; color: #8898b8; margin: 0; }
.ce-prog-score-num  { font-size: 2.4rem; font-weight: 900; color: #1a2b5c; line-height: 1; }
.ce-score-live-star { font-size: 52px; color: #f0b429; flex-shrink: 0; }
@keyframes ce-score-pop { 0%,100% { transform: scale(1); } 40% { transform: scale(1.35); } }
.ce-prog-score-pop { animation: ce-score-pop 0.35s ease; }
.ce-prog-svg      { width:55px; height: 55px; flex-shrink: 0; margin-top: -20px;}

/* Hint */
.ce-hint-card { cursor: pointer; transition: background .2s, border-color .2s; border: 1.5px solid transparent; }
.ce-hint-card:hover:not(.used):not(.revealed) { background: #f6f9ff; }
.ce-hint-inner { display: flex; align-items: center; gap: 2px; }
.ce-hint-bulb { line-height: 1; flex-shrink: 0; }
.ce-hint-bulb svg { transition: stroke .25s; }
.ce-hint-text-wrap { flex: 1; }
.ce-hint-title-txt { font-size: 0.86rem; font-weight: 700; color: #1a2b5c; margin: 0; }
.ce-hint-sub-txt   { font-size: 0.75rem; color: #8898b8; margin: 2px 0 0; }
.ce-hint-chevron   { font-size: 1.15rem; color: #8898b8; flex-shrink: 0; transition: opacity .2s; }
.ce-hint-card.used { opacity: 0.55; pointer-events: none; }

/* Revealed state */
.ce-hint-card.revealed { background: #fffbec; border-color: #f0c040; cursor: default; pointer-events: none; }
.ce-hint-card.revealed .ce-hint-bulb svg { stroke: #f0b429; }
.ce-hint-card.revealed .ce-hint-chevron  { opacity: 0; }
.ce-hint-card.revealed .ce-hint-title-txt {
    font-size: 0.7rem; font-weight: 700; color: #b07800; text-transform: uppercase; letter-spacing: 0.06em;
}
.ce-hint-card.revealed .ce-hint-sub-txt {
    font-size: 0.8rem; font-weight: 700; color: #1a2b5c; margin: 3px 0 0;
    animation: ce-hint-reveal .3s cubic-bezier(0.22,1,0.36,1);
}
@keyframes ce-hint-reveal {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}

/* Status card */
.ce-status-card { padding: 13px 15px; }
.ce-status-fail { display: flex; flex-direction: column; gap: 10px; }
.ce-status-fail-top { display: flex; align-items: flex-start; gap: 8px; }
.ce-status-fail-icon {
    min-width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid #e05a3f; color: #e05a3f;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 900; flex-shrink: 0;
}
.ce-status-fail-msg { font-size: 0.82rem; color: #4a5a7a; line-height: 1.4; margin: 0; }
.ce-status-fail-msg strong { color: #1a2b5c; }
.ce-fail-answer { font-size: 0.82rem; color: #4a5a7a; line-height: 1.4; margin: 0; }
.ce-fail-answer strong { color: #1a2b5c; letter-spacing: 1px; }
/* Panel de "sin intentos" compacto */
.ce-status-card:has(.ce-status-fail) { padding: 10px 12px; }
.ce-status-fail { gap: 6px; }
.ce-status-fail .ce-status-fail-top { align-items: center; gap: 8px; }
.ce-status-fail .ce-status-fail-icon { min-width: 22px; height: 22px; font-size: 0.75rem; }
.ce-status-fail .ce-status-fail-msg { font-size: 0.76rem; line-height: 1.3; }
.ce-status-fail .ce-fail-answer { font-size: 0.76rem; line-height: 1.3; }
.ce-status-fail .ce-fail-feedback { font-size: 0.74rem; line-height: 1.35; padding: 5px 8px; }
.ce-status-fail .ce-next-btn { padding: 8px; font-size: 0.85rem; }
.ce-fail-feedback {
    font-size: 0.8rem; color: #4a5a7a; line-height: 1.5; margin: 0;
    background: #f0f6fb; border-left: 3px solid #7bb5f5; border-radius: 0 6px 6px 0;
    padding: 8px 10px; white-space: pre-line;
}
.ce-retry-btn {
    background: #f0b429; color: #1a1200; border: none; border-radius: 8px;
    padding: 11px; font-size: 0.9rem; font-weight: 500;
    cursor: pointer; width: 100%; font-family: inherit; transition: transform .15s;
}
.ce-retry-btn:hover { transform: translateY(-1px); }

.ce-status-ok       { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.ce-status-ok-inner { display: flex; align-items: center; gap: 12px; }
.ce-status-ok-svg   { display: block; flex-shrink: 0; }
.ce-status-ok-texts { display: flex; flex-direction: column; gap: 2px; }
.ce-status-ok-title { font-size: 1rem; font-weight: 900; color: #1a2b5c; margin: 0; }
.ce-status-ok-sub   { font-size: 0.76rem; color: #8898b8; margin: 0; }
.ce-next-btn {
    background: #f0b429; color: #1a1200; border: none; border-radius: 8px;
    padding: 12px; font-size: 0.9rem; font-weight: 400;
    cursor: pointer; width: 100%; font-family: inherit; transition: transform .15s;
    box-shadow: 0 3px 10px rgba(240,180,41,.35);
}
.ce-next-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(240,180,41,.5); }

/* Confetti */
.ce-confetti-wrap { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ce-confetti-piece {
    position: absolute; top: -12px;
    animation: ce-confetti-fall linear forwards;
}
@keyframes ce-confetti-fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    75%  { opacity: 1; }
    100% { transform: translateY(160px) rotate(400deg); opacity: 0; }
}

/* FGE bottom-right */
.ce-fge-bottom { position: absolute; bottom: 16px; right: 22px; }
.ce-fge-bottom-img { height: 26px; opacity: 0.7; }

/* ══════════════════════════════════════════════
   END SCREEN
   ══════════════════════════════════════════════ */
.ce-end-screen {
    position: fixed; inset: 0;
    display: flex; flex-direction: column; align-items: center;
    z-index: 1000; overflow-y: auto; padding: 30px 20px 30px 20px;
}
.ce-end-screen.hidden { display: none !important; }

/* Org logo — top left */
.ce-end-org {
    position: fixed;
    top: 50px;
    left: 65px;
    width: 128px; height: 128px;
    background: transparent; border-radius: 36px 0 36px 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    padding: 0;
    z-index: 10;
}
.ce-end-org-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ce-end-org-txt { font-size: 0.65rem; color: #8898b0; text-align: center; }

/* FGE — bottom right */
.ce-end-fge { position: fixed; bottom: 22px; right: 30px; z-index: 10; }
.ce-end-fge-img { height: 32px; opacity: 0.85; }

.ce-end-key { width: 80px; margin-bottom: 8px; }
.ce-end-title { font-size: 2.3rem; font-weight: 900; color: #1a2b5c; margin: 0 0 6px; text-align: center; }
.ce-end-title .ce-end-accent { color: #e05a3f; }
.ce-end-subtitle {
    font-size: 1.2rem;
    color: #1a2b5c;
    font-weight: 400;
    margin: 0 0 28px;
    text-align: center;
}

.ce-end-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 16px; width: 100%; max-width: 900px;
}
.ce-end-card {
    background: white; border-radius: 18px; padding: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    padding-bottom: 10px;
}

/* Score */
.ce-score-card { display: flex; align-items: center; gap: 20px; }
.ce-end-star { width: 140px; flex-shrink: 0; }
.ce-score-text-wrap { display: flex; flex-direction: column; gap: 0; }
.ce-score-main  { font-size: 1.9rem; font-weight: 700; color: #e05a3f; margin: 0; line-height: 1.2; }
.ce-score-label { font-size: 1.9rem; font-weight: 700; color: #1a2b5c; margin: 0; line-height: 1.2; }
.ce-score-detail { font-size: 0.82rem; color: #8898b8; margin: 6px 0 0; padding-right: 85px;}
.ce-score-detail-hl { color: #e05a3f; font-weight: 700; }
.ce-score-detail-pts { display: inline-block; background: #ede9fc; color: #5636e3; font-weight: 800; font-size: 0.85rem; border-radius: 20px; padding: 1px 10px; margin-left: 6px; }
.ce-score-badge { display: inline-block; background: #5636e3; color: #fff; font-size: 0.75rem; font-weight: 800; border-radius: 20px; padding: 1px 9px; margin-left: 6px; vertical-align: middle; }

/* Badge */
.ce-badge-end-card { display: flex; align-items: center; gap: 16px; }
.ce-end-badge-img { width: 130px; flex-shrink: 0; }
.ce-badge-end-info { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ce-badge-end-title { font-size: 1.25rem; font-weight: 600; color: #1a2b5c; margin: 0; text-align: center;}
.ce-badge-end-sub   { font-size: 0.78rem; color: #6878a0; margin: 0; line-height: 1.35; text-align: center;}
.ce-badge-end-btn {
    background: #FED863; color: #1a1200; border: none; border-radius: 8px;
    padding: 9px 14px; font-size: 0.88rem; font-weight: 500;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    font-family: inherit; width: 100%; justify-content: center; transition: transform .15s;
}
.ce-badge-end-btn:hover { transform: translateY(-1px); }
.ce-badge-btn-thumb { width: 20px; border-radius: 50%; }

/* Feedback */
.ce-feedback-end-card { display: flex; flex-direction: column; gap: 10px; }
#ce-feedback-form-body { display: flex; flex-direction: column; gap: 10px; }
.ce-feedback-hdr { display: flex; align-items: flex-start; gap: 10px; }
.ce-feedback-icon { flex-shrink: 0; display: flex; margin-top: 2px; }
.ce-feedback-hdr-text { display: flex; flex-direction: column; gap: 2px; }
.ce-feedback-title-txt { font-size: 1.25rem; font-weight: 500; color: #1a2b5c; margin: 0; }
.ce-feedback-sub-txt   { font-size: 0.8rem; color: #8898b8; margin: 0; }
.ce-feedback-tags-row  { display: flex; gap: 7px; }
.ce-tag {
    flex: 1; background: white; border: 1.5px solid #c8d8ec;
    color: #3a5080; border-radius: 20px;
    padding: 7px 6px; font-size: 0.8rem; font-weight: 600; text-align: center;
    cursor: pointer; transition: all .2s; font-family: inherit;
}
.ce-tag:hover, .ce-tag.active { background: #e0eeff; border-color: #7ab0e0; color: #1a2b5c; }
.ce-feedback-textarea {
    width: 100%; min-height: 56px; padding: 9px 13px;
    border: 1.5px solid #d0dae8; border-radius: 10px;
    background: #f8faff; color: #1a2b5c;
    font-size: 0.83rem; font-family: inherit; resize: none; outline: none;
    transition: border-color .2s;
}
.ce-feedback-textarea:focus { border-color: #7ab0e0; }
.ce-feedback-textarea::placeholder { color: #a0b0cc; }
.ce-feedback-send-btn {
    background: #d2c8eb; color: #503890; border: none; border-radius: 24px;
    padding: 10px 36px; font-size: 0.88rem; font-weight: 500;
    cursor: pointer; align-self: center; font-family: inherit; transition: background .2s;
}
.ce-feedback-send-btn:hover { background: #b8a8e0; }

/* Crea tu propio dilema (Clave Ética): más aire entre título, campo y botón */
.ce-dilema-end-card { padding: 28px 28px 22px; gap: 18px; }
.ce-dilema-end-card #ce-dilema-form-body { gap: 18px; }
.ce-dilema-end-card .ce-feedback-hdr-text { gap: 8px; }
.ce-dilema-end-card .ce-feedback-hdr { margin-bottom: 10px; }
.ce-dilema-end-card .ce-feedback-textarea { min-height: 96px; padding: 12px 15px; font-size: 0.88rem; }

/* ── Thank-you state ─────────────────────────────────────────────────── */
.ce-feedback-ok {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 14px; padding: 10px 0; flex: 1;
    animation: ceFbOkIn 0.5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes ceFbOkIn {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ce-feedback-ok-ring {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #f0ecff 0%, #e8f4ff 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 18px rgba(124,111,205,0.22);
}
.ce-feedback-ok-check-svg { width: 52px; height: 52px; }
.ce-ok-circle {
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: ceDrawCircle 0.55s ease forwards 0.1s;
}
.ce-ok-tick {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: ceDrawTick 0.35s ease forwards 0.55s;
}
@keyframes ceDrawCircle {
    to { stroke-dashoffset: 0; }
}
@keyframes ceDrawTick {
    to { stroke-dashoffset: 0; }
}
.ce-feedback-ok-title {
    font-size: 1.2rem; font-weight: 700; color: #1a2b5c;
    text-align: center; margin: 0;
}
.ce-feedback-ok-sub {
    font-size: 0.82rem; color: #7c6fcd; text-align: center;
    margin: 0; line-height: 1.4; font-weight: 500;
}

/* Share */
.ce-share-end-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 18px;
}
.ce-share-title-txt { font-size: 1.25rem; font-weight: 600; color: #1a2b5c; margin: 0; text-align: center; }
.ce-share-icons-row { display: flex; gap: 16px; align-items: center; }
.ce-share-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; text-decoration: none; cursor: pointer;
    transition: transform .2s, opacity .2s;
}
.ce-share-btn:hover { transform: scale(1.15); opacity: 0.8; }
.ce-share-btn svg { width: 26px; height: 26px; fill: #1a2b5c; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .ce-layout { grid-template-columns: 1fr; overflow-y: auto; }
    .ce-sidebar { flex-direction: row; flex-wrap: wrap; overflow: visible; }
    .ce-sidebar-card { flex: 1; min-width: 130px; }
}
@media (max-width: 640px) {
    .ce-end-grid { grid-template-columns: 1fr; }
    .ce-score-card, .ce-badge-end-card { flex-direction: column; text-align: center; align-items: center; }
    .ce-instr-title { font-size: 1.7rem; }
    .ce-end-title   { font-size: 1.7rem; }
}

/* ══════════════════════════════════════════════
   MOBILE — Clave Ética responsive (≤ 768 px)
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* 0. Body/HTML: asegurar scroll de página (anula body.game-active que pone overflow:hidden) */
    html {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
    }
    body.clave-etica-body,
    body.clave-etica-body.single-dilemas,
    body.clave-etica-body.game-active {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        height: auto !important;
        min-height: 100dvh !important;
        background: #fdf7f3 !important;
        background-image: none !important;
    }

    /* 1. Contenedores base: quitar transform fijo de 1250×700 */
    body.clave-etica-body #welcome-box,
    body.clave-etica-body #instructions-box,
    body.clave-etica-body #game-container,
    body.clave-etica-body #game-loader {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        background: #fdf7f3 !important;
        background-image: none !important;
        overflow: visible !important;
    }

    body.clave-etica-body .app-master-wrapper {
        min-height: 0 !important;
        align-items: stretch !important;
        padding: 0 !important;
        background: #fdf7f3 !important;
    }

    body.clave-etica-body .game-state-wrapper {
        border: none !important;
        box-shadow: none !important;
    }

    /* 2. Intro / login screen */
    .ce-intro {
        flex-direction: column !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        align-items: center !important;
        padding: 80px 20px 40px !important;
    }

    .ce-spark { display: none !important; }

    .ce-logo-wrap { padding: 5px !important; }

    .ce-intro-fge {
        top: 16px !important;
        left: 20px !important;
    }
    .ce-intro-fge-img { height: 26px !important; }

    .ce-intro-org-leaf {
        top: 12px !important;
        right: 14px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important;
        padding: 0 !important;
    }

    .ce-intro-logo { width: 440px !important; max-width: 90vw !important; }

    .ce-intro-center {
        max-width: 100% !important;
        width: 100% !important;
        margin-top: 10px !important;
    }

    .ce-lang-bottom {
        position: static !important;
        transform: none !important;
        left: auto !important;
        bottom: auto !important;
        margin: 16px auto 0 !important;
        align-self: center !important;
    }

    /* 3. Instructions screen — scroll de página, no interno */
    .ce-instructions-screen {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        overflow: visible !important;
        touch-action: pan-y !important;
        padding: 70px 16px 30px !important;
        min-height: 100dvh !important;
        background: #fdf7f3 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .ce-instr-org {
        top: 12px !important;
        left: 14px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important;
        padding: 0 !important;
    }

    .ce-instr-title { font-size: 1.5rem !important; }

    .ce-instr-fge { display: none !important; }

    /* 4. Game screen */

    /* Sacar ce-game-area del fixed para que fluya en mobile */
    .ce-game-area {
        position: relative !important;
        inset: auto !important;
        min-height: 100dvh !important;
        background: #fdf7f3 !important;
        background-image: none !important;
    }

    .ce-game-header {
        padding: 12px 12px 8px !important;
        margin-top: 0 !important;
        position: relative !important;
        min-height: 56px !important;
    }

    .ce-gh-brand { gap: 90px !important; zoom: 1 !important; text-align: center !important; }

    .ce-gh-org {
        margin: 0 !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        position: absolute !important;
        top: 6px !important;
        left: 10px !important;
    }

    .ce-fge-bottom { display: none !important; }
    .mute-btn-container { display: none !important; }

    .ce-layout {
        grid-template-columns: 1fr !important;
        padding: 8px 12px 16px !important;
        gap: 10px !important;
    }

    /* Case card: mostrar todo el texto sin cortar */
    .ce-case-card {
        max-height: none !important;
        overflow: visible !important;
        padding: 16px 12px 20px !important;
    }
    .ce-case-text {
        max-height: none !important;
        overflow: visible !important;
        font-size: 0.82rem !important;
    }

    /* Tiles: ligeramente más pequeñas */
    .ce-tile {
        width: 36px !important;
        height: 42px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }

    /* Teclado: reducir teclas para que quepan en pantalla */
    .ce-keyboard { gap: 5px !important; padding: 2px 0 !important; touch-action: pan-y !important; }
    .ce-kb-row { gap: 4px !important; touch-action: pan-y !important; }
    .ce-key {
        min-width: 0 !important;
        width: 34px !important;
        height: 42px !important;
        padding: 0 4px !important;
        font-size: 0.78rem !important;
        border-radius: 8px !important;
        touch-action: manipulation !important;
    }
    .ce-key-special { width: 38px !important; font-size: 0.9rem !important; }
    .ce-key-enter   { width: 44px !important; font-size: 0.65rem !important; }

    /* Permitir scroll vertical en el área de juego aunque el dedo esté sobre el teclado */
    body.clave-etica-body .ce-game-area,
    body.clave-etica-body .ce-main {
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .ce-sidebar { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
    .ce-prog-pair { display: contents !important; }
    .ce-sidebar-nav { grid-column: 1 / -1 !important; width: 100% !important; }

    /* 4b. Status card (correcto / sin intentos) — full width */
    .ce-status-card {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .ce-status-ok, .ce-status-fail {
        width: 100% !important;
    }
    .ce-next-btn, .ce-retry-btn {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 5. End screen */
    .ce-end-screen {
        overflow-y: auto !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding-top: 60px !important;
    }

    .ce-end-org {
        top: 12px !important;
        left: 14px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important;
        padding: 0 !important;
    }

    .ce-end-grid { grid-template-columns: 1fr !important; }
    .ce-end-title { font-size: 1.5rem !important; }

    /* Footer: mismo color de fondo que el juego */
    body.clave-etica-body #main-footer {
        background: #fdf7f3 !important;
        background-image: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        padding: 16px 20px 20px !important;
    }

    body.clave-etica-body #main-footer,
    body.clave-etica-body #main-footer a,
    body.clave-etica-body #main-footer span,
    body.clave-etica-body #main-footer p {
        color: #3a4f82 !important;
    }
}

/* ── Ya completaste (Clave Ética) ── */
body.clave-etica-body .dilema-done-icon-wrap {
    background: rgba(86,54,227,.1);
    box-shadow: 0 0 0 6px rgba(86,54,227,.07);
}
body.clave-etica-body .dilema-done-check {
    color: #5636e3;
}
body.clave-etica-body .dilema-done-title {
    color: #1a2b5c;
}
body.clave-etica-body .dilema-done-msg {
    color: #3a4f82;
}

/* ── Markdown bold ── */
.ce-case-text strong {
    font-weight: 800;
    color: #1a2b5c;
}
.ce-hint-card.revealed .ce-hint-sub-txt strong {
    font-weight: 800;
    color: #0f1d3d;
}

/* ── Chapita: nombre de empresa overlay ── */
.chapita-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.chapita-empresa-label {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 50, 70, 0.80);
    color: #fff;
    padding: 3px 14px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.04em;
    pointer-events: none;
    line-height: 1.6;
}


/* Cuadro centrado al agotar los intentos (Clave Ética) */
.ce-fail-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(18, 24, 60, 0.45); backdrop-filter: blur(2px);
}
.ce-fail-modal {
    width: 100%; max-width: 420px; background: #fff; border-radius: 18px;
    padding: 24px 26px; box-shadow: 0 20px 50px rgba(18, 24, 60, 0.35);
    animation: ceFailPop .25s cubic-bezier(.175,.885,.32,1.275);
}
.ce-fail-modal .ce-status-fail { gap: 12px; }
.ce-fail-modal .ce-status-fail-icon { min-width: 30px; height: 30px; font-size: 1rem; }
.ce-fail-modal .ce-status-fail-msg { font-size: 0.95rem; line-height: 1.4; }
.ce-fail-modal .ce-fail-answer { font-size: 0.95rem; line-height: 1.4; }
.ce-fail-modal .ce-fail-feedback { font-size: 0.9rem; line-height: 1.5; padding: 10px 12px; }
.ce-fail-modal .ce-next-btn { padding: 12px; font-size: 0.95rem; }
@keyframes ceFailPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Feedback opcional al acertar la palabra (Clave Ética) */
.ce-ok-feedback {
    font-size: 0.8rem; color: #4a5a7a; line-height: 1.5; margin: 0; white-space: pre-line;
    background: #eefaf2; border-left: 3px solid #52c87a; border-radius: 0 6px 6px 0; padding: 8px 10px;
}

/* Negrita destacada en feedback de Clave Ética (tarjetas claras: ámbar oscuro para leer sobre blanco) */
.ce-ok-feedback strong, .ce-fail-feedback strong { font-weight: 800; color: #9a6200; }

/* Acierto en cuadro centrado (Clave Ética): mismo contenedor que el de sin intentos */
.ce-fail-modal .ce-status-ok { gap: 14px; }
.ce-fail-modal .ce-status-ok-title { font-size: 1.15rem; }
.ce-fail-modal .ce-status-ok-sub { font-size: 0.9rem; }
.ce-fail-modal .ce-ok-feedback { font-size: 0.9rem; padding: 10px 12px; }
.ce-fail-modal .ce-next-btn { padding: 12px; font-size: 0.95rem; }
