.elementor-widget-container .eael-protected-content-message{font-family:var( --e-global-typography-secondary-font-family ), Sans-serif;font-weight:var( --e-global-typography-secondary-font-weight );}.elementor-widget-container .protected-content-error-msg{font-family:var( --e-global-typography-secondary-font-family ), Sans-serif;font-weight:var( --e-global-typography-secondary-font-weight );}.elementor-5350 .elementor-element.elementor-element-65922a9{--display:grid;--e-con-grid-template-columns:repeat(1, 1fr);--e-con-grid-template-rows:repeat(1, 1fr);--grid-auto-flow:row;}.elementor-widget-shortcode .eael-protected-content-message{font-family:var( --e-global-typography-secondary-font-family ), Sans-serif;font-weight:var( --e-global-typography-secondary-font-weight );}.elementor-widget-shortcode .protected-content-error-msg{font-family:var( --e-global-typography-secondary-font-family ), Sans-serif;font-weight:var( --e-global-typography-secondary-font-weight );}body.elementor-page-5350{margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;}@media(max-width:1024px){.elementor-5350 .elementor-element.elementor-element-65922a9{--grid-auto-flow:row;}}@media(max-width:767px){.elementor-5350 .elementor-element.elementor-element-65922a9{--e-con-grid-template-columns:repeat(1, 1fr);--grid-auto-flow:row;}}/* Start custom CSS *//* =============================================================================
   CSS FINAL UNIFICADO - PORTAL DEL ESTUDIANTE MÓVIL
   Incluye TODOS los fixes necesarios
   ============================================================================= */

/* =============================================================================
   PARTE 1: LAYOUT GENERAL Y CONTENEDORES
   ============================================================================= */

.wcp-main {
    padding: 20px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.wcp-game-area {
    background: white !important;
    padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.wcp-variant-trees-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

.wcp-grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    width: 100% !important;
}

/* =============================================================================
   PARTE 2: TABLEROS - CENTRADO Y ANCHO COMPLETO
   ============================================================================= */

/* TODOS los tableros del sistema */
#wcp-board,
#wcp-editor-board,
#wcp-review-board,
#main-line-board,
#variant-board,
#study-board {
    width: 100% !important;
    max-width: 450px !important;
    margin: 0 auto !important; /* CENTRADO */
    display: block !important;
}

/* Contenedores de tableros - asegurar centrado */
.visual-editor-board,
.branch-board-section,
.study-board-section,
.wcp-grid-2 > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

/* Wrapper específico para centrar */
.board-wrapper {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

/* =============================================================================
   PARTE 3: RESPONSIVE MÓVIL (768px o menos)
   ============================================================================= */

@media (max-width: 768px) {
    
    /* Layout general */
    .wcp-app-container {
        flex-direction: column !important;
    }
    
    .wcp-sidebar {
        width: 100% !important;
        padding: 20px !important;
    }
    
    .wcp-main {
        padding: 15px !important;
    }
    
    .wcp-game-area {
        padding: 15px !important;
        margin: 0 !important;
    }
    
    /* GRIDS A UNA COLUMNA */
    .wcp-grid-2,
    .wcp-trees-grid,
    .visual-editor-container,
    .study-layout,
    .branch-visual-editor {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* TABLEROS - USAR TODO EL ANCHO */
    #wcp-board,
    #wcp-editor-board,
    #wcp-review-board,
    #main-line-board,
    #variant-board,
    #study-board {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    /* Contenedores de tableros */
    .visual-editor-board,
    .branch-board-section,
    .study-board-section {
        padding: 0 !important;
        align-items: center !important;
    }
    
    /* Controles */
    #exercise_body.elementor-page-5350 {
        font-size: 14px !important;
        padding: 8px !important;
    }
    
    #current_exercise_info {
        padding: 12px !important;
        font-size: 14px !important;
    }
    
    #pgn_navigation {
        padding: 10px !important;
    }
    
    #pgn_navigation button {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
    
    .board-controls {
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }
    
    .board-controls button,
    .board-controls .wcp-btn,
    .board-controls .wcp-btn-sm {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    #exercise_comment {
        font-size: 14px !important;
        min-height: 100px !important;
    }
    
    .pgn-display,
    .move-list {
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    .pgn-output {
        font-size: 12px !important;
        padding: 8px !important;
    }
    
    /* Lista de tareas */
    .wcp-task-list {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .wcp-task-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 15px !important;
        gap: 12px !important;
    }
    
    .wcp-task-item > div:last-child {
        width: 100% !important;
    }
    
    .wcp-task-item > div:last-child a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Secciones de información */
    .study-board-section,
    .info-card {
        padding: 10px !important;
    }
    
    .study-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .moves-grid {
        grid-template-columns: auto 1fr 1fr !important;
        gap: 3px 5px !important;
        font-size: 12px !important;
    }
    
    .move-display {
        padding: 8px !important;
        font-size: 13px !important;
    }
    
    /* Títulos */
    h1 {
        font-size: 22px !important;
    }
    
    h2,
    .study-header h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
}

/* =============================================================================
   PARTE 4: MÓVILES PEQUEÑOS (480px o menos)
   ============================================================================= */

@media (max-width: 480px) {
    
    .wcp-sidebar {
        padding: 15px !important;
    }
    
    .wcp-main {
        padding: 10px !important;
    }
    
    .wcp-game-area,
    .wcp-variant-trees-container {
        padding: 10px !important;
    }
    
    #exercise_body.elementor-page-5350 {
        font-size: 13px !important;
        padding: 6px !important;
    }
    
    #current_exercise_info {
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    #pgn_navigation button {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }
    
    .board-controls button,
    .board-controls .wcp-btn,
    .board-controls .wcp-btn-sm {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    
    #exercise_comment {
        font-size: 13px !important;
        min-height: 80px !important;
    }
    
    .tree-card {
        padding: 12px !important;
    }
    
    .moves-grid {
        font-size: 11px !important;
    }
    
    .move-white,
    .move-black {
        padding: 3px 6px !important;
        font-size: 11px !important;
    }
    
    h1 {
        font-size: 20px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
    
    h3 {
        font-size: 16px !important;
    }
    
    .status-badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}

/* =============================================================================
   PARTE 5: BOTONES - ESTILO CORRECTO
   ============================================================================= */

.wcp-btn,
.wcp-btn-sm,
button.wcp-btn,
button.wcp-btn-sm {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 10px 16px !important;
    background: #3498db !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    text-align: center !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.wcp-btn-sm,
button.wcp-btn-sm {
    padding: 8px 12px !important;
    font-size: 13px !important;
}

.wcp-btn:hover,
.wcp-btn-sm:hover,
button.wcp-btn:hover,
button.wcp-btn-sm:hover {
    background: #2980b9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    color: white !important;
    text-decoration: none !important;
}

.wcp-btn:active,
.wcp-btn-sm:active,
button.wcp-btn:active,
button.wcp-btn-sm:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* Botones de colores específicos */
.wcp-btn[style*="e74c3c"],
button[style*="background: #e74c3c"],
button[style*="background:#e74c3c"] {
    background: #e74c3c !important;
}

.wcp-btn[style*="e74c3c"]:hover,
button[style*="background: #e74c3c"]:hover,
button[style*="background:#e74c3c"]:hover {
    background: #c0392b !important;
}

.wcp-btn[style*="27ae60"],
button[style*="background: #27ae60"],
button[style*="background:#27ae60"] {
    background: #27ae60 !important;
}

.wcp-btn[style*="27ae60"]:hover,
button[style*="background: #27ae60"]:hover,
button[style*="background:#27ae60"]:hover {
    background: #229954 !important;
}

.wcp-btn[style*="95a5a6"],
button[style*="background: #95a5a6"],
button[style*="background:#95a5a6"] {
    background: #95a5a6 !important;
}

.wcp-btn[style*="95a5a6"]:hover,
button[style*="background: #95a5a6"]:hover,
button[style*="background:#95a5a6"]:hover {
    background: #7f8c8d !important;
}

.wcp-btn[style*="34495e"],
button[style*="background: #34495e"],
button[style*="background:#34495e"] {
    background: #34495e !important;
}

.wcp-btn[style*="34495e"]:hover,
button[style*="background: #34495e"]:hover,
button[style*="background:#34495e"]:hover {
    background: #2c3e50 !important;
}

.wcp-btn:focus,
.wcp-btn-sm:focus,
button.wcp-btn:focus,
button.wcp-btn-sm:focus {
    outline: 2px solid #3498db !important;
    outline-offset: 2px !important;
}

.wcp-btn:disabled,
.wcp-btn-sm:disabled,
button.wcp-btn:disabled,
button.wcp-btn-sm:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #bdc3c7 !important;
}

/* =============================================================================
   PARTE 6: LANDSCAPE Y OTROS CASOS ESPECIALES
   ============================================================================= */

@media (max-width: 768px) and (orientation: landscape) {
    .wcp-trees-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .wcp-grid-2,
    .visual-editor-container,
    .study-layout,
    .branch-visual-editor {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .study-layout {
        grid-template-columns: 1fr !important;
    }
}

/* =============================================================================
   PARTE 7: OPTIMIZACIÓN PARA TOUCH
   ============================================================================= */

@media (hover: none) and (pointer: coarse) {
    .wcp-btn,
    .board-controls button,
    .wcp-btn-sm,
    button {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .tree-card {
        padding: 15px !important;
        margin-bottom: 10px !important;
    }
    
    .wcp-task-item {
        padding: 18px !important;
    }
}

/* =============================================================================
   PARTE 8: PREVENIR PROBLEMAS
   ============================================================================= */

body,
.wcp-app-container,
.wcp-main,
.wcp-game-area,
.wcp-variant-trees-container {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

.wcp-main img,
.wcp-game-area img,
.wcp-variant-trees-container img {
    max-width: 100% !important;
    height: auto !important;
}

@media (max-width: 768px) {
    .wcp-table {
        font-size: 14px !important;
    }
    
    .wcp-table th,
    .wcp-table td {
        padding: 12px 10px !important;
    }
}

/* =============================================================================
   FIN DEL CSS
   ============================================================================= */
   
   <style>
        /* =============================================================================
           CSS FINAL UNIFICADO - PORTAL DEL ESTUDIANTE MÓVIL
           ============================================================================= */

        /* FORZAR ANCHO COMPLETO EN CONTENEDORES PADRE */
        .wcp-main, 
        .wcp-game-area,
        .wcp-app-container,
        .wcp-variant-trees-container {
            width: 100% !important;
            max-width: 100% !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            box-sizing: border-box !important;
        }

        /* LAYOUT GENERAL */
        .wcp-variant-trees-container {
            padding: 15px !important;
            overflow-x: hidden !important;
        }

        /* TABLEROS - CENTRADO Y ANCHO COMPLETO */
        #main-line-board,
        #study-board,
        [id^="variant-board-"] {
            width: 100% !important;
            max-width: 100% !important; 
            margin: 0 auto !important;
            display: block !important;
        }

        /* En pantallas grandes (Desktop), limitamos el tamaño para que no sea excesivo */
        @media (min-width: 769px) {
            #main-line-board,
            #study-board,
            [id^="variant-board-"] {
                max-width: 500px !important;
            }
            .wcp-variant-trees-container {
                padding: 20px !important;
            }
        }

        .visual-editor-board,
        .branch-board-section,
        .study-board-section {
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            width: 100% !important;
            padding: 0 !important;
        }

        /* GRIDS RESPONSIVOS */
        .wcp-trees-grid {
            display: grid !important;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
            gap: 20px !important;
            margin-top: 20px !important;
        }

        .visual-editor-container,
        .study-layout,
        .branch-visual-editor {
            display: grid !important;
            grid-template-columns: 1fr 1fr !important;
            gap: 30px !important;
        }

        /* ESTILO DE TARJETAS */
        .wcp-tree-card {
            background: white !important;
            border: 1px solid #e0e0e0 !important;
            border-radius: 12px !important;
            padding: 20px !important;
            display: flex !important;
            flex-direction: column !important;
            transition: all 0.3s ease !important;
        }

        /* BOTONES UNIFICADOS */
        .wcp-btn, .wcp-btn-sm {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 8px !important;
            padding: 12px 20px !important;
            background: #3498db !important;
            color: white !important;
            border: none !important;
            border-radius: 8px !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            cursor: pointer !important;
            text-decoration: none !important;
            transition: all 0.2s ease !important;
        }

        .wcp-btn-sm { padding: 8px 14px !important; font-size: 13px !important; }
        .wcp-btn-danger { background: #e74c3c !important; }
        .wcp-btn-success { background: #27ae60 !important; }

        /* RESPONSIVE MÓVIL (768px o menos) */
        @media (max-width: 768px) {
            /* Eliminamos el padding lateral para ganar espacio en el tablero y evitar corte en columna h */
            .wcp-main, .wcp-game-area, .wcp-variant-trees-container {
                padding-left: 0px !important;
                padding-right: 0px !important;
            }

            .visual-editor-board,
            .branch-board-section,
            .study-board-section {
                width: 100vw !important; /* Forzamos ancho de pantalla */
                overflow: hidden !important;
            }

            #main-line-board,
            #study-board,
            [id^="variant-board-"] {
                width: 98% !important; /* Dejamos un mínimo margen para los bordes */
                margin: 0 auto !important;
            }

            .wcp-grid-2,
            .visual-editor-container,
            .study-layout,
            .branch-visual-editor {
                grid-template-columns: 1fr !important;
                gap: 20px !important;
                padding: 10px !important;
            }

            .tree-card-actions {
                display: grid !important;
                grid-template-columns: 1fr 1fr !important;
                gap: 8px !important;
            }

            .wcp-btn { width: 100% !important; }

            .board-controls {
                display: flex !important;
                flex-wrap: wrap !important;
                gap: 8px !important;
                justify-content: center !important;
                width: 100% !important;
                padding: 10px 0 !important;
            }

            .pgn-display, .move-list, .info-card {
                padding: 15px !important;
                font-size: 14px !important;
                margin: 0 10px !important;
            }
        }

        /* MÓVILES PEQUEÑOS (480px o menos) */
        @media (max-width: 480px) {
            .tree-card-actions { grid-template-columns: 1fr !important; }
            h1 { font-size: 20px !important; margin: 0 10px !important; }
            h2 { font-size: 18px !important; margin: 0 10px !important; }
        }

        /* PREVENIR DESBORDE */
        body, .wcp-variant-trees-container {
            overflow-x: hidden !important;
        }
    </style>/* End custom CSS */