.oce-wizard {
    --green: #123D36;
    --orange: #F28C28;
    --cream: #F5F4EF;
    --text: #18211D;
    --muted: #66706B;
    --border: #D9D6CD;

    max-width: 780px;
    margin: 50px auto;
    padding: 18px;
    color: var(--text);
}

.oce-wizard-shell {
    padding: clamp(26px, 6vw, 50px);
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 44px rgba(18,61,54,.07);
}

.oce-wizard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 38px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.oce-wizard-top-label {
    color: var(--green);
    font-weight: 800;
}

.oce-wizard-stage {
    color: var(--muted);
    font-size: 13px;
}

.oce-wizard h1 {
    margin: 0 0 10px;
    color: var(--green);
    font-size: clamp(30px, 6vw, 44px);
    line-height: 1.12;
}

.oce-wizard-help {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.oce-wizard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
}

.oce-wizard-grid-main {
    gap: 16px;
}

.oce-wizard-list {
    display: grid;
    gap: 12px;
}

.oce-wizard-choice {
    position: relative;
    min-height: 82px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--green);
    font: inherit;
    cursor: pointer;
    transition: .15s ease;
}

.oce-wizard-grid-main .oce-wizard-choice {
    min-height: 145px;
    text-align: center;
}

.oce-wizard-choice:hover {
    border-color: var(--orange);
    transform: translateY(-1px);
}

.oce-wizard-choice.is-selected {
    border: 2px solid var(--orange);
    background: #FFF8EF;
}

.oce-wizard-icon {
    display: block;
    margin-bottom: 8px;
    font-size: 28px;
}

.oce-wizard-choice strong {
    font-size: 15px;
    line-height: 1.3;
}

.oce-choice-check {
    display: none;
    position: absolute;
    top: 7px;
    right: 10px;
    color: var(--orange);
    font-weight: 900;
}

.oce-damage-choice.is-selected .oce-choice-check {
    display: block;
}

.oce-wizard-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 34px;
}

.oce-wizard-nav button {
    min-height: 52px;
    border-radius: 11px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.oce-back {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--green);
}

.oce-next {
    border: 0;
    background: var(--orange);
    color: var(--text);
}

.oce-next:disabled {
    opacity: .4;
    cursor: default;
}

.oce-context-block {
    display: grid;
    gap: 10px;
}

.oce-context-block label {
    margin-top: 9px;
    color: var(--green);
    font-size: 14px;
    font-weight: 750;
}

.oce-context-block input[type="text"],
.oce-context-block select,
.oce-context-block textarea {
    width: 100%;
    min-height: 50px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font: inherit;
}

.oce-context-block textarea {
    min-height: 110px;
    resize: vertical;
}

.oce-wizard-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
}

.oce-wizard-check input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.oce-wizard-message {
    min-height: 22px;
    margin-top: 16px;
    font-size: 14px;
}

.oce-wizard-message.is-error {
    color: #9E2B25;
}

@media (max-width: 600px) {

    .oce-wizard {
        margin: 15px auto;
        padding: 10px;
    }

    .oce-wizard-shell {
        padding: 24px 18px;
    }

    .oce-wizard-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 9px;
    }

    .oce-wizard-choice {
        min-height: 100px;
        padding: 13px 9px;
        text-align: center;
    }

    .oce-wizard-grid-main .oce-wizard-choice {
        min-height: 125px;
    }

    .oce-wizard-nav {
        position: sticky;
        bottom: 0;
        padding: 12px 0 4px;
        background: #fff;
    }
}

/*
 * OJO CON ESTO
 * Una sola capa visible por vez.
 * Se fuerza porque estilos del tema pueden sobrescribir [hidden].
 */
.oce-wizard-step[hidden],
.oce-subject-group-wizard[hidden],
.oce-damage-group-wizard[hidden],
.oce-context-block[hidden],
#oce-plate-wrap[hidden],
#oce-company-wrap[hidden] {
    display: none !important;
}

/*
 * LIENZO ESTABLE DEL ASISTENTE
 * Evita que la página cambie bruscamente de altura entre pasos.
 */
@media (min-width: 601px) {

    .oce-wizard-shell {
        min-height: 620px;
        display: flex;
        flex-direction: column;
    }

    .oce-wizard-step:not([hidden]) {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .oce-wizard-nav {
        margin-top: auto;
        padding-top: 34px;
    }
}

/*
 * En móvil dejamos que el contenido determine la altura,
 * pero mantenemos la navegación al final de cada capa.
 */
@media (max-width: 600px) {

    .oce-wizard-step:not([hidden]) {
        display: flex;
        flex-direction: column;
    }

    .oce-wizard-nav {
        margin-top: 28px;
    }
}

/*
 * MARCO ESTABLE REAL DEL WIZARD
 * Escritorio: misma altura en todas las capas.
 */
@media (min-width: 768px) {

    .oce-wizard-shell {
        height: 650px;
        min-height: 650px;
        max-height: 650px;
        overflow: hidden;
    }

    .oce-wizard-step:not([hidden]) {
        flex: 1;
        min-height: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    /*
     * Zona central: si una capa tiene muchas opciones,
     * desplaza solo su contenido y no toda la página.
     */
    .oce-subject-groups,
    .oce-damage-group-wizard:not([hidden]),
    .oce-wizard-list,
    .oce-context-block:not([hidden]) {
        overflow-y: auto;
        min-height: 0;
        max-height: 390px;
        padding-right: 5px;
    }

    /*
     * Navegación siempre abajo.
     */
    .oce-wizard-nav {
        flex-shrink: 0;
        margin-top: auto;
        padding-top: 22px;
    }
}

/*
 * En móvil no imponemos altura fija.
 */
@media (max-width: 767px) {

    .oce-wizard-shell {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
    }
}

/*
 * OJO CON ESTO · WIZARD COMPACTO EN ESCRITORIO
 * Las categorías principales siguen grandes.
 * Las opciones internas usan mejor el espacio disponible.
 */
@media (min-width: 768px) {

    /*
     * Categoría principal: Patrimonio / Medioambiente
     * se mantiene destacada.
     */
    .oce-wizard-grid-main .oce-wizard-choice {
        min-height: 125px;
        padding: 20px 16px;
    }

    /*
     * Tipo y daños: tarjetas más compactas.
     */
    .oce-subject-choice,
    .oce-damage-choice {
        min-height: 58px;
        padding: 10px 12px;
    }

    .oce-subject-choice .oce-wizard-icon {
        margin-bottom: 4px;
        font-size: 22px;
    }

    .oce-subject-choice strong,
    .oce-damage-choice strong {
        font-size: 13px;
        line-height: 1.2;
    }

    /*
     * Menos separación entre tarjetas.
     */
    .oce-wizard-grid {
        gap: 8px;
    }

    /*
     * Las opciones normales deben entrar completas
     * sin scrollbar interno.
     */
    .oce-subject-groups,
    .oce-damage-group-wizard:not([hidden]),
    .oce-wizard-list {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    /*
     * Cómo conociste el hecho:
     * botones también más compactos.
     */
    .oce-wizard-list .oce-wizard-choice {
        min-height: 62px;
        padding: 10px 14px;
        text-align: left;
    }

    .oce-wizard-list .oce-wizard-icon {
        display: inline-block;
        margin: 0 10px 0 0;
        font-size: 22px;
        vertical-align: middle;
    }

    /*
     * Dejamos scroll interno solamente para pasos
     * que realmente pueden tener campos extensos.
     */
    .oce-context-block:not([hidden]) {
        max-height: 385px;
        overflow-y: auto;
    }
}

/*
 * REFINAMIENTO DEL WIZARD EN ESCRITORIO
 * Aprovecha mejor el ancho y evita que las opciones
 * se acerquen a la navegación inferior.
 */
@media (min-width: 768px) {

    /*
     * Títulos un poco más compactos.
     */
    .oce-wizard h1 {
        font-size: 36px;
        margin-bottom: 8px;
        line-height: 1.08;
    }

    .oce-wizard-help {
        margin-bottom: 18px;
    }

    /*
     * Las categorías principales siguen en 2 columnas.
     */
    .oce-wizard-grid-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /*
     * Tipo y "Qué observaste":
     * 3 columnas para evitar demasiadas filas.
     */
    .oce-subject-group-wizard .oce-wizard-grid,
    .oce-damage-group-wizard .oce-wizard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .oce-subject-choice,
    .oce-damage-choice {
        min-height: 62px;
        padding: 8px 10px;
    }

    .oce-subject-choice .oce-wizard-icon {
        font-size: 19px;
        margin-bottom: 3px;
    }

    .oce-subject-choice strong,
    .oce-damage-choice strong {
        font-size: 12px;
        line-height: 1.15;
    }

    /*
     * Si una cuadrícula de 3 columnas termina con
     * una sola opción, la centramos.
     */
    .oce-subject-group-wizard
        .oce-wizard-grid
        > .oce-wizard-choice:last-child:nth-child(3n+1),

    .oce-damage-group-wizard
        .oce-wizard-grid
        > .oce-wizard-choice:last-child:nth-child(3n+1) {
        grid-column: 2;
    }

    /*
     * Más aire entre contenido y navegación.
     */
    .oce-wizard-nav {
        flex-shrink: 0;
        margin-top: auto;
        padding-top: 18px;
    }

    .oce-wizard-nav button {
        min-height: 48px;
    }
}

/*
 * REFINAMIENTO VISUAL OJO CON ESTO
 */

.oce-wizard {
    max-width: 860px;
}

.oce-wizard-shell {
    background: #FBFAF6;
}

/* Cabecera */
.oce-wizard-report-id {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.oce-wizard-top-label {
    color: var(--green);
    font-weight: 800;
}

.oce-wizard-report-code {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .035em;
}

/*
 * Las respuestas dejan de ser blanco puro.
 */
.oce-wizard-choice {
    background: #F3F5F2;
    border-color: #D4DAD6;
}

.oce-wizard-choice:hover {
    background: #F7F4EC;
    border-color: var(--orange);
}

.oce-wizard-choice.is-selected {
    background: #FFF1E2;
    border-color: var(--orange);
}

/*
 * Atrás se distingue claramente de las respuestas
 * y del botón principal.
 */
.oce-back {
    background: #E5EAE7;
    border-color: #CBD3CF;
    color: var(--green);
}

.oce-back:hover {
    background: #DCE3DF;
}

/* Continuar sigue siendo la acción principal */
.oce-next {
    background: var(--orange);
    color: var(--text);
}

.oce-next:hover:not(:disabled) {
    filter: brightness(.97);
}

/* Campos */
.oce-context-block input[type="text"],
.oce-context-block select,
.oce-context-block textarea {
    background: #FFFFFF;
}

/*
 * Con el nuevo ancho podemos recuperar un poco
 * de tamaño tipográfico sin romper las 3 columnas.
 */
@media (min-width: 768px) {

    .oce-subject-choice strong,
    .oce-damage-choice strong {
        font-size: 13px;
    }
}

/*
 * ICONOGRAFÍA DEL WIZARD
 * Solo Patrimonio / Medioambiente conservan iconos.
 */

/* Tipo: solo texto */
.oce-subject-choice .oce-wizard-icon {
    display: none;
}

/* Cómo conociste el hecho: solo texto */
.oce-witness-choice .oce-wizard-icon {
    display: none;
}

/* Ajustamos las tarjetas al quitar los iconos */
.oce-subject-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.oce-witness-choice {
    display: flex;
    align-items: center;
    text-align: left;
}

/*
 * En selección múltiple mantenemos únicamente el ✓,
 * porque comunica una acción y no es decorativo.
 */
.oce-damage-choice .oce-choice-check {
    color: var(--orange);
}

/*
 * UBICACION / FECHA / RELATO
 */

.oce-country-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #E5EAE7;
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
}

.oce-wizard-form {
    display: grid;
    gap: 7px;
}

.oce-wizard-form label,
.oce-exact-date-wrap label {
    margin-top: 5px;
    color: var(--green);
    font-size: 13px;
    font-weight: 750;
}

.oce-wizard-form input,
.oce-wizard-form select,
.oce-wizard-form textarea,
.oce-exact-date-wrap input,
.oce-story-wrap textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D4DAD6;
    border-radius: 9px;
    background: #FFFFFF;
    color: var(--text);
    font: inherit;
}

.oce-wizard-form input,
.oce-wizard-form select,
.oce-exact-date-wrap input {
    min-height: 45px;
}

.oce-wizard-form textarea {
    min-height: 70px;
    resize: vertical;
}

.oce-optional {
    margin-left: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.oce-private-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.oce-time-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 9px;
}

.oce-time-choice {
    min-height: 64px;
    padding: 10px;
    border: 1px solid #D4DAD6;
    border-radius: 12px;
    background: #F3F5F2;
    color: var(--green);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.oce-time-choice:hover {
    border-color: var(--orange);
}

.oce-time-choice.is-selected {
    border: 2px solid var(--orange);
    background: #FFF1E2;
}

.oce-exact-date-wrap {
    margin-top: 18px;
}

.oce-exact-date-wrap input {
    margin-top: 7px;
}

.oce-story-wrap {
    position: relative;
}

.oce-story-wrap textarea {
    min-height: 275px;
    resize: none;
    line-height: 1.55;
}

.oce-story-counter {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.oce-evidence-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border: 2px dashed #D4DAD6;
    border-radius: 14px;
    background: #F3F5F2;
    color: var(--muted);
    font-weight: 700;
}

/*
 * Mantener las nuevas capas dentro del marco estable.
 */
@media (min-width: 768px) {

    .oce-wizard-form {
        max-height: 385px;
        overflow-y: auto;
        padding-right: 4px;
    }

    .oce-story-wrap textarea {
        min-height: 270px;
    }
}

@media (max-width: 767px) {

    .oce-time-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .oce-story-wrap textarea {
        min-height: 220px;
    }
}

/*
 * UBICACION SIN SCROLL INTERNO.
 * Todo debe quedar visible dentro de la capa.
 */
@media (min-width: 768px) {

    .oce-wizard-form {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }

    .oce-wizard-form textarea {
        min-height: 62px;
        max-height: 72px;
    }
}

/*
 * FIX QUIRÚRGICO · UBICACIÓN
 * Mantiene el marco estable sin scroll interno
 * y deja siempre visible Atrás / Continuar.
 */
@media (min-width: 768px) {

    .oce-wizard-step[data-step="6"] h1 {
        font-size: 32px;
        margin-bottom: 5px;
    }

    .oce-wizard-step[data-step="6"] .oce-wizard-help {
        margin-bottom: 10px;
    }

    .oce-wizard-step[data-step="6"] .oce-country-badge {
        min-height: 28px;
        margin-bottom: 7px;
        padding: 4px 11px;
    }

    .oce-wizard-step[data-step="6"] .oce-wizard-form {
        gap: 3px;
    }

    .oce-wizard-step[data-step="6"] .oce-wizard-form label {
        margin-top: 2px;
    }

    .oce-wizard-step[data-step="6"] .oce-wizard-form input,
    .oce-wizard-step[data-step="6"] .oce-wizard-form select {
        min-height: 40px;
        padding: 7px 10px;
    }

    .oce-wizard-step[data-step="6"] .oce-wizard-form textarea {
        min-height: 48px;
        max-height: 54px;
        padding: 7px 10px;
    }

    .oce-wizard-step[data-step="6"] .oce-private-note {
        margin-top: 3px;
        font-size: 11px;
    }

    .oce-wizard-step[data-step="6"] .oce-wizard-nav {
        padding-top: 9px;
    }

    .oce-wizard-step[data-step="6"] .oce-wizard-nav button {
        min-height: 44px;
    }
}


/*
 * Salida permanente del wizard hacia la cuenta ciudadana.
 * No reemplaza el botón Atrás de navegación entre pasos.
 */
.oce-wizard-report-id {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.oce-wizard-account-link {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--orange);
    border-radius: 10px;
    background: var(--orange);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.oce-wizard-account-link:hover,
.oce-wizard-account-link:focus-visible {
    background: #E9811C;
    border-color: #E9811C;
    color: var(--text);
    text-decoration: none;
}

.oce-wizard-report-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

@media (max-width: 620px) {

    .oce-wizard-report-id {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .oce-wizard-report-meta {
        gap: 7px;
    }
}

/*
 * AJUSTE FINO · BOTON "MIS REPORTES" EN MOVIL
 * Lo ancla claramente a la izquierda y ordena mejor
 * la cabecera del wizard en pantallas pequeñas.
 */
@media (max-width: 620px) {

    .oce-wizard-report-id {
        align-items: flex-start;
    }

    .oce-wizard-account-link {
        align-self: flex-start;
        margin-left: 0;
    }

    .oce-wizard-report-meta {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Ajuste fino final: acercar "Mis reportes" al borde en móvil */
@media (max-width: 620px) {
    .oce-wizard-account-link {
        margin-left: -12px;
    }
}
