/* ==========================================================================
   HOJA DE ESTILOS DEFINITIVA PARA LECCIONES (public/lecciones/lecciones.css)
   - PC: Anuncios estrechos en su ancho original y fijos al hacer scroll (sticky)
   - Móvil: Contenido arriba (order: 1), anuncios abajo (order: 2), banners
     intercalados bien integrados y cero cortes laterales.
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-family: 'Inter', 'Exo 2', sans-serif;
    background-color: #f4f7f9;
    color: #334155;
    margin: 0;
    padding: 0;
    overflow-x: clip;
}

.show-if-auth, .show-if-guest {
    display: none;
}

/* ==========================================================================
   1. ESCRITORIO (>1024px): ANUNCIOS ESTRECHOS ORIGINALES Y ANCLADOS (STICKY)
   ========================================================================== */
@media (min-width: 1025px) {
    .main-layout {
        align-items: flex-start !important;
    }

    .ads-side {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 20px !important;
        align-self: flex-start !important;
        height: fit-content !important;
    }

    .content-center {
        min-width: 0 !important;
    }
}

/* ==========================================================================
   2. MIGAS DE PAN (BREADCRUMBS)
   ========================================================================== */
.breadcrumb-nav {
    margin-bottom: 20px;
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 33, 71, 0.02);
    max-width: 100%;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #002147;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb-item a:hover {
    color: #ea580c;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #cbd5e1;
    user-select: none;
    font-weight: 600;
}

.breadcrumb-item.active {
    color: #ea580c;
    font-weight: 700;
}

/* ==========================================================================
   3. ÍNDICE RÁPIDO DE CONTENIDOS (TOC)
   ========================================================================== */
.toc-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #002147;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    max-width: 100%;
}

.toc-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #002147;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
    display: block;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.toc-grid a {
    color: #0369a1;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.toc-grid a:hover {
    background: #e0f2fe;
    color: #002147;
}

/* ==========================================================================
   4. TARJETA DE APUNTES Y CONTENIDO ACADÉMICO
   ========================================================================== */
.apuntes-card {
    background: #ffffff;
    padding: 34px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    border-top: 5px solid #002147;
    line-height: 1.75;
    color: #334155;
    text-align: left;
    box-shadow: 0 4px 16px rgba(0, 33, 71, 0.04);
    margin-bottom: 25px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.apuntes-card h2 {
    color: #002147;
    font-size: 1.55rem;
    margin-top: 0;
    margin-bottom: 14px;
    font-weight: 800;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 10px;
    scroll-margin-top: 85px;
}

.apuntes-card h3 {
    color: #002147;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 12px;
    font-weight: 700;
    scroll-margin-top: 85px;
}

.apuntes-card ul, .apuntes-card ol {
    padding-left: 20px;
    margin-bottom: 18px;
    max-width: 100%;
}

.apuntes-card li {
    margin-bottom: 10px;
}

/* ==========================================================================
   5. LÁMINA ESQUEMÁTICA Y BOTÓN DE ZOOM
   ========================================================================== */
.lamina-figure {
    text-align: center;
    margin: 0 0 28px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    max-width: 100%;
}

.lamina-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: zoom-in;
    display: block;
    margin: 0 auto;
}

.lamina-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.lamina-caption-text {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
    text-align: left;
}

.btn-zoom-lamina {
    background: #002147;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-zoom-lamina:hover {
    background: #0369a1;
}

/* ==========================================================================
   6. TABLAS ANATÓMICAS
   ========================================================================== */
.tabla-anatomica-wrapper,
.tabla-resumen-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 22px 0;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 33, 71, 0.04);
}

.tabla-anatomica,
.tabla-resumen-snc {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.88rem;
    text-align: left;
    table-layout: fixed;
}

.tabla-anatomica th,
.tabla-resumen-snc th {
    background: #002147;
    color: #ffffff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 800;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tabla-anatomica td,
.tabla-resumen-snc td {
    padding: 11px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: top;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tabla-anatomica tr:nth-child(even),
.tabla-resumen-snc tbody tr:nth-child(even) {
    background: #f8fafc;
}

/* ==========================================================================
   7. CAJAS DE MNEMOTECNIA, CLÍNICA, INFO Y NAVEGACIÓN SECUENCIAL
   ========================================================================== */
.info-box {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3182ce;
    margin: 18px 0;
    font-size: 0.96rem;
    max-width: 100%;
}

.mnemo-box {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin: 18px 0;
    font-size: 0.96rem;
    max-width: 100%;
}

.clinica-box {
    background: #fff5f5;
    padding: 18px 20px;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    border-top: 1px solid #fed7d7;
    border-right: 1px solid #fed7d7;
    border-bottom: 1px solid #fed7d7;
    margin: 22px 0;
    color: #7f1d1d;
    font-size: 0.96rem;
    max-width: 100%;
}

.related-lessons {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #3182ce;
    padding: 20px;
    border-radius: 12px;
    margin-top: 28px;
    max-width: 100%;
}

.lesson-seq-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #edf2f7;
    max-width: 100%;
}

.btn-seq-lesson {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #002147;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-seq-lesson:hover {
    background: #002147;
    color: #ffffff;
    border-color: #002147;
    transform: translateY(-1px);
}

/* ==========================================================================
   8. MODAL CUESTIONARIO Y LIGHTBOX HD
   ========================================================================== */
.modal-quiz {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 13, 22, 0.85);
    display: none;
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content-quiz {
    background: #ffffff !important;
    color: #1e293b !important;
    max-width: 660px;
    margin: 40px auto;
    padding: 32px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    text-align: left;
    box-sizing: border-box;
}

.btn-cerrar-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.quiz-option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.quiz-option-label:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 13, 22, 0.92);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.lightbox-overlay img {
    max-width: 96vw;
    max-height: 92vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   9. MÓVIL Y TABLET (<=1024px):
      - CONTENIDO ARRIBA DEL TODO (order: 1) Y ANUNCIOS AL FINAL (order: 2)
      - BANNER HORIZONTAL DE AFILIADO PERFECTAMENTE INTEGRADO SIN SOLAPARSE
   ========================================================================== */
@media (max-width: 1024px) {
    html, body {
        display: block !important; /* Anula el align-items:center de ../styles.css para no cortar lados */
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    /* Usamos flex-direction: column con align-items: stretch para que order:1 y order:2 funcionen */
    .main-layout {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* La lección (título H1, lámina y apuntes) sale SIEMPRE primero arriba del todo */
    .content-center {
        order: 1 !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        padding: 12px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Los anuncios laterales pasan debajo del contenido en móvil */
    .ads-side {
        order: 2 !important;
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: 440px !important;
        min-width: 0 !important;
        margin: 0 auto 15px auto !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 680px) {
    .apuntes-card {
        padding: 18px 14px !important;
    }

    .apuntes-card h2 {
        font-size: 1.3rem !important;
    }

    .apuntes-card h3 {
        font-size: 1.12rem !important;
    }

    .apuntes-card ul, .apuntes-card ol {
        padding-left: 16px !important;
    }

    .toc-grid {
        grid-template-columns: 1fr !important;
    }

    /* Maquetación limpia en móvil para el Banner Horizontal de Amazon (Cuaderno / Flashcards) */
    .content-center > div[style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 16px !important;
        gap: 14px !important;
    }

    .content-center > div[style*="justify-content: space-between"] > div:first-child {
        min-width: 0 !important;
        width: 100% !important;
        align-items: flex-start !important;
    }

    .content-center > div[style*="justify-content: space-between"] > div:last-child,
    .content-center > div[style*="justify-content: space-between"] > div:last-child a {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .content-center div[style*="min-width"] {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Los botones de juegos y test se apilan al 100% de ancho en móvil (nunca en columnas estrechas) */
    #zona-practica-test div[style*="display: flex"],
    #content-guest div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .content-center a.btn-juegos,
    .content-center button.btn-juegos {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* En móvil todas las tablas se apilan en tarjetas verticales 100% legibles */
    .tabla-anatomica-wrapper,
    .tabla-resumen-wrapper {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        overflow: visible !important;
    }

    .tabla-anatomica,
    .tabla-anatomica tbody,
    .tabla-anatomica tr,
    .tabla-anatomica td,
    .tabla-resumen-snc,
    .tabla-resumen-snc tbody,
    .tabla-resumen-snc tr,
    .tabla-resumen-snc td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .tabla-anatomica thead,
    .tabla-resumen-snc thead {
        display: none !important;
    }

    .tabla-anatomica tbody tr,
    .tabla-resumen-snc tbody tr {
        margin-bottom: 12px !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 12px !important;
        padding: 12px !important;
        background: #ffffff !important;
        box-shadow: 0 2px 6px rgba(0, 33, 71, 0.04) !important;
    }

    .tabla-anatomica td,
    .tabla-resumen-snc td {
        padding: 5px 0 !important;
        border-bottom: 1px dashed #edf2f7 !important;
        font-size: 0.88rem !important;
        line-height: 1.45 !important;
    }

    .tabla-anatomica td:last-child,
    .tabla-resumen-snc td:last-child {
        border-bottom: none !important;
    }

    .lesson-seq-nav {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .btn-seq-lesson {
        width: 100% !important;
        text-align: center !important;
    }

    .banner-dash-responsive {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 18px 16px !important;
    }

    .banner-dash-btn {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .modal-quiz {
        padding: 10px !important;
    }

    .modal-content-quiz {
        margin: 15px auto !important;
        padding: 22px 16px !important;
    }
}
/* =========================================================
   ATLAS INTERACTIVO UNIFICADO (Desktop + Móvil)
   Compatible con .atlas-*, .snp-*, .pc-* y .snc-*
   ========================================================= */
.atlas-box, .snp-atlas-box, .pc-atlas-box, .snc-atlas-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(0, 33, 71, 0.05);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.atlas-header, .snp-atlas-header, .pc-atlas-header, .snc-atlas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 12px;
}

.atlas-title, .snp-atlas-title, .pc-atlas-title, .snc-atlas-title {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    color: #002147;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
}

.atlas-badge, .snp-atlas-badge, .pc-atlas-badge, .snc-atlas-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.atlas-tabs, .snp-tabs, .pc-tabs, .snc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.atlas-tab-btn, .snp-tab-btn, .pc-tab-btn, .snc-tab-btn {
    flex: 1;
    min-width: 140px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.atlas-tab-btn:hover, .snp-tab-btn:hover, .pc-tab-btn:hover, .snc-tab-btn:hover {
    background: #e0f2fe;
    color: #002147;
    border-color: #7dd3fc;
}

.atlas-tab-btn.active, .snp-tab-btn.active, .pc-tab-btn.active, .snc-tab-btn.active {
    background: #002147;
    color: #ffffff;
    border-color: #002147;
    box-shadow: 0 3px 10px rgba(0, 33, 71, 0.2);
}

.atlas-panel, .snp-panel, .pc-panel, .snc-panel { display: none; }
.atlas-panel.active, .snp-panel.active, .pc-panel.active, .snc-panel.active { display: block; }

.atlas-hint, .snp-controls-hint, .pc-hint, .snc-hint {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.45;
}

.atlas-pills, .snp-nerve-pills, .pc-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.atlas-pill, .snp-pill, .pc-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #002147;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.atlas-pill:hover, .atlas-pill.active,
.snp-pill:hover, .snp-pill.active,
.pc-pill:hover, .pc-pill.active {
    background: #f59e0b;
    color: #111827;
    border-color: #d97706;
}

/* Contenedor SVG con scroll táctil suave en móvil */
.atlas-svg-wrap, .snp-svg-wrap, .pc-svg-wrap, .snc-svg-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}

.atlas-svg-wrap svg, .snp-svg-wrap svg, .pc-svg-wrap svg, .snc-svg-wrap svg {
    width: 100%;
    height: auto;
    display: block;
    min-width: 600px;
}

/* Rejilla nativa 100% responsive (ideal para móvil sin scroll horizontal) */
.atlas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 10px;
}

.atlas-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #0369a1;
    border-radius: 10px;
    padding: 11px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.atlas-card:hover {
    background: #e0f2fe;
    border-color: #0369a1;
    transform: translateY(-1px);
}

.atlas-card.selected {
    background: #fef3c7;
    border-color: #d97706;
    border-left-color: #ea580c;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.atlas-card.hidden-card { display: none; }
.atlas-card.is-neuro { border-left-color: #0369a1; }
.atlas-card.is-viscero { border-left-color: #16a34a; }
.atlas-card.is-alerta { border-left-color: #dc2626; }

.atlas-card-title {
    display: block;
    font-weight: 800;
    color: #002147;
    font-size: 0.88rem;
    margin-bottom: 3px;
}

.atlas-card-sub {
    display: block;
    font-size: 0.76rem;
    color: #475569;
    line-height: 1.35;
}

/* Tarjeta de información inferior */
.atlas-info-card, .snp-info-card, .pc-info-card, .snc-info-card {
    margin-top: 14px;
    background: #f0f9ff;
    border-left: 4px solid #0369a1;
    border-radius: 0 10px 10px 0;
    padding: 14px 16px;
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.atlas-info-card h4, .snp-info-card h4, .pc-info-card h4, .snc-info-card h4 {
    margin: 0 0 6px 0;
    color: #002147;
    font-size: 1rem;
    font-weight: 800;
}

.atlas-clinica, .snp-clinica, .pc-clinica, .snc-clinica {
    margin-top: 8px;
    color: #991b1b;
    font-weight: 600;
    font-size: 0.86rem;
}

/* === AJUSTES ESPECÍFICOS PARA MÓVIL (<= 768px) === */
@media (max-width: 768px) {
    .atlas-box, .snp-atlas-box, .pc-atlas-box, .snc-atlas-box {
        padding: 14px 12px;
        margin: 18px 0;
        border-radius: 14px;
    }
    .atlas-title, .snp-atlas-title, .pc-atlas-title, .snc-atlas-title {
        font-size: 1.05rem;
    }
    .atlas-tabs, .snp-tabs, .pc-tabs, .snc-tabs {
        gap: 6px;
    }
    .atlas-tab-btn, .snp-tab-btn, .pc-tab-btn, .snc-tab-btn {
        min-width: calc(50% - 6px);
        padding: 9px 8px;
        font-size: 0.78rem;
    }
    .atlas-svg-wrap, .snp-svg-wrap, .pc-svg-wrap, .snc-svg-wrap {
        padding: 8px;
        position: relative;
    }
    /* Aviso visual automático de scroll horizontal en móvil para SVGs anchos */
    .atlas-svg-wrap::after, .snp-svg-wrap::after, .pc-svg-wrap::after, .snc-svg-wrap::after {
        content: "← Desliza lateralmente para ver todo el esquema →";
        display: block;
        text-align: center;
        font-size: 0.72rem;
        font-weight: 700;
        color: #0369a1;
        background: #e0f2fe;
        padding: 5px 8px;
        border-radius: 6px;
        margin-top: 8px;
    }
    .atlas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .atlas-card {
        padding: 9px 10px;
    }
    .atlas-info-card, .snp-info-card, .pc-info-card, .snc-info-card {
        padding: 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .atlas-grid {
        grid-template-columns: 1fr;
    }
}