/* Ajuste de color sobre el diseño original, sin cambiar su composición. */
:root {
    --bg-dark: #111111;
    --bg-light: #171717;
    --bg-white: #292929;
    --surface-light: rgba(42, 42, 42, 0.55);
    --surface-solid: #222222;
    --surface-dark: #191919;
    --bg-glass: rgba(23, 23, 23, 0.85);
    --text-primary: #f5f5f5;
    --text-secondary: #d0d0d0;
    --text-muted: #a3a3a3;
    --accent-blue: #438b83;
    --accent-purple: #aa7a61;
}
body:not(.light-theme) .hero-section {
    background-color: #111111;
    background-image: linear-gradient(180deg, rgba(17,17,17,.72) 0%, rgba(17,17,17,.92) 100%), url('images/back_2.jpg');
}
body:not(.light-theme) .hero-panel { background: rgba(28,28,28,.75); }
.category-badge.blue { background: rgba(67,139,131,.12); }
.category-badge.purple { background: rgba(170,122,97,.12); }
#simulador, #categorias { scroll-margin-top: 90px; }

/* Funciones nuevas: guardado, bitácora y accesibilidad. */
[hidden] { display: none !important; }
.session-dashboard { padding-top: 24px; }
#bankStatus:empty { display: none; }
#bankStatus { color: var(--warning); padding: 12px 0; }
#resumePanel { padding: 20px; margin-bottom: 16px; border: 1px solid var(--border-card); border-radius: var(--radius-md); background: var(--surface-solid); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#resumePanel .station-label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 12px; }
#resumePanel p, #historyList p { color: var(--text-muted); font-size: 13px; }
#historyPanel { border-bottom: 1px solid var(--border-light); padding: 12px 0; }
#historyPanel summary { cursor: pointer; font-size: 14px; color: var(--text-secondary); }
#historyList { padding-top: 15px; }
.history-entry { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border-light); font-size: 13px; }
.modal-overlay:not(.active) { visibility: hidden; pointer-events: none; }
.modal-overlay.active { visibility: visible; }
.dialog-open { overflow: hidden; }
.modal-container { max-height: 88vh; overflow-y: auto; }
.mode-option-card[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 4px; }
.results-hero-card.practice { border-color: var(--border-card); background: var(--surface-solid); }
.answer-explanation { margin-top: 12px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.report-destination, #reportStatus { overflow-wrap: anywhere; font-size: 13px; margin: 15px 0; }
#reportStatus { color: var(--text-secondary); }
.audit-warning { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--warning); border-radius: 6px; background: rgba(245,158,11,.07); color: var(--text-secondary); font-size: .85rem; line-height: 1.6; }
.audit-warning strong { color: var(--warning); }
.audit-warning p { margin-top: 5px; }
@media(max-width:640px) {
    #resumePanel, .history-entry { align-items: flex-start; flex-direction: column; }
    .exam-topbar-actions, .question-header { flex-wrap: wrap; }
}
@media(prefers-reduced-motion:reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
