* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 20px;
    font-family: Arial, sans-serif;
    background-color: #f3f0ff;
    color: #29243d;
}

main {
    max-width: 800px;
    margin: auto;
}

/* Enlace para volver */
a {
    color: #7048d9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    margin-top: 30px;
    text-align: center;
}

.introduccion {
    margin-bottom: 30px;
    text-align: center;
    color: #686078;
}

/* Formulario */
.cuestionario {
    padding: 30px;
    border-radius: 12px;
    background-color: white;
}

.campo {
    margin-bottom: 25px;
}

.campo label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.campo input {
    width: 100%;
    padding: 12px;
    border: 1px solid #b8b0ca;
    border-radius: 8px;
    font: inherit;
}

/* Preguntas */
#preguntas {
    margin-bottom: 25px;
    line-height: 1.6;
}

fieldset {
    min-width: 0;
    margin: 0 0 25px;
    padding: 20px;
    border: 1px solid #e9e5f2;
    border-radius: 8px;
}

legend {
    padding: 0 8px;
    font-weight: bold;
}

fieldset label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 12px 0;
    cursor: pointer;
}

input[type="radio"] {
    accent-color: #7048d9;
}

/* Botón de envío */
button {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    background-color: #7048d9;
    color: white;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

button:hover:not(:disabled) {
    background-color: #5835b5;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Navegación con teclado */
a:focus-visible,
input:focus-visible,
button:focus-visible {
    outline: 2px solid #7048d9;
    outline-offset: 4px;
}

/* Adaptación a móviles */
@media (max-width: 600px) {
    body {
        padding: 25px 15px;
    }

    h1 {
        font-size: 26px;
    }

    .cuestionario {
        padding: 20px;
    }

    fieldset {
        padding: 15px;
    }
}
/* Preguntas de una en una y multiplicador por racha */
.reglas { color: #686078; line-height: 1.6; font-size: 14px; }
.marcador { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0 12px; }
.marcador span { background: #f3f0ff; color: #5835b5; padding: 8px 12px; border-radius: 20px; }
progress { display: block; width: 100%; height: 12px; margin-bottom: 26px; accent-color: #7048d9; }
fieldset:disabled { opacity: .8; }
input[readonly] { background: #f5f5f5; }
[hidden] { display: none !important; }
#resultado { line-height: 1.6; }

.boton-cambiar { margin-top: 12px; background: #eee8ff; color: #5835b5; border: 1px solid #b9a7eb; }
.boton-cambiar:hover:not(:disabled) { background: #e2d8ff; }
